mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Adds a new option to pandemic (#20628)
* Adds a new option to pandemic This option empties and ejects beaker * refactored code
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
wait = 1
|
||||
update_icon()
|
||||
spawn(waittime)
|
||||
src.wait = null
|
||||
wait = null
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 30, 1)
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
B.reagents.add_reagent("vaccine", 15, list(vaccine_type))
|
||||
replicator_cooldown(200)
|
||||
else
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
temp_html = "The replicator is not ready yet."
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if (href_list["create_virus_culture"])
|
||||
if(!wait)
|
||||
@@ -125,24 +125,31 @@
|
||||
B.name = "[name] culture bottle"
|
||||
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
|
||||
B.reagents.add_reagent("blood",20,data)
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
else
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
temp_html = "The replicator is not ready yet."
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if (href_list["empty_beaker"])
|
||||
beaker.reagents.clear_reagents()
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker.forceMove(get_turf(loc))
|
||||
beaker = null
|
||||
icon_state = "mixer0"
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if (href_list["emptyeject_beaker"])
|
||||
beaker.reagents.clear_reagents()
|
||||
beaker.forceMove(get_turf(loc))
|
||||
beaker = null
|
||||
icon_state = "mixer0"
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(href_list["clear"])
|
||||
src.temp_html = ""
|
||||
src.updateUsrDialog()
|
||||
temp_html = ""
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(href_list["name_disease"])
|
||||
var/new_name = stripped_input(usr, "Name the Disease", "New Name", "", MAX_NAME_LEN)
|
||||
@@ -156,15 +163,15 @@
|
||||
A.AssignName(new_name)
|
||||
for(var/datum/disease/advance/AD in SSdisease.processing)
|
||||
AD.Refresh()
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
else
|
||||
usr << browse(null, "window=pandemic")
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/pandemic/attack_hand(mob/user)
|
||||
@@ -172,7 +179,7 @@
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(src.temp_html)
|
||||
if(temp_html)
|
||||
dat = "[src.temp_html]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
|
||||
else if(!beaker)
|
||||
dat += "Please insert beaker.<BR>"
|
||||
@@ -257,7 +264,8 @@
|
||||
dat += "nothing<BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject beaker</A>[((R.total_volume&&R.reagent_list.len) ? "-- <A href='?src=\ref[src];empty_beaker=1'>Empty beaker</A>":"")]<BR>"
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject beaker</A>[((R.total_volume&&R.reagent_list.len) ? "-- <A href='?src=\ref[src];empty_beaker=1'>Empty beaker</A>":"")]"
|
||||
dat += "[((R.total_volume&&R.reagent_list.len) ? "-- <A href='?src=\ref[src];emptyeject_beaker=1'>Empty and Eject beaker</A>":"")]<BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
|
||||
user << browse("<TITLE>[src.name]</TITLE><BR>[dat]", "window=pandemic;size=575x400")
|
||||
@@ -279,7 +287,7 @@
|
||||
beaker = I
|
||||
beaker.loc = src
|
||||
user << "<span class='notice'>You add the beaker to the machine.</span>"
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
icon_state = "mixer1"
|
||||
else
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user