From 47b19fc6534f5c9a10031ff07baa06c8ac66d9db Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Mon, 30 Dec 2013 18:18:02 -0500 Subject: [PATCH] Player-controlled giant spiders --- code/game/objects/structures/tables_racks.dm | 2 +- .../simple_animal/hostile/giant_spider.dm | 79 ++++++++++++++++++- code/modules/mob/transform_procs.dm | 3 +- 3 files changed, 81 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index fe5cc7a9bac..c0ad280ea57 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -272,7 +272,7 @@ destroy() /obj/structure/table/attack_animal(mob/living/simple_animal/user) - if(user.wall_smash) + if(user.wall_smash || istype(user,/mob/living/simple_animal/hostile/carp)) visible_message("[user] smashes [src] apart!") destroy() diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 3da3cecb760..94418b69289 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -195,7 +195,84 @@ busy = 0 stop_automated_movement = 0 + + +/mob/living/simple_animal/hostile/giant_spider/verb/web() + set category = "Alien" + set name = "Spin Web" + set desc = "Create a web that slows down movement." + + var/obj/effect/spider/stickyweb/W = locate() in get_turf(src) + if(!W) + busy = SPINNING_WEB + src.visible_message("\blue \the [src] begins to secrete a sticky substance.") + spawn(40) + if(busy == SPINNING_WEB) + new /obj/effect/spider/stickyweb(src.loc) + + +/mob/living/simple_animal/hostile/giant_spider/nurse/verb/cocoon() + set category = "Alien" + set name = "Cocoon and Feed" + set desc = "Cocooned an incapacitated mob so you can feed upon it." + + for(var/mob/living/P in range(1,src)) + cocoon_target = P + if(P.stat && !istype(P,/mob/living/simple_animal/hostile/giant_spider)) + if(get_dist(src, cocoon_target) <= 1) + busy = SPINNING_COCOON + src.visible_message("\blue \the [src] begins to secrete a sticky substance around \the [cocoon_target].") + 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("\red \the [src] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.") + 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 + + +/mob/living/simple_animal/hostile/giant_spider/nurse/verb/eggs() + set category = "Alien" + set name = "Lay Eggs" + set desc = "Lay a clutch of eggs to make new spiderlings. Requires you to have fed." + + var/obj/effect/spider/eggcluster/E = locate() in get_turf(src) + if(!E && fed > 0) + busy = LAYING_EGGS + src.visible_message("\blue \the [src] begins to lay a cluster of eggs.") + spawn(50) + if(busy == LAYING_EGGS) + E = locate() in get_turf(src) + if(!E) + new /obj/effect/spider/eggcluster(src.loc) + fed-- + busy = 0 + #undef SPINNING_WEB #undef LAYING_EGGS #undef MOVING_TO_TARGET -#undef SPINNING_COCOON \ No newline at end of file +#undef SPINNING_COCOON diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 63a500829a8..539678ac5d7 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -406,7 +406,8 @@ return 1 if(ispath(MP, /mob/living/simple_animal/hostile/bear)) return 1 - + if(ispath(MP, /mob/living/simple_animal/hostile/giant_spider)) + return 1 //Not in here? Must be untested! return 0