Work on mapper item, simpler generation of items from console

This commit is contained in:
2025-01-02 11:16:04 +00:00
parent 03b25565f1
commit 725a59b9d0
20 changed files with 439 additions and 379 deletions
+3 -1
View File
@@ -35,7 +35,9 @@ applyTerminalCommand s = case s of
['I','S',x,y] -> uvWorld . cWorld . lWorld . creatures . ix 0 . crInvCapacity .~ read [x,y]
"GODON" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMaterial .~ Crystal
"GODOFF" -> uvWorld . cWorld . lWorld . creatures . ix 0 . crMaterial .~ Flesh
_ -> id
x -> fromMaybe id $ do
(ibt, n) <- parseItem [x]
return $ uvWorld %~ flip (foldl' (&)) (replicate n (snd . createItemYou (itemFromBase ibt)))
applyTerminalCommandArguments :: String -> [String] -> Universe -> Universe
applyTerminalCommandArguments command args u = case command of