Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Fix some Flockdrone healing bugs #184

Merged
merged 2 commits into from
Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/datums/abilities/flock/flockmind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
if (target.get_health_percentage() >= 1)
boutput(holder.owner, "<span class='notice'>[target.real_name] has no damage!</span>")
return TRUE
if (isdead(target))
return TRUE

playsound(holder.owner, "sound/misc/flockmind/flockmind_cast.ogg", 80, 1)
boutput(holder.owner, "<span class='notice'>You focus the flock's efforts on fixing [target.real_name]</span>")
Expand Down
6 changes: 5 additions & 1 deletion code/mob/living/critter/flock/flockdrone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,10 @@
// also maybe we've just had environmental damage, who knows
/mob/living/critter/flock/drone/TakeDamage(zone, brute, burn, tox, damage_type, disallow_limb_loss)
..()
var/prev_damaged = src.damaged
src.check_health()
if (brute <= 0 && burn <= 0 && tox <= 0)
return
var/prev_damaged = src.damaged
if(!isdead(src) && src.is_npc)
// if we've been damaged a new stage, call it out
if(prev_damaged != src.damaged && src.damaged > 0)
Expand Down Expand Up @@ -843,6 +845,8 @@
if(F.get_health_percentage() >= 1.0)
boutput(user, "<span class='alert'>They don't need to be repaired, they're in perfect condition.</span>")
return
if (isdead(F))
return
if(user.resources < 10)
boutput(user, "<span class='alert'>Not enough resources to repair (you need 10).</span>")
else
Expand Down
2 changes: 2 additions & 0 deletions code/mob/living/critter/flockcritter_parent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@
D.icon_state = "door1"//make it not look broke
else
T.HealDamage("All", T.health_brute / 3, T.health_burn / 3)
if (T.is_npc)
T.ai.interrupt()
F.pay_resources(10)

/////////////////////////////////////////////////////////////////////////////////
Expand Down