Add flavour text, start smoke, support for different reload sounds

This commit is contained in:
2021-06-22 14:42:23 +02:00
parent 52eaeead5d
commit 39218ed3b5
31 changed files with 128 additions and 57 deletions
+29 -27
View File
@@ -6,6 +6,10 @@ import Dodge.Creature
--import Dodge.Base
import Dodge.Floor
import Dodge.Layout
import Dodge.Story
import Dodge.WorldEvent.Cloud
import Dodge.SoundLogic
import Dodge.SoundLogic.Synonyms
import System.Random
import qualified Data.Set as S
@@ -17,35 +21,33 @@ initializeWorld w = w
firstWorld :: IO World
firstWorld = do
-- i <- randomRIO (0,5000)
let i = 2
i <- randomRIO (0,5000)
-- let i = 2
putStrLn $ "Seed for level generation: " ++ show ( i :: Int)
return $ generateLevelFromRoomList levx $ initialWorld {_randGen = mkStdGen i}
initialWorld :: World
initialWorld = defaultWorld
{ _keys = S.empty
, _cameraCenter = (0,0)
, _cameraRot = 0
, _cameraZoom = 1
, _creatures = IM.fromList [(0,startCr)]
, _projectiles = IM.empty
, _walls = IM.empty
, _forceFields = IM.empty
, _floorItems = IM.empty
, _randGen = mkStdGen 2
, _mousePos = (0,0)
, _testString = []
, _yourID = 0
, _worldEvents = id
, _pressPlates = IM.empty
, _buttons = IM.empty
, _soundQueue = []
, _sounds = M.empty
, _decorations = IM.empty
, _storedLevel = Nothing
, _menuLayers = [LevelMenu 1]
, _worldState = M.empty
}
{ _keys = S.empty
, _cameraCenter = (0,0)
, _cameraRot = 0
, _cameraZoom = 10
, _creatures = IM.fromList [(0,startCr)]
, _projectiles = IM.empty
, _walls = IM.empty
, _forceFields = IM.empty
, _floorItems = IM.empty
, _randGen = mkStdGen 2
, _mousePos = (0,0)
, _testString = []
, _yourID = 0
, _worldEvents = soundOncePos foamSprayFadeOutSound (0,0) . foldr ((.) . makeStartCloudAt) id [(x,y) | x <- [-5,-3..5] , y <- [-5,-3..5]]
, _pressPlates = IM.empty
, _buttons = IM.empty
, _soundQueue = []
, _sounds = M.empty
, _decorations = IM.empty
, _storedLevel = Nothing
, _menuLayers = [TerminalMessage 300 rezText']
, _worldState = M.empty
}