mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +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:
@@ -278,9 +278,6 @@ GLOBAL_LIST_EMPTY(gamemode_cache)
|
||||
//so that it's similar to DAMAGE_PAIN. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
|
||||
var/organ_damage_spillover_multiplier = 0.5
|
||||
|
||||
var/bones_can_break = 0
|
||||
var/limbs_can_break = 0
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
var/revival_cloning = 1
|
||||
var/revival_brain_life = -1
|
||||
@@ -1117,10 +1114,6 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
|
||||
GLOB.config.default_brain_health = text2num(value)
|
||||
if(!GLOB.config.default_brain_health || GLOB.config.default_brain_health < 1)
|
||||
GLOB.config.default_brain_health = initial(GLOB.config.default_brain_health)
|
||||
if("bones_can_break")
|
||||
GLOB.config.bones_can_break = value
|
||||
if("limbs_can_break")
|
||||
GLOB.config.limbs_can_break = value
|
||||
|
||||
if("walk_speed")
|
||||
GLOB.config.walk_speed = value
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(projectiles)
|
||||
name = "Projectiles"
|
||||
stat_tag = "PROJ"
|
||||
priority = SS_PRIORITY_PROJECTILES
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user