Flash projectile adjustment

Adjusts brightness, adds some effects, adds 9mm flash rounds and pistol
variant.
This commit is contained in:
mwerezak
2015-02-10 19:54:30 -05:00
parent 5ddbbc0371
commit ee894d6b99
6 changed files with 23 additions and 11 deletions
+1 -1
View File
@@ -153,9 +153,9 @@
/obj/item/weapon/gun/projectile/examine(mob/user)
..(user)
user << "Has [getAmmo()] round\s remaining."
if(ammo_magazine)
user << "It has \a [ammo_magazine] loaded."
user << "Has [getAmmo()] round\s remaining."
// if(in_chamber && !loaded.len)
// user << "However, it has a chambered round."
// if(in_chamber && loaded.len)
@@ -71,7 +71,8 @@
magazine_type = /obj/item/ammo_magazine/mc9mm
/obj/item/weapon/gun/projectile/pistol/flash
desc = "A small, easily concealable gun. Uses 9mm illumination rounds."
name = "\improper Stechtkin signal pistol"
desc = "A small, easily concealable gun. Uses 9mm signal flash rounds."
magazine_type = /obj/item/ammo_magazine/mc9mm/flash
/obj/item/weapon/gun/projectile/pistol/attack_hand(mob/user as mob)
@@ -88,6 +88,8 @@
magazine_type = /obj/item/ammo_magazine/c45m/rubber
/obj/item/weapon/gun/projectile/detective/semiauto/flash
name = "\improper Colt M1911 signal pistol"
desc = "A cheap Martian knock-off of a Colt M1911. Uses .45 signal flash rounds."
magazine_type = /obj/item/ammo_magazine/c45m/flash
/obj/item/weapon/gun/projectile/detective/semiauto/colt
+2
View File
@@ -101,10 +101,12 @@
if(user == target) //Shooting yourself
user.bullet_act(src, target_zone)
on_impact(user)
del(src)
return 0
if(targloc == curloc) //Shooting something in the same turf
target.bullet_act(src, target_zone)
on_impact(target)
del(src)
return 0
+15 -9
View File
@@ -11,29 +11,35 @@
name = "shell" //a chemical filled shell or something
icon_state = "bullet"
damage = 5
var/flash_range = 1
var/brightness = 5
var/light_duration = 10
var/flash_range = 0
var/brightness = 7
var/light_duration = 5
/obj/item/projectile/energy/flash/on_impact()
var/turf/T = get_turf(src)
/obj/item/projectile/energy/flash/on_impact(var/atom/A)
var/turf/T = get_turf(A)
if(!istype(T)) return
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
//blind adjacent people
for (var/mob/living/carbon/M in viewers(T, flash_range))
if(M.eyecheck() < 1)
flick("e_flash", M.flash)
//snap pop
playsound(src, 'sound/effects/snap.ogg', 50, 1)
new/obj/effect/effect/smoke/illumination(src.loc, brightness=max(flash_range*2, brightness), lifetime=light_duration)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
//use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/sparks(src.loc)
new /obj/effect/decal/cleanable/ash(src.loc)
new /obj/effect/effect/smoke/illumination(src.loc, brightness=max(flash_range*2, brightness), lifetime=light_duration)
//blinds people like the flash round, but can also be used for temporary illumination
/obj/item/projectile/energy/flash/flare
damage = 10
flash_range = 1
brightness = 7 //similar to a flare
light_duration = 150
brightness = 9 //similar to a flare
light_duration = 200
/obj/item/projectile/energy/electrode
name = "electrode"