mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
a console command to fill up inventory with every item
This commit is contained in:
@@ -29,4 +29,5 @@ StreamerMode
|
||||
Teleport
|
||||
ToggleNoClip
|
||||
Zoom
|
||||
DynToStatic
|
||||
DynToStatic
|
||||
DebugFillInventory
|
||||
|
17
assets/mods/basegame/locales/hiIN/game.json
Normal file
17
assets/mods/basegame/locales/hiIN/game.json
Normal file
@@ -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": "तुरंत चयन"
|
||||
}
|
||||
@@ -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<String>) {
|
||||
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.")
|
||||
}
|
||||
}
|
||||
@@ -119,5 +119,11 @@ class ActorInventory() : FixtureInventory() {
|
||||
//println("[ActorInventory] consumed; ${item.durability}")
|
||||
}
|
||||
}
|
||||
|
||||
override fun nuke() {
|
||||
super.nuke()
|
||||
itemEquipped.fill(null)
|
||||
quickSlot.fill(null)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +212,10 @@ open class FixtureInventory() {
|
||||
}
|
||||
return -(low + 1) // key not found
|
||||
}
|
||||
|
||||
open fun nuke() {
|
||||
itemList.clear()
|
||||
}
|
||||
}
|
||||
|
||||
class InventoryPair : Comparable<InventoryPair> {
|
||||
|
||||
Reference in New Issue
Block a user