diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 2f877776d5..e312f51319 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -146,6 +146,8 @@ Credit where due: var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar //that's a mouthful G.initial_activation_delay = ark_time * 60 G.seconds_until_activation = ark_time * 60 //60 seconds in a minute * number of minutes + for(var/obj/item/clockwork/construct_chassis/cogscarab/C in GLOB.all_clockwork_objects) + C.infinite_resources = FALSE SSshuttle.registerHostileEnvironment(GLOB.ark_of_the_clockwork_justiciar) ..() return 1 diff --git a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm index 11349cb013..0b7738961a 100644 --- a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm +++ b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm @@ -34,17 +34,28 @@ . = ..() /obj/item/clockwork/construct_chassis/attack_ghost(mob/user) + if(!SSticker.mode) + to_chat(user, "You cannot use that before the game has started.") + return if(alert(user, "Become a [construct_name]? You can no longer be cloned!", construct_name, "Yes", "Cancel") == "Cancel") return if(QDELETED(src)) to_chat(user, "You were too late! Better luck next time.") return + pre_spawn() visible_message(creation_message) var/mob/living/construct = new construct_type(get_turf(src)) construct.key = user.key + post_spawn(construct) qdel(user) qdel(src) +/obj/item/clockwork/construct_chassis/proc/pre_spawn() //Some things might change before the construct spawns; override those on a subtype basis in this proc + return + +/obj/item/clockwork/construct_chassis/proc/post_spawn(mob/living/construct) //And some things might change after it + return + //Marauder armor, used to create clockwork marauders - sturdy frontline combatants that can deflect projectiles. /obj/item/clockwork/construct_chassis/clockwork_marauder @@ -67,3 +78,21 @@ creation_message = "The cogscarab clicks and whirrs as it hops up and springs to life!" construct_type = /mob/living/simple_animal/drone/cogscarab w_class = WEIGHT_CLASS_SMALL + var/infinite_resources = TRUE + +/obj/item/clockwork/construct_chassis/cogscarab/Initialize() + . = ..() + if(istype(SSticker.mode, /datum/game_mode/clockwork_cult)) + infinite_resources = FALSE //For any that are somehow spawned in late + +/obj/item/clockwork/construct_chassis/cogscarab/pre_spawn() + if(infinite_resources) + construct_type = /mob/living/simple_animal/drone/cogscarab/ratvar //During rounds where they can't interact with the station, let them experiment with builds + +/obj/item/clockwork/construct_chassis/cogscarab/post_spawn(mob/living/construct) + if(infinite_resources) //Allow them to build stuff and recite scripture + var/list/cached_stuff = construct.GetAllContents() + for(var/obj/item/clockwork/replica_fabricator/F in cached_stuff) + F.uses_power = FALSE + for(var/obj/item/clockwork/slab/S in cached_stuff) + S.no_cost = TRUE