Removes ID-locking from cloning console (#25812)

* removes ID lock on cloning pod

* removes unimplemented emag_act() and cleans up the rest of the ID locking logic

* adds admin logging for cloning pod force ejection
This commit is contained in:
chuga-git
2024-06-12 13:56:38 -05:00
committed by GitHub
parent 4b3b64e540
commit 6e085f00e5
2 changed files with 5 additions and 47 deletions
+5 -17
View File
@@ -57,11 +57,11 @@
/obj/machinery/clonepod
anchored = TRUE
name = "cloning pod"
desc = "An electronically-lockable pod for growing organic tissue."
desc = "A pod for growing organic tissue."
density = TRUE
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_idle"
req_access = list(ACCESS_MEDICAL)
//So that chemicals can be loaded into the pod.
container_type = OPENCONTAINER
/// The linked cloning console.
@@ -80,9 +80,6 @@
var/desc_flavor = "It doesn't seem to be doing anything right now."
/// The countdown.
var/obj/effect/countdown/clonepod/countdown
/// Whether or not the interface is locked.
var/locked = TRUE
req_access = list(ACCESS_MEDICAL)
/// The speed at which we clone. Each processing cycle will advance clone_progress by this amount.
var/speed_modifier = 1
@@ -165,7 +162,6 @@
/obj/machinery/clonepod/examine(mob/user)
. = ..()
. += "<span class='notice'>[desc_flavor]</span>"
. += "<span class='notice'>[src] is currently [locked ? "locked" : "unlocked"], and can be [locked ? "unlocked" : "locked"] by swiping an ID with medical access on it.</span>"
/obj/machinery/clonepod/RefreshParts()
speed_modifier = 0 //Since we have multiple manipulators, which affect this modifier, we reset here so we can just use += later
@@ -571,13 +567,11 @@
to_chat(user, "<span class='warning'>Access denied.</span>")
return
switch(tgui_alert(user, "Change access restrictions or perform an emergency ejection of [src]?", "Cloning pod", list("Change access", "Emergency ejection")))
if("Change access")
locked = !locked
to_chat(user, "<span class='notice'>Access restriction is now [locked ? "enabled" : "disabled"].</span>")
if("Emergency ejection")
switch(tgui_alert(user, "Perform an emergency ejection of [src]?", "Cloning pod", list("Yes", "No")))
if("Yes")
eject_clone(TRUE) // GET OUT
to_chat(user, "<span class='warning'>You force [src] to eject its clone!</span>")
log_admin("[key_name(user)] has activated a cloning pod's emergency eject at [COORD(src)] (clone: [key_name(clone)])")
return
if(is_organ(I) || is_type_in_list(I, ALLOWED_ROBOT_PARTS)) //fun fact, robot parts aren't organs!
@@ -645,12 +639,6 @@
if(stat & (NOPOWER|BROKEN))
return
if(!allowed(user) && locked && !isobserver(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
if(ui)
ui.close()
return
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "CloningPod", "Cloning Pod")
-30
View File
@@ -7,7 +7,6 @@
icon_keyboard = "med_key"
icon_screen = "dna"
circuit = /obj/item/circuitboard/cloning
req_access = list(ACCESS_MEDICAL)
/// The currently-selected cloning pod.
var/obj/machinery/clonepod/selected_pod
@@ -21,8 +20,6 @@
var/feedback
/// The desired outcome of the cloning process.
var/datum/cloning_data/desired_data
/// Whether the ID lock is on or off
var/locked = TRUE
COOLDOWN_DECLARE(scancooldown)
@@ -49,18 +46,7 @@
P.console = null
return ..()
/obj/machinery/computer/cloning/examine(mob/user)
. = ..()
. += "<span class='notice'>[src] is currently [locked ? "locked" : "unlocked"], and can be [locked ? "unlocked" : "locked"] by swiping an ID with medical access on it.</span>"
/obj/machinery/computer/cloning/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
if(allowed(user))
locked = !locked
to_chat(user, "<span class='notice'>Access restriction is now [locked ? "enabled" : "disabled"].</span>")
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
if(!ismultitool(I))
return ..()
@@ -109,16 +95,6 @@
ui_interact(user)
/obj/machinery/computer/cloning/emag_act(mob/user)
. = ..()
if(!emagged)
emagged = TRUE
to_chat(user, "<span class='notice'>You short out the ID scanner on [src].</span>")
else
to_chat(user, "<span class='warning'>[src]'s ID scanner is already broken!</span>")
return TRUE
/obj/machinery/computer/cloning/proc/generate_healthy_data(datum/cloning_data/patient_data)
var/datum/cloning_data/desired_data = new
@@ -156,12 +132,6 @@
if(stat & (NOPOWER|BROKEN))
return
if(!allowed(user) && locked && !isobserver(user))
to_chat(user, "<span class='warning'>Access denied.</span>")
if(ui)
ui.close()
return
var/datum/asset/simple/cloning/assets = get_asset_datum(/datum/asset/simple/cloning)
assets.send(user)