Make machines have footprint like doors
This commit is contained in:
@@ -13,7 +13,7 @@ import LensHelp
|
||||
destroyMachine :: Machine -> World -> World
|
||||
destroyMachine mc =
|
||||
(cWorld . lWorld . machines %~ IM.delete (_mcID mc))
|
||||
. deleteWallIDs (_mcWallIDs mc)
|
||||
. deleteWallIDs (IM.keysSet $ _mcFootPrint mc)
|
||||
. makeMachineDebris mc
|
||||
. makeSmallExplosionAt (_mcPos mc `v2z` 20) 0
|
||||
. mcKillTerm mc
|
||||
@@ -24,7 +24,8 @@ destroyMachine mc =
|
||||
--explodeMachine mc = \case
|
||||
|
||||
makeMachineDebris :: Machine -> World -> World
|
||||
makeMachineDebris mc = id -- foldl' (flip $ makeDebris mt) w ps
|
||||
makeMachineDebris _ = id -- foldl' (flip $ makeDebris mt) w ps
|
||||
--makeMachineDebris mc = id -- foldl' (flip $ makeDebris mt) w ps
|
||||
-- where
|
||||
-- dsize = debrisSize mt
|
||||
-- ps = gridInPolygon dsize $ shrinkPolyOnEdges dsize $ reverse (_mcFootprint bl)
|
||||
|
||||
Reference in New Issue
Block a user