mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Fixes a bunch of fallout from the tgui PR (#13648)
* screamies fixes a bunch of fallout from the tgui PR.. probably * Empty commit to poke travis
This commit is contained in:
@@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='hear'>You hear a faint buzz.</span>")
|
||||
@@ -147,7 +147,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
. = attack_ai(user)
|
||||
|
||||
/obj/machinery/announcement_system/attack_ai(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
if(!user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s firmware appears to be malfunctioning!</span>")
|
||||
@@ -167,7 +167,9 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
act_up()
|
||||
|
||||
/obj/machinery/announcement_system/emag_act()
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
act_up()
|
||||
return TRUE
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
return
|
||||
if(R.scrambledcodes)
|
||||
return
|
||||
if(hasSiliconAccessInArea(user) && !issilicon(user))
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/robotics/ui_interact(mob/user, datum/tgui/ui)
|
||||
@@ -40,6 +43,10 @@
|
||||
else if(IsAdminGhost(user))
|
||||
data["can_hack"] = TRUE
|
||||
|
||||
data["can_convert"] = FALSE
|
||||
if(isAI(user) && is_servant_of_ratvar(user))
|
||||
data["can_convert"] = TRUE
|
||||
|
||||
data["cyborgs"] = list()
|
||||
for(var/mob/living/silicon/robot/R in GLOB.silicon_mobs)
|
||||
if(!can_control(user, R))
|
||||
@@ -54,6 +61,7 @@
|
||||
module = R.module ? "[R.module.name] Module" : "No Module Detected",
|
||||
synchronization = R.connected_ai,
|
||||
emagged = R.emagged,
|
||||
servant = is_servant_of_ratvar(R),
|
||||
ref = REF(R)
|
||||
)
|
||||
data["cyborgs"] += list(cyborg_data)
|
||||
@@ -110,6 +118,13 @@
|
||||
log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] emagged cyborg [key_name_admin(R)] using robotic console!")
|
||||
R.SetEmagged(TRUE)
|
||||
if("convert")
|
||||
if(isAI(usr) && is_servant_of_ratvar(usr))
|
||||
var/mob/living/silicon/robot/R = locate(params["ref"]) in GLOB.silicon_mobs
|
||||
if(istype(R) && !is_servant_of_ratvar(R) && R.connected_ai == usr)
|
||||
log_game("[key_name(usr)] converted [key_name(R)] using robotic console!")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] converted cyborg [key_name_admin(R)] using robotic console!")
|
||||
add_servant_of_ratvar(R)
|
||||
if("killdrone")
|
||||
if(allowed(usr))
|
||||
var/mob/living/simple_animal/drone/D = locate(params["ref"]) in GLOB.mob_list
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
. = ..()
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Radiation pulse accuracy increased by factor <b>[precision_coeff**2]</b>.<br>Radiation pulse damage decreased by factor <b>[damage_coeff**2]</b>.</span>"
|
||||
if(scan_level >= 3)
|
||||
. += "<span class='notice'>Scanner has been upgraded to support autoprocessing.</span>"
|
||||
|
||||
/obj/machinery/dna_scannernew/update_icon_state()
|
||||
//no power or maintenance
|
||||
@@ -94,6 +96,13 @@
|
||||
|
||||
..(user)
|
||||
|
||||
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
if(istype(mob_occupant))
|
||||
if(locate_computer(/obj/machinery/computer/cloning))
|
||||
if(!mob_occupant.suiciding && !(HAS_TRAIT(mob_occupant, TRAIT_NOCLONE)) && !mob_occupant.hellbound)
|
||||
mob_occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src)
|
||||
|
||||
// DNA manipulators cannot operate on severed heads or brains
|
||||
if(iscarbon(occupant))
|
||||
if(linked_console)
|
||||
|
||||
@@ -1457,6 +1457,16 @@
|
||||
ui.open()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/airlock/ui_status(mob/user)
|
||||
. = ..()
|
||||
if (!issilicon(user) && hasSiliconAccessInArea(user))
|
||||
. = UI_INTERACTIVE
|
||||
|
||||
/obj/machinery/door/airlock/can_interact(mob/user)
|
||||
. = ..()
|
||||
if (!issilicon(user) && hasSiliconAccessInArea(user))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/airlock/ui_data()
|
||||
var/list/data = list()
|
||||
|
||||
|
||||
@@ -92,10 +92,17 @@
|
||||
/obj/item/implant/hijack/proc/hijack_remotely(obj/machinery/power/apc/apc)
|
||||
if (apc.hijacker || hijacking)
|
||||
return FALSE //can't remotely hijack an already hijacked APC
|
||||
|
||||
if(apc.being_hijacked)
|
||||
to_chat(imp_in, "<span class='warning'>This APC is already being hijacked!</span>")
|
||||
return FALSE
|
||||
|
||||
apc.being_hijacked = TRUE
|
||||
hijacking = TRUE
|
||||
to_chat(imp_in, "<span class='notice'>Establishing remote connection with APC.</span>")
|
||||
if (!do_after(imp_in, 4 SECONDS,target=apc))
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
apc.being_hijacked = FALSE
|
||||
hijacking = FALSE
|
||||
return TRUE
|
||||
if (LAZYLEN(imp_in.siliconaccessareas) >= HIJACK_APC_MAX_AMOUNT)
|
||||
@@ -118,6 +125,7 @@
|
||||
toggle_eyes()
|
||||
else
|
||||
to_chat(imp_in, "<span class='warning'>Aborting.</span>")
|
||||
apc.being_hijacked = FALSE
|
||||
hijacking = FALSE
|
||||
imp_in.light_power = 0
|
||||
imp_in.light_range = 0
|
||||
|
||||
@@ -237,12 +237,21 @@
|
||||
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] the interface.</span>"
|
||||
|
||||
/obj/machinery/airalarm/ui_status(mob/user)
|
||||
if(hasSiliconAccessInArea(user) && aidisabled)
|
||||
to_chat(user, "AI control has been disabled.")
|
||||
else if(!shorted)
|
||||
if(hasSiliconAccessInArea(user))
|
||||
if(aidisabled)
|
||||
to_chat(user, "AI control has been disabled")
|
||||
return UI_CLOSE
|
||||
else if(!issilicon(user)) //True sillycones use ..()
|
||||
return UI_INTERACTIVE
|
||||
if(!shorted)
|
||||
return ..()
|
||||
return UI_CLOSE
|
||||
|
||||
/obj/machinery/airalarm/can_interact(mob/user)
|
||||
. = ..()
|
||||
if (!issilicon(user) && hasSiliconAccessInArea(user))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/airalarm/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
suit_type = /obj/item/clothing/suit/space
|
||||
helmet_type = /obj/item/clothing/head/helmet/space
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
storage_type = /obj/item/tank/internals/oxygen
|
||||
storage_type = /obj/item/tank/jetpack/void
|
||||
|
||||
|
||||
/obj/machinery/loot_locator
|
||||
@@ -275,6 +275,7 @@
|
||||
|
||||
/obj/machinery/computer/piratepad_control
|
||||
name = "cargo hold control terminal"
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
ui_x = 600
|
||||
ui_y = 230
|
||||
var/status_report = "Ready for delivery."
|
||||
|
||||
@@ -109,9 +109,12 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
|
||||
. = ..()
|
||||
if((obj_flags & EMAGGED))
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
|
||||
return TRUE
|
||||
|
||||
/**********************Prisoner Collection Unit**************************/
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
var/obj/machinery/computer/apc_control/remote_control = null
|
||||
var/mob/living/carbon/hijacker
|
||||
var/hijackerlast = TRUE
|
||||
var/being_hijacked = FALSE
|
||||
|
||||
/obj/machinery/power/apc/unlocked
|
||||
locked = FALSE
|
||||
@@ -902,7 +903,7 @@
|
||||
if(H && !H.stealthmode && H.toggled)
|
||||
abilitiesavail = TRUE
|
||||
var/list/data = list(
|
||||
"locked" = locked,
|
||||
"locked" = locked && !(integration_cog && is_servant_of_ratvar(user)) && !area.hasSiliconAccessInArea(user, PRIVILEDGES_SILICON|PRIVILEDGES_DRONE),
|
||||
"failTime" = failure_timer,
|
||||
"isOperating" = operating,
|
||||
"externalPower" = main_status,
|
||||
@@ -1119,10 +1120,14 @@
|
||||
/obj/machinery/power/apc/proc/hijack(mob/living/L)
|
||||
if (!istype(L))
|
||||
return
|
||||
if(being_hijacked)
|
||||
to_chat(L, "<span class='warning'>This APC is already being hijacked!</span>")
|
||||
return
|
||||
if (hijacker && hijacker != L)
|
||||
var/obj/item/implant/hijack/H = L.getImplant(/obj/item/implant/hijack)
|
||||
to_chat(L, "<span class='warning'>Someone already has control of this APC. Beginning counter-hijack.</span>")
|
||||
H.hijacking = TRUE
|
||||
being_hijacked = TRUE
|
||||
if (do_after(L,20 SECONDS,target=src))
|
||||
hijacker.toggleSiliconAccessArea(area)
|
||||
if (L.toggleSiliconAccessArea(area))
|
||||
@@ -1130,23 +1135,28 @@
|
||||
update_icon()
|
||||
set_hijacked_lighting()
|
||||
H.hijacking = FALSE
|
||||
being_hijacked = FALSE
|
||||
return
|
||||
else
|
||||
to_chat(L, "<span class='warning'>Aborting.</span>")
|
||||
H.hijacking = FALSE
|
||||
being_hijacked = FALSE
|
||||
return
|
||||
to_chat(L, "<span class='notice'>Beginning hijack of APC.</span>")
|
||||
var/obj/item/implant/hijack/H = L.getImplant(/obj/item/implant/hijack)
|
||||
H.hijacking = TRUE
|
||||
being_hijacked = TRUE
|
||||
if (do_after(L,H.stealthmode ? 12 SECONDS : 5 SECONDS,target=src))
|
||||
if (L.toggleSiliconAccessArea(area))
|
||||
hijacker = L
|
||||
update_icon()
|
||||
set_hijacked_lighting()
|
||||
H.hijacking = FALSE
|
||||
being_hijacked = FALSE
|
||||
else
|
||||
to_chat(L, "<span class='warning'>Aborting.</span>")
|
||||
H.hijacking = FALSE
|
||||
being_hijacked = FALSE
|
||||
return
|
||||
|
||||
/obj/machinery/power/apc/proc/malfhack(mob/living/silicon/ai/malf)
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
lich.real_name = mind.name
|
||||
mind.transfer_to(lich)
|
||||
mind.grab_ghost(force=TRUE)
|
||||
lich.hardset_dna(null,null,null,lich.real_name,null, new /datum/species/skeleton)
|
||||
lich.hardset_dna(null,null,null,lich.real_name,null, new /datum/species/skeleton/space)
|
||||
to_chat(lich, "<span class='warning'>Your bones clatter and shudder as you are pulled back into this world!</span>")
|
||||
var/turf/body_turf = get_turf(old_body)
|
||||
lich.DefaultCombatKnockdown(200 + 200*resurrections)
|
||||
|
||||
@@ -8,6 +8,7 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
const [tab, setTab] = useSharedState(context, 'tab', 1);
|
||||
const {
|
||||
can_hack,
|
||||
can_convert,
|
||||
cyborgs = [],
|
||||
drones = [],
|
||||
} = data;
|
||||
@@ -34,7 +35,9 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
</Tabs.Tab>
|
||||
</Tabs>
|
||||
{tab === 1 && (
|
||||
<Cyborgs cyborgs={cyborgs} can_hack={can_hack} />
|
||||
<Cyborgs cyborgs={cyborgs}
|
||||
can_hack={can_hack}
|
||||
can_convert={can_convert} />
|
||||
)}
|
||||
{tab === 2 && (
|
||||
<Drones drones={drones} />
|
||||
@@ -45,7 +48,7 @@ export const RoboticsControlConsole = (props, context) => {
|
||||
};
|
||||
|
||||
const Cyborgs = (props, context) => {
|
||||
const { cyborgs, can_hack } = props;
|
||||
const { cyborgs, can_hack, can_convert } = props;
|
||||
const { act, data } = useBackend(context);
|
||||
if (!cyborgs.length) {
|
||||
return (
|
||||
@@ -70,6 +73,15 @@ const Cyborgs = (props, context) => {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
)}
|
||||
{!!can_convert && !cyborg.servant && (
|
||||
<Button
|
||||
icon="terminal"
|
||||
content="Convert"
|
||||
color="bad"
|
||||
onClick={() => act('convert', {
|
||||
ref: cyborg.ref,
|
||||
})} />
|
||||
)}
|
||||
<Button.Confirm
|
||||
icon={cyborg.locked_down ? 'unlock' : 'lock'}
|
||||
color={cyborg.locked_down ? 'good' : 'default'}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user