Files
VOREStation/code/game/objects/items/devices/traitordevices.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

65 lines
1.5 KiB
Plaintext

/*
Miscellaneous traitor devices
BATTERER
*/
/*
The Batterer, like a flashbang but 50% chance to knock people over. Can be either very
effective or pretty fucking useless.
*/
/obj/item/batterer
name = "mind batterer"
desc = "A strange device with twin antennas."
icon = 'icons/obj/device.dmi'
icon_state = "batterer"
throwforce = 5
w_class = ITEMSIZE_TINY
throw_speed = 4
throw_range = 10
item_state = "electronic"
origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 3, TECH_ILLEGAL = 3)
var/times_used = 0 //Number of times it's been used.
var/max_uses = 2
pickup_sound = 'sound/items/pickup/device.ogg'
drop_sound = 'sound/items/drop/device.ogg'
/obj/item/batterer/attack_self(mob/user, flag = 0, emp = 0)
. = ..(user)
if(.)
return TRUE
if(!user) return
if(times_used >= max_uses)
to_chat(user, span_warning("The mind batterer has been burnt out!"))
return
var/list/affected = list()
for(var/mob/living/carbon/human/M in orange(10, user))
affected += M
spawn()
if(prob(50))
M.Weaken(rand(10,20))
if(prob(25))
M.Stun(rand(5,10))
to_chat(M, span_danger("You feel a tremendous, paralyzing wave flood your mind."))
else
to_chat(M, span_danger("You feel a sudden, electric jolt travel through your head."))
add_attack_logs(user,affected,"Used a [name]")
playsound(src, 'sound/misc/interference.ogg', 50, 1)
to_chat(user, span_notice("You trigger [src]."))
times_used += 1
if(times_used >= max_uses)
icon_state = "battererburnt"