From 0af8daedb58617a3ec9938e4cc203bda96d15d06 Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:27:00 -0600 Subject: [PATCH 1/6] ling moment --- code/modules/projectiles/gun.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d3b550ed10ae..a1845de000fa 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -609,6 +609,23 @@ update_gunlight() /obj/item/gun/proc/update_gunlight() + if(gun_light) + if(gun_light.on) + set_light(gun_light.brightness_on) + else + set_light(0) + cut_overlay(flashlight_overlay, TRUE) + var/state = "flight[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) + flashlight_overlay.pixel_x = flight_x_offset + flashlight_overlay.pixel_y = flight_y_offset + add_overlay(flashlight_overlay, TRUE) + else + set_light(0) + cut_overlay(flashlight_overlay, TRUE) + flashlight_overlay = null update_icon() for(var/X in actions) var/datum/action/A = X From de67d6c276c2f7c9c5d7053728de308275212da2 Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:36:22 -0600 Subject: [PATCH 2/6] fug variable change --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a1845de000fa..d9e630b68fee 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -611,7 +611,7 @@ /obj/item/gun/proc/update_gunlight() if(gun_light) if(gun_light.on) - set_light(gun_light.brightness_on) + set_light(gun_light.light_range) else set_light(0) cut_overlay(flashlight_overlay, TRUE) From f852f869ce90094380f1534c2c89bc9ffef7667e Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:55:53 -0600 Subject: [PATCH 3/6] Update code/modules/projectiles/gun.dm Co-authored-by: Ling --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d9e630b68fee..f2e04de74bf7 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -610,7 +610,7 @@ /obj/item/gun/proc/update_gunlight() if(gun_light) - if(gun_light.on) + set_light_on(gun_light.on) set_light(gun_light.light_range) else set_light(0) From b8e93aa16c342de7f60792327cc23b6e1930b64b Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:57:47 -0600 Subject: [PATCH 4/6] i dont think we needed that --- code/modules/projectiles/gun.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f2e04de74bf7..4ca2c811b0c8 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -610,10 +610,6 @@ /obj/item/gun/proc/update_gunlight() if(gun_light) - set_light_on(gun_light.on) - set_light(gun_light.light_range) - else - set_light(0) cut_overlay(flashlight_overlay, TRUE) var/state = "flight[gun_light.on? "_on":""]" //Generic state. if(gun_light.icon_state in icon_states('icons/obj/guns/flashlights.dmi')) //Snowflake state? From f17438fce59f1d6d66fdfa24d3b471a043e655d5 Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:58:41 -0600 Subject: [PATCH 5/6] Update gun.dm --- code/modules/projectiles/gun.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 4ca2c811b0c8..df628eaf1bfe 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -619,7 +619,7 @@ flashlight_overlay.pixel_y = flight_y_offset add_overlay(flashlight_overlay, TRUE) else - set_light(0) + set_light_on(FALSE) cut_overlay(flashlight_overlay, TRUE) flashlight_overlay = null update_icon() From 68bd33b2faa99f1a7a911b5e34cf9ed5ee5d6868 Mon Sep 17 00:00:00 2001 From: Manatee <74586965+MajManatee@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:01:46 -0600 Subject: [PATCH 6/6] Update gun.dm --- code/modules/projectiles/gun.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index df628eaf1bfe..5fd9837d691c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -619,7 +619,6 @@ flashlight_overlay.pixel_y = flight_y_offset add_overlay(flashlight_overlay, TRUE) else - set_light_on(FALSE) cut_overlay(flashlight_overlay, TRUE) flashlight_overlay = null update_icon()