mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 10:02:12 +00:00
Allows emagged and syndicate borgs to self-detonate (#61915)
Once upon a time, when borgs could access machines from any distance once the window was open, borgs could self-detonate as a combat strategy. At some point, machine access for borgs was confined to being nearby the device, which removed self-detonation (except when near the console) as a side effect. This PR re-adds the ability for emagged and syndicate borgs by placing a confirm-type button into their RoboTact app (Actions section, under the Status tab). Stunned or locked borgs cannot self-destruct. Additionally, logging for borg detonations has been moved out of the robot console and into the borg self_destruct() proc, to avoid duplicate code, and emagged borgs now have their tablet theme and icon changed to syndicate versions.
This commit is contained in:
@@ -58,8 +58,9 @@
|
||||
data["printerTonerMax"] = borgo.tonermax //It's a variable, might as well use it
|
||||
data["thrustersInstalled"] = borgo.ionpulse //If we have a thruster uprade
|
||||
data["thrustersStatus"] = "[borgo.ionpulse_on?"ACTIVE":"DISABLED"]" //Feedback for thruster status
|
||||
data["selfDestructAble"] = (borgo.emagged || istype(borgo, /mob/living/silicon/robot/model/syndicate/))
|
||||
|
||||
//DEBUG -- Cover, TRUE for locked
|
||||
//Cover, TRUE for locked
|
||||
data["cover"] = "[borgo.locked? "LOCKED":"UNLOCKED"]"
|
||||
//Ability to move. FAULT if lockdown wire is cut, DISABLED if borg locked, ENABLED otherwise
|
||||
data["locomotion"] = "[borgo.wires.is_cut(WIRE_LOCKDOWN)?"FAULT":"[borgo.lockcharge?"DISABLED":"ENABLED"]"]"
|
||||
@@ -135,6 +136,12 @@
|
||||
borgo.lamp_intensity = params["ref"]
|
||||
borgo.toggle_headlamp(FALSE, TRUE)
|
||||
|
||||
if("selfDestruct")
|
||||
if(borgo.stat || borgo.lockcharge) //No detonation while stunned or locked down
|
||||
return
|
||||
if(borgo.emagged || istype(borgo, /mob/living/silicon/robot/model/syndicate/)) //This option shouldn't even be showing otherwise
|
||||
borgo.self_destruct(borgo)
|
||||
|
||||
/**
|
||||
* Forces a full update of the UI, if currently open.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user