Files
kiwistation/code/modules/projectiles/projectile/beams.dm
T
Tenebrosity 84b9a63330 Adds a generic projectile hit sound to most projectiles, except for practice laser and laser tag beams. Scales volume of projectile hit sounds by damage done by the specific projectile.
Overrides the generic sound with specific ones for electrodes and
lasers: sear.ogg for lasers and "sparks" for electrodes.

Thanks @optimumtact for your help with getting the hitsound volume scaling to work.
2014-01-29 19:22:56 +13:00

106 lines
2.5 KiB
Plaintext

/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
flag = "laser"
eyeblur = 2
/obj/item/projectile/practice
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
hitsound = null
damage_type = BURN
flag = "laser"
eyeblur = 2
/obj/item/projectile/beam/scatter
name = "laser pellet"
icon_state = "scatterlaser"
damage = 5
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
/obj/item/projectile/beam/xray
name = "xray beam"
icon_state = "xray"
damage = 15
irradiate = 30
forcedodge = 1
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
on_hit(var/atom/target, var/blocked = 0)
if(istype(target,/turf/)||istype(target,/obj/structure/))
target.ex_act(2)
..()
/obj/item/projectile/beam/deathlaser
name = "death laser"
icon_state = "heavylaser"
damage = 60
/obj/item/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
/obj/item/projectile/bluetag
name = "lasertag beam"
icon_state = "bluelaser"
hitsound = null
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
M.Weaken(5)
return 1
/obj/item/projectile/redtag
name = "lasertag beam"
icon_state = "laser"
hitsound = null
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5)
return 1
/obj/item/projectile/omnitag//A laser tag bolt that stuns EVERYONE
name = "lasertag beam"
hitsound = null
icon_state = "omnilaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
M.Weaken(5)
return 1