Skip to content

Commit

Permalink
remove preview/stable stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
direwolf420 committed May 1, 2022
1 parent d8a57c5 commit 1b440e2
Show file tree
Hide file tree
Showing 67 changed files with 1 addition and 634 deletions.
15 changes: 0 additions & 15 deletions AssPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,7 @@ private void SpawnSoulTemp()

if (!checkIfAlive)
{
#if TML_2022_03
AssUtils.NewProjectile(Player.GetProjectileSource_Item(tempSoulMinion), Player.Center.X, Player.Center.Y, -Player.velocity.X, Player.velocity.Y - 6f, spawnedType, spawnedDamage, EverhallowedLantern.BaseKB, preSync: PreSyncSoulTemp);
#else
AssUtils.NewProjectile(Player.GetSource_Accessory(tempSoulMinion), Player.Center.X, Player.Center.Y, -Player.velocity.X, Player.velocity.Y - 6f, spawnedType, spawnedDamage, EverhallowedLantern.BaseKB, preSync: PreSyncSoulTemp);
#endif
}
}
}
Expand Down Expand Up @@ -726,26 +722,15 @@ public override void ModifyHitPvpWithProj(Projectile proj, Player target, ref in
assPlayer.SpawnSoulTemp();
}

#if TML_2022_03
public override void ModifyWeaponDamage(Item item, ref StatModifier damage, ref float flat)
#else
public override void ModifyWeaponDamage(Item item, ref StatModifier damage)
#endif
{
if (empoweringBuff && !item.CountsAsClass(DamageClass.Summon) && item.damage > 0) damage += empoweringStep; //summon damage gets handled in EmpoweringBuffGlobalProjectile
}

#if TML_2022_03
public override void ModifyWeaponCrit(Item item, ref int crit)
{
crit += (int)(10 * empoweringStep);
}
#else
public override void ModifyWeaponCrit(Item item, ref float crit)
{
crit += 10 * empoweringStep;
}
#endif

public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
{
Expand Down
4 changes: 0 additions & 4 deletions Base/AssExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ public static void AssSpawnPetIfNeeded(this Player player, ref bool petBool, int

if (player.whoAmI == Main.myPlayer)
{
#if TML_2022_03
Projectile.NewProjectile(player.GetProjectileSource_Buff(buffIndex), player.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2), petProjID, 0, 0f, player.whoAmI);
#else
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2), petProjID, 0, 0f, player.whoAmI);
#endif
}
}

Expand Down
11 changes: 0 additions & 11 deletions Base/AssUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,8 @@ private static void HandlePlayerStatModifiers(IEntitySource spawnSource, Project
{
if (spawnSource is EntitySource_ItemUse itemUseSource && itemUseSource.Entity is Player player)
{
#if TML_2022_03
#else
projectile.CritChance += player.GetWeaponCrit(itemUseSource.Item);
projectile.ArmorPenetration += player.GetWeaponArmorPenetration(itemUseSource.Item);
#endif
}
}

Expand All @@ -547,11 +544,7 @@ public static void DropItemInstanced(NPC npc, Vector2 Position, Vector2 HitboxSi
{
if (Main.netMode == NetmodeID.Server)
{
#if TML_2022_03
int item = Item.NewItem(npc.GetItemSource_Loot(), (int)Position.X, (int)Position.Y, (int)HitboxSize.X, (int)HitboxSize.Y, itemType, itemStack, true);
#else
int item = Item.NewItem(npc.GetSource_Loot(), (int)Position.X, (int)Position.Y, (int)HitboxSize.X, (int)HitboxSize.Y, itemType, itemStack, true);
#endif
Main.timeItemSlotCannotBeReusedFor[item] = 54000;
for (int p = 0; p < Main.maxPlayers; p++)
{
Expand All @@ -569,11 +562,7 @@ public static void DropItemInstanced(NPC npc, Vector2 Position, Vector2 HitboxSi
if (condition != null && condition(npc, Main.LocalPlayer) ||
condition == null)

#if TML_2022_03
Item.NewItem(npc.GetItemSource_Loot(), (int)Position.X, (int)Position.Y, (int)HitboxSize.X, (int)HitboxSize.Y, itemType, itemStack);
#else
Item.NewItem(npc.GetSource_Loot(), (int)Position.X, (int)Position.Y, (int)HitboxSize.X, (int)HitboxSize.Y, itemType, itemStack);
#endif
}
//npc.value = 0f;
}
Expand Down
4 changes: 0 additions & 4 deletions Base/SlimePets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ public static float GetSpawnChance(Player player, SpawnConditionType type = Spaw
public static float CuteSlimeSpawnChance(NPCSpawnInfo spawnInfo, SpawnConditionType type, float customFactor = 1f)
{
//AssUtils.Print("spawn chance at " + (Main.netMode == NetmodeID.Server ? "Server" : "Client"));
#if TML_2022_03
Player player = spawnInfo.player;
#else
Player player = spawnInfo.Player;
#endif
float spawnChance = GetSpawnChance(player, type) * customFactor;
if (AssUtils.AnyNPCs(x => x.ModNPC is CuteSlimeBaseNPC)) spawnChance *= 0.5f;
//AssUtils.Print(spawnChance);
Expand Down
4 changes: 0 additions & 4 deletions Buffs/NPCs/Bosses/Harvester/BabyHarvesterBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ public override void ModifyBuffTip(ref string tip, ref int rare)
}
}

#if TML_2022_03

#else
public override bool PreDraw(SpriteBatch spriteBatch, int buffIndex, ref BuffDrawParams drawParams)
{
if (!TryGetBabyHarvester(out BabyHarvesterProj babyHarvester))
Expand All @@ -91,7 +88,6 @@ public override bool PreDraw(SpriteBatch spriteBatch, int buffIndex, ref BuffDra

return true;
}
#endif

public override void Update(Player player, ref int buffIndex)
{
Expand Down
5 changes: 1 addition & 4 deletions Buffs/Pets/ChunkyandMeatballBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ public override void Update(Player player, ref int buffIndex)
PetBool(player) = true;
if (player.whoAmI == Main.myPlayer)
{
#if TML_2022_03
var spawnSource = player.GetProjectileSource_Buff(buffIndex);
#else
var spawnSource = player.GetSource_Buff(buffIndex);
#endif

int chunky = ModContent.ProjectileType<ChunkyProj>();
bool chunkyNotSpawned = player.ownedProjectileCounts[chunky] <= 0;
int meatball = ModContent.ProjectileType<MeatballProj>();
Expand Down
4 changes: 0 additions & 4 deletions Buffs/Pets/PetQueenSlimeBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ public override void Update(Player player, ref int buffIndex)
if (player.whoAmI == Main.myPlayer)
{
int air = ModContent.ProjectileType<PetQueenSlimeAirProj>();
#if TML_2022_03
var spawnSource = player.GetProjectileSource_Buff(buffIndex);
#else
var spawnSource = player.GetSource_Buff(buffIndex);
#endif
if (player.ownedProjectileCounts[air] <= 0)
{
Projectile.NewProjectile(spawnSource, player.Center.X, player.Center.Y, 0, -0.5f, air, 0, 0f, player.whoAmI);
Expand Down
4 changes: 0 additions & 4 deletions Buffs/Pets/PetSunMoonBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ public override void Update(Player player, ref int buffIndex)
petPlayer.PetMoon = true;
if (player.whoAmI == Main.myPlayer)
{
#if TML_2022_03
var source = player.GetProjectileSource_Buff(buffIndex);
#else
var source = player.GetSource_Buff(buffIndex);
#endif

int sun = ModContent.ProjectileType<PetSunProj>();
bool moreThanOneSun = player.ownedProjectileCounts[sun] > 0;
Expand Down
4 changes: 0 additions & 4 deletions Buffs/Pets/TinyTwinsBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ public override void Update(Player player, ref int buffIndex)
PetBool(player) = true;
if (player.whoAmI == Main.myPlayer)
{
#if TML_2022_03
var source = player.GetProjectileSource_Buff(buffIndex);
#else
var source = player.GetSource_Buff(buffIndex);
#endif

int spaz = ModContent.ProjectileType<TinySpazmatismProj>();
if (player.ownedProjectileCounts[spaz] <= 0)
Expand Down
4 changes: 0 additions & 4 deletions Buffs/Pets/WallFragmentBuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ public override void Update(Player player, ref int buffIndex)
PetBool(player) = true;
if (player.whoAmI == Main.myPlayer)
{
#if TML_2022_03
var source = player.GetProjectileSource_Buff(buffIndex);
#else
var source = player.GetSource_Buff(buffIndex);
#endif

int eye1 = ModContent.ProjectileType<WallFragmentEye1>();
if (player.ownedProjectileCounts[eye1] <= 0)
Expand Down
10 changes: 0 additions & 10 deletions Gores/PaperGore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,12 @@ public override void SetStaticDefaults()
GoreID.Sets.DisappearSpeed[Type] = 6;
}

#if TML_2022_03

public override void OnSpawn(Gore gore)
{
gore.Frame = new SpriteFrame(1, 8, 0, (byte)Main.rand.Next(8));
gore.frameCounter = (byte)Main.rand.Next(8);
gore.timeLeft = 120;
}
#else
public override void OnSpawn(Gore gore, IEntitySource source)
{
gore.Frame = new SpriteFrame(1, 8, 0, (byte)Main.rand.Next(8));
gore.frameCounter = (byte)Main.rand.Next(8);
gore.timeLeft = 120;
}
#endif

public override bool Update(Gore gore)
{
Expand Down
10 changes: 0 additions & 10 deletions Gores/PaperScrapGore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,13 @@ public override void SetStaticDefaults()
GoreID.Sets.DisappearSpeed[Type] = 7;
}

#if TML_2022_03
public override void OnSpawn(Gore gore)
{
gore.velocity += new Vector2(Main.rand.NextFloat() - 0.5f, Main.rand.NextFloat() * MathHelper.TwoPi);
gore.Frame = new SpriteFrame(1, 8, 0, (byte)Main.rand.Next(8));
gore.frameCounter = (byte)Main.rand.Next(8);
//UpdateType = 910;
}
#else
public override void OnSpawn(Gore gore, IEntitySource source)
{
gore.velocity += new Vector2(Main.rand.NextFloat() - 0.5f, Main.rand.NextFloat() * MathHelper.TwoPi);
gore.Frame = new SpriteFrame(1, 8, 0, (byte)Main.rand.Next(8));
gore.frameCounter = (byte)Main.rand.Next(8);
//UpdateType = 910;
}
#endif

public override bool Update(Gore gore)
{
Expand Down
4 changes: 0 additions & 4 deletions Items/Accessories/Useful/SigilOfLastStand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ public override void ModifyTooltips(List<TooltipLine> tooltips)
if (tooltips[i].Name == "SocialDesc")
{
inVanitySlot = true;
#if TML_2022_03
tooltips[i].text = "Cooldown will go down while in social slot";
#else
tooltips[i].Text = "Cooldown will go down while in social slot";
#endif
break;
}
}
Expand Down
4 changes: 0 additions & 4 deletions Items/Accessories/Useful/SigilOfPainSuppression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ public override void ModifyTooltips(List<TooltipLine> tooltips)
if (tooltips[i].Name == "SocialDesc")
{
inVanitySlot = true;
#if TML_2022_03
tooltips[i].text = "Cooldown will go down while in social slot";
#else
tooltips[i].Text = "Cooldown will go down while in social slot";
#endif
break;
}
}
Expand Down
4 changes: 0 additions & 4 deletions Items/Accessories/Useful/SigilOfRetreat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ public override void ModifyTooltips(List<TooltipLine> tooltips)
if (tooltips[i].Name == "SocialDesc")
{
inVanitySlot = true;
#if TML_2022_03
tooltips[i].text = "Cooldown will go down while in social slot";
#else
tooltips[i].Text = "Cooldown will go down while in social slot";
#endif
break;
}
}
Expand Down
4 changes: 0 additions & 4 deletions Items/Armor/SoulSaviorHeaddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ public override void UpdateArmorSet(Player player)
mPlayer.soulSaviorArmor = true;

StatModifier summoner = player.GetDamage(DamageClass.Summon);
#if TML_2022_03
float factor = (player.maxMinions / 10f) * player.GetDamage(DamageClass.Summon);
#else
float factor = summoner.ApplyTo(player.maxMinions / 10f);
#endif

player.thorns = factor;

Expand Down
4 changes: 0 additions & 4 deletions Items/CaughtDungeonSoul.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ public override void ModifyTooltips(List<TooltipLine> tooltips)
// Can use item
tooltips.Add(new TooltipLine(Mod, "MakeNPC", "Use it to spawn a soul for the Soul Harvester to eat")
{
#if TML_2022_03
overrideColor = new Color(35, 200, 254)
#else
OverrideColor = new Color(35, 200, 254)
#endif
});
}
else
Expand Down
4 changes: 0 additions & 4 deletions Items/Consumables/HarvesterTreasureBag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ public override bool CanRightClick()

public override void OpenBossBag(Player player)
{
#if TML_2022_03
var source = player.GetItemSource_OpenItem(Type);
#else
var source = player.GetSource_OpenItem(Type);
#endif
//We have to replicate the expert drops from Harvester here via QuickSpawnItem
player.QuickSpawnItem(source, ItemID.Bone, Main.rand.Next(40, 61));
player.QuickSpawnItem(source, ModContent.ItemType<DesiccatedLeather>());
Expand Down
4 changes: 0 additions & 4 deletions Items/EverburningGlobalItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ private void ShootCandleDust(Item item, AssPlayer mPlayer)

//reduce but not prevent spam from boomerang related weapons or modded damage classes
if (player.ownedProjectileCounts[ModContent.ProjectileType<CandleDustDummy>()] < 2)
#if TML_2022_03
Projectile.NewProjectile(player.GetProjectileSource_Item(item), pos, velo + player.velocity, ModContent.ProjectileType<CandleDustDummy>(), 0, 0f, player.whoAmI);
#else
Projectile.NewProjectile(player.GetSource_ItemUse(item), pos, velo + player.velocity, ModContent.ProjectileType<CandleDustDummy>(), 0, 0f, player.whoAmI);
#endif
}

public override void MeleeEffects(Item item, Player player, Rectangle hitbox)
Expand Down
4 changes: 0 additions & 4 deletions Items/Fun/GuideVoodoorang.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ public override void PostUpdate()

byte plr = Player.FindClosest(Item.position, Item.width, Item.height);
Player player = Main.player[plr];
#if TML_2022_03
Item.NewItem(player.GetItemSource_Misc(-1), player.getRect(), ModContent.ItemType<GuideVoodoorang>());
#else
Item.NewItem(player.GetSource_Misc("GuideVoodoorang"), player.getRect(), ModContent.ItemType<GuideVoodoorang>());
#endif

//despawns upon wof spawn
Item.TurnToAir();
Expand Down
4 changes: 0 additions & 4 deletions Items/PetAccessories/PetAccessoryClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,7 @@ public override void ModifyTooltips(List<TooltipLine> tooltips)
{
tooltips.Add(new TooltipLine(Mod, "NoUse", "You have no summoned slime to equip this on")
{
#if TML_2022_03
overrideColor = Color.OrangeRed
#else
OverrideColor = Color.OrangeRed
#endif
});
}
}
Expand Down
15 changes: 0 additions & 15 deletions Items/Pets/PetDestroyerItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ public static void Spawn(Player player, int buffIndex = -1, Item item = null)
}

IEntitySource source;
#if TML_2022_03
if (buffIndex > -1)
{
source = player.GetProjectileSource_Buff(buffIndex);
}
else if (item != null)
{
source = player.GetProjectileSource_Item(item);
}
else
{
return;
}
#else
if (buffIndex > -1)
{
source = player.GetSource_Buff(buffIndex);
Expand All @@ -60,7 +46,6 @@ public static void Spawn(Player player, int buffIndex = -1, Item item = null)
{
return;
}
#endif

int probe = ModContent.ProjectileType<PetDestroyerProbe>();
for (int i = 0; i < Main.maxProjectiles; i++)
Expand Down
15 changes: 0 additions & 15 deletions Items/Pets/PetEaterofWorldsItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ public static void Spawn(Player player, int buffIndex = -1, Item item = null)
}

IEntitySource source;
#if TML_2022_03
if (buffIndex > -1)
{
source = player.GetProjectileSource_Buff(buffIndex);
}
else if (item != null)
{
source = player.GetProjectileSource_Item(item);
}
else
{
return;
}
#else
if (buffIndex > -1)
{
source = player.GetSource_Buff(buffIndex);
Expand All @@ -60,7 +46,6 @@ public static void Spawn(Player player, int buffIndex = -1, Item item = null)
{
return;
}
#endif

for (int i = 0; i < Main.maxProjectiles; i++)
{
Expand Down
Loading

0 comments on commit 1b440e2

Please sign in to comment.