Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Buffs/MirrorBarrier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void SetDefaults()

public override void Update(Player player, ref int buffIndex)
{
PlayerFX p = player.GetModPlayer<PlayerFX>(mod);
PlayerFX p = player.GetModPlayer<PlayerFX>();
p.reflectingProjectiles = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Buffs/RapidRecovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void HealDamage(Player player, Mod mod, double damage)
public static void HealDamage(Player player, Mod mod, int damage)
{
int time = (int)(damage * (120f / healthPer2Secs));
int id = mod.BuffType<RapidRecovery>();
int id = ModContent.BuffType<RapidRecovery>();
player.AddBuff(id, time, false);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Buffs/SabreDance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public override void Update(Player player, ref int buffIndex)

public static void ApplySabreDance(Mod mod, Player player, int extraStrikes)
{
player.AddBuff(mod.BuffType<SabreDance>(), 2 + (extraStrikes * player.itemAnimationMax / 3));
player.AddBuff(ModContent.BuffType<SabreDance>(), 2 + (extraStrikes * player.itemAnimationMax / 3));
}
}
}
2 changes: 1 addition & 1 deletion Buffs/SpiritGuardian.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public override void SetDefaults()
}
public override void Update(Player player, ref int buffIndex)
{
int guardianID = mod.ProjectileType<Projectiles.SpiritGuardian>();
int guardianID = ModContent.ProjectileType<Projectiles.SpiritGuardian>();
player.GetModPlayer<PlayerFX>().starlightGuardian = player.ownedProjectileCounts[guardianID] > 0;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/AccretionEmblem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public override void UpdateAccessory(Player player, bool hideVisual)
player.statManaMax2 += 20;
if (hideVisual) return;
HeliosphereEmblem.DustVisuals(player, DustID.PinkFlame, 2f);
player.GetModPlayer<PlayerFX>(mod).lunarMagicVisual = true;
player.GetModPlayer<PlayerFX>().lunarMagicVisual = true;
}
}
}
4 changes: 2 additions & 2 deletions Items/Accessories/ChaosHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public override void AddRecipes()
{
if (!ModConf.EnableAccessories) return;
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType<DiscordHook>(), 1);
recipe.AddIngredient(ModContent.ItemType<DiscordHook>(), 1);
recipe.SetResult(this);
recipe.AddRecipe();
//Conversion from
recipe = new ModRecipe(mod);
recipe.AddIngredient(this, 1);
recipe.SetResult(mod.ItemType<DiscordHook>());
recipe.SetResult(ModContent.ItemType<DiscordHook>());
recipe.AddRecipe();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/HyperSash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void SetDefaults()
public override void AddRecipes() {
if (!ModConf.EnableFists) return;
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType<FightingSash>(), 1);
recipe.AddIngredient(ModContent.ItemType<FightingSash>(), 1);
recipe.AddIngredient(ItemID.ChlorophyteBar, 2);
recipe.AddTile(TileID.Loom);
recipe.SetResult(this, 1);
Expand Down
16 changes: 8 additions & 8 deletions Items/Accessories/LunarEmblem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public override void SetDefaults()
public override void AddRecipes() {
if (!ModConf.EnableEmblems) return;
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType<HeliosphereEmblem>());
recipe.AddIngredient(mod.ItemType<WormholeEmblem>());
recipe.AddIngredient(mod.ItemType<AccretionEmblem>());
recipe.AddIngredient(mod.ItemType<PerihelionEmblem>());
recipe.AddIngredient(mod.ItemType<SupernovaEmblem>());
recipe.AddIngredient(ModContent.ItemType<HeliosphereEmblem>());
recipe.AddIngredient(ModContent.ItemType<WormholeEmblem>());
recipe.AddIngredient(ModContent.ItemType<AccretionEmblem>());
recipe.AddIngredient(ModContent.ItemType<PerihelionEmblem>());
recipe.AddIngredient(ModContent.ItemType<SupernovaEmblem>());
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this, 1);
recipe.AddRecipe();
Expand All @@ -60,9 +60,9 @@ public override void UpdateAccessory(Player player, bool hideVisual)
player.thrownVelocity += 0.3f;
player.maxMinions += 1;
if (hideVisual) return;
player.GetModPlayer<PlayerFX>(mod).lunarRangeVisual = true;
player.GetModPlayer<PlayerFX>(mod).lunarMagicVisual = true;
player.GetModPlayer<PlayerFX>(mod).lunarThrowVisual = true;
player.GetModPlayer<PlayerFX>().lunarRangeVisual = true;
player.GetModPlayer<PlayerFX>().lunarMagicVisual = true;
player.GetModPlayer<PlayerFX>().lunarThrowVisual = true;

Vector2 hand = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f;
if (player.direction != 1) {
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/MirrorBadge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override void UpdateAccessory(Player player, bool hideVisual)
{
player.buffImmune[BuffID.Stoned] = true;

PlayerFX pFX = player.GetModPlayer<PlayerFX>(mod);
PlayerFX pFX = player.GetModPlayer<PlayerFX>();
if (pFX.reflectingProjectileDelay <= 0)
{
player.AddBuff(WeaponOut.BuffIDMirrorBarrier, 2);
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/Pavise.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override void AddRecipes() {

public override void UpdateAccessory(Player player, bool hideVisual)
{
PlayerFX modPlayer = player.GetModPlayer<PlayerFX>(mod);
PlayerFX modPlayer = player.GetModPlayer<PlayerFX>();
modPlayer.FrontDefence += 10;
modPlayer.frontNoKnockback = true;
}
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/PerihelionEmblem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public override void UpdateAccessory(Player player, bool hideVisual)
player.thrownVelocity += 0.3f;
if (hideVisual) return;
HeliosphereEmblem.DustVisuals(player, 75, 1.5f);
player.GetModPlayer<PlayerFX>(mod).lunarThrowVisual = true;
player.GetModPlayer<PlayerFX>().lunarThrowVisual = true;
}
}
}
6 changes: 3 additions & 3 deletions Items/Accessories/ScrapExosuit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public override void SetDefaults()
public override void AddRecipes() {
if (!ModConf.EnableFists) return;
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType<ScrapActuator>(), 1);
recipe.AddIngredient(mod.ItemType<ScrapFrame>(), 1);
recipe.AddIngredient(mod.ItemType<ScrapTransformer>(), 1);
recipe.AddIngredient(ModContent.ItemType<ScrapActuator>(), 1);
recipe.AddIngredient(ModContent.ItemType<ScrapFrame>(), 1);
recipe.AddIngredient(ModContent.ItemType<ScrapTransformer>(), 1);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this, 1);
recipe.AddRecipe();
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/WoodenShield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override void AddRecipes() {

public override void UpdateAccessory(Player player, bool hideVisual)
{
PlayerFX modPlayer = player.GetModPlayer<PlayerFX>(mod);
PlayerFX modPlayer = player.GetModPlayer<PlayerFX>();
modPlayer.DamageKnockbackThreshold += 10;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Items/Accessories/WormholeEmblem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public override void UpdateAccessory(Player player, bool hideVisual)
player.ammoCost80 = true;
if (hideVisual) return;
HeliosphereEmblem.DustVisuals(player, DustID.Vortex);
player.GetModPlayer<PlayerFX>(mod).lunarRangeVisual = true;
player.GetModPlayer<PlayerFX>().lunarRangeVisual = true;
}
}
}
12 changes: 6 additions & 6 deletions Items/Armour/ChampionLaurels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
private byte armourSet = 0;
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;if (body.type == mod.ItemType<HighPowerBody>() &&
legs.type == mod.ItemType<HighPowerLegs>())
armourSet = 0;if (body.type == ModContent.ItemType<HighPowerBody>() &&
legs.type == ModContent.ItemType<HighPowerLegs>())
{
armourSet = 1;
return true;
}
else if (body.type == mod.ItemType<HighDefBody>() &&
legs.type == mod.ItemType<HighDefLegs>())
else if (body.type == ModContent.ItemType<HighDefBody>() &&
legs.type == ModContent.ItemType<HighDefLegs>())
{
armourSet = 2;
return true;
}
else if (body.type == mod.ItemType<HighSpeedBody>() &&
legs.type == mod.ItemType<HighSpeedLegs>())
else if (body.type == ModContent.ItemType<HighSpeedBody>() &&
legs.type == ModContent.ItemType<HighSpeedLegs>())
{
armourSet = 3;
return true;
Expand Down
12 changes: 6 additions & 6 deletions Items/Armour/FistBoxingHelmet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;
if (body.type == mod.ItemType<FistPowerBody>() &&
legs.type == mod.ItemType<FistPowerLegs>())
if (body.type == ModContent.ItemType<FistPowerBody>() &&
legs.type == ModContent.ItemType<FistPowerLegs>())
{
armourSet = 1;
return true;
}
else if (body.type == mod.ItemType<FistDefBody>() &&
legs.type == mod.ItemType<FistDefLegs>())
else if (body.type == ModContent.ItemType<FistDefBody>() &&
legs.type == ModContent.ItemType<FistDefLegs>())
{
armourSet = 2;
return true;
}
else if (body.type == mod.ItemType<FistSpeedBody>() &&
legs.type == mod.ItemType<FistSpeedLegs>())
else if (body.type == ModContent.ItemType<FistSpeedBody>() &&
legs.type == ModContent.ItemType<FistSpeedLegs>())
{
armourSet = 3;
return true;
Expand Down
24 changes: 12 additions & 12 deletions Items/Armour/FistBoxingHelmetPlus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,38 +91,38 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;
if (body.type == mod.ItemType<FistPowerBody>() &&
legs.type == mod.ItemType<FistPowerLegs>())
if (body.type == ModContent.ItemType<FistPowerBody>() &&
legs.type == ModContent.ItemType<FistPowerLegs>())
{
armourSet = 1; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighPowerBody>() &&
legs.type == mod.ItemType<HighPowerLegs>())
else if (body.type == ModContent.ItemType<HighPowerBody>() &&
legs.type == ModContent.ItemType<HighPowerLegs>())
{
armourSet = 1; hardMode = true;
return true;
}
else if (body.type == mod.ItemType<FistDefBody>() &&
legs.type == mod.ItemType<FistDefLegs>())
else if (body.type == ModContent.ItemType<FistDefBody>() &&
legs.type == ModContent.ItemType<FistDefLegs>())
{
armourSet = 2; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighDefBody>() &&
legs.type == mod.ItemType<HighDefLegs>())
else if (body.type == ModContent.ItemType<HighDefBody>() &&
legs.type == ModContent.ItemType<HighDefLegs>())
{
armourSet = 2; hardMode = true;
return true;
}
else if (body.type == mod.ItemType<FistSpeedBody>() &&
legs.type == mod.ItemType<FistSpeedLegs>())
else if (body.type == ModContent.ItemType<FistSpeedBody>() &&
legs.type == ModContent.ItemType<FistSpeedLegs>())
{
armourSet = 3; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighSpeedBody>() &&
legs.type == mod.ItemType<HighSpeedLegs>())
else if (body.type == ModContent.ItemType<HighSpeedBody>() &&
legs.type == ModContent.ItemType<HighSpeedLegs>())
{
armourSet = 3; hardMode = true;
return true;
Expand Down
12 changes: 6 additions & 6 deletions Items/Armour/FistMartialHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;
if (body.type == mod.ItemType<FistPowerBody>() &&
legs.type == mod.ItemType<FistPowerLegs>())
if (body.type == ModContent.ItemType<FistPowerBody>() &&
legs.type == ModContent.ItemType<FistPowerLegs>())
{
armourSet = 1;
return true;
}
else if (body.type == mod.ItemType<FistDefBody>() &&
legs.type == mod.ItemType<FistDefLegs>())
else if (body.type == ModContent.ItemType<FistDefBody>() &&
legs.type == ModContent.ItemType<FistDefLegs>())
{
armourSet = 2;
return true;
}
else if (body.type == mod.ItemType<FistSpeedBody>() &&
legs.type == mod.ItemType<FistSpeedLegs>())
else if (body.type == ModContent.ItemType<FistSpeedBody>() &&
legs.type == ModContent.ItemType<FistSpeedLegs>())
{
armourSet = 3;
return true;
Expand Down
12 changes: 6 additions & 6 deletions Items/Armour/FistMasterHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;
if (body.type == mod.ItemType<HighPowerBody>() &&
legs.type == mod.ItemType<HighPowerLegs>())
if (body.type == ModContent.ItemType<HighPowerBody>() &&
legs.type == ModContent.ItemType<HighPowerLegs>())
{
armourSet = 1;
return true;
}
else if (body.type == mod.ItemType<HighDefBody>() &&
legs.type == mod.ItemType<HighDefLegs>())
else if (body.type == ModContent.ItemType<HighDefBody>() &&
legs.type == ModContent.ItemType<HighDefLegs>())
{
armourSet = 2;
return true;
}
else if (body.type == mod.ItemType<HighSpeedBody>() &&
legs.type == mod.ItemType<HighSpeedLegs>())
else if (body.type == ModContent.ItemType<HighSpeedBody>() &&
legs.type == ModContent.ItemType<HighSpeedLegs>())
{
armourSet = 3;
return true;
Expand Down
24 changes: 12 additions & 12 deletions Items/Armour/FistVeteranHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,38 +91,38 @@ public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
public override bool IsArmorSet(Item head, Item body, Item legs)
{
armourSet = 0;
if (body.type == mod.ItemType<FistPowerBody>() &&
legs.type == mod.ItemType<FistPowerLegs>())
if (body.type == ModContent.ItemType<FistPowerBody>() &&
legs.type == ModContent.ItemType<FistPowerLegs>())
{
armourSet = 1; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighPowerBody>() &&
legs.type == mod.ItemType<HighPowerLegs>())
else if (body.type == ModContent.ItemType<HighPowerBody>() &&
legs.type == ModContent.ItemType<HighPowerLegs>())
{
armourSet = 1; hardMode = true;
return true;
}
else if (body.type == mod.ItemType<FistDefBody>() &&
legs.type == mod.ItemType<FistDefLegs>())
else if (body.type == ModContent.ItemType<FistDefBody>() &&
legs.type == ModContent.ItemType<FistDefLegs>())
{
armourSet = 2; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighDefBody>() &&
legs.type == mod.ItemType<HighDefLegs>())
else if (body.type == ModContent.ItemType<HighDefBody>() &&
legs.type == ModContent.ItemType<HighDefLegs>())
{
armourSet = 2; hardMode = true;
return true;
}
else if (body.type == mod.ItemType<FistSpeedBody>() &&
legs.type == mod.ItemType<FistSpeedLegs>())
else if (body.type == ModContent.ItemType<FistSpeedBody>() &&
legs.type == ModContent.ItemType<FistSpeedLegs>())
{
armourSet = 3; hardMode = false;
return true;
}
else if (body.type == mod.ItemType<HighSpeedBody>() &&
legs.type == mod.ItemType<HighSpeedLegs>())
else if (body.type == ModContent.ItemType<HighSpeedBody>() &&
legs.type == ModContent.ItemType<HighSpeedLegs>())
{
armourSet = 3; hardMode = true;
return true;
Expand Down
10 changes: 5 additions & 5 deletions Items/Armour/LunarFistHead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public override void UpdateEquip(Player player)

public override bool IsArmorSet(Item head, Item body, Item legs)
{
return head.type == mod.ItemType<LunarFistHead>()
&& body.type == mod.ItemType<LunarFistBody>()
&& legs.type == mod.ItemType<LunarFistLegs>();
return head.type == ModContent.ItemType<LunarFistHead>()
&& body.type == ModContent.ItemType<LunarFistBody>()
&& legs.type == ModContent.ItemType<LunarFistLegs>();
}

public override void UpdateArmorSet(Player player)
Expand All @@ -77,8 +77,8 @@ public override void UpdateArmorSet(Player player)
if (player.whoAmI == Main.myPlayer)
{
// Based on Stardust Guardian spawn
int buffID = mod.BuffType<Buffs.SpiritGuardian>();
int guardianID = mod.ProjectileType<Projectiles.SpiritGuardian>();
int buffID = ModContent.BuffType<Buffs.SpiritGuardian>();
int guardianID = ModContent.ProjectileType<Projectiles.SpiritGuardian>();
if (player.FindBuffIndex(buffID) == -1) player.AddBuff(buffID, 1, true);
if (player.ownedProjectileCounts[guardianID] < 1) // No guardian? spawn one
Projectile.NewProjectile(
Expand Down
Loading