Add gauges support

master
shivajiva101 2020-09-20 19:21:19 +01:00 committed by GitHub
parent bae43891bd
commit ba8e8c1e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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