Make tanks into decorated blocks

This commit is contained in:
2022-07-12 10:57:37 +01:00
parent 791d065eff
commit 1ccb87ff13
8 changed files with 33 additions and 32 deletions
+2
View File
@@ -74,6 +74,8 @@ plLineBlock basePane blwidth a b gw = ( 0
, _blDir = 0 -- THIS IS NOT SENSIBLE. TODO rethink block positioning
, _blFootprint = cornersAt p -- TODO check winding (clockwise, anticlockwise)
, _blObstructs = []
, _blMaterial = _wlMaterial basePane
, _blHeight = 100
, _blPos = p, _blDraw = const mempty , _blDeath = makeBlockDebris}
)
insertBlocks = flip (foldr insertBlock) $ zip is blockCenPs
+3 -1
View File
@@ -101,7 +101,9 @@ doorMechanism dr w = case mvDir of
speed = _drSpeed dr
drid = _drID dr
moveUpdate = playSound . setStatus
playSound = soundContinue (WallSound drid) dpos slideDoorS (Just 1)
playSound
| _drPushedBy dr == PushesItself = soundContinue (WallSound drid) dpos slideDoorS (Just 1)
| otherwise = id
dpos = snd $ _drPos dr
dop = snd $ _drOpenPos dr
dcp = snd $ _drClosePos dr