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

◆ ToggleLampPost()

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

Definition at line 2838 of file Wiring.cs.

2839 {
2840 int num = j - tileCache.frameY / 18;
2841 short num2 = 18;
2842 if (tileCache.frameX > 0)
2843 {
2844 num2 = -18;
2845 }
2846 bool flag = tileCache.frameX > 0;
2847 if (forcedStateWhereTrueIsOn.HasValue && !forcedStateWhereTrueIsOn.Value == flag)
2848 {
2849 return;
2850 }
2851 for (int k = num; k < num + 6; k++)
2852 {
2853 Main.tile[i, k].frameX += num2;
2854 if (doSkipWires)
2855 {
2856 SkipWire(i, k);
2857 }
2858 }
2859 NetMessage.SendTileSquare(-1, i, num, 1, 6);
2860 }
static void SkipWire(int x, int y)
Use to prevent wire signals from running for the provided coordinates. Typically used in multi-tiles ...
Definition Wiring.cs:121

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

Referenced by Terraria.Wiring.HitWireSingle(), and Terraria.WorldGen.TryToggleLight().

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