Gun changes (#4185)

* Various background gun changes

* Forgot to include the sounds, woops

* Fixes some more gun stuff

* Makes the cham gun work again
This commit is contained in:
Anewbe
2018-02-13 01:12:14 -06:00
committed by Atermonera
parent dcf7b73320
commit 534a588a6a
45 changed files with 967 additions and 837 deletions

View File

@@ -69,6 +69,8 @@
var/tracer_type
var/impact_type
var/fire_sound
var/vacuum_traversal = 1 //Determines if the projectile can exist in vacuum, if false, the projectile will be deleted if it enters vacuum.
var/datum/plot_vector/trajectory // used to plot the path of the projectile
@@ -177,7 +179,7 @@
return
//roll to-hit
miss_modifier = max(15*(distance-2) - round(15*accuracy) + miss_modifier + round(15*target_mob.get_evasion()), 0)
miss_modifier = max(15*(distance-2) - accuracy + miss_modifier + target_mob.get_evasion(), 0)
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
var/result = PROJECTILE_FORCE_MISS
@@ -192,7 +194,7 @@
//hit messages
if(silenced)
target_mob << "<span class='danger'>You've been hit in the [parse_zone(def_zone)] by \the [src]!</span>"
to_chat(target_mob, "<span class='danger'>You've been hit in the [parse_zone(def_zone)] by \the [src]!</span>")
else
visible_message("<span class='danger'>\The [target_mob] is hit by \the [src] in the [parse_zone(def_zone)]!</span>")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter