diff --git a/Content/Items/Accessories/Spacesuit.cs b/Content/Items/Accessories/Spacesuit.cs index fb52fe3..07ba70c 100644 --- a/Content/Items/Accessories/Spacesuit.cs +++ b/Content/Items/Accessories/Spacesuit.cs @@ -48,15 +48,11 @@ namespace Emiliasmod.Content.Items.Accessories player.statDefense += DefenseBonus; - - if (player.wet || player.honeyWet || player.lavaWet || player.shimmerWet) { - player.arcticDivingGear = true; - player.accMerman = true; - } - if (Main.dayTime == false) - { - player.wereWolf = true; - } + + //player.arcticDivingGear = true; + player.accMerman = true; + player.wolfAcc = true; + player.accDivingHelm = true; player.buffImmune[BuffID.BrokenArmor] = true; player.buffImmune[BuffID.Bleeding] = true; diff --git a/Content/Items/Ammo/QuantumVacuumTube.png b/Content/Items/Ammo/QuantumVacuumTube.png new file mode 100644 index 0000000..6fbc63a Binary files /dev/null and b/Content/Items/Ammo/QuantumVacuumTube.png differ diff --git a/Content/Items/Ammo/VacuumTube.cs b/Content/Items/Ammo/VacuumTube.cs index bb3cf9d..51adfe1 100644 --- a/Content/Items/Ammo/VacuumTube.cs +++ b/Content/Items/Ammo/VacuumTube.cs @@ -4,7 +4,9 @@ using Terraria.ID; using Terraria.ModLoader; namespace Emiliasmod.Content.Items.Ammo -{ +{ + + //[Autoload(false)] public class VacuumTube : ModItem { public override void SetDefaults() { Item.width = 24; @@ -15,8 +17,22 @@ namespace Emiliasmod.Content.Items.Ammo Item.crit = 0; Item.value = Item.sellPrice(0, 15, 5, 0); Item.rare = ItemRarityID.Red; - Item.shoot = ModContent.ProjectileType(); // The bolt it fires - Item.ammo = Item.type; // This item IS the ammo type + Item.shoot = ModContent.ProjectileType(); + Item.ammo = ModContent.ItemType(); + } + } + public class QuantumVacuumTube : ModItem {//for debug purpose while overheat isn't created + public override void SetDefaults() { + Item.width = 24; + Item.height = 24; + Item.maxStack = 1; + Item.consumable = false; + Item.knockBack = 0f; + Item.crit = 0; + Item.value = Item.sellPrice(0, 15, 5, 0); + Item.rare = ItemRarityID.Red; + Item.shoot = ModContent.ProjectileType(); + Item.ammo = ModContent.ItemType(); } } } diff --git a/Content/Items/Weapon/EmiliasWand.cs b/Content/Items/Weapon/EmiliasWand.cs index 48f11e2..72a31bb 100644 --- a/Content/Items/Weapon/EmiliasWand.cs +++ b/Content/Items/Weapon/EmiliasWand.cs @@ -36,7 +36,7 @@ namespace Emiliasmod.Content.Items.Weapon Item.rare = ItemRarityID.Red; //Item.UseSound = SoundID.ZombieMoan; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 24f; // Adjusts how far away from the player to hold the projectile + Item.shootSpeed = 32f; // Adjusts how far away from the player to hold the projectile Item.noMelee = true; // Turns off damage from the item itself, as we have a projectile Item.noUseGraphic = true; // Stops the item from drawing in your hands, for the aforementioned reason Item.channel = true; diff --git a/Content/Items/Weapon/SpaceBlaster.cs b/Content/Items/Weapon/SpaceBlaster.cs index df7aedd..fbbef4c 100644 --- a/Content/Items/Weapon/SpaceBlaster.cs +++ b/Content/Items/Weapon/SpaceBlaster.cs @@ -41,9 +41,9 @@ namespace Emiliasmod.Content.Items.Weapon recipe.Register(); } - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) - { - base.PostDrawInWorld(spriteBatch, lightColor, alphaColor, rotation, scale, whoAmI); - } + //public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + //{ + // base.PostDrawInWorld(spriteBatch, lightColor, alphaColor, rotation, scale, whoAmI); + //} } } diff --git a/Content/Projectiles/EmiliasWandProjectile.cs b/Content/Projectiles/EmiliasWandProjectile.cs index 76e3f25..ff463c3 100644 --- a/Content/Projectiles/EmiliasWandProjectile.cs +++ b/Content/Projectiles/EmiliasWandProjectile.cs @@ -14,8 +14,8 @@ namespace Emiliasmod.Content.Projectiles } public override void SetDefaults() { - Projectile.width = 64; - Projectile.height = 64; + Projectile.width = 14; + Projectile.height = 16; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.penetrate = -1; diff --git a/Content/Projectiles/EmiliasWandProjectile.png b/Content/Projectiles/EmiliasWandProjectile.png index 4013782..6c2700d 100644 Binary files a/Content/Projectiles/EmiliasWandProjectile.png and b/Content/Projectiles/EmiliasWandProjectile.png differ diff --git a/Content/Projectiles/SpaceBlasterProjectile.cs b/Content/Projectiles/SpaceBlasterProjectile.cs index bad4229..df8ea9e 100644 --- a/Content/Projectiles/SpaceBlasterProjectile.cs +++ b/Content/Projectiles/SpaceBlasterProjectile.cs @@ -24,7 +24,6 @@ namespace Emiliasmod.Content.Projectiles Projectile.CritChance = 0; Projectile.penetrate = -1; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { if (JumpsLeft <= 0) { Projectile.Kill(); @@ -33,13 +32,21 @@ namespace Emiliasmod.Content.Projectiles } hitTargets.Add(target.whoAmI); + target.AddBuff(BuffID.Electrified, 600); + target.AddBuff(BuffID.Frozen, 600); + target.AddBuff(BuffID.OnFire, 120); + //Vector2 launchVelocity = new Vector2(0, -0.5f); + //launchVelocity = launchVelocity.RotatedBy(MathHelper.PiOver2); + //Vector2 pos = target.Center; + //pos.Y += 4f; + //Projectile.NewProjectileDirect(Projectile.InheritSource(Projectile), pos, launchVelocity, ProjectileID.ThunderSpearShot, 100, 0, -1, 44); JumpsLeft--; NPC nextTarget = FindNextTarget(target.Center, 400f); // 25 tile radius if (nextTarget != null) { // Visual: Draw a line of dust between targets DrawLightning(target.Center, nextTarget.Center); - + // Snap projectile to next target Projectile.Center = target.Center; Projectile.velocity = (nextTarget.Center - target.Center).SafeNormalize(Vector2.Zero) * 16f; @@ -54,7 +61,7 @@ namespace Emiliasmod.Content.Projectiles float closestDist = range; for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if ((npc.CanBeChasedBy() || npc.netID == NPCID.TargetDummy) && !hitTargets.Contains(npc.whoAmI)) { + if (npc.CanBeChasedBy() && !hitTargets.Contains(npc.whoAmI)) { float dist = Vector2.Distance(origin, npc.Center); if (dist < closestDist) { closestDist = dist; @@ -73,7 +80,8 @@ namespace Emiliasmod.Content.Projectiles Dust d2 = Dust.NewDustPerfect(pos, DustID.Electric, Vector2.Zero, 100, Color.Cyan, 0.8f); d1.noGravity = true; d2.noGravity = true; + Lighting.AddLight(pos, Color.Cyan.ToVector3()); } - } + } } } diff --git a/Emiliasmod.cs b/Emiliasmod.cs index 4281002..20c532f 100644 --- a/Emiliasmod.cs +++ b/Emiliasmod.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; +using Terraria; using Terraria.ModLoader; namespace Emiliasmod @@ -10,6 +12,6 @@ namespace Emiliasmod // Please read https://github.com/tModLoader/tModLoader/wiki/Basic-tModLoader-Modding-Guide#mod-skeleton-contents for more information about the various files in a mod. public class Emiliasmod : Mod { - + //need to load all of the mods here } } diff --git a/Localization/en-US_Mods.Emiliasmod.hjson b/Localization/en-US_Mods.Emiliasmod.hjson index e7958c1..9126f15 100644 --- a/Localization/en-US_Mods.Emiliasmod.hjson +++ b/Localization/en-US_Mods.Emiliasmod.hjson @@ -37,6 +37,11 @@ Items: { DisplayName: Vacuum Tube Tooltip: "" } + + QuantumVacuumTube: { + Tooltip: "" + DisplayName: Quantum Vacuum Tube + } } Projectiles: { diff --git a/README.md b/README.md index b74b389..9b5df7b 100644 --- a/README.md +++ b/README.md @@ -70,3 +70,12 @@ Item: { ``` } } + +Things to do : use no autoload : https://github.com/JavidPack/AllTheWalls good ref +REF: +https://github.com/tModLoader/tModLoader/wiki/Open-Source-Mods +https://github.com/tModLoader/tModLoader/blob/stable/ExampleMod/Content/Items/Weapons/ExampleSpecificAmmoGun.cs#L82 +https://github.com/pathofyggdrasil-stack/tModLoader/blob/1.4.4/ExampleMod/ExampleMod.ModCalls.cs +https://github.com/tModLoader/tModLoader/wiki/Basic-Projectile#animationmultiple-frames +https://github.com/tModLoader/tModLoader/wiki/Useful-Resources +FK someone already made a mods, but not really the direction i wanted to go to, i will try to make my mod work with the other one