mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-31 12:32:28 +00:00
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.
16 lines
470 B
Plaintext
16 lines
470 B
Plaintext
PROCESSING_SUBSYSTEM_DEF(projectiles)
|
|
name = "Projectiles"
|
|
wait = 1
|
|
stat_tag = "PP"
|
|
flags = SS_NO_INIT|SS_TICKER
|
|
var/global_max_tick_moves = 10
|
|
var/global_pixel_speed = 2
|
|
var/global_iterations_per_move = 16
|
|
|
|
/datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed)
|
|
global_pixel_speed = new_speed
|
|
for(var/i in processing)
|
|
var/obj/projectile/P = i
|
|
if(istype(P)) //there's non projectiles on this too.
|
|
P.set_pixel_speed(new_speed)
|