[MIRROR] Fixing robot upgrades not being removed from lists all times. (#1906)

* Fixing robot upgrades sometimes not being removed from lists. (#54842)

* Fixing robot upgrades not being removed from lists all times.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-11-28 13:03:13 +01:00
committed by GitHub
parent ef6a9a4a8d
commit f969ce5e59
6 changed files with 92 additions and 59 deletions
+1 -3
View File
@@ -149,11 +149,9 @@
var/upgradepath = text2path(params["upgrade"])
var/obj/item/borg/upgrade/installedupgrade = locate(upgradepath) in borg
if (installedupgrade)
installedupgrade.deactivate(borg, user)
borg.upgrades -= installedupgrade
message_admins("[key_name_admin(user)] removed the [installedupgrade] upgrade from [ADMIN_LOOKUPFLW(borg)].")
log_admin("[key_name(user)] removed the [installedupgrade] upgrade from [key_name(borg)].")
qdel(installedupgrade)
qdel(installedupgrade) // see [mob/living/silicon/robot/on_upgrade_deleted()].
else
var/obj/item/borg/upgrade/upgrade = new upgradepath(borg)
upgrade.action(borg, user)