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

◆ ToggleTorch()

static void Terraria.Wiring.ToggleTorch ( int i,
int j,
Tile tileCache,
bool? forcedStateWhereTrueIsOn )
inlinestatic

Definition at line 2862 of file Wiring.cs.

2863 {
2864 bool flag = tileCache.frameX >= 66;
2865 if (!forcedStateWhereTrueIsOn.HasValue || !forcedStateWhereTrueIsOn.Value != flag)
2866 {
2867 if (tileCache.frameX < 66)
2868 {
2869 tileCache.frameX += 66;
2870 }
2871 else
2872 {
2873 tileCache.frameX -= 66;
2874 }
2875 NetMessage.SendTileSquare(-1, i, j);
2876 }
2877 }

References Terraria.Tile.frameX, and Terraria.NetMessage.SendTileSquare().

Referenced by Terraria.WorldGen.TryToggleLight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: