mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-20 02:27:58 +01:00
A lot of new defines are now in inventory_sizes.dm, which contains; All the size identifiers (the thing that tells the game if something is bulky, or w/e). Storage costs for all the sizes, which are exponents of two, as previously. A few constants for inventory size. Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it. This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files. In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke. The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
57 lines
1.4 KiB
Plaintext
57 lines
1.4 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/device/batterer
|
|
name = "mind batterer"
|
|
desc = "A strange device with twin antennas."
|
|
icon_state = "batterer"
|
|
throwforce = 5
|
|
w_class = ITEMSIZE_TINY
|
|
throw_speed = 4
|
|
throw_range = 10
|
|
flags = CONDUCT
|
|
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
|
|
|
|
/obj/item/device/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
|
if(!user) return
|
|
if(times_used >= max_uses)
|
|
user << "<span class='warning'>The mind batterer has been burnt out!</span>"
|
|
return
|
|
|
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [src] to knock down people in the area.</font>")
|
|
|
|
for(var/mob/living/carbon/human/M in orange(10, user))
|
|
spawn()
|
|
if(prob(50))
|
|
|
|
M.Weaken(rand(10,20))
|
|
if(prob(25))
|
|
M.Stun(rand(5,10))
|
|
M << "<span class='danger'>You feel a tremendous, paralyzing wave flood your mind.</span>"
|
|
|
|
else
|
|
M << "<span class='danger'>You feel a sudden, electric jolt travel through your head.</span>"
|
|
|
|
playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
|
|
user << "<span class='notice'>You trigger [src].</span>"
|
|
times_used += 1
|
|
if(times_used >= max_uses)
|
|
icon_state = "battererburnt"
|