not yet autoloaded but everything work fine
This commit is contained in:
parent
3151533be5
commit
a27325bb3e
@ -48,15 +48,11 @@ namespace Emiliasmod.Content.Items.Accessories
|
|||||||
|
|
||||||
|
|
||||||
player.statDefense += DefenseBonus;
|
player.statDefense += DefenseBonus;
|
||||||
|
|
||||||
if (player.wet || player.honeyWet || player.lavaWet || player.shimmerWet) {
|
//player.arcticDivingGear = true;
|
||||||
player.arcticDivingGear = true;
|
player.accMerman = true;
|
||||||
player.accMerman = true;
|
player.wolfAcc = true;
|
||||||
}
|
player.accDivingHelm = true;
|
||||||
if (Main.dayTime == false)
|
|
||||||
{
|
|
||||||
player.wereWolf = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
player.buffImmune[BuffID.BrokenArmor] = true;
|
player.buffImmune[BuffID.BrokenArmor] = true;
|
||||||
player.buffImmune[BuffID.Bleeding] = 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 |
@ -4,7 +4,9 @@ using Terraria.ID;
|
|||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Emiliasmod.Content.Items.Ammo
|
namespace Emiliasmod.Content.Items.Ammo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//[Autoload(false)]
|
||||||
public class VacuumTube : ModItem {
|
public class VacuumTube : ModItem {
|
||||||
public override void SetDefaults() {
|
public override void SetDefaults() {
|
||||||
Item.width = 24;
|
Item.width = 24;
|
||||||
@ -15,8 +17,22 @@ namespace Emiliasmod.Content.Items.Ammo
|
|||||||
Item.crit = 0;
|
Item.crit = 0;
|
||||||
Item.value = Item.sellPrice(0, 15, 5, 0);
|
Item.value = Item.sellPrice(0, 15, 5, 0);
|
||||||
Item.rare = ItemRarityID.Red;
|
Item.rare = ItemRarityID.Red;
|
||||||
Item.shoot = ModContent.ProjectileType<SpaceBlasterProjectile>(); // The bolt it fires
|
Item.shoot = ModContent.ProjectileType<SpaceBlasterProjectile>();
|
||||||
Item.ammo = Item.type; // This item IS the ammo type
|
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.rare = ItemRarityID.Red;
|
||||||
//Item.UseSound = SoundID.ZombieMoan;
|
//Item.UseSound = SoundID.ZombieMoan;
|
||||||
Item.shoot = ModContent.ProjectileType<EmiliasWandProjectile>();
|
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.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.noUseGraphic = true; // Stops the item from drawing in your hands, for the aforementioned reason
|
||||||
Item.channel = true;
|
Item.channel = true;
|
||||||
|
|||||||
@ -41,9 +41,9 @@ namespace Emiliasmod.Content.Items.Weapon
|
|||||||
recipe.Register();
|
recipe.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int 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);
|
// base.PostDrawInWorld(spriteBatch, lightColor, alphaColor, rotation, scale, whoAmI);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,8 @@ namespace Emiliasmod.Content.Projectiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void SetDefaults() {
|
public override void SetDefaults() {
|
||||||
Projectile.width = 64;
|
Projectile.width = 14;
|
||||||
Projectile.height = 64;
|
Projectile.height = 16;
|
||||||
Projectile.friendly = true;
|
Projectile.friendly = true;
|
||||||
Projectile.tileCollide = false;
|
Projectile.tileCollide = false;
|
||||||
Projectile.penetrate = -1;
|
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.CritChance = 0;
|
||||||
Projectile.penetrate = -1;
|
Projectile.penetrate = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) {
|
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) {
|
||||||
if (JumpsLeft <= 0) {
|
if (JumpsLeft <= 0) {
|
||||||
Projectile.Kill();
|
Projectile.Kill();
|
||||||
@ -33,13 +32,21 @@ namespace Emiliasmod.Content.Projectiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
hitTargets.Add(target.whoAmI);
|
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--;
|
JumpsLeft--;
|
||||||
|
|
||||||
NPC nextTarget = FindNextTarget(target.Center, 400f); // 25 tile radius
|
NPC nextTarget = FindNextTarget(target.Center, 400f); // 25 tile radius
|
||||||
if (nextTarget != null) {
|
if (nextTarget != null) {
|
||||||
// Visual: Draw a line of dust between targets
|
// Visual: Draw a line of dust between targets
|
||||||
DrawLightning(target.Center, nextTarget.Center);
|
DrawLightning(target.Center, nextTarget.Center);
|
||||||
|
|
||||||
// Snap projectile to next target
|
// Snap projectile to next target
|
||||||
Projectile.Center = target.Center;
|
Projectile.Center = target.Center;
|
||||||
Projectile.velocity = (nextTarget.Center - target.Center).SafeNormalize(Vector2.Zero) * 16f;
|
Projectile.velocity = (nextTarget.Center - target.Center).SafeNormalize(Vector2.Zero) * 16f;
|
||||||
@ -54,7 +61,7 @@ namespace Emiliasmod.Content.Projectiles
|
|||||||
float closestDist = range;
|
float closestDist = range;
|
||||||
for (int i = 0; i < Main.maxNPCs; i++) {
|
for (int i = 0; i < Main.maxNPCs; i++) {
|
||||||
NPC npc = Main.npc[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);
|
float dist = Vector2.Distance(origin, npc.Center);
|
||||||
if (dist < closestDist) {
|
if (dist < closestDist) {
|
||||||
closestDist = dist;
|
closestDist = dist;
|
||||||
@ -73,7 +80,8 @@ namespace Emiliasmod.Content.Projectiles
|
|||||||
Dust d2 = Dust.NewDustPerfect(pos, DustID.Electric, Vector2.Zero, 100, Color.Cyan, 0.8f);
|
Dust d2 = Dust.NewDustPerfect(pos, DustID.Electric, Vector2.Zero, 100, Color.Cyan, 0.8f);
|
||||||
d1.noGravity = true;
|
d1.noGravity = true;
|
||||||
d2.noGravity = true;
|
d2.noGravity = true;
|
||||||
|
Lighting.AddLight(pos, Color.Cyan.ToVector3());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Terraria;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
namespace Emiliasmod
|
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.
|
// 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
|
public class Emiliasmod : Mod
|
||||||
{
|
{
|
||||||
|
//need to load all of the mods here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,6 +37,11 @@ Items: {
|
|||||||
DisplayName: Vacuum Tube
|
DisplayName: Vacuum Tube
|
||||||
Tooltip: ""
|
Tooltip: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuantumVacuumTube: {
|
||||||
|
Tooltip: ""
|
||||||
|
DisplayName: Quantum Vacuum Tube
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Projectiles: {
|
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