Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit ed80d66

Browse files
authored
[PORT] Ports Stun Baton Eyecandy | Glows and Sparks from TG (#21483)
* port doneq off the port bow * dog station
1 parent 8cb6604 commit ed80d66

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

code/game/objects/items/stunbaton.dm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@
3333
var/preload_cell_type
3434
///used for passive discharge
3535
var/cell_last_used = 0
36+
light_range = 1.5
37+
light_system = MOVABLE_LIGHT
38+
light_on = FALSE
39+
light_color = LIGHT_COLOR_ORANGE
40+
light_power = 0.5
41+
42+
/// Toggles the stun baton's light
43+
/obj/item/melee/baton/proc/toggle_light(mob/user)
44+
set_light_on(!light_on)
45+
return
46+
3647

3748
/obj/item/melee/baton/get_cell()
3849
return cell
@@ -76,6 +87,7 @@
7687
if(status && cell.charge < hitcost)
7788
//we're below minimum, turn off
7889
status = FALSE
90+
set_light_on(FALSE)
7991
update_appearance(UPDATE_ICON)
8092
playsound(loc, "sparks", 75, 1, -1)
8193
STOP_PROCESSING(SSobj, src) // no more charge? stop checking for discharge
@@ -135,6 +147,8 @@
135147
status = !status
136148
to_chat(user, span_notice("[src] is now [status ? "on" : "off"]."))
137149
playsound(loc, "sparks", 75, 1, -1)
150+
toggle_light(user)
151+
do_sparks(1, TRUE, src)
138152
cell_last_used = 0
139153
if(status)
140154
START_PROCESSING(SSobj, src)
@@ -306,3 +320,5 @@
306320
desc = "A new power management circuit which enables stun batons to instantly stun, at the cost of double power usage."
307321
icon = 'icons/obj/module.dmi'
308322
icon_state = "cyborg_upgrade3"
323+
324+

0 commit comments

Comments
 (0)