Add burst fire, tentative inventory locking

This commit is contained in:
2021-12-04 16:05:46 +00:00
parent 30abc318ae
commit cb670bdfd8
16 changed files with 108 additions and 18 deletions
+9
View File
@@ -57,6 +57,7 @@ functionalUpdate cfig w = checkEndGame
. simpleCrSprings
. zoneCreatures
. updateDoors
. updateDelayedEvents
. resetWorldEvents
. dbArg _worldEvents
. updateModifications
@@ -269,3 +270,11 @@ visibleWalls p1 p2 ws
where
f wl = (uncurry intersectSegSeg (_wlLine wl) p1 p2, wl)
theTest wl = _wlOpacity wl /= Opaque
updateDelayedEvents :: World -> World
updateDelayedEvents w = let (neww,newde) = mapAccumR f w (_delayedEvents w)
in neww & delayedEvents .~ catMaybes newde
where
f w' (i,g)
| i <= 0 = (g w', Nothing)
| otherwise = (w', Just (i-1,g))