mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 08:46:35 +01:00
PCUs and SR Connected Computers (#4040)
* PCU and Connected Consoles * Clean this up
This commit is contained in:
@@ -13,20 +13,20 @@
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated() || !istype(usr, /mob/living))
|
||||
to_chat(usr, "<span class='warning'>You can't do that.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't do that."))
|
||||
return
|
||||
|
||||
if(!Adjacent(usr))
|
||||
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't reach it."))
|
||||
return
|
||||
|
||||
if(enabled)
|
||||
bsod = 1
|
||||
bsod = TRUE
|
||||
update_icon()
|
||||
shutdown_computer()
|
||||
to_chat(usr, "You press a hard-reset button on \the [src]. It displays a brief debug screen before shutting down.")
|
||||
spawn(2 SECONDS)
|
||||
bsod = 0
|
||||
bsod = FALSE
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated() || !istype(usr, /mob/living))
|
||||
to_chat(usr, "<span class='warning'>You can't do that.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't do that."))
|
||||
return
|
||||
|
||||
if(!Adjacent(usr))
|
||||
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't reach it."))
|
||||
return
|
||||
|
||||
proc_eject_id(usr)
|
||||
@@ -53,11 +53,11 @@
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated() || !istype(usr, /mob/living))
|
||||
to_chat(usr, "<span class='warning'>You can't do that.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't do that."))
|
||||
return
|
||||
|
||||
if(!Adjacent(usr))
|
||||
to_chat(usr, "<span class='warning'>You can't reach it.</span>")
|
||||
to_chat(usr, SPAN_WARNING("You can't reach it."))
|
||||
return
|
||||
|
||||
proc_eject_usb(usr)
|
||||
@@ -97,31 +97,31 @@
|
||||
uninstall_component(user, portable_drive)
|
||||
update_uis()
|
||||
|
||||
/obj/item/modular_computer/attack_ghost(var/mob/observer/ghost/user)
|
||||
/obj/item/modular_computer/attack_ghost(mob/observer/ghost/user)
|
||||
. = ..()
|
||||
if(enabled)
|
||||
nano_ui_interact(user)
|
||||
else if(check_rights(R_ADMIN, 0, user))
|
||||
var/response = alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", "Yes", "No")
|
||||
var/response = tgui_alert(user, "This computer is turned off. Would you like to turn it on?", "Admin Override", list("Yes", "No"))
|
||||
if(response == "Yes")
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/modular_computer/attack_ai(var/mob/user)
|
||||
/obj/item/modular_computer/attack_ai(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/modular_computer/attack_hand(var/mob/user)
|
||||
/obj/item/modular_computer/attack_hand(mob/user)
|
||||
if(anchored)
|
||||
return attack_self(user)
|
||||
return ..()
|
||||
|
||||
// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
/obj/item/modular_computer/attack_self(var/mob/user)
|
||||
/// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
/obj/item/modular_computer/attack_self(mob/user)
|
||||
if(enabled && screen_on)
|
||||
nano_ui_interact(user)
|
||||
else if(!enabled && screen_on)
|
||||
turn_on(user)
|
||||
|
||||
/obj/item/modular_computer/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
/obj/item/modular_computer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/card/id)) // ID Card, try to insert it.
|
||||
var/obj/item/card/id/I = W
|
||||
if(!card_slot)
|
||||
@@ -181,7 +181,7 @@
|
||||
for(var/obj/item/computer_hardware/H in all_components)
|
||||
component_names.Add(H.name)
|
||||
|
||||
var/choice = input(usr, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in component_names
|
||||
var/choice = tgui_input_list(user, "Which component do you want to uninstall?", "Computer maintenance", component_names)
|
||||
|
||||
if(!choice)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user