From bc72d38c0ef71f9c9522a6b4cd743a77b0abe1f2 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 14:25:46 +0100 Subject: [PATCH] ZERG larva auto evolve into workers now After 2 minutes a larva automatically evolves to make sure larvas dont just stay larvas without any players on --- .../mob/living/simple_animal/aliens/zerg.dm | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index a2fd004e3b..d3a2c86852 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -28,15 +28,21 @@ return FALSE /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve() - //TODDO + //TODDO MAke this work nicely var/location = get_turf(src) chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types if(!chosentype) return - var/myuser = src.key - death() - var//mob/living/simple_animal/hostile/newmob = new chosentype(location) - newmob.ckey = myuser + if(!src.ckey) + death() + qdel(src) + new /mob/living/simple_animal/hostile/hivebot/zerg/worker(location) + else + var/myuser = src.key + death() + qdel(src) + var/mob/living/simple_animal/hostile/newmob = new chosentype(location) + newmob.ckey = myuser /mob/living/simple_animal/hostile/hivebot/zerg/larva name = "zerg larva" @@ -46,6 +52,11 @@ maxHealth = 0.2 LASERS_TO_KILL health = 0.2 LASERS_TO_KILL var/chosentype = null +/mob/living/simple_animal/hostile/hivebot/zerg/larva/Life() + ..() + spawn(1200) + if(!src.ckey) + evolve() /mob/living/simple_animal/hostile/hivebot/zerg/worker name = "Zerg Drone"