mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
// Alien pinning weapon.
|
|
/obj/item/weapon/gun/launcher/spikethrower
|
|
|
|
name = "spike thrower"
|
|
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
|
|
|
|
var/last_regen = 0
|
|
var/spike_gen_time = 100
|
|
var/max_spikes = 3
|
|
var/spikes = 3
|
|
release_force = 30
|
|
icon = 'icons/obj/gun.dmi'
|
|
icon_state = "spikethrower3"
|
|
item_state = "spikethrower"
|
|
fire_sound_text = "a strange noise"
|
|
fire_sound = 'sound/weapons/bladeslice.ogg'
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/New()
|
|
..()
|
|
processing_objects.Add(src)
|
|
last_regen = world.time
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/Destroy()
|
|
processing_objects.Remove(src)
|
|
..()
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/process()
|
|
if(spikes < max_spikes && world.time > last_regen + spike_gen_time)
|
|
spikes++
|
|
last_regen = world.time
|
|
update_icon()
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/examine(mob/user)
|
|
..(user)
|
|
user << "It has [spikes] spike\s remaining."
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
|
|
icon_state = "spikethrower[spikes]"
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/update_release_force()
|
|
return
|
|
|
|
/obj/item/weapon/gun/launcher/spikethrower/consume_next_projectile()
|
|
if(spikes < 1) return null
|
|
spikes--
|
|
return new /obj/item/weapon/spike(src)
|