Moved FurnitureSetupUtils under Tiles Namespace
This commit is contained in:
1 parent
806e3f7763
commit
9022d3c4c1
300 files changed
+914
-926
No files matched your search
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<Items.Placeables.Furniture.AbyssTreasureChest>());
|
||||
AddMapEntry(new Color(71, 49, 41), CalamityUtils.GetItemName<Items.Placeables.Furniture.AbyssTreasureChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(71, 49, 41), CalamityUtils.GetItemName<Items.Placeables.Furniture.AbyssTreasureChest>(), FurnitureCommon.GetMapChestName);
|
||||
DustType = DustID.Water;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = 1;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.Furniture.AbyssTreasureChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<Items.Placeables.Furniture.AbyssTreasureChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<Items.Placeables.Furniture.AbyssTreasureChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<Items.Placeables.Furniture.AbyssTreasureChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<Items.Placeables.Furniture.AbyssTreasureChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
|
||||
// Locked Chest stuff
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
if (tile.TileFrameY != 0)
|
||||
top--;
|
||||
|
||||
return CalamityUtils.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
return FurnitureCommon.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,9 +15,8 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
TileType = (ushort)ModContent.TileType<RustyChestTile>();
|
||||
|
||||
this.SetUpChest(ModContent.ItemType<RustyChest>());
|
||||
AddMapEntry(new Color(113, 90, 71), CalamityUtils.GetItemName<RustyChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(113, 90, 71), CalamityUtils.GetItemName<RustyChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -29,9 +28,9 @@ namespace CalamityMod.Tiles.Abyss
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<RustyChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<RustyChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<RustyChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<RustyChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<RustyChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Tiles.Abyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ namespace CalamityMod.Tiles.Astral
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = 1;
|
||||
|
||||
public string MapChestName(string name, int i, int j) => CalamityUtils.GetMapChestName(name, i, j);
|
||||
public string MapChestName(string name, int i, int j) => FurnitureCommon.GetMapChestName(name, i, j);
|
||||
public override ushort GetMapOption(int i, int j) => (ushort)(Main.tile[i, j].TileFrameX / 36);
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY)
|
||||
{
|
||||
int option = frameX / 36;
|
||||
return this.GetLocalization("MapEntry" + option);
|
||||
}
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<AstralChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<AstralChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<AstralChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<AstralChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
|
||||
// Locked Chest stuff
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
{
|
||||
top--;
|
||||
}
|
||||
return CalamityUtils.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
return FurnitureCommon.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Tiles.Crags
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<AgedSecurityChest>());
|
||||
AddMapEntry(new Color(130, 119, 115), CalamityUtils.GetItemName<AgedSecurityChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(130, 119, 115), CalamityUtils.GetItemName<AgedSecurityChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -26,9 +26,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<AgedSecurityChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<AgedSecurityChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<AgedSecurityChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<AgedSecurityChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<AgedSecurityChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
}
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.DraedonStructures.CagedLights
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<SecurityChest>());
|
||||
AddMapEntry(new Color(130, 119, 115), CalamityUtils.GetItemName<SecurityChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(130, 119, 115), CalamityUtils.GetItemName<SecurityChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
@@ -26,9 +26,9 @@ namespace CalamityMod.Tiles.DraedonStructures
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<SecurityChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<SecurityChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<SecurityChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<SecurityChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<SecurityChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,12 +45,12 @@ namespace CalamityMod.Tiles.Furniture.Fountains
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ namespace CalamityMod.Tiles.Furniture.Fountains
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ namespace CalamityMod.Tiles.Furniture.Fountains
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ namespace CalamityMod.Tiles.Furniture.Fountains
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ namespace CalamityMod.Tiles.Furniture.Fountains
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 4);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 4);
|
||||
SoundEngine.PlaySound(SoundID.Mech, new Vector2(i * 16, j * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.Furniture
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<ThaumaticChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<ThaumaticChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ namespace CalamityMod.Tiles.Furniture
|
||||
info.AnchorTilePosition.Y = j;
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.Furniture.ZenithThrone>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.Furniture.ZenithThrone>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.BedRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssBed>());
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssChest>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -24,9 +24,9 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<Items.Placeables.FurnitureAbyss.AbyssChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<Items.Placeables.FurnitureAbyss.AbyssChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<Items.Placeables.FurnitureAbyss.AbyssChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<Items.Placeables.FurnitureAbyss.AbyssChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
{
|
||||
return CalamityUtils.ClockRightClick();
|
||||
return FurnitureCommon.ClockRightClick();
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
@@ -40,6 +40,6 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
}
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssClock>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssClock>());
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssDresser>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssDresser>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssDresser>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -24,9 +24,9 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureAbyss.AbyssDresser>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver<Items.Placeables.FurnitureAbyss.AbyssDresser>();
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar<Items.Placeables.FurnitureAbyss.AbyssDresser>();
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.DresserMouseOver<Items.Placeables.FurnitureAbyss.AbyssDresser>();
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.DresserMouseFar<Items.Placeables.FurnitureAbyss.AbyssDresser>();
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick();
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.DresserRightClick();
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,11 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.BenchSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssSofa>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssSofa>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.BedRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<AcidwoodBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<AcidwoodBed>());
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.BenchSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<AcidwoodBench>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<AcidwoodBench>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,11 +56,11 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info, 40, true, true);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info, 40, true, true);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<AcidwoodChair>(), true);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<AcidwoodChair>(), true);
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<AcidwoodChest>(), true);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<AcidwoodChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<AcidwoodChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<AcidwoodChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<AcidwoodChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<AcidwoodChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<AcidwoodChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<AcidwoodChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool RightClick(int x, int y) => CalamityUtils.ClockRightClick();
|
||||
public override bool RightClick(int x, int y) => FurnitureCommon.ClockRightClick();
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<AcidwoodClock>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<AcidwoodClock>());
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<AcidwoodDresser>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<AcidwoodDresser>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<AcidwoodDresser>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<AcidwoodDresser>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver<AcidwoodDresser>();
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar<AcidwoodDresser>();
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.DresserMouseOver<AcidwoodDresser>();
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.DresserMouseFar<AcidwoodDresser>();
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick();
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.DresserRightClick();
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 2);
|
||||
}
|
||||
|
||||
public override void GetTileFlameData(int i, int j, ref TileDrawing.TileFlameData tileFlameData)
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -64,6 +64,6 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientBed>());
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
|
||||
public override void GetTileFlameData(int i, int j, ref TileDrawing.TileFlameData tileFlameData)
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientDresser>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAncient.AncientDresser>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAncient.AncientDresser>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureAncient.AncientDresser>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver<Items.Placeables.FurnitureAncient.AncientDresser>();
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar<Items.Placeables.FurnitureAncient.AncientDresser>();
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.DresserMouseOver<Items.Placeables.FurnitureAncient.AncientDresser>();
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.DresserMouseFar<Items.Placeables.FurnitureAncient.AncientDresser>();
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick();
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.DresserRightClick();
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
{
|
||||
return CalamityUtils.ClockRightClick();
|
||||
return FurnitureCommon.ClockRightClick();
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
@@ -67,6 +67,6 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientMonolith>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientMonolith>());
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.BenchSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientSofa>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientSofa>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.BedRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenBed>());
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -25,15 +25,15 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = 1;
|
||||
|
||||
public string MapChestName(string name, int i, int j) => CalamityUtils.GetMapChestName(name, i, j);
|
||||
public string MapChestName(string name, int i, int j) => FurnitureCommon.GetMapChestName(name, i, j);
|
||||
public override ushort GetMapOption(int i, int j) => (ushort)(Main.tile[i, j].TileFrameX / 36);
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY)
|
||||
{
|
||||
int option = frameX / 36;
|
||||
return this.GetLocalization("MapEntry" + option);
|
||||
}
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<Items.Placeables.FurnitureAshen.AshenChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<Items.Placeables.FurnitureAshen.AshenChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<Items.Placeables.FurnitureAshen.AshenChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<Items.Placeables.FurnitureAshen.AshenChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
|
||||
// Locked Chest stuff
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
{
|
||||
top--;
|
||||
}
|
||||
return CalamityUtils.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
return FurnitureCommon.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenDresser>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAshen.AshenDresser>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureAshen.AshenDresser>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureAshen.AshenDresser>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver<Items.Placeables.FurnitureAshen.AshenDresser>();
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar<Items.Placeables.FurnitureAshen.AshenDresser>();
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.DresserMouseOver<Items.Placeables.FurnitureAshen.AshenDresser>();
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.DresserMouseFar<Items.Placeables.FurnitureAshen.AshenDresser>();
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick();
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.DresserRightClick();
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 2);
|
||||
}
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
{
|
||||
return CalamityUtils.ClockRightClick();
|
||||
return FurnitureCommon.ClockRightClick();
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenMonolith>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenMonolith>());
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.BenchSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenSofa>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenSofa>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.BedRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBed>());
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,11 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.BenchSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBench>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.BenchMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicBench>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicChest>(), true);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<Items.Placeables.FurnitureBotanic.BotanicChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<Items.Placeables.FurnitureBotanic.BotanicChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<Items.Placeables.FurnitureBotanic.BotanicChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<Items.Placeables.FurnitureBotanic.BotanicChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
{
|
||||
return CalamityUtils.ClockRightClick();
|
||||
return FurnitureCommon.ClockRightClick();
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
@@ -37,6 +37,6 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
}
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicClock>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicClock>());
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpDresser(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicDresser>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicDresser>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicDresser>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureBotanic.BotanicDresser>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver<Items.Placeables.FurnitureBotanic.BotanicDresser>();
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar<Items.Placeables.FurnitureBotanic.BotanicDresser>();
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.DresserMouseOver<Items.Placeables.FurnitureBotanic.BotanicDresser>();
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.DresserMouseFar<Items.Placeables.FurnitureBotanic.BotanicDresser>();
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick();
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.DresserRightClick();
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,22 +12,10 @@ using Terraria.ModLoader.Default;
|
||||
using Terraria.ObjectData;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public static partial class CalamityUtils
|
||||
internal static class FurnitureCommon
|
||||
{
|
||||
public static void RightClickBreak(int i, int j)
|
||||
{
|
||||
if (Main.tile[i, j] != null && Main.tile[i, j].HasTile)
|
||||
{
|
||||
WorldGen.KillTile(i, j, false, false, false);
|
||||
if (!Main.tile[i, j].HasTile && Main.netMode != NetmodeID.SinglePlayer)
|
||||
{
|
||||
NetMessage.SendData(MessageID.TileManipulation, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool BedRightClick(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
@@ -66,7 +54,79 @@ namespace CalamityMod
|
||||
return true;
|
||||
}
|
||||
|
||||
#region Sitting in Chairs
|
||||
public static void BenchMouseOver(int i, int j, int itemID)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (!player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
}
|
||||
|
||||
public static void BenchSitInfo(int i, int j, ref TileRestingInfo info, int nextStyleHeight = 40)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
info.DirectionOffset = 0;
|
||||
float offset = 0f;
|
||||
if (tile.TileFrameX < 17 && player.direction == 1)
|
||||
offset = 8f;
|
||||
if (tile.TileFrameX < 17 && player.direction == -1)
|
||||
offset = -8f;
|
||||
if (tile.TileFrameX > 34 && player.direction == 1)
|
||||
offset = -8f;
|
||||
if (tile.TileFrameX > 34 && player.direction == -1)
|
||||
offset = 8f;
|
||||
info.VisualOffset = new Vector2(offset, 0f);
|
||||
info.TargetDirection = player.direction;
|
||||
|
||||
info.AnchorTilePosition.X = i;
|
||||
info.AnchorTilePosition.Y = j;
|
||||
|
||||
if (tile.TileFrameY % nextStyleHeight == 0)
|
||||
{
|
||||
info.AnchorTilePosition.Y++;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ChairMouseOver(int i, int j, int itemID, bool fat = false)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (!player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
|
||||
bool frameCheck = fat ? Main.tile[i, j].TileFrameX <= 35 : Main.tile[i, j].TileFrameX / 18 < 0;
|
||||
if (frameCheck)
|
||||
{
|
||||
player.cursorItemIconReversed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ChairRightClick(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
{
|
||||
player.GamepadEnableGrappleCooldown();
|
||||
player.sitting.SitDown(player, i, j);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// fat is for 2 tile chairs like Exo Chair and Exo Toilet
|
||||
public static void ChairSitInfo(int i, int j, ref TileRestingInfo info, int nextStyleHeight = 40, bool fat = false, bool hasOffset = false, bool shitter = false)
|
||||
{
|
||||
@@ -105,91 +165,51 @@ namespace CalamityMod
|
||||
info.AnchorTilePosition.Y++;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ChairRightClick(int i, int j)
|
||||
public static void ChestMouseFar<T>(int i, int j) where T : ModItem
|
||||
{
|
||||
ChestMouseOver<T>(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
if (player.cursorItemIconText == "")
|
||||
{
|
||||
player.GamepadEnableGrappleCooldown();
|
||||
player.sitting.SitDown(player, i, j);
|
||||
player.cursorItemIconEnabled = false;
|
||||
player.cursorItemIconID = ItemID.None;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void ChairMouseOver(int i, int j, int itemID, bool fat = false)
|
||||
public static void ChestMouseOver<T>(int i, int j) where T : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (!player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
Tile tile = Main.tile[i, j];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = i;
|
||||
int top = j;
|
||||
if (tile.TileFrameX % 36 != 0)
|
||||
{
|
||||
return;
|
||||
left--;
|
||||
}
|
||||
if (tile.TileFrameY != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chest = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chest < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyChestType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chest].name.Length > 0 ? Main.chest[chest].name : chestName;
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
|
||||
bool frameCheck = fat ? Main.tile[i, j].TileFrameX <= 35 : Main.tile[i, j].TileFrameX / 18 < 0;
|
||||
if (frameCheck)
|
||||
{
|
||||
player.cursorItemIconReversed = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MouseOver(int i, int j, int itemID)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Sitting in Sofas/Benches
|
||||
public static void BenchSitInfo(int i, int j, ref TileRestingInfo info, int nextStyleHeight = 40)
|
||||
{
|
||||
Tile tile = Framing.GetTileSafely(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
info.DirectionOffset = 0;
|
||||
float offset = 0f;
|
||||
if (tile.TileFrameX < 17 && player.direction == 1)
|
||||
offset = 8f;
|
||||
if (tile.TileFrameX < 17 && player.direction == -1)
|
||||
offset = -8f;
|
||||
if (tile.TileFrameX > 34 && player.direction == 1)
|
||||
offset = -8f;
|
||||
if (tile.TileFrameX > 34 && player.direction == -1)
|
||||
offset = 8f;
|
||||
info.VisualOffset = new Vector2(offset, 0f);
|
||||
info.TargetDirection = player.direction;
|
||||
|
||||
info.AnchorTilePosition.X = i;
|
||||
info.AnchorTilePosition.Y = j;
|
||||
|
||||
if (tile.TileFrameY % nextStyleHeight == 0)
|
||||
{
|
||||
info.AnchorTilePosition.Y++;
|
||||
}
|
||||
}
|
||||
|
||||
public static void BenchMouseOver(int i, int j, int itemID)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
if (!player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static bool ChestRightClick(int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
@@ -264,51 +284,6 @@ namespace CalamityMod
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void ChestMouseOver<T>(int i, int j) where T : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[i, j];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = i;
|
||||
int top = j;
|
||||
if (tile.TileFrameX % 36 != 0)
|
||||
{
|
||||
left--;
|
||||
}
|
||||
if (tile.TileFrameY != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chest = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chest < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyChestType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chest].name.Length > 0 ? Main.chest[chest].name : chestName;
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
}
|
||||
|
||||
public static void ChestMouseFar<T>(int i, int j) where T : ModItem
|
||||
{
|
||||
ChestMouseOver<T>(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
if (player.cursorItemIconText == "")
|
||||
{
|
||||
player.cursorItemIconEnabled = false;
|
||||
player.cursorItemIconID = ItemID.None;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ClockRightClick()
|
||||
{
|
||||
string text = "AM";
|
||||
@@ -358,6 +333,91 @@ namespace CalamityMod
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void DresserMouseFar<T>() where T : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = Player.tileTargetX;
|
||||
int top = Player.tileTargetY;
|
||||
left -= (int)(tile.TileFrameX % 54 / 18);
|
||||
if (tile.TileFrameY % 36 != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chestIndex = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chestIndex < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyDresserType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.chest[chestIndex].name != "")
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chestIndex].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = chestName;
|
||||
}
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
if (player.cursorItemIconText == "")
|
||||
{
|
||||
player.cursorItemIconEnabled = false;
|
||||
player.cursorItemIconID = ItemID.None;
|
||||
}
|
||||
}
|
||||
|
||||
public static void DresserMouseOver<T>() where T : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = Player.tileTargetX;
|
||||
int top = Player.tileTargetY;
|
||||
left -= (int)(tile.TileFrameX % 54 / 18);
|
||||
if (tile.TileFrameY % 36 != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chestIndex = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chestIndex < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyDresserType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.chest[chestIndex].name != "")
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chestIndex].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = chestName;
|
||||
}
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
if (Main.tile[Player.tileTargetX, Player.tileTargetY].TileFrameY > 0)
|
||||
{
|
||||
player.cursorItemIconID = ItemID.FamiliarShirt;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool DresserRightClick()
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
@@ -452,43 +512,109 @@ namespace CalamityMod
|
||||
|
||||
return false;
|
||||
}
|
||||
public static string GetMapChestName(string baseName, int x, int y)
|
||||
{
|
||||
// Bounds check.
|
||||
if (!WorldGen.InWorld(x, y, 2))
|
||||
return baseName;
|
||||
|
||||
public static void DresserMouseFar<T>() where T : ModItem
|
||||
Tile tile = Main.tile[x, y];
|
||||
int left = x;
|
||||
int top = y;
|
||||
if (tile.TileFrameX % 36 != 0)
|
||||
left--;
|
||||
if (tile.TileFrameY != 0)
|
||||
top--;
|
||||
|
||||
int chest = Chest.FindChest(left, top);
|
||||
|
||||
// Valid chest index check.
|
||||
if (chest < 0)
|
||||
return baseName;
|
||||
|
||||
string name = baseName;
|
||||
|
||||
// Concatenate the chest's custom name if it has one.
|
||||
if (!string.IsNullOrEmpty(Main.chest[chest].name))
|
||||
name += $": {Main.chest[chest].name}";
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public static void LightHitWire(int type, int i, int j, int tileX, int tileY)
|
||||
{
|
||||
int x = i - Main.tile[i, j].TileFrameX / 18 % tileX;
|
||||
int y = j - Main.tile[i, j].TileFrameY / 18 % tileY;
|
||||
int tileXX18 = 18 * tileX;
|
||||
for (int l = x; l < x + tileX; l++)
|
||||
{
|
||||
for (int m = y; m < y + tileY; m++)
|
||||
{
|
||||
if (Main.tile[l, m].HasTile && Main.tile[l, m].TileType == type)
|
||||
{
|
||||
if (Main.tile[l, m].TileFrameX < tileXX18)
|
||||
Main.tile[l, m].TileFrameX += (short)(tileXX18);
|
||||
else
|
||||
Main.tile[l, m].TileFrameX -= (short)(tileXX18);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Wiring.running)
|
||||
{
|
||||
for (int k = 0; k < tileX; k++)
|
||||
{
|
||||
for (int l = 0; l < tileY; l++)
|
||||
Wiring.SkipWire(x + k, y + l);
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
NetMessage.SendTileSquare(-1, x, y, tileX, tileY);
|
||||
}
|
||||
|
||||
public static void LockedChestMouseOver<K, C>(int i, int j)
|
||||
where K : ModItem where C : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY];
|
||||
Tile tile = Main.tile[i, j];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = Player.tileTargetX;
|
||||
int top = Player.tileTargetY;
|
||||
left -= (int)(tile.TileFrameX % 54 / 18);
|
||||
if (tile.TileFrameY % 36 != 0)
|
||||
int left = i;
|
||||
int top = j;
|
||||
if (tile.TileFrameX % 36 != 0)
|
||||
{
|
||||
left--;
|
||||
}
|
||||
if (tile.TileFrameY != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chestIndex = Chest.FindChest(left, top);
|
||||
int chest = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chestIndex < 0)
|
||||
if (chest < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyDresserType.0");
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyChestType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.chest[chestIndex].name != "")
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chestIndex].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = chestName;
|
||||
}
|
||||
player.cursorItemIconText = Main.chest[chest].name.Length > 0 ? Main.chest[chest].name : chestName;
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconID = ItemType<C>();
|
||||
if (Main.tile[left, top].TileFrameX / 36 == 1)
|
||||
player.cursorItemIconID = ItemType<K>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
}
|
||||
|
||||
public static void LockedChestMouseOverFar<K, C>(int i, int j)
|
||||
where K : ModItem where C : ModItem
|
||||
{
|
||||
LockedChestMouseOver<K, C>(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
if (player.cursorItemIconText == "")
|
||||
{
|
||||
player.cursorItemIconEnabled = false;
|
||||
@@ -496,48 +622,6 @@ namespace CalamityMod
|
||||
}
|
||||
}
|
||||
|
||||
public static void DresserMouseOver<T>() where T : ModItem
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[Player.tileTargetX, Player.tileTargetY];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = Player.tileTargetX;
|
||||
int top = Player.tileTargetY;
|
||||
left -= (int)(tile.TileFrameX % 54 / 18);
|
||||
if (tile.TileFrameY % 36 != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chestIndex = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chestIndex < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyDresserType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.chest[chestIndex].name != "")
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chestIndex].name;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = chestName;
|
||||
}
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<T>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
if (Main.tile[Player.tileTargetX, Player.tileTargetY].TileFrameY > 0)
|
||||
{
|
||||
player.cursorItemIconID = ItemID.FamiliarShirt;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool LockedChestRightClick(bool isLocked, int left, int top, int i, int j)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
@@ -633,53 +717,44 @@ namespace CalamityMod
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void LockedChestMouseOver<K, C>(int i, int j)
|
||||
where K : ModItem where C : ModItem
|
||||
public static void MouseOver(int i, int j, int itemID)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
Tile tile = Main.tile[i, j];
|
||||
string chestName = TileLoader.DefaultContainerName(tile.TileType, tile.TileFrameX, tile.TileFrameY);
|
||||
int left = i;
|
||||
int top = j;
|
||||
if (tile.TileFrameX % 36 != 0)
|
||||
{
|
||||
left--;
|
||||
}
|
||||
if (tile.TileFrameY != 0)
|
||||
{
|
||||
top--;
|
||||
}
|
||||
int chest = Chest.FindChest(left, top);
|
||||
player.cursorItemIconID = -1;
|
||||
if (chest < 0)
|
||||
{
|
||||
player.cursorItemIconText = Language.GetTextValue("LegacyChestType.0");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.cursorItemIconText = Main.chest[chest].name.Length > 0 ? Main.chest[chest].name : chestName;
|
||||
if (player.cursorItemIconText == chestName)
|
||||
{
|
||||
player.cursorItemIconID = ItemType<C>();
|
||||
if (Main.tile[left, top].TileFrameX / 36 == 1)
|
||||
player.cursorItemIconID = ItemType<K>();
|
||||
player.cursorItemIconText = "";
|
||||
}
|
||||
}
|
||||
player.noThrow = 2;
|
||||
player.cursorItemIconEnabled = true;
|
||||
player.cursorItemIconID = itemID;
|
||||
}
|
||||
public static void RightClickBreak(int i, int j)
|
||||
{
|
||||
if (Main.tile[i, j] != null && Main.tile[i, j].HasTile)
|
||||
{
|
||||
WorldGen.KillTile(i, j, false, false, false);
|
||||
if (!Main.tile[i, j].HasTile && Main.netMode != NetmodeID.SinglePlayer)
|
||||
{
|
||||
NetMessage.SendData(MessageID.TileManipulation, -1, -1, null, 0, (float)i, (float)j, 0f, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LockedChestMouseOverFar<K, C>(int i, int j)
|
||||
where K : ModItem where C : ModItem
|
||||
/// <summary>
|
||||
/// Extension which initializes a ModTile to be a 6x6 Painting.
|
||||
/// </summary>
|
||||
/// <param name="mt">The ModTile which is being initialized.</param>
|
||||
/// <param name="lavaImmune">Whether this tile is supposed to be immune to lava. Defaults to false.</param>
|
||||
internal static void SetUp6x6Painting(this ModTile mt, bool lavaImmune = false)
|
||||
{
|
||||
LockedChestMouseOver<K, C>(i, j);
|
||||
Player player = Main.LocalPlayer;
|
||||
if (player.cursorItemIconText == "")
|
||||
{
|
||||
player.cursorItemIconEnabled = false;
|
||||
player.cursorItemIconID = ItemID.None;
|
||||
}
|
||||
Main.tileFrameImportant[mt.Type] = true;
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileSpelunker[mt.Type] = true;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall);
|
||||
TileObjectData.newTile.Width = 6;
|
||||
TileObjectData.newTile.Height = 6;
|
||||
TileObjectData.newTile.Origin = new Point16(2, 2);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16, 16, 16 };
|
||||
TileObjectData.newTile.LavaDeath = !lavaImmune;
|
||||
TileObjectData.newTile.LavaPlacement = lavaImmune ? LiquidPlacement.Allowed : LiquidPlacement.NotAllowed;
|
||||
TileObjectData.addTile(mt.Type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1560,26 +1635,5 @@ namespace CalamityMod
|
||||
mt.AddMapEntry(new Color(191, 142, 111), Language.GetText("ItemName.WorkBench"));
|
||||
mt.AdjTiles = new int[] { TileID.WorkBenches };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extension which initializes a ModTile to be a 6x6 Painting.
|
||||
/// </summary>
|
||||
/// <param name="mt">The ModTile which is being initialized.</param>
|
||||
/// <param name="lavaImmune">Whether this tile is supposed to be immune to lava. Defaults to false.</param>
|
||||
internal static void SetUp6x6Painting(this ModTile mt, bool lavaImmune = false)
|
||||
{
|
||||
Main.tileFrameImportant[mt.Type] = true;
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileSpelunker[mt.Type] = true;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3Wall);
|
||||
TileObjectData.newTile.Width = 6;
|
||||
TileObjectData.newTile.Height = 6;
|
||||
TileObjectData.newTile.Origin = new Point16(2, 2);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16, 16, 16, 16 };
|
||||
TileObjectData.newTile.LavaDeath = !lavaImmune;
|
||||
TileObjectData.newTile.LavaPlacement = lavaImmune ? LiquidPlacement.Allowed : LiquidPlacement.NotAllowed;
|
||||
TileObjectData.addTile(mt.Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
|
||||
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.BedRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteBed>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteBed>());
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 2, 2);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 2, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, 1, j, 1, 1);
|
||||
FurnitureCommon.LightHitWire(Type, 1, j, 1, 1);
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j)
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override bool RightClick(int i, int j)
|
||||
{
|
||||
CalamityUtils.RightClickBreak(i, j);
|
||||
FurnitureCommon.RightClickBreak(i, j);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info);
|
||||
public override void ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => FurnitureCommon.ChairSitInfo(i, j, ref info);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteChair>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteChair>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override void HitWire(int i, int j)
|
||||
{
|
||||
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
|
||||
FurnitureCommon.LightHitWire(Type, i, j, 3, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.SetUpChest(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteChest>());
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(), CalamityUtils.GetMapChestName);
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(), FurnitureCommon.GetMapChestName);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
@@ -25,9 +25,9 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName<Items.Placeables.FurnitureCosmilite.CosmiliteChest>();
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(i, j);
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.ChestMouseOver<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(i, j);
|
||||
public override void MouseOverFar(int i, int j) => FurnitureCommon.ChestMouseFar<Items.Placeables.FurnitureCosmilite.CosmiliteChest>(i, j);
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j);
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j);
|
||||
public override bool RightClick(int i, int j) => FurnitureCommon.ChestRightClick(i, j);
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
|
||||
public override bool RightClick(int x, int y)
|
||||
{
|
||||
return CalamityUtils.ClockRightClick();
|
||||
return FurnitureCommon.ClockRightClick();
|
||||
}
|
||||
|
||||
public override void NearbyEffects(int i, int j, bool closer)
|
||||
@@ -37,6 +37,6 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteClock>());
|
||||
public override void MouseOver(int i, int j) => FurnitureCommon.MouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteClock>());
|
||||
}
|
||||
}
|
||||
Loaded 100 of 300 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user