Merge pull request #6515 from Citadel-Station-13/upstream-merge-37326
[MIRROR] Removes SCP_294
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
//////////////////////////////////////////
|
||||
// SCP 294 //
|
||||
// //
|
||||
// This is a child of a chemistry //
|
||||
// dispenser. Info of how it works at //
|
||||
// http://www.scp-wiki.net/scp-294 //
|
||||
// //
|
||||
//////////////////////////////////////////
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294
|
||||
name = "\improper strange coffee machine"
|
||||
desc = "It appears to be a standard coffee vending machine, the only noticeable difference being an entry touchpad with buttons corresponding to a Galactic Common QWERTY keyboard."
|
||||
icon = 'icons/obj/scp.dmi'
|
||||
icon_state = "294_bottom"
|
||||
amount = 10
|
||||
resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF | LAVA_PROOF
|
||||
working_state = null
|
||||
nopower_state = null
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
var/static/list/shortcuts = list(
|
||||
"meth" = "methamphetamine",
|
||||
"tricord" = "tricordrazine"
|
||||
)
|
||||
var/mutable_appearance/top_overlay
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/Initialize()
|
||||
. = ..()
|
||||
GLOB.poi_list += src
|
||||
top_overlay = mutable_appearance(icon, "294_top", layer = ABOVE_ALL_MOB_LAYER)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/update_icon()
|
||||
cut_overlays()
|
||||
add_overlay(top_overlay)
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/Destroy()
|
||||
. = ..()
|
||||
GLOB.poi_list -= src
|
||||
QDEL_NULL(top_overlay)
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/display_beaker()
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "scp_294", name, 390, 315, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
update_icon()
|
||||
switch(action)
|
||||
if("ejectBeaker")
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
. = TRUE
|
||||
if("input")
|
||||
var/input_reagent = replacetext(lowertext(input("Enter the name of any liquid", "Input") as text), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
|
||||
if(shortcuts[input_reagent])
|
||||
input_reagent = shortcuts[input_reagent]
|
||||
else
|
||||
input_reagent = find_reagent(input_reagent)
|
||||
if(!input_reagent || !GLOB.chemical_reagents_list[input_reagent])
|
||||
say("OUT OF RANGE")
|
||||
return
|
||||
else
|
||||
if(!beaker)
|
||||
return
|
||||
else if(!beaker.reagents && !QDELETED(beaker))
|
||||
beaker.create_reagents(beaker.volume)
|
||||
beaker.reagents.add_reagent(input_reagent, amount)
|
||||
if("makecup")
|
||||
if(beaker)
|
||||
return
|
||||
beaker = new /obj/item/reagent_containers/food/drinks/sillycup(src)
|
||||
visible_message("<span class='notice'>[src] dispenses a small, paper cup.</span>")
|
||||
|
||||
/obj/machinery/chem_dispenser/scp_294/proc/find_reagent(input)
|
||||
. = FALSE
|
||||
if(GLOB.chemical_reagents_list[input]) //prefer IDs!
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[input]
|
||||
if(R.can_synth)
|
||||
return input
|
||||
else
|
||||
for(var/X in GLOB.chemical_reagents_list)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[X]
|
||||
if(R.can_synth && input == replacetext(lowertext(R.name), " ", ""))
|
||||
return X
|
||||
Reference in New Issue
Block a user