Merge remote-tracking branch 'citadel/master' into combat_patches_1

This commit is contained in:
silicons
2021-07-18 15:12:52 -07:00
159 changed files with 132112 additions and 130447 deletions
@@ -287,7 +287,9 @@
/datum/reagent/water/reaction_obj(obj/O, reac_volume)
O.extinguish()
O.acid_level = 0
var/datum/component/acid/acid = O.GetComponent(/datum/component/acid)
if(acid)
acid.level = 0
// cubes
if(istype(O, /obj/item/reagent_containers/food/snacks/cube))
var/obj/item/reagent_containers/food/snacks/cube/cube = O
@@ -40,6 +40,7 @@
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, multiplier, specialreact)
set waitfor = FALSE
return
//I recommend you set the result amount to the total volume of all components.
@@ -16,7 +16,7 @@
var/stream_mode = 0 //whether we use the more focused mode
var/current_range = 3 //the range of tiles the sprayer will reach.
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
var/stream_range = 3 //the range of tiles the sprayer will reach when in stream mode.
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
/// Amount of time it takes for a spray to completely travel.
var/spray_delay = 8
@@ -74,19 +74,18 @@
return
var/range = clamp(get_dist(src, A), 1, current_range)
var/wait_step = CEILING(spray_delay * INVERSE(range), world.tick_lag)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src), stream_mode, wait_step, range, stream_mode? 1 : range)
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src), stream_mode, wait_step, range, stream_mode? 1 : range, amount_per_transfer_from_this)
var/turf/T = get_turf(src)
if(!T)
return
log_reagent("SPRAY: [key_name(usr)] fired [src] ([REF(src)]) [COORD(T)] at [A] ([REF(A)]) [COORD(A)] (chempuff: [D.reagents.log_list()])")
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
if(stream_mode)
reagents.trans_to(D, amount_per_transfer_from_this)
else
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
D.color = mix_color_from_reagents(D.reagents.reagent_list)
D.add_atom_colour(mix_color_from_reagents(D.reagents.reagent_list), TEMPORARY_COLOUR_PRIORITY)
last_spray = world.time
D.run_puff(A)
INVOKE_ASYNC(D, /obj/effect/decal/chempuff/proc/run_puff, A)
/obj/item/reagent_containers/spray/attack_self(mob/user)
stream_mode = !stream_mode