Refactor doors

This commit is contained in:
2022-07-24 20:36:27 +01:00
parent 2c1bc67a51
commit d6a94ec4bc
25 changed files with 186 additions and 135 deletions
+1 -3
View File
@@ -10,8 +10,6 @@ import Dodge.Placement.Instance
import Color
import Data.Maybe
import qualified IntMapHelp as IM
--import Control.Lens
door :: Room
door = defaultRoom
@@ -41,4 +39,4 @@ triggerDoorRoom inplid = defaultRoom
where
f (pmnt:_) = putDoubleDoor DoorObstacle (switchWallCol red) (cond pmnt) (V2 0 20) (V2 40 20) 2
f _ = error "tried to put a door using an empty placement list"
cond pmnt w = _triggers w IM.! fromJust (_plMID pmnt)
cond pmnt = WdTrig $ fromJust (_plMID pmnt)