From 7b195c39730670684c3826ae20c32d230d163085 Mon Sep 17 00:00:00 2001 From: keronshb Date: Tue, 16 Nov 2021 22:41:08 -0500 Subject: [PATCH] Cogscarabs The return --- .../scripture_applications.dm | 28 +++++++++++++++++++ .../friendly/drone/extra_drone_types.dm | 3 ++ 2 files changed, 31 insertions(+) diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm index 85450dc152..e251fb41e9 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm @@ -231,3 +231,31 @@ to_chat(invoker, "\"Only one of my weapons may exist in this temporal stream!\"") return FALSE return ..() + +/datum/clockwork_scripture/create_object/construct/cogscarab + descname = "Building Construct" + name = "Cogscarab" + desc = "Creates a shell for a cogscarab, a drone that helps build your base!" + invocations = list("Arise, drone!", "Create defenses for the true light!") + channel_time = 80 + power_cost = 8000 + creator_message = "Your slab disgorges several chunks of replicant alloy that form into a spiderlike shell." + usage_tip = "These machines will help you get a base built up while you go out to look for more followers." + tier = SCRIPTURE_APPLICATION + one_per_tile = TRUE + primary_component = BELLIGERENT_EYE + sort_priority = 9 + quickbind = TRUE + quickbind_desc = "Creates a cogscarab, good for the backline." + object_path = /obj/item/clockwork/construct_chassis/cogscarab/ + construct_type = /mob/living/simple_animal/drone/cogscarab + combat_construct = FALSE + +/datum/clockwork_scripture/create_object/construct/cogscarab/update_construct_limit() + var/human_servants = 0 + for(var/V in SSticker.mode.servants_of_ratvar) + var/datum/mind/M = V + var/mob/living/L = M.current + if(ishuman(L) && L.stat != DEAD) + human_servants++ + construct_limit = round(clamp((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3 diff --git a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm index 12b6447a02..f3842b507a 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/extra_drone_types.dm @@ -188,6 +188,9 @@ /mob/living/simple_animal/drone/cogscarab/update_drone_hack() return //we don't get hacked or give a shit about it +/mob/living/simple_animal/drone/cogscarab/death(gibbed) + . = ..() + /mob/living/simple_animal/drone/cogscarab/drone_chat(msg) titled_hierophant_message(src, msg, "nezbere", "brass", "Construct") //HIEROPHANT DRONES