Cleanup
This commit is contained in:
@@ -28,16 +28,13 @@ applyTerminalString ss = case ss of
|
||||
applyTerminalCommand :: String -> Universe -> Universe
|
||||
applyTerminalCommand s = case s of
|
||||
"NOCLIP" -> uvConfig . debug_booleans . at Noclip %~ toggleJust
|
||||
'-': xs -> uvWorld %~ \w -> foldl' (flip createItemYou) w (inventoryX xs)
|
||||
-- (uvWorld . cWorld . lWorld %~ initSpecificCrItemLocations 0)
|
||||
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInv .~ IM.fromList (zip [0 ..] $ inventoryX x))
|
||||
-- . (uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ 50)
|
||||
-- ['I','S',x,y] -> uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ read [x,y]
|
||||
"GODON" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crType . avatarMaterial .~ Crystal
|
||||
"GODOFF" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crType . avatarMaterial .~ Flesh
|
||||
x -> fromMaybe id $ do
|
||||
x -> fromMaybe (g x) $ do
|
||||
(ibt, n) <- parseItem [x]
|
||||
return $ uvWorld %~ flip (foldl' (&)) (replicate n ( createItemYou (itemFromBase ibt)))
|
||||
where
|
||||
g xs = uvWorld %~ \w -> foldl' (flip createItemYou) w (inventoryX xs)
|
||||
|
||||
applyTerminalCommandArguments :: String -> [String] -> Universe -> Universe
|
||||
applyTerminalCommandArguments command args u = case command of
|
||||
|
||||
Reference in New Issue
Block a user