diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-01-26 18:04:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-01-26 18:04:24 (GMT) |
| commit | 631e49b8b72d9875e50e3b39caa9612ffddec3a6 (patch) | |
| tree | d2e10be9430ef1b9d7e807e1245159eabee51fa0 /src/simulation/elements/PSTN.cpp | |
| parent | 12e3802bf4843dc5d1af1812ce7496bd3e7869b3 (diff) | |
| download | powder-631e49b8b72d9875e50e3b39caa9612ffddec3a6.zip powder-631e49b8b72d9875e50e3b39caa9612ffddec3a6.tar.gz | |
Piston fix: Adjust colour and prevent piston from pushing too far when there's empty space
Diffstat (limited to 'src/simulation/elements/PSTN.cpp')
| -rw-r--r-- | src/simulation/elements/PSTN.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/simulation/elements/PSTN.cpp b/src/simulation/elements/PSTN.cpp index 582f070..3714f8e 100644 --- a/src/simulation/elements/PSTN.cpp +++ b/src/simulation/elements/PSTN.cpp @@ -4,9 +4,9 @@ Element_PSTN::Element_PSTN() { Identifier = "DEFAULT_PT_PSTN"; Name = "PSTN"; - Colour = PIXPACK(0xBBFF00); + Colour = PIXPACK(0xAA9999); MenuVisible = 1; - MenuSection = SC_ELEC; + MenuSection = SC_FORCE; Enabled = 1; Advection = 0.0f; @@ -22,7 +22,7 @@ Element_PSTN::Element_PSTN() Flammable = 0; Explosive = 0; Meltable = 0; - Hardness = 1; + Hardness = 0; Weight = 100; @@ -229,6 +229,8 @@ int Element_PSTN::MoveStack(Simulation * sim, int stackX, int stackY, int direct if(!r) { spaces++; tempParts[currentPos++] = 0; + if(spaces >= amount) + break; } else { foundParts = true; if(currentPos < size) |
