diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index 586e69dc98f..d84d3c8219f 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -91,7 +91,9 @@ This file's folder contains: M.visible_message("[M]'s eyes glow a blazing yellow!", \ "Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork Justiciar above all else. Perform his every \ whim without hesitation.") + var/list/scripture_states = get_scripture_states() ticker.mode.servants_of_ratvar += M.mind + scripture_unlock_alert(scripture_states) ticker.mode.update_servant_icons_added(M.mind) M.mind.special_role = "Servant of Ratvar" M.languages_spoken |= RATVAR @@ -120,7 +122,9 @@ This file's folder contains: if(!silent) M.visible_message("[M] seems to have remembered their true allegiance!", \ "A cold, cold darkness flows through your mind, extinguishing the Justiciar's light and all of your memories as his servant.") + var/list/scripture_states = get_scripture_states() ticker.mode.servants_of_ratvar -= M.mind + scripture_unlock_alert(scripture_states) ticker.mode.update_servant_icons_removed(M.mind) all_clockwork_mobs -= M M.mind.memory = "" //Not sure if there's a better way to do this diff --git a/code/game/gamemodes/clock_cult/clock_items.dm b/code/game/gamemodes/clock_cult/clock_items.dm index 2a6dd89bba3..ad7d77b5910 100644 --- a/code/game/gamemodes/clock_cult/clock_items.dm +++ b/code/game/gamemodes/clock_cult/clock_items.dm @@ -370,8 +370,8 @@ var/message = stripped_input(user, "Enter a message to send to your fellow servants.", "Hierophant") if(!message || !user || !user.canUseTopic(src)) return 0 - user.whisper("Freinagf, urne zl jbeqf. [message]") - send_hierophant_message(user, message) + user.whisper("Freinagf, urne zl-jbeqf. [message]") + titled_hierophant_message(user, message) return 1 /obj/item/clothing/glasses/wraith_spectacles //Wraith spectacles: Grants night and x-ray vision at the slow cost of the wearer's sight. Nar-Sian cultists are instantly blinded. diff --git a/code/game/gamemodes/clock_cult/clock_machines.dm b/code/game/gamemodes/clock_cult/clock_machines.dm index 8db2ed225b2..7dd3801683f 100644 --- a/code/game/gamemodes/clock_cult/clock_machines.dm +++ b/code/game/gamemodes/clock_cult/clock_machines.dm @@ -579,7 +579,7 @@ user << "The obelisk lacks the power to broadcast!" return clockwork_say(user, "Uvrebcunag Oebnqpnfg, npgvingr!") - send_hierophant_message(user, input, "big_brass", "large_brass") + titled_hierophant_message(user, input, "big_brass", "large_brass") if("Spatial Gateway") if(gateway_active) user << "The obelisk is already sustaining a gateway!" diff --git a/code/game/gamemodes/clock_cult/clock_structures.dm b/code/game/gamemodes/clock_cult/clock_structures.dm index 470d1f3a90e..e32a63abd79 100644 --- a/code/game/gamemodes/clock_cult/clock_structures.dm +++ b/code/game/gamemodes/clock_cult/clock_structures.dm @@ -24,11 +24,11 @@ /obj/structure/clockwork/New() ..() - clockwork_construction_value += construction_value + change_construction_value(construction_value) all_clockwork_objects += src /obj/structure/clockwork/Destroy() - clockwork_construction_value -= construction_value + change_construction_value(-construction_value) all_clockwork_objects -= src return ..() @@ -155,11 +155,15 @@ /obj/structure/clockwork/cache/New() ..() START_PROCESSING(SSobj, src) + var/list/scripture_states = get_scripture_states() clockwork_caches++ + scripture_unlock_alert(scripture_states) SetLuminosity(2,1) /obj/structure/clockwork/cache/Destroy() + var/list/scripture_states = get_scripture_states() clockwork_caches-- + scripture_unlock_alert(scripture_states) STOP_PROCESSING(SSobj, src) return ..() diff --git a/code/game/gamemodes/clock_cult/clock_unsorted.dm b/code/game/gamemodes/clock_cult/clock_unsorted.dm index 9f8e0707f08..2eb25ec3765 100644 --- a/code/game/gamemodes/clock_cult/clock_unsorted.dm +++ b/code/game/gamemodes/clock_cult/clock_unsorted.dm @@ -1,16 +1,25 @@ //sends messages via hierophant -/proc/send_hierophant_message(mob/user, message, name_span = "heavy_brass", message_span = "brass", user_title = "Servant") +/proc/titled_hierophant_message(mob/user, message, name_span = "heavy_brass", message_span = "brass", user_title = "Servant") if(!user || !message || !ticker || !ticker.mode) return 0 - var/parsed_message = "[user_title ? "[user_title] ":""][findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]: \"[message]\"" - for(var/M in mob_list) - if(isobserver(M)) - var/link = FOLLOW_LINK(M, user) - M << "[link] [parsed_message]" - else if(is_servant_of_ratvar(M)) - M << parsed_message + var/parsed_message = "[user_title ? "[user_title] ":""][findtextEx(user.name, user.real_name) ? user.name : "[user.real_name] (as [user.name])"]: \ + \"[message]\"" + hierophant_message(parsed_message, FALSE, user) return 1 +/proc/hierophant_message(message, servantsonly, atom/target) //sends a generic message to all servants and optionally observers + if(!message || !ticker || !ticker.mode) + return 0 + for(var/M in mob_list) + if(!servantsonly && isobserver(M)) + if(target) + var/link = FOLLOW_LINK(M, target) + M << "[link] [message]" + else + M << message + else if(is_servant_of_ratvar(M)) + M << message + //Function Call action: Calls forth a Ratvarian spear. /datum/action/innate/function_call name = "Function Call" @@ -111,6 +120,23 @@ return 1 //12 or more non-brain servants, 5+ clockwork caches, at least 250 CV, and there are no living, non-servant ais return 0 +/proc/scripture_unlock_alert(list/previous_states) //reports to servants when scripture is locked or unlocked + var/list/states = get_scripture_states() + for(var/i in states) + if(states[i] != previous_states[i]) + hierophant_message("Hierophant Network: [i] Scripture has been [states[i] ? "un":""]locked.") + +/proc/get_scripture_states() //returns the current unlock states of each unlockable scripture tier + . = list("Script" = scripture_unlock_check(SCRIPTURE_SCRIPT), \ + "Application" = scripture_unlock_check(SCRIPTURE_APPLICATION), \ + "Revenant" = scripture_unlock_check(SCRIPTURE_REVENANT), \ + "Judgement" = scripture_unlock_check(SCRIPTURE_JUDGEMENT)) + +/proc/change_construction_value(amount) + var/list/scripture_states = get_scripture_states() + clockwork_construction_value += amount + scripture_unlock_alert(scripture_states) + /proc/generate_cache_component(specific_component_id) //generates a component in the global component cache, either random based on lowest or a specific component if(specific_component_id) clockwork_component_cache[specific_component_id]++ diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 98d64b763cb..79d45dd78f2 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -123,11 +123,17 @@ ..() PoolOrNew(/obj/effect/overlay/temp/ratvar/floor, src) PoolOrNew(/obj/effect/overlay/temp/ratvar/beam, src) - clockwork_construction_value++ + change_construction_value(1) /turf/open/floor/clockwork/Destroy() STOP_PROCESSING(SSobj, src) - clockwork_construction_value-- + change_construction_value(-1) + return ..() + +/turf/open/floor/clockwork/ChangeTurf(path, defer_change = FALSE) + if(path != type) + STOP_PROCESSING(SSobj, src) + change_construction_value(-1) return ..() /turf/open/floor/clockwork/Entered(atom/movable/AM) @@ -160,9 +166,11 @@ /turf/open/floor/clockwork/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/crowbar)) user.visible_message("[user] begins slowly prying up [src]...", "You begin painstakingly prying up [src]...") + playsound(src, 'sound/items/Crowbar.ogg', 20, 1) if(!do_after(user, 70 / I.toolspeed, target = src)) return 0 user.visible_message("[user] pries up [src]!", "You pry up [src], destroying it!") + playsound(src, 'sound/items/Crowbar.ogg', 80, 1) make_plating() return 1 return ..() diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index 60c457c86f8..ded0bf46834 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -53,17 +53,23 @@ ..() PoolOrNew(/obj/effect/overlay/temp/ratvar/wall, src) PoolOrNew(/obj/effect/overlay/temp/ratvar/beam, src) - clockwork_construction_value += 5 + change_construction_value(5) /turf/closed/wall/clockwork/Destroy() - clockwork_construction_value -= 5 - ..() + change_construction_value(-5) + return ..() + +/turf/closed/wall/clockwork/ChangeTurf(path, defer_change = FALSE) + if(path != type) + change_construction_value(-5) + return ..() /turf/closed/wall/clockwork/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = I - if(!WT.isOn()) + if(!WT.remove_fuel(0,user)) return 0 + playsound(src, 'sound/items/Welder.ogg', 100, 1) user.visible_message("[user] begins slowly breaking down [src]...", "You begin painstakingly destroying [src]...") if(!do_after(user, 120 / WT.toolspeed, target = src)) return 0 diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index fc1bf88240b..70530432c29 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -54,7 +54,9 @@ message_type=DEADCHAT_DEATHRATTLE) if(mind) mind.store_memory("Time of death: [tod]", 0) + var/list/scripture_states = get_scripture_states() living_mob_list -= src + scripture_unlock_alert(scripture_states) if(!gibbed) dead_mob_list += src else if(buckled) 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 8a5478dedcb..dee327d9de4 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 @@ -138,4 +138,4 @@ return //we don't get hacked or give a shit about it /mob/living/simple_animal/drone/cogscarab/drone_chat(msg) - send_hierophant_message(src, msg, "heavy_alloy") //HIEROPHANT DRONES + titled_hierophant_message(src, msg, "heavy_alloy") //HIEROPHANT DRONES