re-transformed logo into a cool mod
This commit is contained in:
parent
46818ab7cd
commit
65b428a687
21
function.lua
21
function.lua
@ -13,26 +13,6 @@ surface_effect.dump = function(o)
|
||||
end
|
||||
end
|
||||
|
||||
surface_effect.showLogo = function(player)
|
||||
local name = player:get_player_name()
|
||||
|
||||
if surface_effect.nplayer[name]['logo'] == 'off' then
|
||||
local id = player:hud_add({
|
||||
name = "logo",
|
||||
hud_elem_type = "image",
|
||||
position = {x = 0.2, y = 0.9},
|
||||
scale = {
|
||||
x = -30,
|
||||
y = -10
|
||||
},
|
||||
text = "surfaces_effect_Mine_apocalypse.png"
|
||||
})
|
||||
|
||||
surface_effect.nplayer[name]['logo'] = "on"
|
||||
minetest.log("action", name .. " status logo " .. surface_effect.nplayer[name]['logo'] .. " id " .. id)
|
||||
end
|
||||
end
|
||||
|
||||
surface_effect.setHud = function(player)
|
||||
local name = player:get_player_name()
|
||||
|
||||
@ -40,7 +20,6 @@ surface_effect.setHud = function(player)
|
||||
surface_effect.nplayer[name] = {
|
||||
radiation_damage = false,
|
||||
id_varning_text = false,
|
||||
logo = 'off',
|
||||
id_mask = false,
|
||||
id_status_chemical = false,
|
||||
}
|
||||
|
3
init.lua
3
init.lua
@ -36,7 +36,6 @@ end)
|
||||
--Новый игрок
|
||||
minetest.register_on_newplayer(function(player)
|
||||
surface_effect.setHud(player)
|
||||
surface_effect.showLogo(player)
|
||||
|
||||
if minetest.get_modpath("hazmat_suit") then
|
||||
player:get_inventory():add_item("main", 'hazmat_suit:suit_hazmat 1')
|
||||
@ -50,7 +49,6 @@ end)
|
||||
--Событие когда игрок заходит на сервер
|
||||
minetest.register_on_joinplayer(function(player, last_login)
|
||||
surface_effect.setHud(player)
|
||||
surface_effect.showLogo(player)
|
||||
|
||||
local name = player:get_player_name()
|
||||
surface_effect.nplayer[name]['radiation_damage'] = false
|
||||
@ -87,7 +85,6 @@ end )
|
||||
--Вызывается, когда игрок покидает игру
|
||||
minetest.register_on_leaveplayer(function(player, timed_out)
|
||||
local name = player:get_player_name()
|
||||
surface_effect.nplayer[name]['logo'] = 'off'
|
||||
surface_effect.nplayer[name]["radiation_damage"] = false
|
||||
surface_effect.nplayer[name]["id_varning_text"] = false
|
||||
surface_effect.nplayer[name]["id_mask"] = false
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
Loading…
Reference in New Issue
Block a user