This commit is contained in:
Merkalto committed 2022-06-11 17:48:10 -05:00
commit 146e96d98d
17 files changed
+65 -16

No files matched your search

+6
View File
@@ -5859,6 +5859,12 @@ namespace CalamityMod.CalPlayer
Player.waist = (sbyte)EquipLoader.GetEquipSlot(Mod, "DaedalusBreastplate", EquipType.Waist);
}
if (Player.body == EquipLoader.GetEquipSlot(Mod, "DemonshadeBreastplate", EquipType.Body))
{
//Use an extra front layers to have the players arms draw above the shoulderpads that droop
Player.front = (sbyte)EquipLoader.GetEquipSlot(Mod, "DemonshadeBreastplate", EquipType.Front);
}
bool victideBreastplateVisible = Player.body == EquipLoader.GetEquipSlot(Mod, "VictideBreastplate", EquipType.Body);
//Give the player faulds if either the body armor or the leggings are equipped
if (victideBreastplateVisible || Player.legs == EquipLoader.GetEquipSlot(Mod, "VictideGreaves", EquipType.Legs))
+1 -1
View File
@@ -304,7 +304,7 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Main.maxNPCs; ++i)
{
NPC npc = Main.npc[i];
if (npc is null || !npc.IsAnEnemy() || npc.Calamity().DoesNotGenerateRage)
if (npc is null || !npc.IsAnEnemy() || !npc.Calamity().ProvidesProximityRage)
continue;
// Take the longer of the two directions for the NPC's hitbox to be generous.
@@ -3,12 +3,21 @@ using CalamityMod.Items.Materials;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Armor.Demonshade
{
[AutoloadEquip(EquipType.Body)]
public class DemonshadeBreastplate : ModItem
{
public override void Load()
{
if (Main.netMode != NetmodeID.Server)
{
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Armor/Demonshade/DemonshadeBreastplate_Arms", EquipType.Front, this);
}
}
public override void SetStaticDefaults()
{
SacrificeTotal = 1;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

+8
View File
@@ -1,5 +1,6 @@
using Terraria.ModLoader;
using Terraria.ID;
using Terraria;
namespace CalamityMod.Items.Armor.Vanity
{
@@ -10,6 +11,13 @@ namespace CalamityMod.Items.Armor.Vanity
{
SacrificeTotal = 1;
DisplayName.SetDefault("Calamitous Robes");
if (Main.netMode != NetmodeID.Server)
{
var equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Body);
ArmorIDs.Body.Sets.HidesArms[equipSlot] = true;
ArmorIDs.Body.Sets.HidesTopSkin[equipSlot] = true;
}
}
public override void SetDefaults()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

+3 -3
View File
@@ -163,8 +163,8 @@ namespace CalamityMod.NPCs
public int shopAlertAnimTimer = 0;
public int shopAlertAnimFrame = 0;
// Rage interactions
public bool DoesNotGenerateRage = false;
// Set to false for this NPC to be unable to generate proximity Rage, regardless of other factors
public bool ProvidesProximityRage = true;
// NewAI
internal const int maxAIMod = 4;
@@ -361,7 +361,7 @@ namespace CalamityMod.NPCs
myClone.shopAlertAnimTimer = shopAlertAnimTimer;
myClone.shopAlertAnimFrame = shopAlertAnimFrame;
myClone.DoesNotGenerateRage = DoesNotGenerateRage;
myClone.ProvidesProximityRage = ProvidesProximityRage;
myClone.newAI = new float[maxAIMod];
for (int i = 0; i < maxAIMod; ++i)
+1 -1
View File
@@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.ExoMechs
NPC.aiStyle = AIType = -1;
NPC.knockBackResist = 0f;
NPC.DeathSound = SoundID.NPCDeath14;
NPC.Calamity().DoesNotGenerateRage = true;
NPC.Calamity().ProvidesProximityRage = false;
}
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
+1 -1
View File
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Other
NPC.knockBackResist = 0f;
NPC.netAlways = true;
NPC.aiStyle = -1;
NPC.Calamity().DoesNotGenerateRage = true;
NPC.Calamity().ProvidesProximityRage = false;
NPC.Calamity().DoesNotDisappearInBossRush = true;
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToCold = true;
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Other
NPC.knockBackResist = 0f;
NPC.netAlways = true;
NPC.aiStyle = -1;
NPC.Calamity().DoesNotGenerateRage = true;
NPC.Calamity().ProvidesProximityRage = false;
NPC.Calamity().DoesNotDisappearInBossRush = true;
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToCold = true;
+1 -1
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Other
NPC.netAlways = true;
NPC.aiStyle = -1;
NPC.canGhostHeal = false;
NPC.Calamity().DoesNotGenerateRage = true;
NPC.Calamity().ProvidesProximityRage = false;
NPC.Calamity().DoesNotDisappearInBossRush = true;
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToCold = true;
@@ -205,6 +205,14 @@ namespace CalamityMod.Projectiles.Melee
public void SimulateSegments()
{
// TODO -- Ozzatron put this here to stop multiplayer errors.
if (Segments is null)
{
Segments = new List<VerletSimulatedSegment>(SegmentCount);
for (int i = 0; i < SegmentCount; ++i)
Segments[i] = new VerletSimulatedSegment(Projectile.Center, false);
}
Segments[0].oldPosition = Segments[0].position;
Segments[0].position = Projectile.Center;
@@ -327,7 +335,17 @@ namespace CalamityMod.Projectiles.Melee
public override void ReceiveExtraAI(BinaryReader reader)
{
Segments[SegmentCount - 1].position = reader.ReadVector2();
Vector2 sentPos = reader.ReadVector2();
if (Segments is not null)
{
try
{
Segments[SegmentCount - 1].position = sentPos;
}
catch (Exception) {
CalamityMod.Instance.Logger.Warn("IbanPlay Victide Cnidarian Position Netcode failed safely");
}
}
}
}
}
+2 -2
View File
@@ -464,7 +464,7 @@ namespace CalamityMod.Projectiles.Summon
int x = xPos + direction + (int) Projectile.velocity.X;
for (int y = yPos; y < yPos + Projectile.height / 16 + 1; ++y)
{
if (WorldGen.SolidTile(x, y))
if (WorldGen.InWorld(x, y) && WorldGen.SolidTile(x, y))
flag3 = true;
}
}
@@ -480,7 +480,7 @@ namespace CalamityMod.Projectiles.Summon
x = (int)Projectile.Right.X / 16;
int y = (int)Projectile.Bottom.Y / 16;
Tile tile = Main.tile[x, y];
if (WorldGen.SolidTile(x, y) || tile.IsHalfBlock || tile.Slope > 0 || TileID.Sets.Platforms[tile.TileType] && tile.HasTile && !tile.HasActuator)
if ((WorldGen.InWorld(x, y) && WorldGen.SolidTile(x, y)) || tile.IsHalfBlock || tile.Slope > 0 || TileID.Sets.Platforms[tile.TileType] && tile.HasTile && !tile.HasActuator)
{
try
{
+13 -5
View File
@@ -44,8 +44,13 @@ namespace CalamityMod.Systems
// Player variable, always finds the closest player relative to the center of the map
int closestPlayer = Player.FindClosest(new Vector2(Main.maxTilesX / 2, (float)Main.worldSurface / 2f) * 16f, 0, 0);
Player player = Main.player[closestPlayer];
CalamityPlayer modPlayer = player.Calamity();
Player player = null;
CalamityPlayer modPlayer = null;
if (closestPlayer > -1)
{
player = Main.player[closestPlayer];
modPlayer = player.Calamity();
}
// Force boss rush to off if necessary.
if (!BossRushEvent.DeactivateStupidFuckingBullshit)
@@ -75,9 +80,12 @@ namespace CalamityMod.Systems
BossRushEvent.Update();
// Handle conditional summons.
TrySpawnArmoredDigger(player, modPlayer);
TrySpawnDungeonGuardian(player);
TrySpawnAEoW(player, modPlayer);
if (player is not null)
{
TrySpawnArmoredDigger(player, modPlayer);
TrySpawnDungeonGuardian(player);
TrySpawnAEoW(player, modPlayer);
}
// Very, very, very rarely display a Lorde joke text if the system clock is set to April Fools Day.
if (Main.rand.NextBool(100000000) && DateTime.Now.Month == 4 && DateTime.Now.Day == 1)