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

◆ CanPlaceProjectilePressurePad()

static int Terraria.WorldGen.CanPlaceProjectilePressurePad ( int x,
int y,
int type = 442,
int style = 0,
int direction = 0,
int alternate = 0 )
inlinestatic

Definition at line 76381 of file WorldGen.cs.

76382 {
76384 if (!canUp && !canDown && !canLeft && !canRight)
76385 {
76386 return -1;
76387 }
76388 switch (alternate)
76389 {
76390 case 0:
76391 if (!canDown)
76392 {
76393 return -1;
76394 }
76395 break;
76396 case 1:
76397 if (!canUp)
76398 {
76399 return -1;
76400 }
76401 break;
76402 case 2:
76403 if (!canLeft)
76404 {
76405 return -1;
76406 }
76407 break;
76408 case 3:
76409 if (!canRight)
76410 {
76411 return -1;
76412 }
76413 break;
76414 }
76415 return style;
76416 }
static void CheckProjectilePressurePad_GetPossiblePlacementDirections(int i, int j, out bool canUp, out bool canLeft, out bool canRight, out bool canDown)

Referenced by Terraria.ObjectData.TileObjectData.Initialize().