This is a version of the basegame lakitushop which fixes its errors, and also adds a way to define its items in the editor.
And here's some code to make a custom custom coin counter which overrides the default one.
(Put it in your luna.lua file)
Code: Select all
-- make the shop use currencies
local lakitushop = require("custom_lakitushop")
lakitushop.defaultConfig.useCurrencies = true
local hudoverride = require("hudoverride")
local currencies = require("currencies")
-- hide the default coin counter
hudoverride.offsets.coins.value.y = hudoverride.offsets.coins.value.y - 50
-- register the custom coin counter with limit 99999
local coinCounter = currencies.registerCurrency(currencies.CURRENCY_COINS)
coinCounter:registerLimit(99999, function() end)
-- draw the coin counter
function onDraw()
local offset = hudoverride.offsets.coins
Text.printWP(
string.format("%.5d", coinCounter:getMoney()), 1,
400 + offset.x + offset.value.x - 34,
50 + offset.y + offset.value.y,
hudoverride.priority
)
end
https://drive.google.com/file/d/14j4kfv ... sp=sharing
Credit is not required.