diff --git a/assets/mods/basegame/commands.csv b/assets/mods/basegame/commands.csv index 7edb84b5b..842175335 100644 --- a/assets/mods/basegame/commands.csv +++ b/assets/mods/basegame/commands.csv @@ -29,4 +29,5 @@ StreamerMode Teleport ToggleNoClip Zoom -DynToStatic \ No newline at end of file +DynToStatic +DebugFillInventory \ No newline at end of file diff --git a/assets/mods/basegame/locales/hiIN/game.json b/assets/mods/basegame/locales/hiIN/game.json new file mode 100644 index 000000000..2fddf4105 --- /dev/null +++ b/assets/mods/basegame/locales/hiIN/game.json @@ -0,0 +1,17 @@ +{ + "CONTEXT_WORLD_NEW": "नयी दुनिया", + "MENU_LABEL_DELETE_WORLD": "दुनिया हटाओ", + "CONTEXT_WORLD_COUNT": "Worlds: ", + "GAME_INVENTORY_INGREDIENTS": "Ingredients", + "GAME_INVENTORY_POTIONS": "Potions", + "GAME_INVENTORY_BLOCKS": "Blocks", + "GAME_INVENTORY_WALLS": "Walls", + "CONTEXT_ITEM_TOOL_PLURAL": "Tools", + "GAME_INVENTORY_FAVORITES": "Favorites", + "GAME_INVENTORY_REGISTER": "Register", + "CONTEXT_ITEM_MAP": "नक्शा", + "MENU_LABEL_MENU": "मेन्यू", + "CONTEXT_GENERATOR_SEED": "बीज", + "GAME_ACTION_GRAPPLE": "ग्रेपल", + "GAME_ACTION_QUICKSEL": "तुरंत चयन" +} diff --git a/src/net/torvald/terrarum/modulebasegame/console/DebugFillInventory.kt b/src/net/torvald/terrarum/modulebasegame/console/DebugFillInventory.kt new file mode 100644 index 000000000..137536a59 --- /dev/null +++ b/src/net/torvald/terrarum/modulebasegame/console/DebugFillInventory.kt @@ -0,0 +1,22 @@ +package net.torvald.terrarum.modulebasegame.console + +import net.torvald.terrarum.INGAME +import net.torvald.terrarum.console.ConsoleCommand +import net.torvald.terrarum.console.Echo +import net.torvald.terrarum.modulebasegame.gameactors.PlayerBuilderSigrid + +/** + * Created by minjaesong on 2022-02-22. + */ +internal object DebugFillInventory : ConsoleCommand { + override fun execute(args: Array) { + INGAME.actorNowPlaying?.let { + it.inventory.nuke() + PlayerBuilderSigrid.fillTestInventory(it.inventory) + } + } + + override fun printUsage() { + Echo("Populates inventory of the currently playing actor with every item currently available. Will overwrite existing inventory.") + } +} \ No newline at end of file diff --git a/src/net/torvald/terrarum/modulebasegame/gameactors/ActorInventory.kt b/src/net/torvald/terrarum/modulebasegame/gameactors/ActorInventory.kt index 20be163d5..c97aa69b2 100644 --- a/src/net/torvald/terrarum/modulebasegame/gameactors/ActorInventory.kt +++ b/src/net/torvald/terrarum/modulebasegame/gameactors/ActorInventory.kt @@ -119,5 +119,11 @@ class ActorInventory() : FixtureInventory() { //println("[ActorInventory] consumed; ${item.durability}") } } + + override fun nuke() { + super.nuke() + itemEquipped.fill(null) + quickSlot.fill(null) + } } diff --git a/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureInventory.kt b/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureInventory.kt index 08e6d58e5..d484ff092 100644 --- a/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureInventory.kt +++ b/src/net/torvald/terrarum/modulebasegame/gameactors/FixtureInventory.kt @@ -212,6 +212,10 @@ open class FixtureInventory() { } return -(low + 1) // key not found } + + open fun nuke() { + itemList.clear() + } } class InventoryPair : Comparable {