diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 74f60a3a72..7d8e75764c 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -13,6 +13,7 @@
var/on = 1
var/area/area = null
var/otherarea = null
+ var/image/overlay
/obj/machinery/light_switch/New()
..()
@@ -31,14 +32,18 @@
/obj/machinery/light_switch/proc/updateicon()
+ if(!overlay)
+ overlay = image(icon, "light1-overlay", LIGHTING_LAYER+0.1)
+
+ overlays.Cut()
if(stat & NOPOWER)
icon_state = "light-p"
set_light(0)
- layer = OBJ_LAYER
else
icon_state = "light[on]"
- set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
- layer = LIGHTING_LAYER+0.1
+ overlay.icon_state = "light[on]-overlay"
+ overlays += overlay
+ set_light(2, 0.1, on ? "#82FF4C" : "#F86060")
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index fcb52986a4..01fc592690 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -213,10 +213,10 @@ steam.start() -- spawns the effect
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
-/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
+/obj/effect/effect/smoke/illumination/New(var/newloc, var/lifetime=10, var/range=null, var/power=null, var/color=null)
time_to_live=lifetime
..()
- set_light(brightness)
+ set_light(range, power, color)
/////////////////////////////////////////////
// Bad smoke
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index da512f9449..0024a05c62 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -60,6 +60,10 @@
else //can only use it 5 times a minute
user << "*click* *click*"
return
+
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
var/flashfail = 0
@@ -112,6 +116,7 @@
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
if(!user || !clown_check(user)) return
+
if(broken)
user.show_message("The [src.name] is broken", 2)
return
@@ -131,6 +136,7 @@
else //can only use it 5 times a minute
user.show_message("*click* *click*", 2)
return
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("flash2", src)
if(user && isrobot(user))
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index a95d3b1382..17616942c1 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -22,13 +22,13 @@
B.update_icon()
new/obj/effect/effect/sparks(src.loc)
- new/obj/effect/effect/smoke/illumination(src.loc, brightness=15)
+ new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
qdel(src)
return
proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
M << "BANG" // Called during the loop that bangs people in lockers/containers and when banging
- playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5) // people in normal view. Could theroetically be called during other explosions.
+ playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
// -- Polymorph
//Checking for protections
diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm
index d56c298b6c..66155da7ea 100644
--- a/code/modules/projectiles/projectile/energy.dm
+++ b/code/modules/projectiles/projectile/energy.dm
@@ -14,7 +14,7 @@
kill_count = 15 //if the shell hasn't hit anything after travelling this far it just explodes.
var/flash_range = 0
var/brightness = 7
- var/light_duration = 5
+ var/light_colour = "#ffffff"
/obj/item/projectile/energy/flash/on_impact(var/atom/A)
var/turf/T = flash_range? src.loc : get_turf(A)
@@ -29,16 +29,25 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("\The [src] explodes in a bright flash!")
- new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
- new /obj/effect/effect/sparks(T)
- new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration)
+ var/datum/effect/effect/system/spark_spread/sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
+ sparks.set_up(2, 1, T)
+ sparks.start()
+ new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
+ new /obj/effect/effect/smoke/illumination(T, 5, brightness, brightness, light_colour)
//blinds people like the flash round, but can also be used for temporary illumination
/obj/item/projectile/energy/flash/flare
damage = 10
flash_range = 1
- brightness = 9 //similar to a flare
- light_duration = 200
+ brightness = 15
+
+/obj/item/projectile/energy/flash/flare/on_impact(var/atom/A)
+ light_colour = pick("#e58775", "#ffffff", "#90ff90", "#a09030")
+
+ ..() //initial flash
+
+ //residual illumination
+ new /obj/effect/effect/smoke/illumination(src.loc, rand(190,240) SECONDS, range=8, power=3, color=light_colour) //same lighting power as flare
/obj/item/projectile/energy/electrode
name = "electrode"
diff --git a/html/changelogs/HarpyEagle - lightingadditions.yml b/html/changelogs/HarpyEagle - lightingadditions.yml
new file mode 100644
index 0000000000..8cf4b825e3
--- /dev/null
+++ b/html/changelogs/HarpyEagle - lightingadditions.yml
@@ -0,0 +1,38 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+#################################
+
+# Your name.
+author: HarpyEagle
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - tweak: "Shotgun flare illumination now lasts longer, around 3-4 minutes."
+ - bugfix: "Fixed attack animation playing when using flashes even if the flash was not actually used due to being broken or recharging."
+ - bugfix: "Fixed lightswitches layering over darkness. Now only the light layers above shadow. Lightswitch illumination is now much more subtle."
diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi
index 099070a4fc..80d768dfe5 100644
Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ