Add in "linear" lWorld to separate time reversable worlds
This commit is contained in:
@@ -30,10 +30,10 @@ applyTerminalCommand s = case s of
|
||||
"NOCLIP" -> uvConfig . debug_booleans . at Noclip %~ toggleJust
|
||||
['L', x] ->
|
||||
(uvWorld . cWorld %~ initSpecificCrItemLocations 0)
|
||||
. (uvWorld . cWorld . creatures . ix 0 . crInv .~ IM.fromList (zip [0 ..] $ inventoryX x))
|
||||
. (uvWorld . cWorld . creatures . ix 0 . crInvCapacity .~ 50)
|
||||
"GODON" -> uvWorld . cWorld . creatures . ix 0 . crMaterial .~ Crystal
|
||||
"GODOFF" -> uvWorld . cWorld . creatures . ix 0 . crMaterial .~ Flesh
|
||||
. (uvWorld . cWorld . lWorld . creatures . ix 0 . crInv .~ IM.fromList (zip [0 ..] $ inventoryX x))
|
||||
. (uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ 50)
|
||||
"GODON" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMaterial .~ Crystal
|
||||
"GODOFF" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMaterial .~ Flesh
|
||||
_ -> id
|
||||
|
||||
applyTerminalCommandArguments :: String -> [String] -> Universe -> Universe
|
||||
@@ -65,10 +65,10 @@ applySetTerminalString :: String -> Universe -> Universe
|
||||
applySetTerminalString [] = id
|
||||
applySetTerminalString var = case key' of
|
||||
"" -> showTerminalError ("set " ++ var) ("Unable to read as argument as float: " ++ val)
|
||||
"hp" -> uvWorld . cWorld . creatures . ix 0 . crHP .~ round (fromJust val')
|
||||
"invcap" -> uvWorld . cWorld . creatures . ix 0 . crInvCapacity .~ round (fromJust val')
|
||||
"mass" -> uvWorld . cWorld . creatures . ix 0 . crMass .~ fromJust val'
|
||||
"mvspeed" -> uvWorld . cWorld . creatures . ix 0 . crMvType . mvSpeed .~ fromJust val'
|
||||
"hp" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crHP .~ round (fromJust val')
|
||||
"invcap" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ round (fromJust val')
|
||||
"mass" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMass .~ fromJust val'
|
||||
"mvspeed" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMvType . mvSpeed .~ fromJust val'
|
||||
_ -> showTerminalError ("set " ++ var) ("Invalid set command: " ++ key) -- never reached?
|
||||
where
|
||||
(key, val) = getSplitString var
|
||||
|
||||
Reference in New Issue
Block a user