mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
New bullet types, projectile rewrite
* Refactors projectile Bump() * Converts projectile_type var strings to paths * Reorganizes bullet projectile paths * Made a pass through all the bullet_act() definitions. Mainly ensured that damage_type is checked when dealing damage to certain objects. Removed stupid /turf bullet_act() override, replaced with on_hit() overrides on the relevant projectiles. * Adds shotgun pellets projectile. Adds Raptor's shotgun slug sprite. * Gives stunshots more of their own identity, refluffs them as taser cartridges for shotguns. They still aren't obtainable anywhere unless spawned. * Makes projectiles pass through girders and cultgirders with a certain probability, unless the girder itself was clicked. * Projectiles are also able to pass through grilles. Low damage projectiles have a chance to be blocked by grilles. High damage projectiles have a chance to have some damage absorbed by the grille. * Makes projectiles for blanks invisible. * Adds flash bullet types * Adds support for 'penetrating' projectiles * Swaps .45 and 9mm projectile types. .45s hit slightly harder, 9mils have more ammo capacity.
This commit is contained in:
@@ -59,16 +59,33 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(!Proj) return
|
||||
|
||||
//Tasers and the like should not damage grilles.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
src.health -= Proj.damage*0.2
|
||||
healthcheck()
|
||||
return 0
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.damage
|
||||
var/passthrough
|
||||
if(damage > 30)
|
||||
passthrough = 1
|
||||
if(prob(20))
|
||||
Proj.damage *= 0.5 //weaken the projectile
|
||||
else
|
||||
//weaker bullets are affected to a greater extent
|
||||
if(prob(20))
|
||||
passthrough = 0
|
||||
else
|
||||
Proj.damage *= 0.5 //weaken the projectile
|
||||
passthrough = 1
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
damage *= 0.1 //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
|
||||
Reference in New Issue
Block a user