Merge branch 'master' into independent_mod
Merging master cleaning
This commit is contained in:
commit
1465e7d0db
@ -6,6 +6,9 @@ It comes with an arena manager and a signs system. The latter creates a bridge i
|
||||
<a href="https://liberapay.com/EticaDigitale/donate"><img src="https://i.imgur.com/4B2PxjP.png" alt="Support my work"/></a>
|
||||
|
||||
### Config
|
||||
|
||||
> BEWARE! Arena_lib right now works with a minigame only. DO NOT use it for more than one mod in the same client/server or it'll override itself over and over. We're on it to fix it
|
||||
|
||||
1) **You DON'T need to create a different folder in your mods path.** Instead, create a folder called `arena_lib` inside your specific mod folder and put all the files of this repo there (mind the textures!).
|
||||
|
||||
2) Add this in your init.lua
|
||||
|
9
api.lua
9
api.lua
@ -397,15 +397,16 @@ function arena_lib.end_arena(arena)
|
||||
|
||||
local players = {}
|
||||
|
||||
arena.in_celebration = false
|
||||
arena.in_game = false
|
||||
|
||||
for pl_name, stats in pairs(arena.players) do
|
||||
|
||||
players[pl_name] = stats
|
||||
arena.players[pl_name] = nil
|
||||
players_in_game[pl_name] = nil
|
||||
arena.in_celebration = false
|
||||
arena.in_game = false
|
||||
|
||||
local player = minetest.get_player_by_name (pl_name)
|
||||
local player = minetest.get_player_by_name(pl_name)
|
||||
|
||||
player:get_inventory():set_list("main", {})
|
||||
player:set_pos(hub_spawn_point)
|
||||
@ -457,7 +458,7 @@ end
|
||||
|
||||
|
||||
|
||||
function arena_lib.on_end(arena)
|
||||
function arena_lib.on_end(arena, players)
|
||||
--[[override this function on your mod if you wanna add more!
|
||||
Just do: function arena_lib.on_end() yourstuff end]]
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user