This commit is contained in:
2025-08-27 22:35:33 +01:00
parent 3c2369d979
commit 2a0e6d1e6e
3 changed files with 15 additions and 25 deletions
+3 -6
View File
@@ -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