Award heal score only to medics
This commit is contained in:
parent
10585d0663
commit
83da1ec0c4
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ minetest.override_item("ctf_bandages:bandage", {
|
||||||
if ctf.player(pname).team == ctf.player(name).team then
|
if ctf.player(pname).team == ctf.player(name).team then
|
||||||
local hp = object:get_hp()
|
local hp = object:get_hp()
|
||||||
local limit = ctf_bandages.heal_percent * object:get_properties().hp_max
|
local limit = ctf_bandages.heal_percent * object:get_properties().hp_max
|
||||||
if hp > 0 and hp < limit then
|
if hp > 0 and hp < limit and ctf_classes.get(user).name == "medic" then
|
||||||
local main, match = ctf_stats.player(name)
|
local main, match = ctf_stats.player(name)
|
||||||
if main and match then
|
if main and match then
|
||||||
local reward = 1
|
local reward = 1
|
||||||
|
@ -87,7 +87,7 @@ minetest.override_item("ctf_bandages:bandage", {
|
||||||
match.score = match.score + reward
|
match.score = match.score + reward
|
||||||
|
|
||||||
hud_score.new(name, {
|
hud_score.new(name, {
|
||||||
name = "ctf_stats:heal_score",
|
name = "ctf_classes:medic_heal",
|
||||||
color = "0x00FF00",
|
color = "0x00FF00",
|
||||||
value = reward
|
value = reward
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue