This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -0,0 +1,119 @@
{
"gui" : {
"background" : {
"type" : "background",
"fileHeader" : "/interface/chests/chestheader.png",
"fileBody" : "/interface/scripted/treasuretestchest/treasuretestchestbg.png",
"fileFooter" : "/interface/chests/chestfooter.png"
},
"lblLevel" : {
"type" : "label",
"value" : "Level:",
"hAnchor" : "right",
"position" : [30, 68]
},
"txtLevel" : {
"type" : "textbox",
"callback" : "null",
"position" : [36, 68],
"hint" : "level",
"maxWidth" : 80,
"enterKey" : "generateTreasure",
"value" : "1",
"nextFocus" : "txtSeed",
"prevFocus" : "txtTreasurePool"
},
"lblSeed" : {
"type" : "label",
"value" : "Seed:",
"hAnchor" : "right",
"position" : [86, 68]
},
"txtSeed" : {
"type" : "textbox",
"callback" : "null",
"position" : [92, 68],
"hint" : "seed",
"maxWidth" : 80,
"enterKey" : "generateTreasure",
"value" : "",
"nextFocus" : "txtTreasurePool",
"prevFocus" : "txtLevel"
},
"lblPool" : {
"type" : "label",
"value" : "Pool:",
"hAnchor" : "right",
"position" : [30, 54]
},
"txtTreasurePool" : {
"type" : "textbox",
"callback" : "null",
"position" : [36, 54],
"hint" : "pool",
"maxWidth" : 120,
"enterKey" : "generateTreasure",
"value" : "basicChestTreasure",
"nextFocus" : "txtLevel",
"prevFocus" : "txtSeed"
},
"btnGenerate" : {
"type" : "button",
"base" : "/interface/button.png",
"hover" : "/interface/buttonhover.png",
"press" : "/interface/buttonhover.png",
"caption" : "Generate",
"position" : [52, 31],
"callback" : "generateTreasure"
},
"objectImage" : {
"type" : "image",
"position" : [40, 122],
"file" : "",
"centered" : true,
"maxSize" : [40, 40],
"minSize" : [40, 40]
},
"itemGrid" : {
"type" : "itemgrid",
"position" : [81, 81],
"dimensions" : [4, 4],
"spacing" : [19, 19],
"backingImage" : "/interface/inventory/empty.png"
},
"itemGrid2" : {
"type" : "itemgrid",
"position" : [4, 43],
"slotOffset" : 16,
"dimensions" : [8, 2],
"spacing" : [19, 19],
"backingImage" : "/interface/inventory/empty.png"
},
"count" : {
"type" : "label",
"value" : "16 SLOTS",
"hAnchor" : "mid",
"position" : [120, 158]
},
"overlay" : {
"type" : "image",
"file" : "/interface/chests/shine25to32.png",
"position" : [0, 2]
},
"close" : {
"type" : "button",
"base" : "/interface/x.png",
"hover" : "/interface/xhover.png",
"pressed" : "/interface/xpress.png",
"pressedOffset" : [0, 0],
"position" : [143, 174]
}
},
"scriptWidgetCallbacks" : [
"generateTreasure"
],
"scripts" : ["/interface/scripted/treasuretestchest/treasuretestchestgui.lua"],
"scriptDelta" : 5
}

View file

@ -0,0 +1,17 @@
function init()
end
function generateTreasure()
world.containerTakeAll(pane.containerEntityId())
local treasurePool = widget.getText("txtTreasurePool")
if treasurePool and root.isTreasurePool(treasurePool) then
local level = widget.getText("txtLevel") or 1
local seed = widget.getText("txtSeed")
if seed == "" then seed = nil end
local treasure = root.createTreasure(treasurePool, level, seed)
for _, item in pairs(treasure) do
world.containerAddItems(pane.containerEntityId(), item)
end
end
end