Spider updates (#2562)

CHANGES:

Spiders will no longer create massive stacks of cocoons under dead comrades. Fixes #2448
Limbs infested with spider eggs will now take longer to burst. When they do burst, the limb is gibbed.
Infested limbs will give out more warning now past a certain stage.
Modified the spider event. The moderate severity one will now no longer spawn nurses, so they can't multiply.
Added a major severity spider event. It spawns more spiders than the moderate severity one along with nurses.
This commit is contained in:
skull132
2017-06-04 19:55:18 +03:00
committed by GitHub
parent 5ce2fc79ef
commit 08fc62966d
6 changed files with 185 additions and 102 deletions
+3 -2
View File
@@ -163,7 +163,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 100),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 0, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 1),0,10,125, list("Extended")),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Moderate Spider Infestation",/datum/event/spider_infestation/moderate,50, list(ASSIGNMENT_SECURITY = 25)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 12), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Major Vermin Infestation", /datum/event/infestation, 60, list(ASSIGNMENT_JANITOR = 15, ASSIGNMENT_SECURITY = 15))
)
@@ -177,7 +177,8 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 40, list(ASSIGNMENT_ENGINEER = 10),1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 75, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_GARDENER = 20), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 20, list(ASSIGNMENT_MEDICAL = 15), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Bluespace Bears", /datum/event/bear_attack, 25, list(ASSIGNMENT_SECURITY = 10), 1)
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Bluespace Bears", /datum/event/bear_attack, 25, list(ASSIGNMENT_SECURITY = 10), 1),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Spider Infestation",/datum/event/spider_infestation, 25, list(ASSIGNMENT_SECURITY = 10, ASSIGNMENT_MEDICAL = 5), 1)
)
#undef ASSIGNMENT_ANY
+9 -3
View File
@@ -4,16 +4,17 @@
announceWhen = 90
var/spawncount = 1
ic_name = "unidentified lifesigns"
var/list/possible_spiders
/datum/event/spider_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 60)
spawncount = rand(4 * severity, 6 * severity) //spiderlings only have a 50% chance to grow big and strong
sent_spiders_to_station = 0
possible_spiders = typesof(/mob/living/simple_animal/hostile/giant_spider)
/datum/event/spider_infestation/announce()
command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
/datum/event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
@@ -21,8 +22,13 @@
if(temp_vent.network.normal_members.len > 50)
vents += temp_vent
while((spawncount >= 1) && vents.len)
while(spawncount && vents.len)
var/obj/vent = pick(vents)
new /obj/effect/spider/spiderling(vent.loc)
new /obj/effect/spider/spiderling(vent.loc, spawns = possible_spiders)
vents -= vent
spawncount--
// Moderate event cannot spawn nurses, ergo, they only terrorize but do not replicate.
/datum/event/spider_infestation/moderate/setup()
..()
possible_spiders -= /mob/living/simple_animal/hostile/giant_spider/nurse
@@ -84,7 +84,7 @@
var/mob/living/carbon/human/H = .
if(prob(poison_per_bite))
var/obj/item/organ/external/O = pick(H.organs)
if(!(O.status & ORGAN_ROBOT))
if(!(O.status & (ORGAN_ROBOT|ORGAN_ADV_ROBOT)) && !O.cannot_amputate)
var/eggs = new /obj/effect/spider/eggcluster(O, src)
O.implants += eggs
H << "<span class='warning'>The [src] injects something into your [O.name]!</span>"
@@ -100,17 +100,11 @@
move_targets.Add(T)*/
stop_automated_movement = 1
walk_to(src, pick(orange(20, src)), 1, move_to_delay)
spawn(50)
stop_automated_movement = 0
walk(src,0)
addtimer(CALLBACK(src, .proc/stop_walking), 50, TIMER_UNIQUE)
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/GiveUp(var/C)
spawn(100)
if(busy == MOVING_TO_TARGET)
if(cocoon_target == C && get_dist(src,cocoon_target) > 1)
cocoon_target = null
busy = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/giant_spider/proc/stop_walking()
stop_automated_movement = 0
walk(src, 0)
/mob/living/simple_animal/hostile/giant_spider/nurse/Life()
..()
@@ -126,7 +120,7 @@
busy = MOVING_TO_TARGET
walk_to(src, C, 1, move_to_delay)
//give up if we can't reach them after 10 seconds
GiveUp(C)
addtimer(CALLBACK(src, .proc/GiveUp, C), 100, TIMER_UNIQUE)
return
//second, spin a sticky spiderweb on this tile
@@ -135,11 +129,7 @@
busy = SPINNING_WEB
src.visible_message("<span class='notice'>\The [src] begins to secrete a sticky substance.</span>")
stop_automated_movement = 1
spawn(40)
if(busy == SPINNING_WEB)
new /obj/effect/spider/stickyweb(src.loc)
busy = 0
stop_automated_movement = 0
addtimer(CALLBACK(src, .proc/finalize_web), 40, TIMER_UNIQUE)
else
//third, lay an egg cluster there
var/obj/effect/spider/eggcluster/E = locate() in get_turf(src)
@@ -147,14 +137,7 @@
busy = LAYING_EGGS
src.visible_message("<span class='notice'>\The [src] begins to lay a cluster of eggs.</span>")
stop_automated_movement = 1
spawn(50)
if(busy == LAYING_EGGS)
E = locate() in get_turf(src)
if(!E)
new /obj/effect/spider/eggcluster(loc, src)
fed--
busy = 0
stop_automated_movement = 0
addtimer(CALLBACK(src, .proc/finalize_eggs), 50, TIMER_UNIQUE)
else
//fourthly, cocoon any nearby items so those pesky pinkskins can't use them
for(var/obj/O in can_see)
@@ -176,42 +159,71 @@
src.visible_message("<span class='notice'>\The [src] begins to secrete a sticky substance around \the [cocoon_target].</span>")
stop_automated_movement = 1
walk(src,0)
spawn(50)
if(busy == SPINNING_COCOON)
if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
var/obj/effect/spider/cocoon/C = new(cocoon_target.loc)
var/large_cocoon = 0
C.pixel_x = cocoon_target.pixel_x
C.pixel_y = cocoon_target.pixel_y
for(var/mob/living/M in C.loc)
if(istype(M, /mob/living/simple_animal/hostile/giant_spider))
continue
large_cocoon = 1
fed++
src.visible_message("<span class='warning'>\The [src] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.</span>")
M.loc = C
C.pixel_x = M.pixel_x
C.pixel_y = M.pixel_y
break
for(var/obj/item/I in C.loc)
I.loc = C
for(var/obj/structure/S in C.loc)
if(!S.anchored)
S.loc = C
large_cocoon = 1
for(var/obj/machinery/M in C.loc)
if(!M.anchored)
M.loc = C
large_cocoon = 1
if(large_cocoon)
C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3")
busy = 0
stop_automated_movement = 0
addtimer(CALLBACK(src, .proc/finalize_cocoon), 50, TIMER_UNIQUE)
else
busy = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/GiveUp(var/C)
if(busy == MOVING_TO_TARGET)
if(cocoon_target == C && get_dist(src,cocoon_target) > 1)
cocoon_target = null
busy = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/finalize_eggs()
if(busy == LAYING_EGGS)
if(!(locate(/obj/effect/spider/eggcluster) in get_turf(src)))
new /obj/effect/spider/eggcluster(loc, src)
fed--
busy = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/finalize_web()
if(busy == SPINNING_WEB)
new /obj/effect/spider/stickyweb(src.loc)
busy = 0
stop_automated_movement = 0
/mob/living/simple_animal/hostile/giant_spider/nurse/proc/finalize_cocoon()
if(busy == SPINNING_COCOON)
if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
var/obj/effect/spider/cocoon/C = new(cocoon_target.loc)
var/large_cocoon = 0
C.pixel_x = cocoon_target.pixel_x
C.pixel_y = cocoon_target.pixel_y
for (var/A in C.loc)
var/atom/movable/aa = A
if (ismob(aa))
var/mob/M = aa
if(istype(M, /mob/living/simple_animal/hostile/giant_spider) && M.stat != DEAD)
continue
large_cocoon = 1
fed++
src.visible_message("<span class='warning'>\The [src] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.</span>")
M.forceMove(C)
C.pixel_x = M.pixel_x
C.pixel_y = M.pixel_y
break
if (istype(aa, /obj/item))
var/obj/item/I = aa
I.forceMove(C)
if (istype(aa, /obj/structure))
var/obj/structure/S = aa
if(!S.anchored)
S.forceMove(C)
large_cocoon = 1
if (istype(aa, /obj/machinery))
var/obj/machinery/M = aa
if(!M.anchored)
M.forceMove(C)
large_cocoon = 1
if(large_cocoon)
C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3")
busy = 0
stop_automated_movement = 0
#undef SPINNING_WEB
#undef LAYING_EGGS
#undef MOVING_TO_TARGET