Jane/src/token.lua
2025-03-24 13:08:59 +01:00

86 lines
2.7 KiB
Lua

SMODS.Atlas {
key = "janetokens",
px = 71,
py = 95,
path = Jane.config.texture_pack .. "/c_jane_tokens.png"
}
SMODS.Sound({key = "e_gilded", path = "e_gilded.ogg"})
SMODS.ConsumableType {
key = "jane_tokens",
default = "c_jane_token_tag_standard",
loc_txt = {
collection = "Tokens",
name = "Token"
},
shop_rate = 0,
collection_rows = {6, 6},
primary_colour = G.C.CHIPS,
secondary_colour = G.C.VOUCHER,
}
for _, v in pairs({
{"tag_standard", "Standard", 0, 0, 3},
{"tag_charm", "Charm", 1, 0, 5},
{"tag_meteor", "Meteor", 2, 0, 5},
{"tag_ethereal", "Ethereal", 3, 0, 5},
{"tag_buffoon", "Buffoon", 4, 0, 8},
{"tag_cry_bundle", "Bundle", 1, 1, 10},
{"tag_uncommon", "Uncommon", 2, 1, 3},
{"tag_rare", "Rare", 3, 1, 5},
{"tag_cry_epic", "Epic", 4, 1, 8},
{"tag_foil", "Foil", 1, 3, 3},
{"tag_holo", "Holographic", 2, 3, 4},
{"tag_polychrome", "Polychrome", 3, 3, 5},
{"tag_negative", "Negative", 4, 3, 10},
{"tag_investment", "Investment", 0, 3, 8},
{"tag_voucher", "Voucher", 4, 5, 5},
{"tag_handy", "Handy", 1, 5, 8},
{"tag_garbage", "Garbage", 0, 5, 6},
{"tag_coupon", "Coupon", 4, 4, 10},
{"tag_juggle", "Juggle", 2, 5, 2},
{"tag_d_six", "Dice", 0, 4, 2},
{"tag_top_up", "Top-up", 2, 4, 2},
{"tag_skip", "Speed", 4, 2, 7},
{"tag_economy", "Economy", 5, 2, 10},
{"tag_double", "Double", 0, 2, 6},
{"tag_cry_triple", "Triple", 1, 2, 8},
{"tag_cry_quadruple", "Quadruple", 2, 2, 10},
{"tag_cry_quintuple", "Quintuple", 3, 2, 13},
{"tag_cry_memory", "Memory", 5, 4, 8}
}) do
if Cryptid or v[1]:sub(1, 7) ~= "tag_cry" then
SMODS.Consumable {
key = "token_" .. v[1],
set = "jane_tokens",
atlas = "janetokens",
loc_txt = {
name = v[2] .. " Token",
text = {
"Use to create a",
"{C:attention}" .. v[2] .. " Tag",
},
},
pos = {x = v[3], y = v[4]},
cost = v[5],
can_stack = true,
can_divide = true,
can_use = Jane.canuse,
in_pool = function (_, _)
return G.GAME.used_vouchers.v_jane_token_voucher
end,
use = function(_, _, _, _)
play_sound("jane_e_gilded", 1.25, 0.4)
add_tag(Tag(v[1]))
end,
bulk_use = function(_, _, _, _, number)
play_sound("jane_e_gilded", 1.25, 0.4)
for _ = 1, number do
add_tag(Tag(v[1]))
end
end
}
end
end