From b478701d78735d09510c36606bc1b3157dd6f83f Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 22 Aug 2019 11:20:54 +0200 Subject: [PATCH] ZERG restructure --- .../mob/living/simple_animal/aliens/zerg.dm | 60 +++++++++++-------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index 2c5c3c5f64..8a32891585 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -23,10 +23,38 @@ var/zerg_types = list("Zerg Drone" = /mob/living/simple_animal/hostile/hivebot/zerg/worker,) + isSynthetic() + return FALSE -/mob/living/simple_animal/hostile/hivebot/zerg/isSynthetic() - return FALSE +///////////////////////////////////////////////////////////////// +///////////////////// LARVA "CORE" ////////////////////////////// +///////////////////////////////////////////////////////////////// +/mob/living/simple_animal/hostile/hivebot/zerg/larva + name = "zerg larva" + desc = "Larva are a fundamental zerg type, able to turn into other types" + melee_damage_lower = 0 + melee_damage_upper = 0 + maxHealth = 0.2 LASERS_TO_KILL + health = 0.2 LASERS_TO_KILL + var/chosentype = null + + Life() + ..() + + New() + ..() + verbs |= /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve + + initialize() + ..() + spawn(1200) + if(!src.client) + evolve() + +///////////////////////////////////////////////////////////////// +///////////////////// EVOLUTION ///////////////////////////////// +///////////////////////////////////////////////////////////////// /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve() //TODDO MAke this work nicely set name = "EVOLVE" @@ -35,8 +63,7 @@ var/location = get_turf(src) chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types if(!chosentype && src.ckey) return - if(!src.ckey) - death() + if(!src.client) qdel(src) new /mob/living/simple_animal/hostile/hivebot/zerg/worker(location) else @@ -47,28 +74,9 @@ qdel(src) newmob.ckey = myuser new newmob(location) - -/mob/living/simple_animal/hostile/hivebot/zerg/larva - name = "zerg larva" - desc = "Larva are a fundamental zerg type, able to turn into other types" - melee_damage_lower = 0 - melee_damage_upper = 0 - maxHealth = 0.2 LASERS_TO_KILL - health = 0.2 LASERS_TO_KILL - var/chosentype = null -/mob/living/simple_animal/hostile/hivebot/zerg/larva/Life() - ..() - -/mob/living/simple_animal/hostile/hivebot/zerg/larva/New() - ..() - verbs |= /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve - -/mob/living/simple_animal/hostile/hivebot/zerg/larva/initialize() - ..() - spawn(1200) - if(!src.ckey) - evolve() - +///////////////////////////////////////////////////////////////// +///////////////////// ZERG TYPES //////////////////////////////// +///////////////////////////////////////////////////////////////// /mob/living/simple_animal/hostile/hivebot/zerg/worker name = "Zerg Drone" desc = "Drones are fundamental to economic and tech development, as they harvest resources and construct buildings."