Skip to content

Commit

Permalink
Fixes the charge overlays for the m1911 pulse pistol, scatter shot la…
Browse files Browse the repository at this point in the history
…ser rifle, and instakill rifles, and fixes the gunlight overlay of the mini energygun. (tgstation#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.
  • Loading branch information
Firecage authored and actioninja committed Nov 15, 2019
1 parent b5b1ce6 commit aecaf54
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 3 additions & 5 deletions code/modules/projectiles/guns/energy/energy_gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Binary file modified icons/obj/guns/energy.dmi
Binary file not shown.
Binary file modified icons/obj/guns/flashlights.dmi
Binary file not shown.

0 comments on commit aecaf54

Please sign in to comment.