mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Changes how robotics control console works (#64608)
* First touch to this code for last decade Removes remote detonation, changes the ease of use for robotics console * Removes detonation. Reqiested by kyler * fixes description * Back to robotics it is * required changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/obj/machinery/computer/robotics
|
||||
name = "robotics control console"
|
||||
desc = "Used to remotely lockdown or detonate linked Cyborgs and Drones."
|
||||
desc = "Used to remotely lockdown linked Cyborgs and Drones."
|
||||
icon_screen = "robot"
|
||||
icon_keyboard = "rd_key"
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
@@ -77,24 +77,23 @@
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("killbot")
|
||||
if(allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs
|
||||
if(can_control(usr, R) && !..())
|
||||
R.self_destruct(usr)
|
||||
else
|
||||
to_chat(usr, span_danger("Access Denied."))
|
||||
if("stopbot")
|
||||
if(allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs
|
||||
if(can_control(usr, R) && !..())
|
||||
message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!"))
|
||||
log_silicon("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!")
|
||||
log_combat(usr, R, "[!R.lockcharge ? "locked down" : "released"] cyborg")
|
||||
R.SetLockdown(!R.lockcharge)
|
||||
to_chat(R, !R.lockcharge ? span_notice("Your lockdown has been lifted!") : span_alert("You have been locked down!"))
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "[!R.lockcharge ? span_notice("NOTICE - Cyborg lockdown lifted") : span_alert("ALERT - Cyborg lockdown detected")]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a><br>")
|
||||
if(isAI(usr) && (R.ai_lockdown && R.lockcharge || !R.lockcharge) || !isAI(usr))
|
||||
R.ai_lockdown = FALSE
|
||||
if(isAI(usr)&&!R.lockcharge)
|
||||
R.ai_lockdown = TRUE
|
||||
message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!"))
|
||||
log_silicon("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!")
|
||||
log_combat(usr, R, "[!R.lockcharge ? "locked down" : "released"] cyborg")
|
||||
R.SetLockdown(!R.lockcharge)
|
||||
to_chat(R, !R.lockcharge ? span_notice("Your lockdown has been lifted!") : span_alert("You have been locked down!"))
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "[!R.lockcharge ? span_notice("NOTICE - Cyborg lockdown lifted") : span_alert("ALERT - Cyborg lockdown detected")]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a><br>")
|
||||
else
|
||||
to_chat(usr, span_danger("Cyborg locked by an user with superior permissions."))
|
||||
else
|
||||
to_chat(usr, span_danger("Access Denied."))
|
||||
if("magbot")
|
||||
|
||||
@@ -94,7 +94,8 @@
|
||||
var/scrambledcodes = FALSE
|
||||
///Boolean of whether the borg is locked down or not
|
||||
var/lockcharge = FALSE
|
||||
|
||||
///Boolean of whether the borg was locked by its AI or nothing
|
||||
var/ai_lockdown = FALSE
|
||||
///Random serial number generated for each cyborg upon its initialization
|
||||
var/ident = 0
|
||||
var/locked = TRUE
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
name = "Computer Design (Robotics Control Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Robotics Control console."
|
||||
id = "robocontrol"
|
||||
materials = list(/datum/material/glass = 1000, /datum/material/gold = 1000, /datum/material/silver = 1000, /datum/material/bluespace = 2000)
|
||||
build_path = /obj/item/circuitboard/computer/robotics
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
@@ -75,13 +75,6 @@ const Cyborgs = (props, context) => {
|
||||
onClick={() => act('stopbot', {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
<Button.Confirm
|
||||
icon="bomb"
|
||||
content="Detonate"
|
||||
color="bad"
|
||||
onClick={() => act('killbot', {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
</>
|
||||
)}>
|
||||
<LabeledList>
|
||||
|
||||
Reference in New Issue
Block a user