Cargo train vs projectiles

If a cargo train has a mob riding it, there is a chance the mob will be hit by the projectile instead.
This commit is contained in:
Loganbacca
2015-07-10 16:12:30 +12:00
parent 6b10b648d2
commit ba7e3ae9e8
2 changed files with 8 additions and 1 deletions

View File

@@ -37,7 +37,7 @@
var/dispersion = 0.0
var/damage = 10
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE, HALLOSS are the only things that should be in here
var/nodamage = 0 //Determines if the projectile will skip any damage inflictions
var/taser_effect = 0 //If set then the projectile will apply it's agony damage using stun_effect_act() to mobs it hits, and other damage will be ignored
var/check_armour = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb //Cael - bio and rad are also valid

View File

@@ -79,6 +79,13 @@
return
..()
//cargo trains are open topped, so there is a chance the projectile will hit the mob ridding the train instead
/obj/vehicle/train/cargo/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob && prob(70))
buckled_mob.bullet_act(Proj)
return
..()
/obj/vehicle/train/cargo/update_icon()
if(open)
icon_state = initial(icon_state) + "_open"