Refactor doors
This commit is contained in:
@@ -10,6 +10,7 @@ import Dodge.Base
|
||||
import Dodge.Creature.Property
|
||||
--import Dodge.LevelGen.MoveDoor
|
||||
import Dodge.LevelGen.DoorPane
|
||||
import Dodge.LevelGen.TriggerDoor
|
||||
--import Geometry
|
||||
import Picture
|
||||
import Geometry.Data
|
||||
@@ -26,7 +27,16 @@ addAutoDoor
|
||||
-> Point2 -- ^ Right point (though the two points should be symmetric)
|
||||
-> World
|
||||
-> World
|
||||
addAutoDoor a b = over walls (autoDoorAt a b)
|
||||
addAutoDoor a b = putDoubleDoor True (dim yellow) cond a b 3
|
||||
where
|
||||
cond = any (crNearSeg 40 a b) . IM.filter isAnimate . _creatures
|
||||
|
||||
addAutoDoor'
|
||||
:: Point2 -- ^ Left point
|
||||
-> Point2 -- ^ Right point (though the two points should be symmetric)
|
||||
-> World
|
||||
-> World
|
||||
addAutoDoor' a b = over walls (autoDoorAt a b)
|
||||
|
||||
autoDoorAt
|
||||
:: Point2 -- ^ Left point
|
||||
|
||||
Reference in New Issue
Block a user