Remove commands now integrated within arena_lib

This commit is contained in:
Zughy 2022-12-26 00:22:49 +01:00
parent fec25c5028
commit 5992d045d1
2 changed files with 10 additions and 49 deletions

View File

@ -13,20 +13,17 @@ Zughy <a href="https://liberapay.com/Zughy/"><img src="https://i.imgur.com/4B2Px
* [skills](https://gitlab.com/zughy-friends-minetest/skills) by Giov4
### Set up an arena
1. run `/bladmin create <arena_name> <mode>`, where `mode` is `1` for Touchdown and `2` for Deathmatch
2. enter the editor via `/bladmin edit <arena_name>`
3. have fun customising it
If it's TD, you must also
1. set the two goals via `/bladmin goal [set|remove] <arena_name> <team_name>`
1. run `/arenas create block_league <arena_name>`
2. set the two waiting rooms via `/bladmin wroom [set|remove] <arena_name> <team_name>`
3. set the ball spawn point via `/bladmin ball [set|remove] <arena_name>`
1. (TD) set the two goals via `/bladmin goal [set|remove] <arena_name> <team_name>`
2. (TD) set the ball spawn point via `/bladmin ball [set|remove] <arena_name>
3. enter the editor via `/arenas edit <arena_name>`
1. (DM) Go to Settings -> Arena properties -> set `mode` to 2 (1 is TD, 2 is DM)
4. have fun customising it
(one day™ these 3 last steps will be included in the editor... maybe)
(one day™ the steps involving `/bladmin` commands will be included in the editor... maybe)
### Utility commands
* `/bladmin list`: list all arenas
* `/bladmin info <arena_name>`: list all the info about the specific arena
* `/bladmin testkit`: gives you the bouncer and the in-game physics, to easily test your maps. The last object in the hotbar restores your inventory and physics
### Want to help?

View File

@ -4,53 +4,17 @@ local mod = "block_league"
ChatCmdBuilder.new("bladmin", function(cmd)
-- creazione arene
cmd:sub("create :arena :mode:int", function(sender, arena_name, mode)
arena_lib.create_arena(sender, mod, arena_name)
local id, arena = arena_lib.get_arena_by_name("block_league", arena_name)
arena_lib.change_arena_property(sender, "block_league", arena_name, "mode" , mode)
end)
-- rimozione arene
cmd:sub("remove :arena", function(sender, arena_name)
arena_lib.remove_arena(sender, mod, arena_name)
end)
-- rinominazione arene
cmd:sub("rename :arena :newname", function(sender, arena_name, new_name)
arena_lib.rename_arena(sender, mod, arena_name, new_name)
end)
-- lista arene
cmd:sub("list", function(sender)
arena_lib.print_arenas(sender, mod)
end)
-- info su un'arena specifica
cmd:sub("info :arena", function(sender, arena_name)
arena_lib.print_arena_info(sender, mod, arena_name)
end)
--editor
cmd:sub("edit :arena", function(sender, arena)
arena_lib.enter_editor(sender, mod, arena)
end)
-- cartello arena
cmd:sub("setsign :arena", function(sender, arena)
arena_lib.set_sign(sender, nil, nil, mod, arena)
end)
-- abilitazione e disabilitazione arene
cmd:sub("enable :arena", function(sender, arena)
arena_lib.enable_arena(sender, mod, arena)
end)
cmd:sub("disable :arena", function(sender, arena)
arena_lib.disable_arena(sender, mod, arena)
end)
-- aggiunta/rimozione TD. option può essere "set" o "remove"
-- aggiunta/rimozione TD. `option` può essere "set" o "remove"
cmd:sub("goal :option :arena :team", function(sender, option, arena_name, team)
-- TODO: muovere in una funzione a parte
local id, arena = arena_lib.get_arena_by_name("block_league", arena_name)
@ -80,7 +44,7 @@ ChatCmdBuilder.new("bladmin", function(cmd)
end
end)
-- aggiunta/rimozione palla. option può essere "set" o "remove"
-- aggiunta/rimozione palla. `option` può essere "set" o "remove"
cmd:sub("ball :option :arena", function(sender, option, arena_name)
local id, arena = arena_lib.get_arena_by_name("block_league", arena_name)
@ -101,7 +65,7 @@ ChatCmdBuilder.new("bladmin", function(cmd)
arena_lib.change_arena_property(sender, "block_league", arena_name, "ball_spawn" , new_param)
end)
-- aggiunta/rimozione sala d'attesa. option può essere "set" o "remove"
-- aggiunta/rimozione sala d'attesa. `option` può essere "set" o "remove"
cmd:sub("wroom :option :arena :team", function(sender, option, arena_name, team)
local id, arena = arena_lib.get_arena_by_name("block_league", arena_name)