diff --git a/assets/policem.kra b/assets/policem.kra new file mode 100644 index 0000000..38b1934 Binary files /dev/null and b/assets/policem.kra differ diff --git a/assets/policem.png b/assets/policem.png new file mode 100644 index 0000000..b549a0e Binary files /dev/null and b/assets/policem.png differ diff --git a/src/Load.hs b/src/Load.hs index 90ad625..3f447b8 100644 --- a/src/Load.hs +++ b/src/Load.hs @@ -334,6 +334,18 @@ loadFork ws win glc nvg future progress = do ))) jdoemWalking <- loadAnimationSprites "assets/jdoem.png" nvg (zip (walkIds AnimJDoeM) walkConfigs) + modifyMVar_ progress (return . (\(p, _) -> + ( p + increment + , "Loading Animation \"policem: standing\"" + ))) + policemStanding <- loadAnimationSprites "assets/policem.png" nvg + (zip (standIds AnimPoliceM) standConfigs) + modifyMVar_ progress (return . (\(p, _) -> + ( p + increment + , "Loading Animation \"policem: walking\"" + ))) + policemWalking <- loadAnimationSprites "assets/policem.png" nvg + (zip (walkIds AnimPoliceM) walkConfigs) modifyMVar_ progress (return . (\(p, _) -> ( p + increment , "Loading Animation \"copier: stand\"" @@ -506,6 +518,8 @@ loadFork ws win glc nvg future progress = do playerWalking ++ jdoemStanding ++ jdoemWalking ++ + policemStanding ++ + policemWalking ++ copierStand ++ copierCopy ++ cornerComputerOff ++ diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index b6563e5..a1282fe 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -94,7 +94,7 @@ loadMapFork ud ad future progress = do fc = FloorConfig (V2 10 10) [(V2 5 5), (V2 5 20)] - (50, 50) + (40, 40) modifyMVar_ progress (return . (\(p, _) -> ( p + increment , "Building floor" @@ -248,6 +248,7 @@ loadMapFork ud ad future progress = do <*> (randomRIO (0, 1)) <*> (randomRIO (0, 1)) <*> (randomRIO (0, 1)) + police <- liftIO $ randomRIO (0 :: Int, 9 :: Int) let room = V.head (V.filter ((inBounds $ pointCoord cpr) . bounds) @@ -264,7 +265,8 @@ loadMapFork ud ad future progress = do , npcActionState = Just ASWork , npcStats = Just stats , clearanceLvl = Just (clearance room) - , anim = Just $ AnimState (AnimId AnimJDoeM "standing" SE) 0 0 + , anim = Just $ AnimState + (AnimId (if police == 0 then AnimPoliceM else AnimJDoeM) "standing" SE) 0 0 } ) computers liftIO $ modifyMVar_ progress (return . (\(p, _) -> @@ -617,10 +619,12 @@ drawMap ud = do "FPS: " <> T.pack (Prelude.take 5 $ show (1/dt)) <> " Clearance: " - <> if not (Prelude.null room) + <> (if not (Prelude.null room) then T.pack (show $ clearance $ V.head room) else "0" ) + <> "\nFor answers call 6350" + ) drawTile :: UserData diff --git a/src/Types/Animation.hs b/src/Types/Animation.hs index 763e7ec..ea9e11f 100644 --- a/src/Types/Animation.hs +++ b/src/Types/Animation.hs @@ -46,6 +46,7 @@ data AnimationName | AnimComputer | AnimToilet | AnimJDoeM + | AnimPoliceM | AnimDoor0 deriving (Show, Eq, Ord, Enum)