Add terminal GODON command

This commit is contained in:
2021-12-09 17:12:32 +00:00
parent 4324d298d4
commit 1a053421ef
7 changed files with 34 additions and 18 deletions
+7 -2
View File
@@ -2,6 +2,8 @@ module Dodge.Debug.Terminal
where
import Dodge.Data
import Dodge.Creature
import Dodge.Creature.YourControl
import Dodge.Creature.State
import Control.Lens
@@ -9,9 +11,12 @@ applyTerminalString :: String -> Universe -> Universe
applyTerminalString "NOCLIP" w = w & config . debug_noclip %~ not
applyTerminalString "LOADME" w = w & uvWorld . creatures . ix 0 . crInv .~ stackedInventory
& uvWorld . creatures . ix 0 . crInvCapacity .~ 50
applyTerminalString "LM" w = applyTerminalString "LOADME" w
applyTerminalString "LT" w = w & uvWorld . creatures . ix 0 . crInv .~ testInventory
applyTerminalString "GODON" u = u & uvWorld . creatures . ix 0 . crUpdate .~ stateUpdateDamage clearDamage yourControl
applyTerminalString "GODOFF" u = u & uvWorld . creatures . ix 0 . crUpdate .~ stateUpdate yourControl
applyTerminalString "LOADTEST" w = w & uvWorld . creatures . ix 0 . crInv .~ testInventory
& uvWorld . creatures . ix 0 . crInvCapacity .~ 50
applyTerminalString "LM" w = applyTerminalString "LOADME" w
applyTerminalString "LT" w = applyTerminalString "LOADTEST" w
applyTerminalString _ w = w
loadme :: a