Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit97
This commit is contained in:
@@ -51,7 +51,8 @@
|
||||
//these become available once upgraded.
|
||||
var/list/upgrade_reagents = list(
|
||||
"oil",
|
||||
"ammonia"
|
||||
"ammonia",
|
||||
"ash"
|
||||
)
|
||||
|
||||
var/list/upgrade_reagents2 = list(
|
||||
@@ -248,13 +249,8 @@
|
||||
work_animation()
|
||||
. = TRUE
|
||||
if("eject")
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
. = TRUE
|
||||
replace_beaker(usr)
|
||||
. = TRUE //no afterattack
|
||||
if("dispense_recipe")
|
||||
if(!is_operational() || QDELETED(cell))
|
||||
return
|
||||
@@ -267,7 +263,7 @@
|
||||
if(beaker && dispensable_reagents.Find(r_id)) // but since we verify we have the reagent, it'll be fine
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/free = R.maximum_volume - R.total_volume
|
||||
var/actual = min(round(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free)
|
||||
var/actual = min(max(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free)
|
||||
if(actual)
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
@@ -320,14 +316,12 @@
|
||||
return
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = 1 //no afterattack
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
return
|
||||
. = TRUE //no afterattack
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
beaker = B
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag))
|
||||
to_chat(user, "<span class='warning'>You can't load [I] into [src]!</span>")
|
||||
@@ -379,7 +373,17 @@
|
||||
dispensable_reagents |= upgrade_reagents3
|
||||
powerefficiency = round(newpowereff, 0.01)
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/on_deconstruction()
|
||||
cell = null
|
||||
@@ -415,6 +419,12 @@
|
||||
final_list += list(avoid_assoc_duplicate_keys(fuck[1],key_list) = text2num(fuck[2]))
|
||||
return final_list
|
||||
|
||||
/obj/machinery/chem_dispenser/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
|
||||
@@ -478,9 +488,16 @@
|
||||
"tomatojuice",
|
||||
"lemonjuice",
|
||||
"menthol"
|
||||
) //prevents the soda machine from obtaining chemical upgrades. .
|
||||
upgrade_reagents = null
|
||||
upgrade_reagents2 = null
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"mushroomhallucinogen",
|
||||
"nothing",
|
||||
"cryoxadone"
|
||||
)
|
||||
upgrade_reagents2 = list(
|
||||
"banana",
|
||||
"berryjuice"
|
||||
)
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"thirteenloko",
|
||||
@@ -534,18 +551,19 @@
|
||||
"triple_sec",
|
||||
"sake",
|
||||
"applejack"
|
||||
)//prevents the booze machine from obtaining chemical upgrades.
|
||||
upgrade_reagents = null
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"ethanol",
|
||||
"fernet"
|
||||
)
|
||||
upgrade_reagents2 = null
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"ethanol",
|
||||
"iron",
|
||||
"alexander",
|
||||
"clownstears",
|
||||
"minttoxin",
|
||||
"atomicbomb",
|
||||
"fernet",
|
||||
"aphro",
|
||||
"aphro+"
|
||||
)
|
||||
|
||||
@@ -28,13 +28,23 @@
|
||||
else
|
||||
icon_state = "mixer0b"
|
||||
|
||||
/obj/machinery/chem_heater/proc/eject_beaker(mob/user)
|
||||
/obj/machinery/chem_heater/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_heater/RefreshParts()
|
||||
heater_coefficient = 0.1
|
||||
@@ -58,21 +68,19 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = 1 //no afterattack
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
. = TRUE //no afterattack
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
beaker = I
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/on_deconstruction()
|
||||
eject_beaker()
|
||||
replace_beaker()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
@@ -122,5 +130,5 @@
|
||||
target_temperature = CLAMP(target, 0, 1000)
|
||||
if("eject")
|
||||
on = FALSE
|
||||
eject_beaker(usr)
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
|
||||
@@ -60,16 +60,6 @@
|
||||
else
|
||||
icon_state = "mixer0"
|
||||
|
||||
/obj/machinery/chem_master/proc/eject_beaker(mob/user)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(beaker)
|
||||
else
|
||||
adjust_item_drop_location(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
@@ -85,36 +75,49 @@
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = 1 // no afterattack
|
||||
. = TRUE // no afterattack
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't use the [src.name] while its panel is opened!</span>")
|
||||
return
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
beaker = I
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
src.updateUsrDialog()
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
|
||||
if(bottle)
|
||||
to_chat(user, "<span class='warning'>A pill bottle is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
bottle = I
|
||||
to_chat(user, "<span class='notice'>You add [I] into the dispenser slot.</span>")
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
eject_beaker()
|
||||
replace_beaker(usr)
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
@@ -164,7 +167,7 @@
|
||||
return
|
||||
switch(action)
|
||||
if("eject")
|
||||
eject_beaker(usr)
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
|
||||
if("ejectp")
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
var/speed = 1
|
||||
var/list/holdingitems
|
||||
|
||||
var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine")
|
||||
var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject")
|
||||
var/static/radial_grind = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_grind")
|
||||
var/static/radial_juice = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_juice")
|
||||
var/static/radial_mix = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_mix")
|
||||
|
||||
/obj/machinery/reagentgrinder/Initialize()
|
||||
. = ..()
|
||||
holdingitems = list()
|
||||
@@ -51,7 +57,6 @@
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
if(holdingitems[A])
|
||||
holdingitems -= A
|
||||
|
||||
@@ -67,6 +72,18 @@
|
||||
else
|
||||
icon_state = "juicer0"
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params)
|
||||
//You can only screw open empty grinder
|
||||
if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
@@ -82,17 +99,14 @@
|
||||
return TRUE
|
||||
|
||||
if (istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
if (!beaker)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You slide [I] into [src].</span>")
|
||||
beaker = I
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's already a container inside [src].</span>")
|
||||
return TRUE //no afterattack
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = TRUE
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(holdingitems.len >= limit)
|
||||
to_chat(user, "<span class='warning'>[src] is filled to capacity!</span>")
|
||||
@@ -108,8 +122,6 @@
|
||||
to_chat(user, "<span class='notice'>You empty [I] into [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You fill [src] to the brim.</span>")
|
||||
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
if(!I.grind_results && !I.juice_results)
|
||||
@@ -125,104 +137,89 @@
|
||||
if(user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
holdingitems[I] = TRUE
|
||||
updateUsrDialog()
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave
|
||||
. = ..()
|
||||
var/is_chamber_empty = FALSE
|
||||
var/is_beaker_ready = FALSE
|
||||
var/processing_chamber = ""
|
||||
var/beaker_contents = ""
|
||||
var/dat = ""
|
||||
|
||||
if(!operating)
|
||||
for (var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
processing_chamber += "\A [O.name]<BR>"
|
||||
if(operating || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
if (!processing_chamber)
|
||||
is_chamber_empty = TRUE
|
||||
processing_chamber = "Nothing."
|
||||
if (!beaker)
|
||||
beaker_contents = "<B>No beaker attached.</B><br>"
|
||||
else
|
||||
is_beaker_ready = TRUE
|
||||
beaker_contents = "<B>The beaker contains:</B><br>"
|
||||
var/anything = FALSE
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
anything = TRUE
|
||||
beaker_contents += "[R.volume] - [R.name]<br>"
|
||||
if(!anything)
|
||||
beaker_contents += "Nothing<br>"
|
||||
var/list/options = list()
|
||||
|
||||
dat = {"
|
||||
<b>Processing chamber contains:</b><br>
|
||||
[processing_chamber]<br>
|
||||
[beaker_contents]<hr>
|
||||
"}
|
||||
if (is_beaker_ready)
|
||||
if(!is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
|
||||
dat += "<A href='?src=[REF(src)];action=grind'>Grind the reagents</a><BR>"
|
||||
dat += "<A href='?src=[REF(src)];action=juice'>Juice the reagents</a><BR><BR>"
|
||||
else if (beaker.reagents.total_volume)
|
||||
dat += "<A href='?src=[REF(src)];action=mix'>Mix the reagents</a><BR><BR>"
|
||||
if(length(holdingitems))
|
||||
dat += "<A href='?src=[REF(src)];action=eject'>Eject the reagents</a><BR>"
|
||||
if(beaker)
|
||||
dat += "<A href='?src=[REF(src)];action=detach'>Detach the beaker</a><BR>"
|
||||
if(beaker || length(holdingitems))
|
||||
options["eject"] = radial_eject
|
||||
|
||||
if(isAI(user))
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
options["examine"] = radial_examine
|
||||
|
||||
// if there is no power or it's broken, the procs will fail but the buttons will still show
|
||||
if(length(holdingitems))
|
||||
options["grind"] = radial_grind
|
||||
options["juice"] = radial_juice
|
||||
else if(beaker?.reagents.total_volume)
|
||||
options["mix"] = radial_mix
|
||||
|
||||
var/choice
|
||||
|
||||
if(length(options) < 1)
|
||||
return
|
||||
if(length(options) == 1)
|
||||
for(var/key in options)
|
||||
choice = key
|
||||
else
|
||||
dat += "Please wait..."
|
||||
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
|
||||
|
||||
var/datum/browser/popup = new(user, "reagentgrinder", "All-In-One Grinder")
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||
popup.open(1)
|
||||
return
|
||||
// post choice verification
|
||||
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
/obj/machinery/reagentgrinder/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/mob/user = usr
|
||||
if(!user.canUseTopic(src))
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(operating)
|
||||
updateUsrDialog()
|
||||
return
|
||||
switch(href_list["action"])
|
||||
if ("grind")
|
||||
switch(choice)
|
||||
if("eject")
|
||||
eject(user)
|
||||
if("grind")
|
||||
grind(user)
|
||||
if("juice")
|
||||
juice(user)
|
||||
if("mix")
|
||||
mix(user)
|
||||
if("eject")
|
||||
eject(user)
|
||||
if("detach")
|
||||
detach(user)
|
||||
updateUsrDialog()
|
||||
if("examine")
|
||||
examine(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/detach(mob/user)
|
||||
if(!beaker)
|
||||
/obj/machinery/reagentgrinder/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>")
|
||||
return
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
if(operating)
|
||||
to_chat(user, "<span class='warning'>\The [src] is operating.</span>")
|
||||
return
|
||||
|
||||
if(beaker || length(holdingitems))
|
||||
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='notice'>- \A [beaker].</span>")
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
to_chat(user, "<span class='notice'>- \A [O.name].</span>")
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
to_chat(user, "<span class='notice'>The status display reads:</span>")
|
||||
to_chat(user, "<span class='notice'>- Grinding reagents at <b>[speed*100]%</b>.<span>")
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>- [R.volume] units of [R.name].</span>")
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/eject(mob/user)
|
||||
if(!length(holdingitems))
|
||||
return
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
O.forceMove(drop_location())
|
||||
holdingitems -= O
|
||||
updateUsrDialog()
|
||||
if(beaker)
|
||||
replace_beaker(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O)
|
||||
holdingitems -= O
|
||||
@@ -240,7 +237,6 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/operate_for(time, silent = FALSE, juicing = FALSE)
|
||||
shake_for(time / speed)
|
||||
updateUsrDialog()
|
||||
operating = TRUE
|
||||
if(!silent)
|
||||
if(!juicing)
|
||||
@@ -251,11 +247,10 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/stop_operating()
|
||||
operating = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/juice()
|
||||
power_change()
|
||||
if(!beaker || (beaker && (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)))
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
for(var/obj/item/i in holdingitems)
|
||||
@@ -274,7 +269,7 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/grind()
|
||||
power_change()
|
||||
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(60)
|
||||
for(var/i in holdingitems)
|
||||
@@ -296,13 +291,13 @@
|
||||
/obj/machinery/reagentgrinder/proc/mix(mob/user)
|
||||
//For butter and other things that would change upon shaking or mixing
|
||||
power_change()
|
||||
if(!beaker)
|
||||
if(!beaker || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/mix_complete()
|
||||
if(beaker && beaker.reagents.total_volume)
|
||||
if(beaker?.reagents.total_volume)
|
||||
//Recipe to make Butter
|
||||
var/butter_amt = FLOOR(beaker.reagents.get_reagent_amount("milk") / MILK_TO_BUTTER_COEFF, 1)
|
||||
beaker.reagents.remove_reagent("milk", MILK_TO_BUTTER_COEFF * butter_amt)
|
||||
|
||||
@@ -213,15 +213,15 @@
|
||||
glass_desc = "White and nutritious goodness!"
|
||||
|
||||
/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.heal_bodypart_damage(1.5,0, 0)
|
||||
. = 1
|
||||
else
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 2)
|
||||
var/datum/dna/Mdna = M.has_dna()
|
||||
if(Mdna && Mdna.species && (Mdna.species.id == "plasmaman" || Mdna.species.id == "skeleton"))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/soymilk
|
||||
|
||||
@@ -887,3 +887,64 @@
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice //oof ouch
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
description = "A strange substance that looks a lot like water. Drinking it is oddly tempting. Oof ouch."
|
||||
color = "#AAAAAA77" //RGBA: 170, 170, 170, 77
|
||||
toxpwr = 0
|
||||
taste_description = "bone hurting"
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/M)
|
||||
M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustStaminaLoss(7.5, 0)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.adjustBruteLoss(3.5, 0)
|
||||
if(prob(12))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
var/list/possible_says = list("oof.", "ouch!", "my bones.", "oof ouch.", "oof ouch my bones.")
|
||||
M.say(pick(possible_says), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(2)
|
||||
var/list/possible_mes = list("oofs softly.", "looks like their bones hurt.", "grimaces, as though their bones hurt.")
|
||||
M.say("*custom " + pick(possible_mes), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(3)
|
||||
to_chat(M, "<span class='warning'>Your bones hurt!</span>")
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M)
|
||||
if(prob(6) && iscarbon(M)) //big oof
|
||||
var/selected_part
|
||||
switch(rand(1, 4)) //God help you if the same limb gets picked twice quickly.
|
||||
if(1)
|
||||
selected_part = BODY_ZONE_L_ARM
|
||||
if(2)
|
||||
selected_part = BODY_ZONE_R_ARM
|
||||
if(3)
|
||||
selected_part = BODY_ZONE_L_LEG
|
||||
if(4)
|
||||
selected_part = BODY_ZONE_R_LEG
|
||||
var/obj/item/bodypart/bp = M.get_bodypart(selected_part)
|
||||
if(M.dna.species.type != /datum/species/skeleton || M.dna.species.type != /datum/species/plasmaman || M.dna.species.type != /datum/species/golem/bone) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
bp.receive_damage(0, 0, 200)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M]'s bones hurt too much!!</span>", "<span class='danger'>Your bones hurt too much!!</span>")
|
||||
M.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //SUCH A LUST FOR REVENGE!!!
|
||||
to_chat(M, "<span class='warning'>A phantom limb hurts!</span>")
|
||||
M.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //you just want to socialize
|
||||
if(bp)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M] rattles loudly and flails around!!</span>", "<span class='danger'>Your bones hurt so much that your missing muscles spasm!!</span>")
|
||||
M.say("OOF!!", forced=/datum/reagent/toxin/bonehurtingjuice)
|
||||
bp.receive_damage(200, 0, 0) //But I don't think we should
|
||||
else
|
||||
to_chat(M, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
M.emote("sigh")
|
||||
return ..()
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
strengthdiv = 8
|
||||
for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom)))
|
||||
var/deity
|
||||
if(SSreligion.deity)
|
||||
deity = SSreligion.deity
|
||||
if(GLOB.deity)
|
||||
deity = GLOB.deity
|
||||
else
|
||||
deity = "Christ"
|
||||
to_chat(R, "<span class='userdanger'>The power of [deity] compels you!</span>")
|
||||
|
||||
@@ -119,3 +119,10 @@
|
||||
id = "mimesbane"
|
||||
results = list("mimesbane" = 3)
|
||||
required_reagents = list("radium" = 1, "mutetoxin" = 1, "nothing" = 1)
|
||||
|
||||
/datum/chemical_reaction/bonehurtingjuice
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
results = list("bonehurtingjuice" = 5)
|
||||
required_reagents = list("mutagen" = 1, "itching_powder" = 3, "milk" = 1)
|
||||
mix_message = "<span class='danger'>The mixture suddenly becomes clear and looks a lot like water. You feel a strong urge to drink it.</span>"
|
||||
|
||||
Reference in New Issue
Block a user