mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Allow cancelling partway through Manipulate Organs (#38471)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/client/proc/manipulate_organs(mob/living/carbon/C in world)
|
||||
set name = "Manipulate Organs"
|
||||
set category = "Debug"
|
||||
var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") in list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel")
|
||||
var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") as null|anything in list("add organ", "add implant", "drop organ/implant", "remove organ/implant", "cancel")
|
||||
if (!operation)
|
||||
return
|
||||
|
||||
var/list/organs = list()
|
||||
switch(operation)
|
||||
@@ -10,7 +12,9 @@
|
||||
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
var/obj/item/organ/organ = input("Select organ type:", "Organ Manipulation", null) in organs
|
||||
var/obj/item/organ/organ = input("Select organ type:", "Organ Manipulation", null) as null|anything in organs
|
||||
if(!organ)
|
||||
return
|
||||
organ = organs[organ]
|
||||
organ = new organ
|
||||
organ.Insert(C)
|
||||
@@ -22,7 +26,9 @@
|
||||
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
var/obj/item/implant/organ = input("Select implant type:", "Organ Manipulation", null) in organs
|
||||
var/obj/item/implant/organ = input("Select implant type:", "Organ Manipulation", null) as null|anything in organs
|
||||
if(!organ)
|
||||
return
|
||||
organ = organs[organ]
|
||||
organ = new organ
|
||||
organ.implant(C)
|
||||
@@ -38,7 +44,9 @@
|
||||
var/obj/item/implant/I = X
|
||||
organs["[I.name] ([I.type])"] = I
|
||||
|
||||
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
|
||||
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) as null|anything in organs
|
||||
if(!organ)
|
||||
return
|
||||
organ = organs[organ]
|
||||
if(!organ)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user