This commit is contained in:
2022-07-14 21:12:51 +01:00
parent 5463328d41
commit 893a3d5f17
5 changed files with 11 additions and 61 deletions
-11
View File
@@ -17,7 +17,6 @@ import Dodge.Default.LightSource
import Dodge.Default.Item
import Dodge.Data
import Dodge.SoundLogic
import Dodge.Wall.Delete
import Dodge.Creature.Damage
import Dodge.Creature.Picture
import Geometry
@@ -193,17 +192,7 @@ defaultMachine = Machine
, _mcName = ""
, _mcMounts = mempty
, _mcCloseSound = Nothing
-- , _mcTriggerCond = const True
}
defaultMachineUpdate :: Machine -> World -> World
defaultMachineUpdate mc
| _mcHP mc < 1 = (machines %~ IM.delete mcid)
. deleteWallIDs (_mcWallIDs mc)
| otherwise = machines . ix mcid %~ ( (mcDamage .~ []) . (mcHP -~ dams) )
where
dams = sum $ map _dmAmount $ _mcDamage mc
mcid = _mcID mc
defaultDrawButton :: Color -> Button -> SPic
defaultDrawButton col bt =
( translateSHz 15 . colorSH col $ upperPrismPoly 5 buttonGeometry