mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Improves spray bottles reagent dividing (#30667)
* fixes the things * i think it works now * lets not make infinite reagents actually * clamping is smarter
This commit is contained in:
@@ -84,9 +84,10 @@
|
||||
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/spray(atom/A)
|
||||
var/spray_divisor = 1 / clamp(round(get_dist_euclidian(get_turf(A), get_turf(src))), 1, spray_currentrange)
|
||||
var/obj/effect/decal/chempuff/chem_puff = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
chem_puff.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(chem_puff, amount_per_transfer_from_this, 1/spray_currentrange)
|
||||
reagents.trans_to(chem_puff, amount_per_transfer_from_this, spray_divisor)
|
||||
chem_puff.icon += mix_color_from_reagents(chem_puff.reagents.reagent_list)
|
||||
|
||||
var/datum/move_loop/our_loop = GLOB.move_manager.move_towards_legacy(chem_puff, A, 3 DECISECONDS, timeout = spray_currentrange * 3 DECISECONDS, flags = MOVEMENT_LOOP_START_FAST, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
|
||||
Reference in New Issue
Block a user