Fixes the charge overlays for the m1911 pulse pistol, scatter shot laser rifle, and instakill rifles, and fixes the gunlight overlay of the mini energygun. (#47759)

* Fixes the overlays for the m1911 pulse pistol, scatter shot laser rifle, and instakill rifles.

* The mini flashlight overlay of mini energy guns now works properly.
This commit is contained in:
Firecage
2019-11-15 00:28:21 -08:00
committed by Rob Bailey
parent b5b1ce67f7
commit aecaf54d9a
6 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -51,6 +51,7 @@
var/obj/item/flashlight/seclite/gun_light
var/mutable_appearance/flashlight_overlay
var/datum/action/item_action/toggle_gunlight/alight
var/gunlight_state = "flight"
var/can_bayonet = FALSE //if a bayonet can be added or removed if it already has one.
var/obj/item/kitchen/knife/bayonet
@@ -483,7 +484,7 @@
else
set_light(0)
cut_overlays(flashlight_overlay, TRUE)
var/state = "flight[gun_light.on? "_on":""]" //Generic state.
var/state = "[gunlight_state][gun_light.on? "_on":""]" //Generic state.
if(gun_light.icon_state in icon_states('icons/obj/guns/flashlights.dmi')) //Snowflake state?
state = gun_light.icon_state
flashlight_overlay = mutable_appearance('icons/obj/guns/flashlights.dmi', state)
@@ -21,16 +21,14 @@
ammo_x_offset = 2
charge_sections = 3
can_flashlight = FALSE // Can't attach or detach the flashlight, and override it's icon update
gunlight_state = "mini-light"
flight_x_offset = 19
flight_y_offset = 13
/obj/item/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/flashlight/seclite(src)
return ..()
/obj/item/gun/energy/e_gun/mini/update_icon()
..()
if(gun_light && gun_light.on)
add_overlay("mini-light")
/obj/item/gun/energy/e_gun/stun
name = "tactical energy gun"
desc = "Military issue energy gun, is able to fire stun rounds."
@@ -45,6 +45,7 @@
item_state = "laser"
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
shaded_charge = FALSE
/obj/item/gun/energy/laser/cyborg
can_charge = FALSE
@@ -321,6 +321,9 @@
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
force = 60
charge_sections = 5
ammo_x_offset = 2
shaded_charge = FALSE
/obj/item/gun/energy/laser/instakill/red
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."