mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Refactors projectile ricochets (#25764)
* same taste, twice the speed * pulls proc/handle_ricochet() to the atom level. adds var/flags_ricochet and related defines. * space indentation sneaks its way in yet again --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -115,7 +115,7 @@
|
||||
air = environment
|
||||
if(isnull(air))
|
||||
return
|
||||
|
||||
|
||||
var/breath_percentage = BREATH_VOLUME / air.return_volume()
|
||||
return air.remove(air.total_moles() * breath_percentage)
|
||||
else
|
||||
@@ -303,6 +303,12 @@
|
||||
else
|
||||
C.KnockDown(3 SECONDS)
|
||||
|
||||
/obj/handle_ricochet(obj/item/projectile/P)
|
||||
. = ..()
|
||||
if(. && receive_ricochet_damage_coeff)
|
||||
// pass along receive_ricochet_damage_coeff damage to the structure for the ricochet
|
||||
take_damage(P.damage * receive_ricochet_damage_coeff, P.damage_type, P.flag, 0, REVERSE_DIR(P.dir), P.armour_penetration_flat, P.armour_penetration_percentage)
|
||||
|
||||
/obj/proc/return_obj_air()
|
||||
RETURN_TYPE(/datum/gas_mixture)
|
||||
if(isobj(loc))
|
||||
|
||||
Reference in New Issue
Block a user