Files
VOREStation/code/game/objects/items/weapons/grenades/spawnergrenade.dm
Arokha Sieyes 484fb96202 Merge branch 'master' of https://github.com/PolarisSS13/Polaris
# Conflicts:
#	.travis.yml
#	code/game/machinery/adv_med.dm
#	code/modules/mob/mob.dm
2016-07-03 16:21:21 -04:00

43 lines
1.6 KiB
Plaintext

/obj/item/weapon/grenade/spawnergrenade
desc = "It is set to detonate in 5 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
name = "delivery grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "delivery"
item_state = "flashbang"
origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4)
var/banglet = 0
var/spawner_type = null // must be an object path
var/deliveryamt = 1 // amount of type to deliver
// Prime now just handles the two loops that query for people in lockers and people who can see it.
/obj/item/weapon/grenade/spawnergrenade/prime()
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
M.flash_eyes()
// Spawn some hostile syndicate critters
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type(T)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(x, pick(NORTH,SOUTH,EAST,WEST))
qdel(src)
return
/obj/item/weapon/grenade/spawnergrenade/manhacks
name = "manhack delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/viscerator
deliveryamt = 5
origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4)
/obj/item/weapon/grenade/spawnergrenade/spesscarp
name = "carp delivery grenade"
spawner_type = /mob/living/simple_animal/hostile/vore/carp // Vorestation edit
deliveryamt = 5
origin_tech = list(TECH_MATERIAL = 3, TECH_MAGNET = 4, TECH_ILLEGAL = 4)