Files
archbtw 3425cf03e5 Gun Muzzle Flash (2) (#94172)
## About The Pull Request

Continues https://github.com/tgstation/tgstation/pull/81507

Adds a directional muzzle flash to all guns (excluding suppressors,
toys, e-bow, etc).
Changes color depending on the laser/projectile.
If anything is missed, let me know.

## Why It's Good For The Game

Realism
Cool visuals
Makes sense
2025-11-30 13:37:00 -06:00

98 lines
3.5 KiB
Plaintext

/obj/item/gun/energy/pulse
name = "pulse rifle"
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
icon_state = "pulse"
inhand_icon_state = null
worn_icon_state = null
w_class = WEIGHT_CLASS_BULKY
force = 10
modifystate = TRUE
obj_flags = CONDUCTS_ELECTRICITY
slot_flags = ITEM_SLOT_BACK
light_color = COLOR_BLUE
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
cell_type = /obj/item/stock_parts/power_store/cell/pulse
/obj/item/gun/energy/pulse/Initialize(mapload)
. = ..()
AddElement(/datum/element/empprotection, EMP_PROTECT_ALL)
/obj/item/gun/energy/pulse/prize
pin = /obj/item/firing_pin
/obj/item/gun/energy/pulse/prize/Initialize(mapload)
. = ..()
SSpoints_of_interest.make_point_of_interest(src)
var/turf/T = get_turf(src)
message_admins("A pulse rifle prize has been created at [ADMIN_VERBOSEJMP(T)]")
log_game("A pulse rifle prize has been created at [AREACOORD(T)]")
notify_ghosts(
"Someone won a pulse rifle as a prize!",
source = src,
header = "Pulse rifle prize",
)
/obj/item/gun/energy/pulse/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine
name = "pulse carbine"
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_BULKY
icon_state = "pulse_carbine"
worn_icon_state = "gun"
inhand_icon_state = null
cell_type = /obj/item/stock_parts/power_store/cell/pulse/carbine
/obj/item/gun/energy/pulse/carbine/add_seclight_point()
AddComponent(/datum/component/seclite_attachable, \
light_overlay_icon = 'icons/obj/weapons/guns/flashlights.dmi', \
light_overlay = "flight", \
overlay_x = 18, \
overlay_y = 12)
/obj/item/gun/energy/pulse/carbine/lethal
ammo_type = list(/obj/item/ammo_casing/energy/laser, /obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode)
/obj/item/gun/energy/pulse/carbine/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/carbine/taserless
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/pulse/destroyer
name = "pulse destroyer"
desc = "A heavy-duty energy rifle built for pure destruction."
worn_icon_state = "pulse"
cell_type = /obj/item/stock_parts/power_store/cell/infinite
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
to_chat(user, span_danger("[src.name] has three settings, and they are all DESTROY."))
/obj/item/gun/energy/pulse/pistol
name = "pulse pistol"
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
w_class = WEIGHT_CLASS_SMALL
slot_flags = ITEM_SLOT_BELT
icon_state = "pulse_pistol"
worn_icon_state = "gun"
inhand_icon_state = "gun"
cell_type = /obj/item/stock_parts/power_store/cell/pulse/pistol
/obj/item/gun/energy/pulse/pistol/taserless
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/laser)
/obj/item/gun/energy/pulse/pistol/loyalpin
pin = /obj/item/firing_pin/implant/mindshield
/obj/item/gun/energy/pulse/pistol/m1911
name = "\improper M1911-P"
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
icon_state = "m1911"
inhand_icon_state = "gun"
cell_type = /obj/item/stock_parts/power_store/cell/infinite