1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00
kawari/resources/scripts/commands/debug/Festival.lua
Joshua Goins e6536da9dd Split up the command arguments on the Rust side
This removes some boilerplate code we need in every command to do
this ourselves.

See #65
2025-06-28 10:27:56 -04:00

16 lines
547 B
Lua

-- A list of festival ids can be found in Hyperborea's source tree:
-- https://github.com/kawaii/Hyperborea/blob/main/Hyperborea/festivals.yaml
required_rank = GM_RANK_DEBUG
command_sender = "[festival] "
function onCommand(args, player)
local usage = "\nUsage: !festival <id1> <id2> <id3> <id4>"
local id1 = args[1]
local id2 = args[2] or 0
local id3 = args[3] or 0
local id4 = args[4] or 0
player:set_festival(id1, id2, id3, id4)
printf(player, "Festival(s) changed to %s, %s, %s and %s.", id1, id2, id3, id4)
end