Add gauges support
parent
bae43891bd
commit
ba8e8c1e45
5
init.lua
5
init.lua
|
@ -16,6 +16,7 @@ eggwars.arena = {}
|
|||
eggwars.armor = minetest.get_modpath("3d_armor") ~= nil
|
||||
eggwars.bows = minetest.get_modpath("bows") ~= nil
|
||||
eggwars.playertag = minetest.get_modpath("playertag") ~= nil
|
||||
eggwars.gauges = minetest.get_modpath("gauges") ~= nil
|
||||
eggwars.match = {}
|
||||
eggwars.player = {}
|
||||
|
||||
|
@ -792,6 +793,8 @@ eggwars.begin_match = function ()
|
|||
meta:set_string('owner', name)
|
||||
meta:set_string('infotext', name .. "'s egg")
|
||||
|
||||
if eggwars.gauges then gauges.add(player) end
|
||||
|
||||
-- Create players shop items table
|
||||
match.player[name].shop_items = {
|
||||
-- Add players wool colour
|
||||
|
@ -1308,6 +1311,8 @@ minetest.register_on_dieplayer(function(player, reason)
|
|||
end
|
||||
player:set_properties({visual_size = {x = 0, y = 0}}) --Make player invisible
|
||||
|
||||
if eggwars.gauges then gauges.remove(name) end
|
||||
|
||||
if eggwars.armor then eggwars.clear_armor(player) end
|
||||
def.player[name].alive = false
|
||||
def.alive = def.alive - 1
|
||||
|
|
Loading…
Reference in New Issue