diff --git a/assets/cabinet/cabCoffeeSW.kra b/assets/cabinet/cabCoffeeSW.kra new file mode 100644 index 0000000..8a9a608 Binary files /dev/null and b/assets/cabinet/cabCoffeeSW.kra differ diff --git a/assets/cabinet/cabCoffeeSW.png b/assets/cabinet/cabCoffeeSW.png new file mode 100644 index 0000000..2a05516 Binary files /dev/null and b/assets/cabinet/cabCoffeeSW.png differ diff --git a/assets/cabinet/cabinetSW.kra b/assets/cabinet/cabinetSW.kra new file mode 100644 index 0000000..3a579d0 Binary files /dev/null and b/assets/cabinet/cabinetSW.kra differ diff --git a/assets/cabinet/cabinetSW.png b/assets/cabinet/cabinetSW.png new file mode 100644 index 0000000..33984ec Binary files /dev/null and b/assets/cabinet/cabinetSW.png differ diff --git a/src/Load.hs b/src/Load.hs index de0bd21..14164da 100644 --- a/src/Load.hs +++ b/src/Load.hs @@ -63,7 +63,7 @@ loadFork -> MVar (Float, T.Text) -> IO () loadFork ws win glc nvg future progress = do - let stateSteps = 41 + let stateSteps = 43 increment = 1 / stateSteps SDL.glMakeCurrent win glc modifyMVar_ progress (return . (\(p, _) -> @@ -211,6 +211,16 @@ loadFork ws win glc nvg future progress = do , "Loading asset \"vending machine\"" ))) mmiscVending <- createImage nvg (FileName "assets/misc/vending.png") 0 + modifyMVar_ progress (return . (\(p, _) -> + ( p + increment + , "Loading asset \"Cabinet with Coffee machine\"" + ))) + mmiscCabCoffee <- createImage nvg (FileName "assets/cabinet/cabCoffeeSW.png") 0 + modifyMVar_ progress (return . (\(p, _) -> + ( p + increment + , "Loading asset \"cabinet SW\"" + ))) + mmiscCabinetSW <- createImage nvg (FileName "assets/cabinet/cabinetSW.png") 0 let micons = [ mcontrblue, mcontrgreen, marrow ] @@ -227,6 +237,7 @@ loadFork ws win glc nvg future progress = do , mmiscFlipchart , mmiscPlant1, mmiscPlant2 , mmiscWatercooler, mmiscVending + , mmiscCabCoffee, mmiscCabinetSW ] when (any isNothing mimgs) $ do liftIO $logIO Error "Failed to load image assets" @@ -239,7 +250,7 @@ loadFork ws win glc nvg future progress = do -- (zipWith (\a b -> (a, [b])) [0..] $ [ImgIntrE .. ImgIntrN] ++ [ImgIntrNE]) let imgs = zipWith (\a b -> (a, fromJust b)) [ ImgWallAsc - .. ImgMiscVending + .. ImgCabinetSW ] mimgs icons = zipWith (\a b -> (a, fromJust b)) diff --git a/src/Types/Collidible.hs b/src/Types/Collidible.hs index 3bab3ce..9257b3a 100644 --- a/src/Types/Collidible.hs +++ b/src/Types/Collidible.hs @@ -99,6 +99,8 @@ instance Collidible ImgId where collisionObstacle ImgMiscVending = [ Boundaries (0, 2/36) (24/36, 34/36) ] + collisionObstacle ImgCabinetCoffee = collisionObstacle ImgTableSW + collisionObstacle ImgCabinetSW = collisionObstacle ImgTableSW collisionObstacle ImgEmptyNoWalk = [ Boundaries (0, 0) (0.99, 0.99) ] collisionObstacle _ = [] diff --git a/src/Types/ImgId.hs b/src/Types/ImgId.hs index a45bd08..7e66362 100644 --- a/src/Types/ImgId.hs +++ b/src/Types/ImgId.hs @@ -35,6 +35,8 @@ data ImgId | ImgMiscPlant2 | ImgMiscWatercooler | ImgMiscVending + | ImgCabinetCoffee + | ImgCabinetSW -- | ImgIntrNE -- | ImgIntrE -- | ImgIntrSE diff --git a/src/Types/Interior.hs b/src/Types/Interior.hs index ec48ccd..16eed2a 100644 --- a/src/Types/Interior.hs +++ b/src/Types/Interior.hs @@ -28,6 +28,7 @@ data Cluster | ClusterToilet | ClusterWatercooler | ClusterVending + | ClusterCabCoffee deriving (Enum, Bounded, Show) -- row -> NS; col -> WE @@ -118,6 +119,10 @@ clusterMat ClusterVending _ = [ [ Just ImgMiscVending ] , [ Just ImgEmpty ] ] +clusterMat ClusterCabCoffee _ = + M.fromLists + [ [ Just ImgEmpty, Just ImgCabinetCoffee ] + ] clusterRoom :: Cluster -> [TileState] clusterRoom ClusterBox1 = [Offi] @@ -135,6 +140,7 @@ clusterRoom ClusterPlant2 = [Offi] clusterRoom ClusterToilet = [Toil] clusterRoom ClusterWatercooler = [Kitc, Offi] clusterRoom ClusterVending = [Kitc] +clusterRoom ClusterCabCoffee = [Kitc] clusterPoints :: Cluster -> (Int, Int) -> [ReachPoint] clusterPoints ClusterBox1 _ = [] @@ -177,6 +183,9 @@ clusterPoints ClusterWatercooler _ = clusterPoints ClusterVending _ = [ ReachPoint Eat (V2 2 1) NW ] +clusterPoints ClusterCabCoffee _ = + [ ReachPoint Drink (V2 1 1) NE + ] clusterPoints _ _ = [] instance Size (Cluster, (Int, Int)) where