Fixes AI integrity restorer functionality broken in #52265 (#52466)

* Update AI health after healing damage in integrity restorer

* Also feex legacy AI inegrity restorer.

* Update IntelliCard icon when AI is successfully revived.

* Clean up proc arguments

* Feex
This commit is contained in:
Timberpoes
2020-07-24 20:06:38 +01:00
committed by GitHub
parent 11c026946c
commit 44a3c41e19
2 changed files with 14 additions and 7 deletions
@@ -71,12 +71,18 @@
ai_slot.locked = FALSE
restoring = FALSE
return
ai_slot.locked =TRUE
A.adjustOxyLoss(-5, 0, FALSE)
A.adjustFireLoss(-5, 0, FALSE)
A.adjustBruteLoss(-5, 0)
ai_slot.locked = TRUE
A.adjustOxyLoss(-5, FALSE)
A.adjustFireLoss(-5, FALSE)
A.adjustBruteLoss(-5, FALSE)
// Please don't forget to update health, otherwise the below if statements will probably always fail.
A.updatehealth()
if(A.health >= 0 && A.stat == DEAD)
A.revive(full_heal = FALSE, admin_revive = FALSE)
cardhold.update_icon()
// Finished restoring
if(A.health >= 100)
ai_slot.locked = FALSE