mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
Projectile refactoring madness (#19878)
Refactored the projectile code, mostly in line with TG's now. Refactored various procs that are used or depends on it. Projectiles can now ricochet if enabled to. Damage falloffs with distance. Homing projectiles can now have accuracy falloff with distance. Projectiles have a maximum range. Muzzle flash is configurable per projectile. Impact effect of the projectile is configurable per projectile. Accuracy decreases with distance. Projectiles work with signals and emits them, for easy hooking up from other parts of the code. Meatshielding is now less effective . Impact sound is now configurable per projectile. High risk.
This commit is contained in:
@@ -340,15 +340,19 @@
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/power/supermatter/bullet_act(var/obj/projectile/Proj)
|
||||
/obj/machinery/power/supermatter/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
|
||||
. = ..()
|
||||
if(. != BULLET_ACT_HIT)
|
||||
return .
|
||||
|
||||
var/turf/L = loc
|
||||
if(!istype(L)) // We don't run process() when we are in space
|
||||
return 0 // This stops people from being able to really power up the supermatter
|
||||
// Then bring it inside to explode instantly upon landing on a valid turf.
|
||||
|
||||
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(istype(Proj, /obj/projectile/beam))
|
||||
var/proj_damage = hitting_projectile.get_structure_damage()
|
||||
if(istype(hitting_projectile, /obj/projectile/beam))
|
||||
power += proj_damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR
|
||||
else
|
||||
damage += proj_damage * config_bullet_energy
|
||||
|
||||
Reference in New Issue
Block a user