From 09c3d9eca42d6b6665ecb1e7a7e5a30ff1a69548 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 13:32:59 +0100 Subject: [PATCH 1/7] Initial zerg file --- .../mob/living/simple_animal/aliens/zerg.dm | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 code/modules/mob/living/simple_animal/aliens/zerg.dm diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm new file mode 100644 index 0000000000..42cdbbcd49 --- /dev/null +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -0,0 +1,55 @@ +//Hivebot based zergs woo +#define LASERS_TO_KILL *30 //Explanation in hivebot.dm +/mob/living/simple_animal/hostile/hivebot/zerg //Base Zerg template + name = "zerg template" + desc = "The Zerg Swarm is a terrifying and ruthless amalgamation of biologically advanced, arthropodal aliens. Dedicated to the pursuit of genetic perfection." + faction = "zerg" + speed = 2 + melee_damage_lower = 2 + melee_damage_upper = 2 + + //zergoverride = 1 + + projectilesound = 'sound/effects/splat.ogg' + projectiletype = /obj/item/projectile/energy/acid + + speak = list("For the Hive!",) + emote_hear = list() + emote_see = list("looks around the area", "turns from side to side") + say_understood = list("Affirmative.", "Positive.") + say_cannot = list("Denied.", "Negative.") + say_maybe_target = list("Possible threat detected. Investigating.", "Motion detected.", "Investigating.") + say_got_target = list("Threat detected.", "Threat removal engaged.", "Engaging target.") + + var/zerg_types = list("Zerg Drone" = /mob/living/simple_animal/hostile/hivebot/zerg/worker,) + + +/mob/living/simple_animal/hostile/hivebot/zerg/isSynthetic() + return FALSE + +/mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve() + //TODDO + + var/location = get_turf(src) + var/chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types + if(!choosetype) return + var/myuser = src.key + death() + newmob = new chosentype(location) + newmob.ckey = myuser + +/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 + +/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." + maxHealth = 1 LASERS_TO_KILL + health = 1 LASERS_TO_KILL + melee_damage_lower = 1 + melee_damage_upper = 1 From 7bfb1e8a210530cf22eef65449d03c0541ec9b71 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 13:39:57 +0100 Subject: [PATCH 2/7] include DME --- vorestation.dme | 1 + 1 file changed, 1 insertion(+) diff --git a/vorestation.dme b/vorestation.dme index 437620ba10..27160c0c14 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2179,6 +2179,7 @@ #include "code\modules\mob\living\simple_animal\aliens\drone.dm" #include "code\modules\mob\living\simple_animal\aliens\faithless.dm" #include "code\modules\mob\living\simple_animal\aliens\hivebot.dm" +#include "code\modules\mob\living\simple_animal\aliens\zerg.dm" #include "code\modules\mob\living\simple_animal\aliens\mimic.dm" #include "code\modules\mob\living\simple_animal\aliens\shade.dm" #include "code\modules\mob\living\simple_animal\aliens\statue.dm" From 46a00b6e600d3d016563133ca4b4068423f12c4c Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 13:51:44 +0100 Subject: [PATCH 3/7] Update zerg.dm --- code/modules/mob/living/simple_animal/aliens/zerg.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index 42cdbbcd49..261a8ce3f4 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -20,7 +20,7 @@ say_cannot = list("Denied.", "Negative.") say_maybe_target = list("Possible threat detected. Investigating.", "Motion detected.", "Investigating.") say_got_target = list("Threat detected.", "Threat removal engaged.", "Engaging target.") - + var/zerg_types = list("Zerg Drone" = /mob/living/simple_animal/hostile/hivebot/zerg/worker,) @@ -31,11 +31,11 @@ //TODDO var/location = get_turf(src) - var/chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types + chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types if(!choosetype) return var/myuser = src.key death() - newmob = new chosentype(location) + var/newmob = new chosentype(location) newmob.ckey = myuser /mob/living/simple_animal/hostile/hivebot/zerg/larva @@ -45,6 +45,7 @@ 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/worker name = "Zerg Drone" From 914c7b3b5f1c75ab2aea1ecb3049c979607fddce Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 14:01:40 +0100 Subject: [PATCH 4/7] Update zerg.dm --- code/modules/mob/living/simple_animal/aliens/zerg.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index 261a8ce3f4..8a35c6da42 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -32,7 +32,7 @@ var/location = get_turf(src) chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types - if(!choosetype) return + if(!chosentype) return var/myuser = src.key death() var/newmob = new chosentype(location) From 548ed0e7cd3ae0074d2bf05fb77ef1e23a434cee Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 14:13:31 +0100 Subject: [PATCH 5/7] Update zerg.dm --- code/modules/mob/living/simple_animal/aliens/zerg.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index 8a35c6da42..a2fd004e3b 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -35,7 +35,7 @@ if(!chosentype) return var/myuser = src.key death() - var/newmob = new chosentype(location) + var//mob/living/simple_animal/hostile/newmob = new chosentype(location) newmob.ckey = myuser /mob/living/simple_animal/hostile/hivebot/zerg/larva 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 6/7] 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" From 58c956b85943814585c9a793b397f76b66ff455c Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 19 Mar 2019 14:28:45 +0100 Subject: [PATCH 7/7] Evolve button --- code/modules/mob/living/simple_animal/aliens/zerg.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/aliens/zerg.dm b/code/modules/mob/living/simple_animal/aliens/zerg.dm index d3a2c86852..109d84331a 100644 --- a/code/modules/mob/living/simple_animal/aliens/zerg.dm +++ b/code/modules/mob/living/simple_animal/aliens/zerg.dm @@ -29,7 +29,9 @@ /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve() //TODDO MAke this work nicely - + set name = "EVOLVE" + set desc = "Performs larva evolution." + set category = "Abilities" var/location = get_turf(src) chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types if(!chosentype) return @@ -57,6 +59,9 @@ spawn(1200) if(!src.ckey) evolve() +/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/worker name = "Zerg Drone"