diff --git a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm index 5cb11f0057f..cd56feb6d69 100644 --- a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm +++ b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm @@ -188,6 +188,7 @@ origin_tech = null can_charge = FALSE selfcharge = TRUE // Selfcharge is enabled and disabled, and used as the away mission tracker + can_flashlight = FALSE /obj/item/gun/energy/laser/awaymission_aeg/on_changed_z_level(turf/old_turf, turf/new_turf, same_z_layer, notify_contents = FALSE) if(is_away_level(new_turf?.z)) diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index 9e56bf8bb21..47548721172 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -89,6 +89,7 @@ name = "Old laser" desc = "A once potent weapon, years of dust have collected in the chamber and lens of this weapon, weakening the beam significantly." clumsy_check = 0 + can_flashlight = FALSE /* * Safe code hints diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index fade0a3224b..01f14d78f5f 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -4,12 +4,19 @@ icon_state = "lasergun" item_state = null w_class = WEIGHT_CLASS_NORMAL + can_flashlight = TRUE materials = list(MAT_METAL=2000) origin_tech = "combat=4;magnets=2" ammo_type = list(/obj/item/ammo_casing/energy/lasergun) ammo_x_offset = 1 + gun_light_overlay = "lasergun_light" shaded_charge = TRUE +/obj/item/gun/energy/laser/ui_action_click(mob/user, datum/action/action, leftclick) + if(istype(action, /datum/action/item_action/toggle_gunlight)) + toggle_gunlight() + return TRUE + /obj/item/gun/energy/laser/practice name = "practice laser gun" desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice." @@ -19,12 +26,14 @@ ammo_type = list(/obj/item/ammo_casing/energy/laser/practice) clumsy_check = 0 needs_permit = 0 + can_flashlight = FALSE /obj/item/gun/energy/laser/retro name ="retro laser gun" icon_state = "retro" item_state = "laser" desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws." + can_flashlight = FALSE ammo_x_offset = 3 /obj/item/gun/energy/laser/captain @@ -34,6 +43,7 @@ desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding." force = 10 origin_tech = null + can_flashlight = FALSE ammo_x_offset = 3 selfcharge = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF @@ -52,6 +62,7 @@ item_state = "laser" desc = "An industrial-grade heavy-duty laser rifle with a modified laser lense to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theorically infinite use." origin_tech = "combat=5;materials=4;powerstorage=4" + can_flashlight = FALSE ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser) shaded_charge = FALSE unique_reskin = FALSE @@ -61,6 +72,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/laser/cyborg) can_charge = FALSE origin_tech = null + can_flashlight = FALSE /obj/item/gun/energy/laser/cyborg/newshot() ..() @@ -73,6 +85,7 @@ name = "scatter laser gun" desc = "A laser gun equipped with a refraction kit that spreads bolts." ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser) + can_flashlight = FALSE ///Laser Cannon @@ -82,6 +95,7 @@ icon_state = "lasercannon" item_state = "laser" w_class = WEIGHT_CLASS_BULKY + can_flashlight = FALSE force = 10 flags = CONDUCT slot_flags = ITEM_SLOT_BACK @@ -119,6 +133,7 @@ desc = "A high-power laser gun capable of expelling concentrated xray blasts. These blasts will penetrate solid objects, but will decrease in power the longer they have to travel." icon_state = "xray" origin_tech = "combat=6;materials=4;magnets=4" + can_flashlight = FALSE ammo_type = list(/obj/item/ammo_casing/energy/xray) /obj/item/gun/energy/immolator @@ -127,6 +142,7 @@ icon_state = "immolator" item_state = "laser" ammo_type = list(/obj/item/ammo_casing/energy/immolator) + can_flashlight = FALSE origin_tech = "combat=4;magnets=4;powerstorage=3" shaded_charge = TRUE @@ -158,6 +174,7 @@ name = "laser tag gun" desc = "Standard issue weapon of the Imperial Guard" origin_tech = "combat=2;magnets=2" + can_flashlight = FALSE clumsy_check = FALSE needs_permit = FALSE ammo_x_offset = 2 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 8860e9ccd22..90c184c8b55 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -337,6 +337,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/instakill) force = 60 origin_tech = "combat=7;magnets=6" + can_flashlight = FALSE /obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib return diff --git a/code/modules/projectiles/guns/mounted.dm b/code/modules/projectiles/guns/mounted.dm index e359a928b9b..e72e40273d1 100644 --- a/code/modules/projectiles/guns/mounted.dm +++ b/code/modules/projectiles/guns/mounted.dm @@ -16,3 +16,4 @@ item_state = "armcannonlase" selfcharge = TRUE trigger_guard = TRIGGER_GUARD_ALLOW_ALL + can_flashlight = FALSE diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 84b3210e68f..af47c5b61ce 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -84,9 +84,24 @@ desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control." icon_state = "riotshotgun" mag_type = /obj/item/ammo_box/magazine/internal/shot/riot + can_flashlight = TRUE sawn_desc = "Come with me if you want to live." sawn_state = SAWN_INTACT fire_sound = 'sound/weapons/gunshots/1shotgun.ogg' + gun_light_overlay = "riotshotgun_light" + +/obj/item/gun/projectile/shotgun/riot/update_overlays() + . = ..() + if(gun_light && gun_light_overlay) + var/iconF = gun_light_overlay + if(gun_light.on) + iconF = "[gun_light_overlay]_on" + . += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset) + +/obj/item/gun/projectile/shotgun/riot/ui_action_click(mob/user, datum/action/action, leftclick) + if(istype(action, /datum/action/item_action/toggle_gunlight)) + toggle_gunlight() + return TRUE /obj/item/gun/projectile/shotgun/riot/attackby(obj/item/I, mob/user, params) diff --git a/icons/obj/weapons/energy.dmi b/icons/obj/weapons/energy.dmi index 459a68a74cc..351183d8903 100644 Binary files a/icons/obj/weapons/energy.dmi and b/icons/obj/weapons/energy.dmi differ diff --git a/icons/obj/weapons/projectile.dmi b/icons/obj/weapons/projectile.dmi index 4dd37d84e0f..e3154d9b8f7 100644 Binary files a/icons/obj/weapons/projectile.dmi and b/icons/obj/weapons/projectile.dmi differ