mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-07-19 21:12:41 +01:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,941 @@
|
||||
/obj/submachine/chef_sink
|
||||
name = "kitchen sink"
|
||||
desc = "A water-filled unit intended for cookery purposes."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "sink"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 12
|
||||
flags = NOSPLASH
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/reagent_containers/food/snacks/ingredient/flour))
|
||||
user.show_text("You add water to the flour to make dough!", "blue")
|
||||
new /obj/item/reagent_containers/food/snacks/ingredient/dough(src.loc)
|
||||
qdel (W)
|
||||
else if (istype(W, /obj/item/reagent_containers/glass/) || istype(W, /obj/item/reagent_containers/food/drinks/) || istype(W, /obj/item/reagent_containers/balloon/))
|
||||
var/fill = W.reagents.maximum_volume
|
||||
if (fill == W.reagents.total_volume)
|
||||
user.show_text("[W] is too full already.", "red")
|
||||
else
|
||||
fill -= W.reagents.total_volume
|
||||
W.reagents.add_reagent("water", fill)
|
||||
user.show_text("You fill [W] with water.", "blue")
|
||||
playsound(src.loc, "sound/misc/pourdrink.ogg", 100, 1)
|
||||
else if (istype(W, /obj/item/mop)) // dude whatever
|
||||
var/fill = W.reagents.maximum_volume
|
||||
if (fill == W.reagents.total_volume)
|
||||
user.show_text("[W] is too wet already.", "red")
|
||||
else
|
||||
fill -= W.reagents.total_volume
|
||||
W.reagents.add_reagent("water", fill)
|
||||
user.show_text("You wet [W].", "blue")
|
||||
playsound(src.loc, "sound/effects/slosh.ogg", 100, 1)
|
||||
else
|
||||
user.visible_message("<span style=\"color:blue\">[user] cleans [W].</span>")
|
||||
W.clean_forensic() // There's a global proc for this stuff now (Convair880).
|
||||
if (istype(W, /obj/item/device/key/skull))
|
||||
W.icon_state = "skull"
|
||||
if (W.reagents)
|
||||
W.reagents.clear_reagents() // avoid null error
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
playsound(src.loc, "sound/effects/slosh.ogg", 100, 1)
|
||||
if (H.gloves)
|
||||
user.visible_message("<span style=\"color:blue\">[user] cleans [his_or_her(user)] gloves.</span>")
|
||||
H.gloves.clean_forensic() // Ditto (Convair880).
|
||||
H.set_clothing_icon_dirty()
|
||||
else
|
||||
user.visible_message("<span style=\"color:blue\">[user] washes [his_or_her(user)] hands.</span>")
|
||||
if (H.sims)
|
||||
H.sims.affectMotive("hygiene", 2)
|
||||
H.blood_DNA = null // Don't want to use it here, though. The sink isn't a shower (Convair880).
|
||||
H.blood_type = null
|
||||
H.set_clothing_icon_dirty()
|
||||
..()
|
||||
|
||||
/obj/submachine/ice_cream_dispenser
|
||||
name = "Ice Cream Dispenser"
|
||||
desc = "A machine designed to dispense space ice cream."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "ice_creamer0"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 18
|
||||
flags = NOSPLASH
|
||||
var/list/flavors = list("chocolate","vanilla","coffee")
|
||||
var/obj/item/reagent_containers/glass/beaker = null
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream_cone/cone = null
|
||||
var/doing_a_thing = 0
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat = "<b>Ice Cream-O-Mat 9900</b><br>"
|
||||
if(src.cone)
|
||||
dat += "<a href='?src=\ref[src];eject=cone'>Eject Cone</a><br>"
|
||||
dat += "<b>Select a Flavor:</b><br><ul>"
|
||||
for(var/flavor in flavors)
|
||||
dat += "<li><a href='?src=\ref[src];flavor=[flavor]'>[capitalize(flavor)]</a></li>"
|
||||
if(src.beaker)
|
||||
dat += "<li><a href='?src=\ref[src];flavor=beaker'>From Beaker</a></li>"
|
||||
dat += "</ul><br>"
|
||||
|
||||
else
|
||||
dat += "<b>No Cone Inserted!</b><br>"
|
||||
|
||||
if(src.beaker)
|
||||
dat += "<a href='?src=\ref[src];eject=beaker'>Eject Beaker</a><br>"
|
||||
|
||||
user << browse(dat, "window=icecream;size=400x500")
|
||||
onclose(user, "icecream")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if (istype(src.loc, /turf) && (( get_dist(src, usr) <= 1) || issilicon(usr) ))
|
||||
if (!isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
usr.machine = src
|
||||
|
||||
if(href_list["eject"])
|
||||
switch(href_list["eject"])
|
||||
if("beaker")
|
||||
if(src.beaker)
|
||||
src.beaker.set_loc(src.loc)
|
||||
src.beaker = null
|
||||
src.update_icon()
|
||||
|
||||
if("cone")
|
||||
if(src.cone)
|
||||
src.cone.set_loc(src.loc)
|
||||
src.cone = null
|
||||
src.update_icon()
|
||||
|
||||
else if(href_list["flavor"])
|
||||
if(doing_a_thing)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
if(!cone)
|
||||
boutput(usr, "<span style=\"color:red\">There is no cone loaded!</span>")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
var/the_flavor = href_list["flavor"]
|
||||
if(the_flavor == "beaker")
|
||||
if(!beaker)
|
||||
boutput(usr, "<span style=\"color:red\">There is no beaker loaded!</span>")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!beaker.reagents.total_volume)
|
||||
boutput(usr, "<span style=\"color:red\">The beaker is empty!</span>")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
doing_a_thing = 1
|
||||
qdel(src.cone)
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream/newcream = new
|
||||
beaker.reagents.trans_to(newcream,40)
|
||||
newcream.set_loc(src.loc)
|
||||
|
||||
else
|
||||
if(the_flavor in src.flavors)
|
||||
doing_a_thing = 1
|
||||
qdel(src.cone)
|
||||
var/obj/item/reagent_containers/food/snacks/ice_cream/newcream = new
|
||||
newcream.reagents.add_reagent(the_flavor,40)
|
||||
newcream.set_loc(src.loc)
|
||||
else
|
||||
boutput(usr, "<span style=\"color:red\">Unknown flavor!</span>")
|
||||
|
||||
doing_a_thing = 0
|
||||
src.update_icon()
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/reagent_containers/food/snacks/ice_cream_cone))
|
||||
if(src.cone)
|
||||
boutput(user, "There is already a cone loaded.")
|
||||
return
|
||||
else
|
||||
user.drop_item()
|
||||
W.set_loc(src)
|
||||
src.cone = W
|
||||
boutput(user, "<span style=\"color:blue\">You load the cone into [src].</span>")
|
||||
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if (istype(W, /obj/item/reagent_containers/glass/) || istype(W, /obj/item/reagent_containers/food/drinks/))
|
||||
if(src.beaker)
|
||||
boutput(user, "There is already a beaker loaded.")
|
||||
return
|
||||
else
|
||||
user.drop_item()
|
||||
W.set_loc(src)
|
||||
src.beaker = W
|
||||
boutput(user, "<span style=\"color:red\">You load [W] into [src].</span>")
|
||||
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
else ..()
|
||||
|
||||
proc/update_icon()
|
||||
if(src.beaker)
|
||||
src.overlays += image(src.icon, "ice_creamer_beaker")
|
||||
else
|
||||
src.overlays.len = 0
|
||||
|
||||
src.icon_state = "ice_creamer[src.cone ? "1" : "0"]"
|
||||
|
||||
return
|
||||
|
||||
/// COOKING RECODE ///
|
||||
|
||||
var/list/oven_recipes = list()
|
||||
|
||||
/obj/submachine/chef_oven
|
||||
name = "oven"
|
||||
desc = "A multi-cooking unit featuring a hob, grill, oven and more."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "oven_off"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 18
|
||||
flags = NOSPLASH
|
||||
var/working = 0
|
||||
var/time = 5
|
||||
var/heat = "Low"
|
||||
var/list/recipes = null
|
||||
//var/allowed = list(/obj/item/reagent_containers/food/, /obj/item/parts/robot_parts/head, /obj/item/clothing/head/butt, /obj/item/organ/brain/obj/item)
|
||||
var/allowed = list(/obj/item)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (!src.working)
|
||||
user.machine = src
|
||||
var/dat = {"<B>Cookomatic Multi-Oven</B><BR>
|
||||
<HR>
|
||||
<B>Contents:</B><BR>"}
|
||||
for (var/obj/item/I in src.contents)
|
||||
dat += "[I]<BR>"
|
||||
dat += {"<HR>
|
||||
<B>Time:</B> [time]<BR>
|
||||
<B>Heat:</B> [heat]<BR>
|
||||
<HR>
|
||||
<A href='?src=\ref[src];cook=1'>Cook!</A><BR>
|
||||
Time: <A href='?src=\ref[src];time=1'>-</A> <A href='?src=\ref[src];time=2'>+</A><BR>
|
||||
Heat: <A href='?src=\ref[src];heat=1'>-</A> <A href='?src=\ref[src];heat=2'>+</A><BR>
|
||||
<A href='?src=\ref[src];eject=1'>Eject Contents</A>"}
|
||||
user << browse(dat, "window=oven;size=400x500")
|
||||
onclose(user, "oven")
|
||||
else
|
||||
user.machine = src
|
||||
var/dat = {"<B>Cookomatic Multi-Oven</B><BR>
|
||||
<HR><BR>
|
||||
Cooking! Please wait!"}
|
||||
user << browse(dat, "window=oven;size=400x500")
|
||||
onclose(user, "oven")
|
||||
|
||||
New()
|
||||
// Note - The order these are placed in matters! Put more complex recipes before simpler ones, or the way the
|
||||
// oven checks through the recipe list will make it pick the simple recipe and finish the cooking proc
|
||||
// before it even gets to the more complex recipe, wasting the ingredients that would have gone to the
|
||||
// more complicated one and pissing off the chef by giving something different than what he wanted!
|
||||
|
||||
src.recipes = oven_recipes
|
||||
if (!src.recipes)
|
||||
src.recipes = list()
|
||||
|
||||
if (!src.recipes.len)
|
||||
src.recipes += new /datum/cookingrecipe/omelette_bee(src)
|
||||
src.recipes += new /datum/cookingrecipe/omelette(src)
|
||||
src.recipes += new /datum/cookingrecipe/monster(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_h(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_p_h(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_p(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_s(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_m(src)
|
||||
src.recipes += new /datum/cookingrecipe/scarewich_c(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_m_h(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_m_m(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_m_s(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_c(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_p_h(src)
|
||||
src.recipes += new /datum/cookingrecipe/elviswich_p(src)
|
||||
src.recipes += new /datum/cookingrecipe/sandwich_mb(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_m_h(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_m_m(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_m_s(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_c(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_p_h(src)
|
||||
//src.recipes += new /datum/cookingrecipe/sandwich_p(src)
|
||||
src.recipes += new /datum/cookingrecipe/sandwich_custom(src)
|
||||
src.recipes += new /datum/cookingrecipe/ultrachili(src)
|
||||
src.recipes += new /datum/cookingrecipe/baconator(src)
|
||||
src.recipes += new /datum/cookingrecipe/cheeseburger_m(src)
|
||||
src.recipes += new /datum/cookingrecipe/cheeseburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/humanburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/monkeyburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/synthburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/baconburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/mysteryburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/assburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/heartburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/brainburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/fishburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/sloppyjoe(src)
|
||||
src.recipes += new /datum/cookingrecipe/superchili(src)
|
||||
src.recipes += new /datum/cookingrecipe/chili(src)
|
||||
src.recipes += new /datum/cookingrecipe/queso(src)
|
||||
src.recipes += new /datum/cookingrecipe/roburger(src)
|
||||
src.recipes += new /datum/cookingrecipe/swede_mball(src)
|
||||
src.recipes += new /datum/cookingrecipe/donkpocket(src)
|
||||
src.recipes += new /datum/cookingrecipe/donkpocket2(src)
|
||||
src.recipes += new /datum/cookingrecipe/cornbread4(src)
|
||||
src.recipes += new /datum/cookingrecipe/cornbread3(src)
|
||||
src.recipes += new /datum/cookingrecipe/cornbread2(src)
|
||||
src.recipes += new /datum/cookingrecipe/cornbread1(src)
|
||||
src.recipes += new /datum/cookingrecipe/elvis_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/banana_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/pumpkin_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/spooky_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/banana_bread_alt(src)
|
||||
src.recipes += new /datum/cookingrecipe/honeywheat_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/eggnog(src)
|
||||
src.recipes += new /datum/cookingrecipe/brain_bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/donut(src)
|
||||
src.recipes += new /datum/cookingrecipe/ice_cream_cone(src)
|
||||
src.recipes += new /datum/cookingrecipe/waffles(src)
|
||||
src.recipes += new /datum/cookingrecipe/spaghetti_m(src)
|
||||
src.recipes += new /datum/cookingrecipe/spaghetti_s(src)
|
||||
src.recipes += new /datum/cookingrecipe/spaghetti_t(src)
|
||||
src.recipes += new /datum/cookingrecipe/spaghetti_p(src)
|
||||
src.recipes += new /datum/cookingrecipe/breakfast(src)
|
||||
src.recipes += new /datum/cookingrecipe/elvischeesetoast(src)
|
||||
src.recipes += new /datum/cookingrecipe/elvisbacontoast(src)
|
||||
src.recipes += new /datum/cookingrecipe/cheesetoast(src)
|
||||
src.recipes += new /datum/cookingrecipe/bacontoast(src)
|
||||
/*
|
||||
src.recipes += new /datum/cookingrecipe/pizza_mushpoison(src)
|
||||
src.recipes += new /datum/cookingrecipe/pizza_mushdrug(src)
|
||||
src.recipes += new /datum/cookingrecipe/pizza_mushnorm(src)
|
||||
src.recipes += new /datum/cookingrecipe/pizza_meat(src)
|
||||
src.recipes += new /datum/cookingrecipe/pizza_plain(src)
|
||||
*/
|
||||
src.recipes += new /datum/cookingrecipe/nougat(src)
|
||||
src.recipes += new /datum/cookingrecipe/cereal_honey(src)
|
||||
|
||||
src.recipes += new /datum/cookingrecipe/bakedpotato(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_apple(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_lime(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_lemon(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_slurry(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_pumpkin(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_custard(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_cream(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_strawberry(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_anything(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_bacon(src)
|
||||
src.recipes += new /datum/cookingrecipe/pie_ass(src)
|
||||
src.recipes += new /datum/cookingrecipe/candy_apple(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_bacon(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_downs(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_meat(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_chocolate(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_cream(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_custom(src)
|
||||
src.recipes += new /datum/cookingrecipe/hotdog(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_spooky(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_jaffa(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_bacon(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_oatmeal(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_chocolate_chip(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie_iron(src)
|
||||
src.recipes += new /datum/cookingrecipe/cookie(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_spooky(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_jaffa(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_bacon(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_chocolate(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_oatmeal(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_chips(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie_iron(src)
|
||||
src.recipes += new /datum/cookingrecipe/moon_pie(src)
|
||||
src.recipes += new /datum/cookingrecipe/granola_bar(src)
|
||||
// Put all single-ingredient recipes after this point
|
||||
src.recipes += new /datum/cookingrecipe/cake_custom_item(src)
|
||||
src.recipes += new /datum/cookingrecipe/pancake(src)
|
||||
src.recipes += new /datum/cookingrecipe/bread(src)
|
||||
src.recipes += new /datum/cookingrecipe/oatmeal(src)
|
||||
src.recipes += new /datum/cookingrecipe/salad(src)
|
||||
src.recipes += new /datum/cookingrecipe/tomsoup(src)
|
||||
src.recipes += new /datum/cookingrecipe/toast_brain(src)
|
||||
src.recipes += new /datum/cookingrecipe/toast_banana(src)
|
||||
src.recipes += new /datum/cookingrecipe/toast_elvis(src)
|
||||
src.recipes += new /datum/cookingrecipe/toast_spooky(src)
|
||||
src.recipes += new /datum/cookingrecipe/toast(src)
|
||||
src.recipes += new /datum/cookingrecipe/fries(src)
|
||||
src.recipes += new /datum/cookingrecipe/taco_shell(src)
|
||||
src.recipes += new /datum/cookingrecipe/bacon(src)
|
||||
src.recipes += new /datum/cookingrecipe/steak_h(src)
|
||||
src.recipes += new /datum/cookingrecipe/steak_m(src)
|
||||
src.recipes += new /datum/cookingrecipe/steak_s(src)
|
||||
src.recipes += new /datum/cookingrecipe/fish_fingers(src)
|
||||
src.recipes += new /datum/cookingrecipe/meatloaf(src)
|
||||
|
||||
Topic(href, href_list)
|
||||
if ((get_dist(src, usr) > 1 && !issilicon(usr)) || !isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
if (href_list["cook"])
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">It's already working.</span>")
|
||||
return
|
||||
var/amount = src.contents.len
|
||||
if (!amount)
|
||||
boutput(usr, "<span style=\"color:red\">There's nothing in the oven to cook.</span>")
|
||||
return
|
||||
var/output = null
|
||||
var/cook_amt = src.time
|
||||
var/bonus = 0
|
||||
var/derivename = 0
|
||||
var/recipebonus = 0
|
||||
var/recook = 0
|
||||
if (src.heat == "High") cook_amt *= 2
|
||||
for (var/datum/cookingrecipe/R in src.recipes)
|
||||
if (R.item1)
|
||||
if (!OVEN_checkitem(R.item1, R.amt1)) continue
|
||||
if (R.item2)
|
||||
if (!OVEN_checkitem(R.item2, R.amt2)) continue
|
||||
if (R.item3)
|
||||
if (!OVEN_checkitem(R.item3, R.amt3)) continue
|
||||
if (R.item4)
|
||||
if (!OVEN_checkitem(R.item4, R.amt4)) continue
|
||||
|
||||
output = R.specialOutput(src)
|
||||
if (isnull(output))
|
||||
output = R.output
|
||||
|
||||
score_meals += 1
|
||||
if (R.useshumanmeat) derivename = 1
|
||||
recipebonus = R.cookbonus
|
||||
if (cook_amt == R.cookbonus) bonus = 1
|
||||
else if (cook_amt == R.cookbonus + 1) bonus = 1
|
||||
else if (cook_amt == R.cookbonus - 1) bonus = 1
|
||||
else if (cook_amt <= R.cookbonus - 5) bonus = -1
|
||||
else if (cook_amt >= R.cookbonus + 5)
|
||||
output = /obj/item/reagent_containers/food/snacks/yuckburn
|
||||
bonus = 0
|
||||
break
|
||||
|
||||
if (isnull(output))
|
||||
output = /obj/item/reagent_containers/food/snacks/yuck
|
||||
|
||||
if (amount == 1 && output == /obj/item/reagent_containers/food/snacks/yuck)
|
||||
for (var/obj/item/reagent_containers/food/snacks/F in src)
|
||||
if(F.quality < 1)
|
||||
recook = 1
|
||||
if (cook_amt == F.quality) F.quality = 1.5
|
||||
else if (cook_amt == F.quality + 1) F.quality = 1
|
||||
else if (cook_amt == F.quality - 1) F.quality = 1
|
||||
else if (cook_amt <= F.quality - 5) F.quality = 0.5
|
||||
else if (cook_amt >= F.quality + 5)
|
||||
output = /obj/item/reagent_containers/food/snacks/yuckburn
|
||||
bonus = 0
|
||||
src.working = 1
|
||||
src.icon_state = "oven_bake"
|
||||
src.updateUsrDialog()
|
||||
spawn(cook_amt * 10)
|
||||
|
||||
if(recook && bonus !=0)
|
||||
for (var/obj/item/reagent_containers/food/snacks/F in src)
|
||||
if (bonus == 1)
|
||||
if (F.quality != 1)
|
||||
F.quality = 1
|
||||
else if (bonus == -1)
|
||||
if (F.quality > 0.5)
|
||||
F.quality = 0.5
|
||||
F.heal_amt = 0
|
||||
F.set_loc(src.loc)
|
||||
else
|
||||
var/obj/item/reagent_containers/food/snacks/F
|
||||
if (ispath(output))
|
||||
F = new output(src.loc)
|
||||
else
|
||||
F = output
|
||||
F.set_loc( get_turf(src) )
|
||||
|
||||
if (bonus == 1)
|
||||
F.quality = 5
|
||||
else if (bonus == -1)
|
||||
F.quality = recipebonus - cook_amt
|
||||
F.heal_amt = 0
|
||||
if (derivename)
|
||||
var/foodname = F.name
|
||||
for (var/obj/item/reagent_containers/food/snacks/ingredient/meat/humanmeat/M in src.contents)
|
||||
F.name = "[M.subjectname] [foodname]"
|
||||
F.desc += " It sort of smells like [M.subjectjob ? M.subjectjob : "pig"]s."
|
||||
if (M.subjectjob && M.subjectjob == "Clown" && isnull(F.unlock_medal_when_eaten))
|
||||
F.unlock_medal_when_eaten = "That tasted funny"
|
||||
src.icon_state = "oven_off"
|
||||
src.working = 0
|
||||
playsound(src.loc, "sound/machines/ding.ogg", 50, 1)
|
||||
for (var/atom/movable/I in src.contents)
|
||||
qdel(I)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["time"])
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">It's already working.</span>")
|
||||
return
|
||||
var/operation = text2num(href_list["time"])
|
||||
if(operation == 1 && src.time > 1) src.time -= 1
|
||||
if(operation == 2 && src.time < 10) src.time += 1
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["heat"])
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">The dials are locked! THIS IS HOW OVENS WORK OK</span>")
|
||||
return
|
||||
var/operation = text2num(href_list["heat"])
|
||||
if(operation == 1 && src.heat == "High") src.heat = "Low"
|
||||
if(operation == 2 && src.heat == "Low") src.heat = "High"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["eject"])
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">Too late! It's already cooking, ejecting the food would ruin everything forever!</span>")
|
||||
return
|
||||
for (var/obj/item/I in src.contents)
|
||||
I.set_loc(src.loc)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
suicide(var/mob/user as mob)
|
||||
user.visible_message("<span style=\"color:red\"><b>[user] shoves \his head in the oven and turns it on.</b></span>")
|
||||
src.icon_state = "oven_bake"
|
||||
user.TakeDamage("head", 0, 150)
|
||||
sleep(50)
|
||||
src.icon_state = "oven_off"
|
||||
sleep(50)
|
||||
user.suiciding = 0
|
||||
return 1
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">It's already on! Putting a new thing in could result in a collapse of the cooking waveform into a really lousy eigenstate, like a vending machine chili dog.</span>")
|
||||
return
|
||||
var/amount = src.contents.len
|
||||
if (amount >= 8)
|
||||
boutput(user, "<span style=\"color:red\">The oven cannot hold any more items.</span>")
|
||||
return
|
||||
var/proceed = 0
|
||||
for(var/check_path in src.allowed)
|
||||
if(istype(W, check_path))
|
||||
proceed = 1
|
||||
break
|
||||
if (amount == 1)
|
||||
var/cakecount
|
||||
for (var/obj/item/reagent_containers/food/snacks/cake/cream/C in src.contents) cakecount++
|
||||
if (cakecount == 1) proceed = 1
|
||||
if (!proceed)
|
||||
boutput(user, "<span style=\"color:red\">You can't put that in the oven!</span>")
|
||||
return
|
||||
user.visible_message("<span style=\"color:blue\">[user] loads [W] into the [src].</span>")
|
||||
user.u_equip(W)
|
||||
W.set_loc(src)
|
||||
W.dropped()
|
||||
src.updateUsrDialog()
|
||||
|
||||
proc/OVEN_checkitem(var/recipeitem, var/recipecount)
|
||||
if (!locate(recipeitem) in src.contents) return 0
|
||||
var/count = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(istype(I, recipeitem))
|
||||
count++
|
||||
if (count < recipecount)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/submachine/foodprocessor
|
||||
name = "Processor"
|
||||
desc = "Refines various food substances into different forms."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "processor-off"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 18
|
||||
var/working = 0
|
||||
var/allowed = list(/obj/item/reagent_containers/food/, /obj/item/plant/, /obj/item/organ/brain, /obj/item/clothing/head/butt)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (src.contents.len < 1)
|
||||
boutput(user, "<span style=\"color:red\">There is nothing in the processor!</span>")
|
||||
return
|
||||
if (src.working == 1)
|
||||
boutput(user, "<span style=\"color:red\">The processor is busy!</span>")
|
||||
return
|
||||
src.icon_state = "processor-on"
|
||||
src.working = 1
|
||||
src.visible_message("The [src] begins processing its contents.")
|
||||
sleep(rand(30,70))
|
||||
// Dispense processed stuff
|
||||
for(var/obj/item/P in src.contents)
|
||||
switch( P.type )
|
||||
if (/obj/item/reagent_containers/food/snacks/ingredient/meat/humanmeat)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = P:subjectname + " meatball"
|
||||
F.desc = "Meaty balls taken from the station's finest [P:subjectjob]."
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/ingredient/meat/monkeymeat)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = "monkey meatball"
|
||||
F.desc = "Welcome to Space Station 13, where you too can eat a rhesus macaque's balls."
|
||||
qdel( P )
|
||||
if (/obj/item/organ/brain)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = "brain meatball"
|
||||
F.desc = "Oh jesus, brain meatballs? That's just nasty."
|
||||
qdel( P )
|
||||
if (/obj/item/clothing/head/butt)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = "buttball"
|
||||
F.desc = "The best you can hope for is that the meat was lean..."
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/ingredient/meat/synthmeat)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = "synthetic meatball"
|
||||
F.desc = "Let's be honest, this is probably as good as these things are going to get."
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/ingredient/meat/mysterymeat)
|
||||
var/obj/item/reagent_containers/food/snacks/meatball/F = new(src.loc)
|
||||
F.name = "mystery meatball"
|
||||
F.desc = "A meatball of even more dubious quality than usual."
|
||||
qdel( P )
|
||||
if (/obj/item/plant/wheat/metal)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/ironfilings/(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/plant/wheat)
|
||||
new/obj/item/reagent_containers/food/snacks/ingredient/flour/(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/tomato)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/ketchup(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/peanuts)
|
||||
new/obj/item/reagent_containers/food/snacks/ingredient/peanutbutter(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/ingredient/egg)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/mayo(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/chili/chilly)
|
||||
var/datum/plantgenes/DNA = P:plantgenes
|
||||
var/obj/item/reagent_containers/food/snacks/condiment/coldsauce/F = new(src.loc)
|
||||
F.reagents.add_reagent("cryostylane", DNA.potency)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/chili/ghost_chili)
|
||||
var/datum/plantgenes/DNA = P:plantgenes
|
||||
var/obj/item/reagent_containers/food/snacks/condiment/hotsauce/ghostchilisauce/F = new(src.loc)
|
||||
F.reagents.add_reagent("ghostchilijuice", 5 + DNA.potency)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/chili)
|
||||
var/datum/plantgenes/DNA = P:plantgenes
|
||||
var/obj/item/reagent_containers/food/snacks/condiment/hotsauce/F = new(src.loc)
|
||||
F.reagents.add_reagent("capsaicin", DNA.potency)
|
||||
qdel( P )
|
||||
if (/obj/item/plant/sugar)
|
||||
var/obj/item/reagent_containers/food/snacks/ingredient/sugar/F = new(src.loc)
|
||||
F.reagents.add_reagent("sugar", 20)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/drinks/milk)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/cream(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/drinks/milk/soy)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/cream(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/drinks/milk/rancid)
|
||||
new/obj/item/reagent_containers/food/snacks/yoghurt(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/candy)
|
||||
new/obj/item/reagent_containers/food/snacks/condiment/chocchips(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/corn)
|
||||
new/obj/item/reagent_containers/food/snacks/popcorn(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/avocado)
|
||||
new/obj/item/reagent_containers/food/snacks/soup/guacamole(src.loc)
|
||||
qdel( P )
|
||||
if (/obj/item/reagent_containers/food/snacks/plant/soy)
|
||||
new/obj/item/reagent_containers/food/drinks/milk/soy(src.loc)
|
||||
qdel( P )
|
||||
// Wind down
|
||||
for(var/obj/item/S in src.contents)
|
||||
S.set_loc(get_turf(src))
|
||||
src.working = 0
|
||||
src.icon_state = "processor-off"
|
||||
playsound(src.loc, "sound/machines/ding.ogg", 100, 1)
|
||||
return
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/satchel/))
|
||||
var/obj/item/satchel/S = W
|
||||
if (S.contents.len < 1) boutput(usr, "<span style=\"color:red\">There's nothing in the satchel!</span>")
|
||||
else
|
||||
user.visible_message("<span style=\"color:blue\">[user] loads [S]'s contents into [src]!</span>")
|
||||
var/amtload = 0
|
||||
for (var/obj/item/reagent_containers/food/F in S.contents)
|
||||
F.set_loc(src)
|
||||
amtload++
|
||||
for (var/obj/item/plant/P in S.contents)
|
||||
P.set_loc(src)
|
||||
amtload++
|
||||
W:satchel_updateicon()
|
||||
boutput(user, "<span style=\"color:blue\">[amtload] items loaded from satchel!</span>")
|
||||
S.desc = "A leather bag. It holds [S.contents.len]/[S.maxitems] [S.itemstring]."
|
||||
return
|
||||
else
|
||||
var/proceed = 0
|
||||
for(var/check_path in src.allowed)
|
||||
if(istype(W, check_path))
|
||||
proceed = 1
|
||||
break
|
||||
if (!proceed)
|
||||
boutput(user, "<span style=\"color:red\">You can't put that in the processor!</span>")
|
||||
return
|
||||
user.visible_message("<span style=\"color:blue\">[user] loads [W] into the [src].</span>")
|
||||
user.u_equip(W)
|
||||
W.set_loc(src)
|
||||
W.dropped()
|
||||
return
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if (get_dist(src, usr) > 1 || !isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
if (over_object == usr && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
for(var/obj/item/P in src.contents)
|
||||
P.set_loc(get_turf(src))
|
||||
for(var/mob/O in AIviewers(usr, null))
|
||||
O.show_message("<span style=\"color:blue\">[usr] empties the [src].</span>")
|
||||
return
|
||||
|
||||
MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if (get_dist(src, user) > 1 || !isliving(user) || iswraith(user) || isintangible(user))
|
||||
return
|
||||
if (user.stunned > 0 || user.weakened > 0 || user.paralysis > 0 || user.stat != 0 || user.restrained())
|
||||
return
|
||||
|
||||
if (istype(O, /obj/storage))
|
||||
if (O:locked)
|
||||
boutput(user, "<span style=\"color:red\">You need to unlock it first!</span>")
|
||||
return
|
||||
user.visible_message("<span style=\"color:blue\">[user] loads [O]'s contents into [src]!</span>")
|
||||
var/amtload = 0
|
||||
for (var/obj/item/reagent_containers/food/M in O.contents)
|
||||
M.set_loc(src)
|
||||
amtload++
|
||||
for (var/obj/item/plant/P in O.contents)
|
||||
P.set_loc(src)
|
||||
amtload++
|
||||
if (amtload) boutput(user, "<span style=\"color:blue\">[amtload] items of food loaded from [O]!</span>")
|
||||
else boutput(user, "<span style=\"color:red\">No food loaded!</span>")
|
||||
else if (istype(O, /obj/item/reagent_containers/food/) || istype(O, /obj/item/plant/))
|
||||
user.visible_message("<span style=\"color:blue\">[user] begins quickly stuffing food into [src]!</span>")
|
||||
var/staystill = user.loc
|
||||
for(var/obj/item/reagent_containers/food/M in view(1,user))
|
||||
M.set_loc(src)
|
||||
sleep(3)
|
||||
if (user.loc != staystill) break
|
||||
for(var/obj/item/plant/P in view(1,user))
|
||||
P.set_loc(src)
|
||||
sleep(3)
|
||||
if (user.loc != staystill) break
|
||||
boutput(user, "<span style=\"color:blue\">You finish stuffing food into [src]!</span>")
|
||||
else ..()
|
||||
src.updateUsrDialog()
|
||||
|
||||
var/list/mixer_recipes = list()
|
||||
|
||||
/obj/submachine/mixer
|
||||
name = "KitchenHelper"
|
||||
desc = "A food Mixer."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "blender"
|
||||
density = 1
|
||||
anchored = 1
|
||||
mats = 15
|
||||
var/list/recipes = null
|
||||
var/list/to_remove = list()
|
||||
var/allowed = list(/obj/item/reagent_containers/food/, /obj/item/parts/robot_parts/head, /obj/item/clothing/head/butt, /obj/item/organ/brain)
|
||||
var/working = 0
|
||||
|
||||
New()
|
||||
src.recipes = mixer_recipes
|
||||
if (!src.recipes)
|
||||
src.recipes = list()
|
||||
|
||||
if (!src.recipes.len)
|
||||
src.recipes += new /datum/cookingrecipe/mix_cake_custom(src)
|
||||
src.recipes += new /datum/cookingrecipe/pancake_batter(src)
|
||||
src.recipes += new /datum/cookingrecipe/cake_batter(src)
|
||||
src.recipes += new /datum/cookingrecipe/custard(src)
|
||||
src.recipes += new /datum/cookingrecipe/creamofmushroom/amanita(src)
|
||||
src.recipes += new /datum/cookingrecipe/creamofmushroom/psilocybin(src)
|
||||
src.recipes += new /datum/cookingrecipe/creamofmushroom(src)
|
||||
src.recipes += new /datum/cookingrecipe/mashedpotatoes(src)
|
||||
src.recipes += new /datum/cookingrecipe/mashedbrains(src)
|
||||
src.recipes += new /datum/cookingrecipe/gruel(src)
|
||||
src.recipes += new /datum/cookingrecipe/meatpaste(src)
|
||||
src.recipes += new /datum/cookingrecipe/wonton_wrapper(src)
|
||||
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
var/amount = src.contents.len
|
||||
if (amount >= 4)
|
||||
boutput(user, "<span style=\"color:red\">The mixer is full.</span>")
|
||||
return
|
||||
var/proceed = 0
|
||||
for(var/check_path in src.allowed)
|
||||
if(istype(W, check_path))
|
||||
proceed = 1
|
||||
break
|
||||
if (!proceed)
|
||||
boutput(user, "<span style=\"color:red\">You can't put that in the mixer!</span>")
|
||||
return
|
||||
user.visible_message("<span style=\"color:blue\">[user] puts [W] into the [src].</span>")
|
||||
user.u_equip(W)
|
||||
W.set_loc(src)
|
||||
W.dropped()
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (!src.working)
|
||||
user.machine = src
|
||||
var/dat = {"<B>KitchenHelper Mixer</B><BR>
|
||||
<HR>
|
||||
<B>Contents:</B><BR>"}
|
||||
for (var/obj/item/I in src.contents)
|
||||
dat += "[I]<BR>"
|
||||
dat += {"<HR>
|
||||
<A href='?src=\ref[src];mix=1'>Mix!</A><BR>
|
||||
<A href='?src=\ref[src];eject=1'>Eject Contents</A>"}
|
||||
user << browse(dat, "window=mixer;size=400x500")
|
||||
onclose(user, "mixer")
|
||||
else
|
||||
user.machine = src
|
||||
var/dat = {"<B>KitchenHelper Mixer</B><BR>
|
||||
<HR><BR>
|
||||
Mixing! Please wait!"}
|
||||
user << browse(dat, "window=mixer;size=400x500")
|
||||
onclose(user, "mixer")
|
||||
|
||||
Topic(href, href_list)
|
||||
if ((get_dist(src, usr) > 1 && !issilicon(usr)) || !isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
|
||||
if (href_list["mix"])
|
||||
if (src.working)
|
||||
boutput(usr, "<span style=\"color:red\">It's already working.</span>")
|
||||
return
|
||||
mix()
|
||||
if(href_list["eject"])
|
||||
for (var/obj/item/I in src.contents)
|
||||
I.set_loc(src.loc)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
proc/bowl_checkitem(var/recipeitem, var/recipecount)
|
||||
if (!locate(recipeitem) in src.contents) return 0
|
||||
var/count = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(istype(I, recipeitem))
|
||||
count++
|
||||
to_remove += I
|
||||
|
||||
if (count < recipecount)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
proc/mix()
|
||||
var/amount = src.contents.len
|
||||
if (!amount)
|
||||
boutput(usr, "<span style=\"color:red\">There's nothing in the mixer.</span>")
|
||||
return
|
||||
working = 1
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
playsound(src.loc, "sound/machines/mixer.ogg", 50, 1)
|
||||
var/output = null // /obj/item/reagent_containers/food/snacks/yuck
|
||||
var/derivename = 0
|
||||
for (var/datum/cookingrecipe/R in src.recipes)
|
||||
to_remove.len = 0
|
||||
if (R.item1)
|
||||
if (!bowl_checkitem(R.item1, R.amt1)) continue
|
||||
if (R.item2)
|
||||
if (!bowl_checkitem(R.item2, R.amt2)) continue
|
||||
if (R.item3)
|
||||
if (!bowl_checkitem(R.item3, R.amt3)) continue
|
||||
if (R.item4)
|
||||
if (!bowl_checkitem(R.item4, R.amt4)) continue
|
||||
output = R.specialOutput(src)
|
||||
if (!output)
|
||||
output = R.output
|
||||
score_meals += 1
|
||||
if (R.useshumanmeat)
|
||||
derivename = 1
|
||||
break
|
||||
spawn(20)
|
||||
|
||||
if (!isnull(output))
|
||||
var/obj/item/reagent_containers/food/snacks/F
|
||||
if (ispath(output))
|
||||
F = new output(get_turf(src))
|
||||
else
|
||||
F = output
|
||||
F.set_loc(get_turf(src))
|
||||
|
||||
if (derivename)
|
||||
var/foodname = F.name
|
||||
for (var/obj/item/reagent_containers/food/snacks/ingredient/meat/humanmeat/M in src.contents)
|
||||
F.name = "[M.subjectname] [foodname]"
|
||||
F.desc += " It sort of smells like [M.subjectjob ? M.subjectjob : "pig"]s."
|
||||
if (M.subjectjob && M.subjectjob == "Clown" && isnull(F.unlock_medal_when_eaten))
|
||||
F.unlock_medal_when_eaten = "That tasted funny"
|
||||
for (var/obj/item/I in to_remove)
|
||||
qdel(I)
|
||||
|
||||
for (var/obj/I in src.contents)
|
||||
I.set_loc(src.loc)
|
||||
src.visible_message("<span style=\"color:red\">[I] is tossed out of [src]!</span>")
|
||||
var/edge = get_edge_target_turf(src, pick(alldirs))
|
||||
I.throw_at(edge, 25, 4)
|
||||
|
||||
working = 0
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
proc/update_icon()
|
||||
if (!src || !istype(src))
|
||||
return
|
||||
|
||||
if (src.working != 0)
|
||||
src.icon_state = "blender_on"
|
||||
else
|
||||
src.icon_state = "blender"
|
||||
|
||||
return
|
||||
@@ -0,0 +1,2 @@
|
||||
// TODO: reincorporate all these as actual machines, but take them out of the process loop, if need be
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
// Robotics Stuff
|
||||
|
||||
/obj/submachine/robomoduler
|
||||
name = "Module Rewriter"
|
||||
desc = "A device used to rewrite robotic and cybernetic software modules."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "moduler-off"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 15
|
||||
var/working = 0
|
||||
var/modules = 0
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
user.machine = src
|
||||
if (!src.working)
|
||||
var/dat = {"<B>Module Rewriter</B><BR>
|
||||
<HR><BR>
|
||||
<B>Modules Available:</B> [modules]<BR>
|
||||
<HR><BR>
|
||||
<A href='?src=\ref[src];module=std'>Write Standard Module<BR>
|
||||
<A href='?src=\ref[src];module=med'>Write Medical Module<BR>
|
||||
<A href='?src=\ref[src];module=eng'>Write Engineering Module<BR>
|
||||
<A href='?src=\ref[src];module=jan'>Write Janitor Module<BR>
|
||||
<A href='?src=\ref[src];module=hyd'>Write Hydroponics Module<BR>
|
||||
<A href='?src=\ref[src];module=bro'>Write Brobot Module<BR>
|
||||
<A href='?src=\ref[src];module=min'>Write Mining Module<BR>
|
||||
<A href='?src=\ref[src];module=cst'>Write Construction Module<BR>
|
||||
<A href='?src=\ref[src];module=chem'>Write Chemistry Module<BR>"}
|
||||
if (ticker && ticker.mode)
|
||||
if (istype(ticker.mode, /datum/game_mode/construction))
|
||||
dat += "<A href='?src=\ref[src];module=con'>Write Construction Worker Module</A><BR>"
|
||||
user << browse(dat, "window=mwriter;size=400x500")
|
||||
onclose(user, "mwriter")
|
||||
else
|
||||
var/dat = {"<B>Module Rewriter</B><BR>
|
||||
<HR><BR>
|
||||
<B>Modules Available:</B> [modules]<BR>
|
||||
<HR><BR>
|
||||
The Rewriter is currently busy!"}
|
||||
user << browse(dat, "window=mwriter;size=400x500")
|
||||
onclose(user, "mwriter")
|
||||
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if ((get_dist(src, usr) > 1 && !issilicon(usr)) || !isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
if (src.working)
|
||||
usr.show_text("[src] is currently busy.", "red")
|
||||
return
|
||||
|
||||
if (href_list["module"])
|
||||
if (src.modules < 1)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'No modules available for write.'", src), 1)
|
||||
return
|
||||
|
||||
src.working = 1
|
||||
var/output = null
|
||||
|
||||
switch (href_list["module"])
|
||||
if ("std") output = /obj/item/robot_module/standard
|
||||
if ("med") output = /obj/item/robot_module/medical
|
||||
if ("eng") output = /obj/item/robot_module/engineering
|
||||
if ("jan") output = /obj/item/robot_module/janitor
|
||||
if ("hyd") output = /obj/item/robot_module/hydro
|
||||
if ("bro") output = /obj/item/robot_module/brobot
|
||||
if ("min") output = /obj/item/robot_module/mining
|
||||
if ("cst") output = /obj/item/robot_module/construction
|
||||
if ("chem") output = /obj/item/robot_module/chemistry
|
||||
if ("con")
|
||||
if (ticker && ticker.mode)
|
||||
if (istype(ticker.mode, /datum/game_mode/construction))
|
||||
output = /obj/item/robot_module/construction_worker
|
||||
else
|
||||
output = /obj/item/robot_module/construction
|
||||
else
|
||||
output = /obj/item/robot_module/construction
|
||||
|
||||
src.icon_state = "moduler-on"
|
||||
src.updateUsrDialog()
|
||||
|
||||
spawn (50)
|
||||
if (src)
|
||||
src.working = 0
|
||||
src.icon_state = "moduler-off"
|
||||
new output(src.loc)
|
||||
if (src.modules > 0)
|
||||
src.modules = max(0, src.modules - 1)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Work complete.'", src), 1)
|
||||
src.updateUsrDialog()
|
||||
|
||||
return
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/robot_module/) && !issilicon(user))
|
||||
boutput(user, "You insert the module.")
|
||||
user.u_equip(W)
|
||||
W.set_loc(src)
|
||||
src.modules = max(0, src.modules + 1)
|
||||
qdel(W)
|
||||
|
||||
else ..()
|
||||
return
|
||||
|
||||
/obj/item/robojumper
|
||||
name = "Cell Cables"
|
||||
desc = "Used by Engineering Cyborgs for emergency recharging of APCs."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "robojumper"
|
||||
|
||||
/obj/item/atmosporter
|
||||
name = "Atmospherics Transporter"
|
||||
desc = "Used by Atmospherics Cyborgs for convenient transport of siphons and tanks."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "bedbin"
|
||||
var/capacity = 2
|
||||
|
||||
attack_self(var/mob/user as mob)
|
||||
if (src.contents.len == 0) boutput(user, "<span style=\"color:red\">You have nothing stored!</span>")
|
||||
else
|
||||
var/selection = input("What do you want to drop?", "Atmos Transporter", null, null) as null|anything in src.contents
|
||||
if(!selection) return
|
||||
selection:set_loc(user.loc)
|
||||
selection:contained = 0
|
||||
var/datum/effects/system/spark_spread/s = unpool(/datum/effects/system/spark_spread)
|
||||
s.set_up(5, 1, user)
|
||||
s.start()
|
||||
|
||||
/obj/item/robot_chemaster
|
||||
name = "Mini-ChemMaster"
|
||||
desc = "A cybernetic tool designed for chemistry cyborgs to do their work with. Use a beaker on it to begin."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "minichem"
|
||||
flags = NOSPLASH
|
||||
var/working = 0
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (!istype(W,/obj/item/reagent_containers/glass/)) return
|
||||
var/obj/item/reagent_containers/glass/B = W
|
||||
|
||||
if(!B.reagents.reagent_list.len || B.reagents.total_volume < 1)
|
||||
boutput(user, "<span style=\"color:red\">That beaker is empty! There are no reagents for the [src.name] to process!</span>")
|
||||
return
|
||||
if (working)
|
||||
boutput(user, "<span style=\"color:red\">Chemmaster is working, be patient</span>")
|
||||
return
|
||||
|
||||
working = 1
|
||||
var/the_reagent = input("Which reagent do you want to manipulate?","Mini-ChemMaster",null,null) in B.reagents.reagent_list
|
||||
if (!the_reagent) return
|
||||
var/action = input("What do you want to do with the [the_reagent]?","Mini-ChemMaster",null,null) in list("Isolate","Purge","Remove One Unit","Remove Five Units","Create Pill","Create Pill Bottle","Create Bottle","Do Nothing")
|
||||
if (!action || action == "Do Nothing")
|
||||
working = 0
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("Isolate") B.reagents.isolate_reagent(the_reagent)
|
||||
if("Purge") B.reagents.del_reagent(the_reagent)
|
||||
if("Remove One Unit") B.reagents.remove_reagent(the_reagent, 1)
|
||||
if("Remove Five Units") B.reagents.remove_reagent(the_reagent, 5)
|
||||
if("Create Pill")
|
||||
var/obj/item/reagent_containers/pill/P = new/obj/item/reagent_containers/pill(user.loc)
|
||||
var/name = copytext(html_encode(input(usr,"Name:","Name your pill!",B.reagents.get_master_reagent_name())), 1, 32)
|
||||
if(!name || name == " ") name = B.reagents.get_master_reagent_name()
|
||||
P.name = "[name] pill"
|
||||
B.reagents.trans_to(P,B.reagents.total_volume)
|
||||
if("Create Pill Bottle")
|
||||
// copied from chem_master because fuck fixing everything at once jeez
|
||||
var/pillname = copytext( html_encode( input( usr, "Name:", "Name the pill!", B.reagents.get_master_reagent_name() ) ), 1, 32)
|
||||
if(!pillname || pillname == " ")
|
||||
pillname = B.reagents.get_master_reagent_name()
|
||||
|
||||
var/pillvol = input( usr, "Volume:", "Volume of chemical per pill!", "5" ) as num
|
||||
if( !pillvol || !isnum(pillvol) || pillvol < 5 )
|
||||
pillvol = 5
|
||||
|
||||
var/pillcount = round( B.reagents.total_volume / pillvol ) // round with a single parameter is actually floor because byond
|
||||
if(!pillcount)
|
||||
boutput(usr, "[src] makes a weird grinding noise. That can't be good.")
|
||||
else
|
||||
var/obj/item/chem_pill_bottle/pillbottle = new /obj/item/chem_pill_bottle(user.loc)
|
||||
pillbottle.create_from_reagents(B.reagents, pillname, pillvol, pillcount)
|
||||
if("Create Bottle")
|
||||
var/obj/item/reagent_containers/glass/bottle/P = new/obj/item/reagent_containers/glass/bottle(user.loc)
|
||||
var/name = copytext(html_encode(input(usr,"Name:","Name your bottle!",B.reagents.get_master_reagent_name())), 1, 32)
|
||||
if(!name || name == " ") name = B.reagents.get_master_reagent_name()
|
||||
P.name = "[name] bottle"
|
||||
B.reagents.trans_to(P,30)
|
||||
|
||||
working = 0
|
||||
|
||||
/obj/item/robot_foodsynthesizer
|
||||
name = "Food Synthesizer"
|
||||
desc = "A portable food synthesizer."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "synthesizer"
|
||||
var/vend_this = null
|
||||
var/last_use = 0
|
||||
|
||||
attack_self(var/mob/user as mob)
|
||||
if (!vend_this)
|
||||
var/pickme = input("Please make your selection!", "Item selection", src.vend_this) in list("Burger", "Cheeseburger", "Meat sandwich", "Cheese sandwich", "Snack", "Cola", "Milk")
|
||||
src.vend_this = pickme
|
||||
user.show_text("[pickme] selected. Click with the synthesizer on yourself to pick a different item.", "blue")
|
||||
return
|
||||
|
||||
if (src.last_use && world.time < src.last_use + 50)
|
||||
user.show_text("The synthesizer is recharging!", "red")
|
||||
return
|
||||
|
||||
else
|
||||
switch(src.vend_this)
|
||||
|
||||
if ("Burger")
|
||||
new /obj/item/reagent_containers/food/snacks/burger/synthburger(get_turf(src))
|
||||
if ("Cheeseburger")
|
||||
new /obj/item/reagent_containers/food/snacks/burger/cheeseburger(get_turf(src))
|
||||
if ("Meat sandwich")
|
||||
new /obj/item/reagent_containers/food/snacks/sandwich/meat_s(get_turf(src))
|
||||
if ("Cheese sandwich")
|
||||
new /obj/item/reagent_containers/food/snacks/sandwich/cheese(get_turf(src))
|
||||
if ("Snack")
|
||||
var/pick_snack = rand(1,6)
|
||||
switch(pick_snack)
|
||||
if(1)
|
||||
new /obj/item/reagent_containers/food/snacks/fries(get_turf(src))
|
||||
if(2)
|
||||
new /obj/item/reagent_containers/food/snacks/popcorn(get_turf(src))
|
||||
if(3)
|
||||
new /obj/item/reagent_containers/food/snacks/donut(get_turf(src))
|
||||
if(4)
|
||||
new /obj/item/reagent_containers/food/snacks/ice_cream/goodrandom(get_turf(src))
|
||||
if(5)
|
||||
new /obj/item/reagent_containers/food/snacks/candy/negativeonebar(get_turf(src))
|
||||
if(6)
|
||||
new /obj/item/reagent_containers/food/snacks/moon_pie/jaffa(get_turf(src))
|
||||
if ("Cola")
|
||||
new /obj/item/reagent_containers/food/drinks/cola(get_turf(src))
|
||||
if ("Milk")
|
||||
new /obj/item/reagent_containers/food/drinks/milk(get_turf(src))
|
||||
else
|
||||
user.show_text("<b>ERROR</b> - Invalid item! Resetting...", "red")
|
||||
logTheThing("debug", user, null, "<b>Convair880</b>: [user]'s food synthesizer was set to an invalid value.")
|
||||
src.vend_this = null
|
||||
return
|
||||
|
||||
if (isrobot(user)) // Carbon mobs might end up using the synthesizer somehow, I guess?
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if (R.cell) R.cell.charge -= 100
|
||||
playsound(src.loc, "sound/machines/click.ogg", 50, 1)
|
||||
user.visible_message("<span style=\"color:blue\">[user] dispenses a [src.vend_this]!</span>", "<span style=\"color:blue\">You dispense a [src.vend_this]!</span>")
|
||||
src.last_use = world.time
|
||||
return
|
||||
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
src.vend_this = null
|
||||
user.show_text("Selection cleared.", "red")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/glass/oilcan
|
||||
name = "oil can"
|
||||
desc = "Contains oil intended for use on cyborgs and robots."
|
||||
icon = 'icons/obj/robot_parts.dmi'
|
||||
icon_state = "oilcan"
|
||||
amount_per_transfer_from_this = 15
|
||||
splash_all_contents = 0
|
||||
w_class = 3.0
|
||||
rc_flags = RC_FULLNESS
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(120)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("oil", 60)
|
||||
|
||||
/*
|
||||
Jucier container.
|
||||
By: SARazage
|
||||
For: LLJK Goonstation
|
||||
ported and crapped up by: haine
|
||||
*/
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/juicer
|
||||
name = "\improper Juice-O-Matic 3000"
|
||||
desc = "It's the Juice-O-Matic 3000! The pinicle of juicing technology! A revolutionary new juicing system!"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "juicer"
|
||||
amount_per_transfer_from_this = 10
|
||||
initial_volume = 200
|
||||
|
||||
afterattack(obj/target, mob/user)
|
||||
if (get_dist(user, src) > 1 || get_dist(user, target) > 1)
|
||||
user.show_text("You're too far away!", "red")
|
||||
|
||||
if (istype(target, /obj/machinery) || ismob(target) || isturf(target)) // Do nothing if the user is trying to put it in a machine or feeding a mob.
|
||||
return
|
||||
|
||||
if (target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if (!src.reagents.total_volume)
|
||||
user.show_text("[src] is empty!", "red")
|
||||
return
|
||||
|
||||
if (target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user.show_text("[target] is full!", "red")
|
||||
return
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user.show_text("You transfer [trans] unit\s of the solution to [target].")
|
||||
|
||||
if (reagents.total_volume == reagents.maximum_volume) // See if the juicer is full.
|
||||
user.show_text("[src] is full!", "red")
|
||||
return
|
||||
|
||||
if (istype(target, /obj/item/reagent_containers/food/snacks/plant)) // Check to make sure they're juicing food.
|
||||
if ((target.reagents.total_volume + src.reagents.total_volume) > src.reagents.maximum_volume)
|
||||
var/transamnt = src.reagents.maximum_volume - src.reagents.total_volume
|
||||
target.reagents.trans_to(src, transamnt)
|
||||
user.show_text("[src] makes a slicing sound as it destroys [target].<br>[src] juiced [transamnt] units, the rest is wasted.")
|
||||
playsound(src.loc, "sound/machines/mixer.ogg", 50, 1) // Play a sound effect.
|
||||
qdel(target) // delete the fruit, it got juiced!
|
||||
return
|
||||
|
||||
else
|
||||
user.show_text("[src] makes a slicing sound as it destroys [target].<br>[src] juiced [target.reagents.total_volume] units.")
|
||||
target.reagents.trans_to(src, target.reagents.total_volume) // Transfer it all!
|
||||
playsound(src.loc, "sound/machines/mixer.ogg", 50, 1)
|
||||
qdel(target)
|
||||
return
|
||||
else
|
||||
user.show_text("Dang, the hopper only accepts food!", "red")
|
||||
|
||||
|
||||
get_desc(dist)
|
||||
if (dist <= 0)
|
||||
if (src.reagents && src.reagents.reagent_list.len)
|
||||
. += "<br>It contains:"
|
||||
for (var/datum/reagent/R in src.reagents.reagent_list)
|
||||
. += "[R.volume] units of [R.name]"
|
||||
|
||||
/*
|
||||
Hydroponics Borg formula hose.
|
||||
By: SARazage
|
||||
For: LLJK Goonstation
|
||||
ported and crapped up by: haine
|
||||
*/
|
||||
|
||||
/obj/item/borghose
|
||||
name = "\improper Nutriant Hose 3000" // Name of the Module
|
||||
desc = "A nutriant hose for hydroponics work." // Description that shows up when examined
|
||||
icon = 'icons/obj/device.dmi' // Icon, just using a green cable coil for now.
|
||||
icon_state = "nutrient"
|
||||
flags = FPRINT | TABLEPASS | SUPPRESSATTACK
|
||||
var/amt_to_transfer = 10 // How much it transfers at once.
|
||||
var/charge_cost = 20 // How much the thing costs, I'm not sure if this is per tick or what. Can be adjusted.
|
||||
var/charge_tick = 0 // regulates if the borg is in a recharge station, to recharge reagents.
|
||||
var/recharge_time = 3 // How fast the module recharges, not really sure how this works yet.
|
||||
var/recharge_per_tick = 5 // how many units to add back to the tanks each tick
|
||||
|
||||
var/list/hydro_reagents = list("saltpetre", "ammonia", "potash", "poo", "space_fungus", "water") // IDs of what we should dispense
|
||||
var/list/hydro_reagent_names = list() // the tank creation proc adds the names of the above reagents to this list
|
||||
var/list/tanks = list() // what tanks we have
|
||||
var/obj/item/reagent_containers/borghose_tank/active_tank = null // what tank is active
|
||||
|
||||
New() // So this goes through and adds all the reagents to the hose on creation. Pretty good for expandability.
|
||||
..()
|
||||
for (var/reagent in hydro_reagents)
|
||||
create_tank(reagent)
|
||||
|
||||
process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
src.charge_tick ++
|
||||
if (src.charge_tick >= src.recharge_time)
|
||||
src.regenerate_reagents()
|
||||
src.charge_tick = 0
|
||||
|
||||
proc/create_tank(var/reagent) // The actual add_reagent function to add new reagents to the hose.
|
||||
var/obj/item/reagent_containers/borghose_tank/new_tank = new /obj/item/reagent_containers/borghose_tank(src)
|
||||
new_tank.reagents.add_reagent(reagent, 40)
|
||||
new_tank.label = reagent
|
||||
new_tank.label_name = reagent_id_to_name(reagent)
|
||||
new_tank.name = "[new_tank.label_name] tank"
|
||||
src.tanks += new_tank
|
||||
src.hydro_reagent_names += new_tank.label_name // the name list is so we don't have to call reagent_id_to_name() each time we wanna know the names of our reagents
|
||||
|
||||
attack(mob/M as mob, mob/user as mob)
|
||||
return // Don't attack people with the hoses, god you people!
|
||||
|
||||
proc/regenerate_reagents()
|
||||
if (isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc // I'm not sure why it's src.loc and not src. (src is the hose, src.loc is where the hose is)
|
||||
if (R && R.cell) // If the robot's alive and there's power.
|
||||
var/full_tanks = 0 // to keep track of when we're good to remove ourselves from processing_items
|
||||
for (var/obj/item/reagent_containers/borghose_tank/tank in src.tanks) // Regenerate all formulas at once.
|
||||
var/tank_max = tank.reagents.maximum_volume // easier than writing tank.reagents.total_volume/etc over and over
|
||||
var/tank_vol = tank.reagents.total_volume
|
||||
if (tank_vol >= tank_max) // if it's already full
|
||||
full_tanks ++ // add to the list of full tanks
|
||||
continue // then skip it
|
||||
var/add_amt = min((tank_max - tank_vol), src.recharge_per_tick) // how much we'll be adding, in case the room left in the tank is less than recharge_per_tick
|
||||
if (tank.label) // who knows, maybe somehow you ended up with no label?
|
||||
tank.reagents.add_reagent(tank.label, add_amt)
|
||||
R.cell.use(src.charge_cost)
|
||||
if (tank.reagents.total_volume >= tank.reagents.maximum_volume)
|
||||
full_tanks ++
|
||||
else
|
||||
full_tanks ++ // just in case, we don't need this taking up extra processing if it's just gunna fail every time this runs
|
||||
if (full_tanks >= src.tanks.len && (src in processing_items))
|
||||
processing_items.Remove(src)
|
||||
|
||||
attack_self(mob/user)
|
||||
var/switch_tank = input(user, "What reagent do you want to dispense?") as null|anything in src.hydro_reagent_names
|
||||
if (!switch_tank)
|
||||
return
|
||||
for (var/obj/item/reagent_containers/borghose_tank/tank in src.tanks)
|
||||
if (src.active_tank == tank)
|
||||
return
|
||||
if (tank.label_name == switch_tank)
|
||||
src.active_tank = tank
|
||||
user.show_text("[src] is now dispensing [switch_tank].")
|
||||
playsound(loc, "sound/effects/pop.ogg", 50, 0) // Play a sound effect.
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user)
|
||||
if (istype(target, /obj/machinery/plantpot/))
|
||||
if (!src.active_tank)
|
||||
user.show_text("No tank is currently active.", "red")
|
||||
return
|
||||
|
||||
if (!src.active_tank.reagents || !src.active_tank.reagents.total_volume) // vOv
|
||||
user.show_text("[src] is currently out of this reagent.", "red")
|
||||
return
|
||||
|
||||
if (target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user.show_text("[target] is full.", "red")
|
||||
return
|
||||
|
||||
var/trans = src.active_tank.reagents.trans_to(target, amt_to_transfer)
|
||||
user.show_text("You transfer [trans] unit\s of the solution to [target]. [active_tank.reagents.total_volume] unit\s remain.", "blue")
|
||||
playsound(loc, "sound/effects/slosh.ogg", 50, 0) // Play a sound effect.
|
||||
if (!(src in processing_items))
|
||||
processing_items.Add(src)
|
||||
else
|
||||
return ..() // call your parents!!
|
||||
|
||||
get_desc(dist)
|
||||
if (dist <= 0)
|
||||
. += src.DescribeContents()
|
||||
|
||||
proc/DescribeContents()
|
||||
var/data = null
|
||||
for (var/obj/item/reagent_containers/borghose_tank/tank in src.tanks)
|
||||
if (tank.reagents && tank.label)
|
||||
data += "<br>It currently has [tank.reagents.total_volume] unit\s of [tank.label_name] stored."
|
||||
if (data)
|
||||
return data
|
||||
|
||||
/obj/item/reagent_containers/borghose_tank
|
||||
name = "borghose reagent tank"
|
||||
desc = "you shouldn't see me!!"
|
||||
initial_volume = 40
|
||||
var/label = null // the ID of the reagent inside
|
||||
var/label_name = null // the name of the reagent inside, so we don't have to keep calling reagent_id_to_name()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,158 @@
|
||||
/obj/submachine/slot_machine
|
||||
name = "Slot Machine"
|
||||
desc = "Gambling for the antisocial."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "slots-off"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mats = 8
|
||||
//var/money = 1000000
|
||||
var/plays = 0
|
||||
var/working = 0
|
||||
var/current_bet = 10
|
||||
var/obj/item/card/id/scan = null
|
||||
|
||||
New()
|
||||
mechanics = new(src)
|
||||
mechanics.master = src
|
||||
mechanics.addInput("activate", "activateinput")
|
||||
..()
|
||||
|
||||
proc/activateinput(var/datum/mechanicsMessage/inp) //make this work some day.
|
||||
//var/list/reflist = list("ops")
|
||||
//Topic(null,
|
||||
return
|
||||
|
||||
attackby(var/obj/item/I as obj, user as mob)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(src.scan)
|
||||
boutput(user, "<span style=\"color:red\">There is a card already in the slot machine.</span>")
|
||||
else
|
||||
boutput(user, "<span style=\"color:blue\">You insert your ID card.</span>")
|
||||
usr.drop_item()
|
||||
I.set_loc(src)
|
||||
src.scan = I
|
||||
src.updateUsrDialog()
|
||||
else src.attack_hand(user)
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
user.machine = src
|
||||
if (!src.scan)
|
||||
var/dat = {"<B>Slot Machine</B><BR>
|
||||
<HR><BR>
|
||||
<B>Please insert card!</B><BR>"}
|
||||
user << browse(dat, "window=slotmachine;size=450x500")
|
||||
onclose(user, "slotmachine")
|
||||
else if (src.working)
|
||||
var/dat = {"<B>Slot Machine</B><BR>
|
||||
<HR><BR>
|
||||
<B>Please wait!</B><BR>"}
|
||||
user << browse(dat, "window=slotmachine;size=450x500")
|
||||
onclose(user, "slotmachine")
|
||||
else
|
||||
var/dat = {"<B>Slot Machine</B><BR>
|
||||
<HR><BR>
|
||||
Ten credits to play!<BR>
|
||||
<B>Your Card:</B> [src.scan]<BR>
|
||||
<B>Credits Remaining:</B> [src.scan.money]<BR>
|
||||
[src.plays] attempts have been made today!<BR>
|
||||
<HR><BR>
|
||||
<A href='?src=\ref[src];ops=1'>Play!</A><BR>
|
||||
<A href='?src=\ref[src];ops=2'>Eject card</A>"}
|
||||
user << browse(dat, "window=slotmachine;size=400x500")
|
||||
onclose(user, "slotmachine")
|
||||
|
||||
Topic(href, href_list)
|
||||
if (get_dist(src, usr) > 1 || !isliving(usr) || iswraith(usr) || isintangible(usr))
|
||||
return
|
||||
if (usr.stunned > 0 || usr.weakened > 0 || usr.paralysis > 0 || usr.stat != 0 || usr.restrained())
|
||||
return
|
||||
|
||||
if(href_list["ops"])
|
||||
var/operation = text2num(href_list["ops"])
|
||||
if(operation == 1) // Play
|
||||
if(src.working) return
|
||||
if(!src.scan) return
|
||||
if (src.scan.money < 10)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Insufficient money to play!'", src), 1)
|
||||
return
|
||||
/*if (src.money < 0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'No prize money left!'", src), 1)
|
||||
return*/
|
||||
src.scan.money -= 10
|
||||
//src.money += 10
|
||||
src.plays += 1
|
||||
src.working = 1
|
||||
src.icon_state = "slots-on"
|
||||
//for(var/mob/O in hearers(src, null))
|
||||
//O.show_message(text("<b>[]</b> says, 'Let's roll!'", src), 1)
|
||||
var/roll = rand(1,1350)
|
||||
|
||||
playsound(src.loc, "sound/machines/ding.ogg", 50, 1)
|
||||
spawn(25) // why was this at ten seconds, christ
|
||||
if (roll == 1)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'JACKPOT! [src.scan.registered] has won a MILLION CREDITS!'", src), 1)
|
||||
command_alert("Congratulations to [src.scan.registered] on winning the Jackpot of ONE MILLION CREDITS!", "Jackpot Winner")
|
||||
playsound(src.loc, "sound/misc/airraid_loop.ogg", 55, 1)
|
||||
src.scan.money += 1000000
|
||||
//src.money = 0
|
||||
else if (roll > 1 && roll <= 5)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Big Winner! [src.scan.registered] has won a hundred thousand credits!'", src), 1)
|
||||
command_alert("Congratulations to [src.scan.registered] on winning a hundred thousand credits!", "Big Winner")
|
||||
playsound(src.loc, "sound/misc/klaxon.ogg", 55, 1)
|
||||
src.scan.money += 100000
|
||||
//src.money -= 100000
|
||||
else if (roll > 5 && roll <= 25)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Big Winner! [src.scan.registered] has won ten thousand credits!'", src), 1)
|
||||
playsound(src.loc, "sound/misc/klaxon.ogg", 55, 1)
|
||||
src.scan.money += 10000
|
||||
//src.money -= 10000
|
||||
else if (roll > 25 && roll <= 50)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Winner! [src.scan.registered] has won a thousand credits!'", src), 1)
|
||||
playsound(src.loc, "sound/effects/bell.ogg", 55, 1)
|
||||
src.scan.money += 1000
|
||||
//src.money -= 1000
|
||||
else if (roll > 50 && roll <= 100)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Winner! [src.scan.registered] has won a hundred credits!'", src), 1)
|
||||
playsound(src.loc, "sound/effects/bell.ogg", 55, 1)
|
||||
src.scan.money += 100
|
||||
//src.money -= 100
|
||||
else if (roll > 100 && roll <= 200)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Winner! [src.scan.registered] has won fifty credits!'", src), 1)
|
||||
playsound(src.loc, "sound/machines/ping.ogg", 55, 1)
|
||||
src.scan.money += 50
|
||||
//src.money -= 50
|
||||
else if (roll > 200 && roll <= 500)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, '[src.scan.registered] has won ten credits!'", src), 1)
|
||||
playsound(src.loc, "sound/machines/ping.ogg", 55, 1)
|
||||
src.scan.money += 10
|
||||
//src.money -= 10
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'No luck!'", src), 1)
|
||||
//playsound(src.loc, "sound/machines/buzz-two.ogg", 55, 1) // way too loud UGH
|
||||
src.working = 0
|
||||
src.icon_state = "slots-off"
|
||||
updateUsrDialog()
|
||||
if(operation == 2) // Eject Card
|
||||
if(!src.scan) return // jerks doing that "hide in a chute to glitch auto-update windows out" exploit caused a wall of runtime errors
|
||||
src.scan.set_loc(src.loc)
|
||||
src.scan = null
|
||||
src.working = 0
|
||||
src.icon_state = "slots-off" // just in case, some fucker broke it earlier
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> says, 'Thank you for playing!'", src), 1)
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
if(mechanics) mechanics.fireOutgoing(mechanics.newSignal("machineUsed"))
|
||||
return
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/submachine/syndicate_teleporter
|
||||
name = "Syndicate Teleporter"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "pad0"
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
var/recharging =0
|
||||
var/id = "shuttle" //The main location of the teleporter
|
||||
var/recharge = 20 //A short recharge time between teleports
|
||||
|
||||
proc/teleport(mob/user)
|
||||
for(var/obj/submachine/syndicate_teleporter/S)
|
||||
if(S.id == src.id && S != src)
|
||||
if(recharging == 1)
|
||||
return 1
|
||||
else
|
||||
S.recharging = 1
|
||||
src.recharging = 1
|
||||
user.set_loc(S.loc)
|
||||
showswirl(user.loc)
|
||||
spawn(recharge)
|
||||
S.recharging = 0
|
||||
src.recharging = 0
|
||||
return
|
||||
|
||||
/obj/item/remote/syndicate_teleporter
|
||||
name = "Syndicate Teleporter Remote"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
desc = "Allows one to use a syndicate teleporter when standing on it."
|
||||
icon_state = "locator"
|
||||
item_state = "electronic"
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
w_class = 2.0
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
for(var/obj/submachine/syndicate_teleporter/S in get_turf(src))
|
||||
S.teleport(user)
|
||||
@@ -0,0 +1,257 @@
|
||||
// disease reagent manipulator thing
|
||||
|
||||
/obj/submachine/virus_manipulator
|
||||
name = "Virus Manipulator"
|
||||
desc = "A device which alters bacteria and virii."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "DAn-off"
|
||||
flags = NOSPLASH
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/obj/item/reagent_containers/glass/vial/active_vial = null
|
||||
var/datavial = "No Vial Inserted"
|
||||
var/datareagent = "N/A"
|
||||
var/dataspread = "N/A"
|
||||
var/datacurable = "N/A"
|
||||
var/dataregress = "N/A"
|
||||
var/datavaccine = "N/A"
|
||||
var/datacure = "N/A"
|
||||
var/dataprob = "N/A"
|
||||
var/working = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
src.overlays += image('icons/obj/objects.dmi', "DAn-Oe")
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
user.machine = src
|
||||
if (!src.working)
|
||||
var/dat = {"<B>Virus Manipulator</B><BR>
|
||||
<HR><BR>
|
||||
<B>Vial:</B> [datavial]<BR>
|
||||
<B>Vial Contents:</B> [datareagent]<BR>
|
||||
<HR><BR>
|
||||
<B>Contagion Vector:</B> [dataspread]<BR>
|
||||
<B>Strain Vulnerability:</B> [datacure]<BR>
|
||||
<B>Antibiotic Resistance:</B> [datacurable]<BR>
|
||||
<B>Immune System Resistance:</B> [dataregress]<BR>
|
||||
<B>Infection Development Rate:</B> [dataprob]<BR>
|
||||
<B>Crippled Infectiousness:</B> [datavaccine]<BR><BR>
|
||||
<HR><BR>
|
||||
<A href='?src=\ref[src];ops=1'>Attempt to Create Vaccine<BR>
|
||||
<A href='?src=\ref[src];ops=2'>Mutate<BR>
|
||||
<A href='?src=\ref[src];ops=3'>Refresh Report<BR>
|
||||
<A href='?src=\ref[src];ops=4'>Eject Vial"}
|
||||
user << browse(dat, "window=virusmanip;size=400x500")
|
||||
onclose(user, "virusmanip")
|
||||
else
|
||||
var/dat = {"<B>Virus Manipulator</B><BR>
|
||||
<HR><BR>
|
||||
<B>Please wait. Work in progress.</B><BR>"}
|
||||
user << browse(dat, "window=virusmanip;size=450x500")
|
||||
onclose(user, "virusmanip")
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["ops"])
|
||||
var/operation = text2num(href_list["ops"])
|
||||
if(operation == 1) // Attempt to Create Vaccine
|
||||
if (src.datareagent == "N/A" || src.datareagent == "No virii detected")
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Unable to begin process. No reagent detected.'", src), 1)
|
||||
return
|
||||
else if (src.datareagent == "Multiple virii detected")
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Unable to begin process. Excess reagents detected.'", src), 1)
|
||||
return
|
||||
src.working = 1
|
||||
src.icon_state = "DAn-on"
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Commencing work.'", src), 1)
|
||||
if(src.active_vial.reagents && src.active_vial.reagents.reagent_list.len)
|
||||
for(var/current_id in src.active_vial.reagents.reagent_list)
|
||||
var/datum/reagent/disease/current_disease = src.active_vial.reagents.reagent_list[current_id]
|
||||
if(istype(current_disease))
|
||||
if(prob(50))
|
||||
current_disease.Rvaccine = rand(0,1)
|
||||
if (current_disease.Rvaccine) src.datavaccine = "Yes"
|
||||
else src.datavaccine = "No"
|
||||
|
||||
spawn(rand(100,150))
|
||||
src.working = 0
|
||||
src.icon_state = "DAn-off"
|
||||
var/vacannounce
|
||||
if (src.datavaccine == "Yes") vacannounce = "Vaccine created successfully"
|
||||
else vacannounce = "Failed to create vaccine"
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, '[].'", src, vacannounce), 1)
|
||||
src.updateUsrDialog()
|
||||
if(operation == 2) // Mutate
|
||||
if (src.datareagent == "N/A" || src.datareagent == "No virii detected")
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Unable to begin process. No reagent detected.'", src), 1)
|
||||
return
|
||||
else if (src.datareagent == "Multiple virii detected")
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Unable to begin process. Excess reagents detected.'", src), 1)
|
||||
return
|
||||
src.working = 1
|
||||
src.icon_state = "DAn-on"
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Commencing work.'", src), 1)
|
||||
if(src.active_vial.reagents.reagent_list.len)
|
||||
for(var/current_id in active_vial.reagents.reagent_list)
|
||||
var/datum/reagent/disease/current_disease = active_vial.reagents.reagent_list[current_id]
|
||||
|
||||
if(istype(current_disease))
|
||||
if(prob(40))
|
||||
current_disease.Rspread = "Non-Contagious"
|
||||
if (prob(20)) current_disease.Rspread = "Contact"
|
||||
if (prob(10)) current_disease.Rspread = "Airborne"
|
||||
src.dataspread = current_disease.Rspread
|
||||
if(prob(40))
|
||||
current_disease.Rcure = pick("Sleep", "Antibiotics", "Self-Curing")
|
||||
if(prob(10)) current_disease.Rcure = pick("Beatings", "Burnings", "Electric Shock")
|
||||
if(rand(1,5000) == 1) current_disease.Rcure = "Incurable"
|
||||
src.datacure = current_disease.Rcure
|
||||
if(prob(50))
|
||||
current_disease.Rcurable = rand(0,1)
|
||||
if (current_disease.Rcurable) src.datacurable = "No"
|
||||
else src.datacurable = "Yes"
|
||||
if(prob(50))
|
||||
current_disease.Rregress = rand(0,1)
|
||||
if (current_disease.Rregress) src.dataregress = "No"
|
||||
else src.dataregress = "Yes"
|
||||
if(prob(50))
|
||||
current_disease.Rprob = rand(-3,3)
|
||||
src.dataprob = current_disease.Rprob
|
||||
spawn(rand(100,150))
|
||||
src.working = 0
|
||||
src.icon_state = "DAn-off"
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message(text("<b>[]</b> states, 'Work complete.'", src), 1)
|
||||
src.updateUsrDialog()
|
||||
if(operation == 3) // Refresh Report
|
||||
if (src.active_vial) src.datavial = src.active_vial.name
|
||||
else
|
||||
src.datavial = "No Vial Inserted"
|
||||
src.datareagent = "N/A"
|
||||
src.dataspread = "N/A"
|
||||
src.datacure = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
src.dataprob = "N/A"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
var/reagcount = 0
|
||||
if(src.active_vial.reagents.reagent_list.len)
|
||||
for(var/current_id in active_vial.reagents.reagent_list)
|
||||
var/datum/reagent/disease/current_disease = active_vial.reagents.reagent_list[current_id]
|
||||
|
||||
if(istype(current_disease))
|
||||
reagcount++
|
||||
|
||||
src.datareagent = current_disease.name
|
||||
src.dataspread = current_disease.Rspread
|
||||
src.datacure = current_disease.Rcure
|
||||
if (current_disease.Rcurable) src.datacurable = "No"
|
||||
else src.datacurable = "Yes"
|
||||
if (current_disease.Rregress) src.dataregress = "No"
|
||||
else src.dataregress = "Yes"
|
||||
if (current_disease.Rvaccine) src.datavaccine = "Yes"
|
||||
else src.datavaccine = "No"
|
||||
|
||||
if (reagcount > 1)
|
||||
src.datareagent = "Multiple virii detected"
|
||||
src.dataspread = "N/A"
|
||||
src.datacure = "N/A"
|
||||
src.dataprob = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
else
|
||||
src.datareagent = "No virii detected"
|
||||
src.dataspread = "N/A"
|
||||
src.datacure = "N/A"
|
||||
src.dataprob = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
src.updateUsrDialog()
|
||||
if(operation == 4) // Eject Vial
|
||||
var/log_reagents = ""
|
||||
if(src.active_vial && src.active_vial.reagents)
|
||||
for(var/reagent_id in src.active_vial.reagents.reagent_list)
|
||||
log_reagents += " [reagent_id]"
|
||||
|
||||
logTheThing("combat", usr, null, "modified <i>(<b>[log_reagents]</b>)</i> to [src.dataspread], cure = [src.datacure], curable = [src.datacurable], regress = [src.dataregress], speed =[src.dataprob], vaccine = [src.datavaccine]")
|
||||
for(var/obj/item/reagent_containers/glass/vial/V in src.contents)
|
||||
V.set_loc(get_turf(src))
|
||||
src.active_vial = null
|
||||
src.datavial = "No Vial Inserted"
|
||||
src.datareagent = "N/A"
|
||||
src.dataspread = "N/A"
|
||||
src.datacure = "N/A"
|
||||
src.dataprob = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
src.overlays -= image('icons/obj/objects.dmi', "DAn-Of")
|
||||
src.overlays += image('icons/obj/objects.dmi', "DAn-Oe")
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog()
|
||||
|
||||
attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if (src.working)
|
||||
boutput(user, "<span style=\"color:red\">The manipulator is busy!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/reagent_containers/glass/vial))
|
||||
if(src.active_vial)
|
||||
boutput(user, "<span style=\"color:red\">A vial is already loaded into the manipulator.</span>")
|
||||
return
|
||||
boutput(user, "<span style=\"color:blue\">You add the [W] to the manipulator!</span>")
|
||||
src.datavial = W.name
|
||||
src.active_vial = W
|
||||
user.drop_item()
|
||||
W.set_loc(src)
|
||||
src.overlays -= image('icons/obj/objects.dmi', "DAn-Oe")
|
||||
src.overlays += image('icons/obj/objects.dmi', "DAn-Of")
|
||||
src.updateUsrDialog()
|
||||
var/reagcount = 0
|
||||
if(src.active_vial.reagents.reagent_list.len)
|
||||
for(var/current_id in active_vial.reagents.reagent_list)
|
||||
var/datum/reagent/disease/current_disease = active_vial.reagents.reagent_list[current_id]
|
||||
|
||||
if(istype(current_disease))
|
||||
reagcount++
|
||||
|
||||
src.datareagent = current_disease.name
|
||||
src.dataspread = current_disease.Rspread
|
||||
src.datacure = current_disease.Rcure
|
||||
src.dataprob = current_disease.Rprob
|
||||
if (current_disease.Rcurable) src.datacurable = "No"
|
||||
else src.datacurable = "Yes"
|
||||
if (current_disease.Rregress) src.dataregress = "No"
|
||||
else src.dataregress = "Yes"
|
||||
if (current_disease.Rvaccine) src.datavaccine = "Yes"
|
||||
else src.datavaccine = "No"
|
||||
if (reagcount > 1)
|
||||
src.datareagent = "Multiple virii detected"
|
||||
src.dataspread = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
else
|
||||
src.datareagent = "No virii detected"
|
||||
src.dataspread = "N/A"
|
||||
src.datacure = "N/A"
|
||||
src.dataprob = "N/A"
|
||||
src.datacurable = "N/A"
|
||||
src.dataregress = "N/A"
|
||||
src.datavaccine = "N/A"
|
||||
else
|
||||
boutput(user, "<span style=\"color:red\">The manipulator cannot accept that!</span>")
|
||||
return
|
||||
Reference in New Issue
Block a user