diff --git a/code/game/gamemodes/clock_cult/__clock_defines.dm b/code/game/gamemodes/clock_cult/__clock_defines.dm index a53795615eb..3516eac2b30 100644 --- a/code/game/gamemodes/clock_cult/__clock_defines.dm +++ b/code/game/gamemodes/clock_cult/__clock_defines.dm @@ -4,6 +4,7 @@ var/global/clockwork_daemons = 0 //How many daemons exist in the world var/global/list/clockwork_generals_invoked = list("nezbere" = FALSE, "sevtug" = FALSE, "nzcrentr" = FALSE, "inath-neq" = FALSE) //How many generals have been recently invoked var/global/list/all_clockwork_objects = list() //All clockwork items, structures, and effects in existence var/global/list/all_clockwork_mobs = list() //All clockwork SERVANTS (not creatures) in existence +var/global/list/clockwork_component_cache = list("belligerent_eye" = 0, "vanguard_cogwheel" = 0, "guvax_capacitor" = 0, "replicant_alloy" = 0, "hierophant_ansible" = 0) //The pool of components that caches draw from #define SCRIPTURE_PERIPHERAL 0 //Should never be used #define SCRIPTURE_DRIVER 1 diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 452b27c2c7a..d8c30ee8d73 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -151,6 +151,7 @@ var/global/ratvar_awakens = FALSE //If Ratvar has been summoned modePlayer += servant servant.special_role = "Servant of Ratvar" servant.restricted_roles = restricted_jobs + update_servant_icons_added(servant) starter_servants-- return 1 diff --git a/code/game/gamemodes/clock_cult/clock_objects.dm b/code/game/gamemodes/clock_cult/clock_objects.dm index c5546d38a90..3e1f91a71db 100644 --- a/code/game/gamemodes/clock_cult/clock_objects.dm +++ b/code/game/gamemodes/clock_cult/clock_objects.dm @@ -36,7 +36,7 @@ var/no_cost = FALSE //If the slab is admin-only and needs no components and has no scripture locks /obj/item/clockwork/slab/starter - stored_components = list("belligerent_eye" = 1, "vanguard_cogwheel" = 1, "guvax_capacitor" = 1, "replicant_alloy" = 1, "hierophant_ansible" = 1) //One of each + stored_components = list("belligerent_eye" = 1, "vanguard_cogwheel" = 1, "guvax_capacitor" = 1, "replicant_alloy" = 1, "hierophant_ansible" = 1) /obj/item/clockwork/slab/debug no_cost = TRUE @@ -694,9 +694,9 @@ if(production_progress >= production_interval) production_progress = 0 //Start it over if(specific_component) - cache.stored_components[specific_component]++ + clockwork_component_cache[specific_component]++ else - cache.stored_components[pick("belligerent_eye", "vanguard_cogwheel", "guvax_capacitor", "replicant_alloy", "hierophant_ansible")]++ + clockwork_component_cache[pick("belligerent_eye", "vanguard_cogwheel", "guvax_capacitor", "replicant_alloy", "hierophant_ansible")]++ cache.visible_message("Something clunks around inside of [cache].") /obj/item/clockwork/tinkerers_daemon/attack_hand(mob/user) @@ -814,11 +814,10 @@ /obj/structure/clockwork/cache //Tinkerer's cache: Stores components for later use. name = "tinkerer's cache" - desc = "A large brass container with no visible methods of access." - clockwork_desc = "A brass container capable of storing a large amount of components." + desc = "A large brass spire with a flaming hole in its center." + clockwork_desc = "A brass container capable of storing a large amount of components. Shares components with all other caches." icon_state = "tinkerers_cache" construction_value = 10 - var/list/stored_components = list("belligerent_eye" = 0, "vanguard_cogwheel" = 0, "guvax_capacitor" = 0, "replicant_alloy" = 0, "hierophant_ansible" = 0) //Components in the cache /obj/structure/clockwork/cache/New() ..() @@ -834,18 +833,18 @@ return 0 if(istype(I, /obj/item/clockwork/component)) var/obj/item/clockwork/component/C = I - stored_components[C.component_id]++ + clockwork_component_cache[C.component_id]++ user << "You add [C] to [src]." user.drop_item() qdel(C) return 1 if(istype(I, /obj/item/clockwork/slab)) var/obj/item/clockwork/slab/S = I - stored_components["belligerent_eye"] += S.stored_components["belligerent_eye"] - stored_components["vanguard_cogwheel"] += S.stored_components["vanguard_cogwheel"] - stored_components["guvax_capacitor"] += S.stored_components["guvax_capacitor"] - stored_components["replicant_alloy"] += S.stored_components["replicant_alloy"] - stored_components["hierophant_ansible"] += S.stored_components["hierophant_ansible"] + clockwork_component_cache["belligerent_eye"] += S.stored_components["belligerent_eye"] + clockwork_component_cache["vanguard_cogwheel"] += S.stored_components["vanguard_cogwheel"] + clockwork_component_cache["guvax_capacitor"] += S.stored_components["guvax_capacitor"] + clockwork_component_cache["replicant_alloy"] += S.stored_components["replicant_alloy"] + clockwork_component_cache["hierophant_ansible"] += S.stored_components["hierophant_ansible"] S.stored_components["belligerent_eye"] = 0 S.stored_components["vanguard_cogwheel"] = 0 S.stored_components["guvax_capacitor"] = 0 @@ -884,15 +883,15 @@ if(!is_servant_of_ratvar(user)) return 0 var/list/possible_components = list() - if(stored_components["belligerent_eye"]) + if(clockwork_component_cache["belligerent_eye"]) possible_components += "Belligerent Eye" - if(stored_components["vanguard_cogwheel"]) + if(clockwork_component_cache["vanguard_cogwheel"]) possible_components += "Vanguard Cogwheel" - if(stored_components["guvax_capacitor"]) + if(clockwork_component_cache["guvax_capacitor"]) possible_components += "Guvax Capacitor" - if(stored_components["replicant_alloy"]) + if(clockwork_component_cache["replicant_alloy"]) possible_components += "Replicant Alloy" - if(stored_components["hierophant_ansible"]) + if(clockwork_component_cache["hierophant_ansible"]) possible_components += "Hierophant Ansible" if(!possible_components.len) user << "[src] is empty!" @@ -904,19 +903,19 @@ switch(component_to_withdraw) if("Belligerent Eye") the_component = new/obj/item/clockwork/component/belligerent_eye(get_turf(src)) - stored_components["belligerent_eye"]-- + clockwork_component_cache["belligerent_eye"]-- if("Vanguard Cogwheel") the_component = new/obj/item/clockwork/component/vanguard_cogwheel(get_turf(src)) - stored_components["vanguard_cogwheel"]-- + clockwork_component_cache["vanguard_cogwheel"]-- if("Guvax Capacitor") the_component = new/obj/item/clockwork/component/guvax_capacitor(get_turf(src)) - stored_components["guvax_capacitor"]-- + clockwork_component_cache["guvax_capacitor"]-- if("Replicant Alloy") the_component = new/obj/item/clockwork/component/replicant_alloy(get_turf(src)) - stored_components["replicant_alloy"]-- + clockwork_component_cache["replicant_alloy"]-- if("Hierophant Ansible") the_component = new/obj/item/clockwork/component/hierophant_ansible(get_turf(src)) - stored_components["hierophant_ansible"]-- + clockwork_component_cache["hierophant_ansible"]-- if(the_component) user.visible_message("[user] withdraws [the_component] from [src].", "You withdraw [the_component] from [src].") user.put_in_hands(the_component) @@ -926,11 +925,11 @@ ..() if(is_servant_of_ratvar(user) || isobserver(user)) user << "Stored components:" - user << "Belligerent Eyes: [stored_components["belligerent_eye"]]" - user << "Vanguard Cogwheels: [stored_components["vanguard_cogwheel"]]" - user << "Guvax Capacitors: [stored_components["guvax_capacitor"]]" - user << "Replicant Alloys: [stored_components["replicant_alloy"]]" - user << "Hierophant Ansibles: [stored_components["hierophant_ansible"]]" + user << "Belligerent Eyes: [clockwork_component_cache["belligerent_eye"]]" + user << "Vanguard Cogwheels: [clockwork_component_cache["vanguard_cogwheel"]]" + user << "Guvax Capacitors: [clockwork_component_cache["guvax_capacitor"]]" + user << "Replicant Alloys: [clockwork_component_cache["replicant_alloy"]]" + user << "Hierophant Ansibles: [clockwork_component_cache["hierophant_ansible"]]" /obj/structure/clockwork/ocular_warden //Ocular warden: Low-damage, low-range turret. Deals constant damage to whoever it makes eye contact with. name = "ocular warden" diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm index 1576379b93d..91c5ea10472 100644 --- a/code/game/gamemodes/clock_cult/clock_ratvar.dm +++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm @@ -19,12 +19,14 @@ /obj/structure/clockwork/massive/celestial_gateway/New() ..() + SSshuttle.emergencyNoEscape = TRUE SSobj.processing += src for(var/mob/M in mob_list) if(is_servant_of_ratvar(M) || isobserver(M)) M << "A gateway to the Celestial Derelict has been created in [get_area(src)]!" /obj/structure/clockwork/massive/celestial_gateway/Destroy() + SSshuttle.emergencyNoEscape = FALSE SSobj.processing -= src if(!purpose_fulfilled) for(var/mob/M in mob_list) diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm index 38fc5ffa2a0..6d4179f9ae3 100644 --- a/code/game/gamemodes/clock_cult/clock_scripture.dm +++ b/code/game/gamemodes/clock_cult/clock_scripture.dm @@ -38,9 +38,15 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed if(scripture_effects() && (!ratvar_awakens && !slab.no_cost)) for(var/i in required_components) if(tier <= SCRIPTURE_DRIVER || consumed_component_override) - slab.stored_components[i] -= consumed_components[i] + if(clockwork_component_cache[i] >= consumed_components[i]) //Draw components from the global cache first + clockwork_component_cache[i] -= consumed_components[i] + else + slab.stored_components[i] -= consumed_components[i] else - slab.stored_components[i] -= required_components[i] + if(clockwork_component_cache[i] >= required_components[i]) + clockwork_component_cache[i] -= required_components[i] + else + slab.stored_components[i] -= required_components[i] if(slab) slab.busy = null qdel(src) @@ -54,7 +60,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed return 0 if(!ratvar_awakens && !slab.no_cost) for(var/i in required_components) - if(slab.stored_components[i] < required_components[i]) + if(slab.stored_components[i] < required_components[i] && clockwork_component_cache[i] < required_components[i]) invoker << "You lack the components to recite this piece of scripture! Check Recollection for component costs." return 0 if(multiple_invokers_used && !multiple_invokers_optional) diff --git a/code/game/gamemodes/clock_cult/clock_unsorted.dm b/code/game/gamemodes/clock_cult/clock_unsorted.dm index 8c877b81b38..04fa650d48a 100644 --- a/code/game/gamemodes/clock_cult/clock_unsorted.dm +++ b/code/game/gamemodes/clock_cult/clock_unsorted.dm @@ -24,7 +24,7 @@ /turf/closed/wall/clockwork/process() for(var/obj/structure/clockwork/cache/C in range(3, src)) if(prob(5)) - C.stored_components[pick("belligerent_eye", "vanguard_cogwheel", "guvax_capacitor", "replicant_alloy", "hierophant_ansible")]++ + clockwork_component_cache[pick("belligerent_eye", "vanguard_cogwheel", "guvax_capacitor", "replicant_alloy", "hierophant_ansible")]++ /turf/closed/wall/clockwork/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/weldingtool)) @@ -79,6 +79,9 @@ usr.verbs -= /mob/living/carbon/human/proc/function_call return 1 +/datum/clockwork_cache //The global cache datum, used to link together all tinkerer's caches + var/list/stored_components = list("belligerent_eye" = 0, "vanguard_cogwheel" = 0, "guvax_capacitor" = 0, "replicant_alloy" = 0, "hierophant_ansible" = 0) + /* The Ratvarian Language diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 220b1b4c9e9..dfc910e5aa1 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -468,6 +468,16 @@ dat += "FLW" dat += "" + if(ticker.mode.servants_of_ratvar.len) + dat += "
" + for(var/datum/mind/N in ticker.mode.servants_of_ratvar) + var/mob/M = N.current + if(M) + dat += "" + dat += "" + dat += "" + dat += "
Servants of Ratvar
[M.real_name][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]PMFLW
" + if(ticker.mode.red_deities.len || ticker.mode.red_deity_prophets.len || ticker.mode.blue_deity_prophets.len || ticker.mode.red_deity_followers.len || ticker.mode.blue_deity_followers.len) dat += "
" for(var/datum/mind/N in ticker.mode.red_deities) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index b46eb020ea0..2ae03291140 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -200,6 +200,7 @@ target << "You're forced out! You return to your own body." target.mind.transfer_to(src) target.mind_control_holder.mind.transfer_to(target) + qdel(mind_control_holder) if(!silent) target << "You take control of your own body again!" return 1
Red Deity