not yet autoloaded but everything work fine
This commit is contained in:
parent
3151533be5
commit
a27325bb3e
@ -49,14 +49,10 @@ 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;
|
||||
|
||||
BIN
Content/Items/Ammo/QuantumVacuumTube.png
Normal file
BIN
Content/Items/Ammo/QuantumVacuumTube.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 389 B |
@ -5,6 +5,8 @@ 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<SpaceBlasterProjectile>(); // The bolt it fires
|
||||
Item.ammo = Item.type; // This item IS the ammo type
|
||||
Item.shoot = ModContent.ProjectileType<SpaceBlasterProjectile>();
|
||||
Item.ammo = ModContent.ItemType<VacuumTube>();
|
||||
}
|
||||
}
|
||||
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<SpaceBlasterProjectile>();
|
||||
Item.ammo = ModContent.ItemType<VacuumTube>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ namespace Emiliasmod.Content.Items.Weapon
|
||||
Item.rare = ItemRarityID.Red;
|
||||
//Item.UseSound = SoundID.ZombieMoan;
|
||||
Item.shoot = ModContent.ProjectileType<EmiliasWandProjectile>();
|
||||
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;
|
||||
|
||||
@ -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);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 355 B |
@ -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,6 +32,14 @@ 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
|
||||
@ -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,6 +80,7 @@ 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,6 +37,11 @@ Items: {
|
||||
DisplayName: Vacuum Tube
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
QuantumVacuumTube: {
|
||||
Tooltip: ""
|
||||
DisplayName: Quantum Vacuum Tube
|
||||
}
|
||||
}
|
||||
|
||||
Projectiles: {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user