Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit
This commit is contained in:
@@ -73,6 +73,6 @@
|
||||
splash_holder.reaction(A, TOUCH, fraction)
|
||||
|
||||
qdel(splash_holder)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
fermiIsReacting = FALSE
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion"))
|
||||
Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//This is just to calc the on_reaction multiplier, and is a candidate for removal.
|
||||
for(var/B in cached_required_reagents)
|
||||
@@ -561,11 +561,11 @@
|
||||
targetVol = cached_results[P]*multiplier
|
||||
|
||||
if(!((chem_temp <= C.ExplodeTemp) && (chem_temp >= C.OptimalTempMin)))
|
||||
return 0 //Not hot enough
|
||||
return FALSE //Not hot enough
|
||||
if(! ((pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) ))//To prevent pointless reactions
|
||||
return 0
|
||||
return FALSE
|
||||
if (fermiIsReacting)
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
selected_reaction.on_reaction(src, my_atom, multiplier)
|
||||
@@ -581,7 +581,7 @@
|
||||
fermiIsReacting = FALSE
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion"))
|
||||
Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
for(var/B in cached_required_reagents) //
|
||||
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL))
|
||||
@@ -621,7 +621,7 @@
|
||||
|
||||
while(reaction_occurred)
|
||||
update_total()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/process()
|
||||
var/datum/chemical_reaction/C = fermiReactID
|
||||
@@ -838,7 +838,7 @@
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change(DEL_REAGENT)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/reagents/proc/update_total()
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -853,7 +853,7 @@
|
||||
total_volume += R.volume
|
||||
if(!reagent_list || !total_volume)
|
||||
pH = REAGENT_NORMAL_PH
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/clear_reagents()
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -861,7 +861,7 @@
|
||||
var/datum/reagent/R = reagent
|
||||
del_reagent(R.type)
|
||||
pH = REAGENT_NORMAL_PH
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1, from_gas = 0)
|
||||
var/react_type
|
||||
@@ -1075,9 +1075,9 @@
|
||||
if(round(R.volume, CHEMICAL_QUANTISATION_LEVEL) >= amount)
|
||||
return R
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/get_reagent_amount(reagent)
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -1086,7 +1086,7 @@
|
||||
if (R.type == reagent)
|
||||
return round(R.volume, CHEMICAL_QUANTISATION_LEVEL)
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/get_reagents()
|
||||
var/list/names = list()
|
||||
@@ -1099,7 +1099,7 @@
|
||||
|
||||
/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
|
||||
if(!isnum(amount))
|
||||
return 1
|
||||
return TRUE
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/has_removed_reagent = 0
|
||||
|
||||
|
||||
@@ -94,16 +94,16 @@
|
||||
|
||||
/obj/machinery/chem_dispenser/Initialize(mapload)
|
||||
. = ..()
|
||||
dispensable_reagents = sortList(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sort_list(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(emagged_reagents)
|
||||
emagged_reagents = sortList(emagged_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
emagged_reagents = sort_list(emagged_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents)
|
||||
upgrade_reagents = sortList(upgrade_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents = sort_list(upgrade_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents2)
|
||||
upgrade_reagents2 = sortList(upgrade_reagents2, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents2 = sort_list(upgrade_reagents2, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents3)
|
||||
upgrade_reagents3 = sortList(upgrade_reagents3, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sortList(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents3 = sort_list(upgrade_reagents3, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sort_list(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
create_reagents(200, NO_REACT)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
num = round(num)
|
||||
return num
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
|
||||
|
||||
@@ -71,14 +71,14 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
|
||||
/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
return FALSE
|
||||
if(method == VAPOR) //smoke, foam, spray
|
||||
if(M.reagents)
|
||||
var/modifier = clamp((1 - touch_protection), 0, 1)
|
||||
var/amount = round(reac_volume*modifier, 0.1)
|
||||
if(amount >= 0.5)
|
||||
M.reagents.add_reagent(type, amount)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/proc/reaction_obj(obj/O, volume)
|
||||
if(O && volume && boiling_point)
|
||||
|
||||
@@ -1479,15 +1479,15 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/eggnog
|
||||
name = "Eggnog"
|
||||
name = "Spiked Eggnog"
|
||||
description = "The traditional way to get absolutely hammered at a Christmas party."
|
||||
color = "#fcfdc6" // rgb: 252, 253, 198
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
boozepwr = 1
|
||||
boozepwr = 20
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "custard and alcohol"
|
||||
glass_icon_state = "nog3"
|
||||
glass_name = "eggnog"
|
||||
glass_name = "spiked eggnog"
|
||||
glass_desc = "The traditional way to get absolutely hammered at a Christmas party."
|
||||
|
||||
/datum/reagent/consumable/ethanol/narsour
|
||||
|
||||
@@ -1146,3 +1146,14 @@
|
||||
taste_description = "bitter powder"
|
||||
glass_name = "glass of banana peel powder"
|
||||
description = "You took a banana peel... pulped it... baked it... Where are you going with this?"
|
||||
|
||||
/datum/reagent/consumable/eggnog
|
||||
name = "Eggnog"
|
||||
description = "A creamy, rich beverage made out of whisked eggs, milk and sugar, for when you feel like celebrating the winter holidays."
|
||||
color = "#fcfdc6" // rgb: 252, 253, 198
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "custard"
|
||||
glass_icon_state = "nog3"
|
||||
glass_name = "eggnog"
|
||||
glass_desc = "You can't egg-nore the holiday cheer all around you"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
/datum/reagent/toxin/plasma/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
return 0
|
||||
return FALSE
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
O.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]")
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
/obj/item/reagent_containers/proc/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/living/carbon/C = eater
|
||||
var/covered = ""
|
||||
if(C.is_mouth_covered(head_only = 1))
|
||||
@@ -85,8 +85,8 @@
|
||||
if(covered)
|
||||
var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]"
|
||||
to_chat(user, "<span class='warning'>You have to remove [who] [covered] first!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/ex_act(severity, target, origin)
|
||||
if(reagents)
|
||||
@@ -106,9 +106,10 @@
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
. = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || !target.CanPass(src, T) || !thrownby || !thrownby.actions)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(!T || !target.CanPass(src, T) || !thrown_by || !thrown_by.actions)
|
||||
return
|
||||
var/datum/action/innate/D = get_action_of_type(thrownby, /datum/action/innate/drink_fling)
|
||||
var/datum/action/innate/D = get_action_of_type(thrown_by, /datum/action/innate/drink_fling)
|
||||
if(D?.active)
|
||||
return TRUE
|
||||
|
||||
@@ -118,6 +119,7 @@
|
||||
/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
return
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
|
||||
if(ismob(target) && target.reagents)
|
||||
if(thrown)
|
||||
@@ -128,10 +130,10 @@
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
var/turf/TT = get_turf(target)
|
||||
var/throwerstring
|
||||
if(thrownby && thrown)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
|
||||
if(thrown_by && thrown)
|
||||
log_combat(thrown_by, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrown_by)
|
||||
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
|
||||
log_reagent("SPLASH: [src] mob SplashReagents() onto [key_name(target)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
@@ -142,15 +144,15 @@
|
||||
addtimer(CALLBACK(src, PROC_REF(ForceResetRotation)), 1)
|
||||
|
||||
else
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "in [AREACOORD(target)]")
|
||||
log_game("[key_name(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [AREACOORD(target)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [ADMIN_VERBOSEJMP(target)].")
|
||||
if(isturf(target) && reagents.reagent_list.len && thrown_by)
|
||||
log_combat(thrown_by, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "in [AREACOORD(target)]")
|
||||
log_game("[key_name(thrown_by)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [AREACOORD(target)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrown_by)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [ADMIN_VERBOSEJMP(target)].")
|
||||
var/turf/T = get_turf(target)
|
||||
var/throwerstring
|
||||
if(thrownby && thrown)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] ([AREACOORD(AT)])"
|
||||
if(thrown_by && thrown)
|
||||
var/turf/AT = get_turf(thrown_by)
|
||||
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] ([AREACOORD(AT)])"
|
||||
log_reagent("SPLASH - [src] object SplashReagents() onto [target] at [T] ([AREACOORD(T)])[throwerstring] - [reagents.log_list()]")
|
||||
visible_message("<span class='notice'>[src] spills its contents all over [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
@@ -53,7 +53,7 @@ Borg Hypospray
|
||||
charge_tick = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/reagent_containers/borghypo/proc/add_reagent(datum/reagent/reagent)
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
var/R = reagents?.log_list()
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(isturf(target) && reagents.reagent_list.len && thrown_by)
|
||||
log_combat(thrown_by, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrown_by)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
log_combat(user, M, "splashed", R)
|
||||
var/turf/UT = get_turf(user)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
return 1 // Masks were stopping people from "eating" patches. Thanks, inheritance.
|
||||
return FALSE
|
||||
return TRUE // Masks were stopping people from "eating" patches. Thanks, inheritance.
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/styptic
|
||||
name = "brute patch"
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(reagents && reagents.total_volume)
|
||||
return clamp(round((reagents.total_volume / volume * 15),5), 1, 15)
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params)
|
||||
if(W.is_refillable())
|
||||
return 0 //so we can refill them via their afterattack.
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user