mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +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:
@@ -52,11 +52,15 @@
|
||||
// "Stun" weapons can cause minor damage to components (short-circuits?)
|
||||
// "Burn" damage is equally strong against internal components and exterior casing
|
||||
// "Brute" damage mostly damages the casing.
|
||||
/obj/item/modular_computer/bullet_act(var/obj/projectile/Proj)
|
||||
switch(Proj.damage_type)
|
||||
/obj/item/modular_computer/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
|
||||
. = ..()
|
||||
if(. != BULLET_ACT_HIT)
|
||||
return .
|
||||
|
||||
switch(hitting_projectile.damage_type)
|
||||
if(DAMAGE_BRUTE)
|
||||
take_damage(Proj.damage, Proj.damage / 2)
|
||||
take_damage(hitting_projectile.damage, hitting_projectile.damage / 2)
|
||||
if(DAMAGE_PAIN)
|
||||
take_damage(Proj.damage, Proj.damage / 3, 0)
|
||||
take_damage(hitting_projectile.damage, hitting_projectile.damage / 3, 0)
|
||||
if(DAMAGE_BURN)
|
||||
take_damage(Proj.damage, Proj.damage / 1.5)
|
||||
take_damage(hitting_projectile.damage, hitting_projectile.damage / 1.5)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/obj/item/modular_computer/console/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(mover?.movement_type & PHASING)
|
||||
return TRUE
|
||||
if(istype(mover,/obj/projectile))
|
||||
if(prob(80))
|
||||
//Holoscreens are non solid, and the frames of the computers are thin. So projectiles will usually
|
||||
|
||||
Reference in New Issue
Block a user