mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] Fix admin borg panel unable to install/remove upgrades (#28055)
* Fix admin borg panel unable to install/remove upgrades (#83733) ## About The Pull Request Fixes the admin borg panel's upgrade functionality. Caused by not registering the signals for deletion and also by the upgrade code checking the robot's contents instead of upgrades list (since the borg panel spawns the item in the borg, it appears in the borg's contents, making the check think the borg already has it installed.) ## Why It's Good For The Game Easier testing new borg modules ## Changelog 🆑 fix: Fixes admin borg panel upgrade functions /🆑 * Fix admin borg panel unable to install/remove upgrades --------- Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
This commit is contained in:
@@ -134,17 +134,19 @@ ADMIN_VERB(borg_panel, R_ADMIN, "Show Borg Panel", ADMIN_VERB_NO_DESCRIPTION, AD
|
||||
borg.fully_replace_character_name(borg.real_name,new_name)
|
||||
if ("toggle_upgrade")
|
||||
var/upgradepath = text2path(params["upgrade"])
|
||||
var/obj/item/borg/upgrade/installedupgrade = locate(upgradepath) in borg
|
||||
var/obj/item/borg/upgrade/installedupgrade = locate(upgradepath) in borg.upgrades
|
||||
if (installedupgrade)
|
||||
message_admins("[key_name_admin(user)] removed the [installedupgrade] upgrade from [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_silicon("[key_name(user)] removed the [installedupgrade] upgrade from [key_name(borg)].")
|
||||
qdel(installedupgrade) // see [mob/living/silicon/robot/on_upgrade_deleted()].
|
||||
else
|
||||
var/obj/item/borg/upgrade/upgrade = new upgradepath(borg)
|
||||
upgrade.action(borg, user)
|
||||
borg.upgrades += upgrade
|
||||
message_admins("[key_name_admin(user)] added the [upgrade] borg upgrade to [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_silicon("[key_name(user)] added the [upgrade] borg upgrade to [key_name(borg)].")
|
||||
if(upgrade.action(borg, user))
|
||||
borg.add_to_upgrades(upgrade)
|
||||
else
|
||||
qdel(upgrade)
|
||||
if ("toggle_radio")
|
||||
var/channel = params["channel"]
|
||||
if (channel in borg.radio.channels) // We're removing a channel
|
||||
|
||||
Reference in New Issue
Block a user