Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ KillWire()

static bool Terraria.WorldGen.KillWire ( int i,
int j )
inlinestatic

Definition at line 49060 of file WorldGen.cs.

49061 {
49062 if (Main.tile[i, j].wire())
49063 {
49064 SoundEngine.PlaySound(0, i * 16, j * 16);
49065 Main.tile[i, j].wire(wire: false);
49066 if (Main.netMode != 1)
49067 {
49068 Item.NewItem(GetItemSource_FromTileBreak(i, j), i * 16, j * 16, 16, 16, 530);
49069 }
49070 for (int k = 0; k < 5; k++)
49071 {
49072 Dust.NewDust(new Vector2(i * 16, j * 16), 16, 16, 50);
49073 }
49074 return true;
49075 }
49076 return false;
49077 }
static void PlaySound(int type, Vector2 position, int style=1)
static IEntitySource GetItemSource_FromTileBreak(int x, int y)

References Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Item.NewItem(), Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Main.tile.

Referenced by Terraria.MessageBuffer.GetData(), Terraria.Player.ItemCheck_UseWiringTools(), and Terraria.Wiring.MassWireOperationStep().