Working implementation of light change when door opens

This commit is contained in:
2021-09-29 01:34:54 +01:00
parent 6b937b115e
commit f3437adef7
12 changed files with 87 additions and 66 deletions
+2 -3
View File
@@ -3,8 +3,7 @@
Creation of doors that open when creatures approach them.
-}
module Dodge.LevelGen.AutoDoor
( addAutoDoor
) where
where
import Dodge.Data
import Dodge.Base
import Dodge.Creature.Property
@@ -22,6 +21,6 @@ addAutoDoor
-> Point2 -- ^ Right point (though the two points should be symmetric)
-> World
-> World
addAutoDoor a b = putDoubleDoor True (dim yellow) cond a b 3
addAutoDoor a b = insertDoubleDoor True (dim yellow) cond a b 3
where
cond = any (crNearSeg 40 a b) . IM.filter isAnimate . _creatures