Make game auto-start (no splash menu)
This commit is contained in:
+4
-2
@@ -2,6 +2,7 @@ module Main (
|
|||||||
main,
|
main,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Dodge.StartNewGame
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Parallel
|
import Control.Parallel
|
||||||
@@ -15,7 +16,7 @@ import Dodge.Data
|
|||||||
import Dodge.Event
|
import Dodge.Event
|
||||||
import Dodge.Initialisation
|
import Dodge.Initialisation
|
||||||
import Dodge.LoadSeed
|
import Dodge.LoadSeed
|
||||||
import Dodge.Menu
|
--import Dodge.Menu
|
||||||
import Dodge.Render
|
import Dodge.Render
|
||||||
import Dodge.SoundLogic.LoadSound
|
import Dodge.SoundLogic.LoadSound
|
||||||
import Dodge.TestString
|
import Dodge.TestString
|
||||||
@@ -100,7 +101,8 @@ firstWorldLoad theConfig = do
|
|||||||
, _uvDebugMessageOffset = 0
|
, _uvDebugMessageOffset = 0
|
||||||
, _uvSoundQueue = mempty
|
, _uvSoundQueue = mempty
|
||||||
}
|
}
|
||||||
return $ u & uvScreenLayers .~ [splashMenu u]
|
--return $ u & uvScreenLayers .~ [splashMenu u]
|
||||||
|
return $ startNewGameInSlot 0 u
|
||||||
|
|
||||||
theUpdateStep :: SDL.Window -> Universe -> IO Universe
|
theUpdateStep :: SDL.Window -> Universe -> IO Universe
|
||||||
theUpdateStep win = doSideEffects <=< updateRenderSplit win
|
theUpdateStep win = doSideEffects <=< updateRenderSplit win
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ inventoryX c = case c of
|
|||||||
, rifle
|
, rifle
|
||||||
, shellMag
|
, shellMag
|
||||||
]
|
]
|
||||||
'P' -> [burstRifle , tinMag, battery, bulletSynthesizer]
|
'P' -> [burstRifle , tinMag, bulletSynthesizer, battery]
|
||||||
'T' -> testInventory
|
'T' -> testInventory
|
||||||
'U' ->
|
'U' ->
|
||||||
[targetingScope tt | tt <- [minBound .. maxBound]]
|
[targetingScope tt | tt <- [minBound .. maxBound]]
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ applyTerminalString ss = case ss of
|
|||||||
applyTerminalCommand :: String -> Universe -> Universe
|
applyTerminalCommand :: String -> Universe -> Universe
|
||||||
applyTerminalCommand s = case s of
|
applyTerminalCommand s = case s of
|
||||||
"NOCLIP" -> uvConfig . debug_booleans . at Noclip %~ toggleJust
|
"NOCLIP" -> uvConfig . debug_booleans . at Noclip %~ toggleJust
|
||||||
['L', x] -> uvWorld %~ \w -> foldr createItemYou w (inventoryX x)
|
['L', x] -> uvWorld %~ \w -> foldl' (flip createItemYou) w (inventoryX x)
|
||||||
-- (uvWorld . cWorld . lWorld %~ initSpecificCrItemLocations 0)
|
-- (uvWorld . cWorld . lWorld %~ initSpecificCrItemLocations 0)
|
||||||
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInv .~ IM.fromList (zip [0 ..] $ inventoryX x))
|
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInv .~ IM.fromList (zip [0 ..] $ inventoryX x))
|
||||||
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ 50)
|
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ 50)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ crNumFreeSlots m cr = maxInvSlots - invSize (fmap f (_crInv cr))
|
|||||||
f i = m ^?! ix i
|
f i = m ^?! ix i
|
||||||
|
|
||||||
maxInvSlots :: Int
|
maxInvSlots :: Int
|
||||||
maxInvSlots = 25
|
maxInvSlots = 250
|
||||||
|
|
||||||
invSize :: NewIntMap InvInt Item -> Int
|
invSize :: NewIntMap InvInt Item -> Int
|
||||||
invSize = alaf Sum foldMap itInvHeight
|
invSize = alaf Sum foldMap itInvHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user