diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm index cdafb81b62c..f57d9af87f0 100644 --- a/code/game/objects/items/melee/baton.dm +++ b/code/game/objects/items/melee/baton.dm @@ -427,6 +427,12 @@ on_stun_volume = 50 active = FALSE context_living_rmb_active = "Harmful Stun" + light_range = 1.5 + light_system = OVERLAY_LIGHT + light_on = FALSE + light_color = LIGHT_COLOR_ORANGE + light_power = 0.5 + var/throw_stun_chance = 35 var/obj/item/stock_parts/cell/cell @@ -541,6 +547,8 @@ active = !active balloon_alert(user, "turned [active ? "on" : "off"]") playsound(src, SFX_SPARKS, 75, TRUE, -1) + toggle_light(user) + do_sparks(1, TRUE, src) else active = FALSE if(!cell) @@ -550,6 +558,11 @@ update_appearance() add_fingerprint(user) +/// Toggles the stun baton's light +/obj/item/melee/baton/security/proc/toggle_light(mob/user) + set_light_on(!light_on) + return + /obj/item/melee/baton/security/proc/deductcharge(deducted_charge) if(!cell) return @@ -559,6 +572,7 @@ if(active && cell.charge < cell_hit_cost) //we're below minimum, turn off active = FALSE + set_light_on(FALSE) update_appearance() playsound(src, SFX_SPARKS, 75, TRUE, -1) @@ -649,6 +663,8 @@ if (!cell || cell.charge < cell_hit_cost) return active = !active + toggle_light() + do_sparks(1, TRUE, src) playsound(src, SFX_SPARKS, 75, TRUE, -1) update_appearance()