From 40541529fda61208f4882fa894b0c71e48dfd6f2 Mon Sep 17 00:00:00 2001 From: yacabo Date: Thu, 7 Nov 2019 22:53:59 -0500 Subject: [PATCH 1/2] Changes Clock Cult's watts to Joules Changes (probably) all the times Clock Cult uses the term watts to joules --- code/__DEFINES/clockcult.dm | 4 ++-- code/_onclick/hud/alert.dm | 2 +- .../clockcult/clock_effects/clock_sigils.dm | 2 +- .../clockcult/clock_items/clockwork_slab.dm | 12 +++++------ .../clock_items/replica_fabricator.dm | 20 +++++++++---------- .../antagonists/clockcult/clock_scripture.dm | 4 ++-- .../antagonists/clockcult/clock_structure.dm | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/__DEFINES/clockcult.dm b/code/__DEFINES/clockcult.dm index 070b92acc7fb..1793bf22af19 100644 --- a/code/__DEFINES/clockcult.dm +++ b/code/__DEFINES/clockcult.dm @@ -7,7 +7,7 @@ GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult GLOBAL_VAR_INIT(clockwork_vitality, 0) //How much Vitality is stored, total -GLOBAL_VAR_INIT(clockwork_power, 0) //How many watts of power are globally available to the clockwork cult +GLOBAL_VAR_INIT(clockwork_power, 0) //How many joules of power are globally available to the clockwork cult GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence @@ -28,7 +28,7 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us #define SCRIPTURE_APPLICATION "Application" //Various costs related to power. -#define MAX_CLOCKWORK_POWER 50000 //The max power in W that the cult can stockpile +#define MAX_CLOCKWORK_POWER 50000 //The max power in J that the cult can stockpile #define SCRIPT_UNLOCK_THRESHOLD 25000 //Scripts will unlock if the total power reaches this amount #define APPLICATION_UNLOCK_THRESHOLD 40000 //Applications will unlock if the total powre reaches this amount diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 47570b632ff5..e8dfd11cdd5c 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -453,7 +453,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion." time_name = "until the Ark finishes summoning" if(time_info) textlist += "[time_info / 60] minutes [time_name].
" - textlist += "[DisplayPower(get_clockwork_power())] / [DisplayPower(MAX_CLOCKWORK_POWER)] power available for use." + textlist += "[DisplayEnergy(get_clockwork_power())] / [DisplayEnergy(MAX_CLOCKWORK_POWER)] power available for use." desc = textlist.Join() ..() diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index e62c783141a2..0bd3a150f8a1 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -196,7 +196,7 @@ var/structure_number = 0 for(var/obj/structure/destructible/clockwork/powered/P in range(SIGIL_ACCESS_RANGE, src)) structure_number++ - . += {"It is storing [DisplayPower(get_clockwork_power())] of shared power, + . += {"It is storing [DisplayEnergy(get_clockwork_power())] of shared power, and [structure_number] clockwork structure[structure_number == 1 ? " is":"s are"] in range."} if(iscyborg(user)) . += "You can recharge from the [sigil_name] by crossing it." diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm index 451bbd58a697..466961bc1ad2 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm @@ -128,7 +128,7 @@ continue var/datum/clockwork_scripture/quickbind_slot = quickbound[i] . += "Quickbind button: [initial(quickbind_slot.name)]." - . += "Available power: [DisplayPower(get_clockwork_power())]." + . += "Available power: [DisplayEnergy(get_clockwork_power())]." //Slab actions; Hierophant, Quickbind /obj/item/clockwork/slab/ui_action_click(mob/user, action) @@ -337,7 +337,7 @@ anything but a last resort. Instead, it is recommended that a Sigil of Transmission is created. This sigil serves as both battery and power generator for nearby clockwork \ structures, and those structures will happily draw power from the sigil before they resort to APCs.

" dat += "Generating power is less easy. The most reliable and efficient way is using brass sheets; attacking a sigil of transmission with brass sheets will convert them \ - to power, at a rate of [DisplayPower(POWER_FLOOR)] per sheet. (Brass sheets are created from replica fabricators, which are explained more in detail in the Conversion section.) \ + to power, at a rate of [DisplayEnergy(POWER_FLOOR)] per sheet. (Brass sheets are created from replica fabricators, which are explained more in detail in the Conversion section.) \ Activating a sigil of transmission will also cause it to drain power from the nearby area, which, while effective, serves as an obvious tell that there is something wrong.

" dat += "Without power, many structures will not function, making a base vulnerable to attack. For this reason, it is critical that you keep an eye on your power reserves and \ ensure that they remain comfortably high.

" @@ -405,7 +405,7 @@ /obj/item/clockwork/slab/ui_data(mob/user) //we display a lot of data via TGUI var/list/data = list() - data["power"] = "[DisplayPower(get_clockwork_power())] power is available for scripture and other consumers." + data["power"] = "[DisplayEnergy(get_clockwork_power())] power is available for scripture and other consumers." switch(selected_scripture) //display info based on selected scripture tier if(SCRIPTURE_DRIVER) @@ -414,12 +414,12 @@ if(GLOB.scripture_states[SCRIPTURE_SCRIPT]) data["tier_info"] = "These scriptures are permanently unlocked." else - data["tier_info"] = "These scriptures will automatically unlock when the Ark is halfway ready or if [DisplayPower(SCRIPT_UNLOCK_THRESHOLD)] of power is reached." + data["tier_info"] = "These scriptures will automatically unlock when the Ark is halfway ready or if [DisplayEnergy(SCRIPT_UNLOCK_THRESHOLD)] of power is reached." if(SCRIPTURE_APPLICATION) if(GLOB.scripture_states[SCRIPTURE_APPLICATION]) data["tier_info"] = "These scriptures are permanently unlocked." else - data["tier_info"] = "Unlock these optional scriptures by converting another servant or if [DisplayPower(APPLICATION_UNLOCK_THRESHOLD)] of power is reached.." + data["tier_info"] = "Unlock these optional scriptures by converting another servant or if [DisplayEnergy(APPLICATION_UNLOCK_THRESHOLD)] of power is reached.." data["selected"] = selected_scripture data["scripturecolors"] = "Scriptures in yellow are related to construction and building.
\ @@ -437,7 +437,7 @@ var/list/temp_info = list("name" = "[S.name]", "descname" = "([S.descname])", "tip" = "[S.desc]\n[S.usage_tip]", - "required" = "([DisplayPower(S.power_cost)][S.special_power_text ? "+ [replacetext(S.special_power_text, "POWERCOST", "[DisplayPower(S.special_power_cost)]")]" : ""])", + "required" = "([DisplayPower(S.power_cost)][S.special_power_text ? "+ [replacetext(S.special_power_text, "POWERCOST", "[DisplayEnergy(S.special_power_cost)]")]" : ""])", "type" = "[S.type]", "quickbind" = S.quickbind) if(S.important) diff --git a/code/modules/antagonists/clockcult/clock_items/replica_fabricator.dm b/code/modules/antagonists/clockcult/clock_items/replica_fabricator.dm index 66b1341b83b3..021ebc6ba50b 100644 --- a/code/modules/antagonists/clockcult/clock_items/replica_fabricator.dm +++ b/code/modules/antagonists/clockcult/clock_items/replica_fabricator.dm @@ -49,22 +49,22 @@ . += {"Can be used to replace walls, floors, tables, windows, windoors, and airlocks with Clockwork variants.\n Can construct Clockwork Walls on Clockwork Floors and deconstruct Clockwork Walls to Clockwork Floors."} if(uses_power) - . += {"It can consume floor tiles, rods, metal, and plasteel for power at rates of 2:[DisplayPower(POWER_ROD)], 1:[DisplayPower(POWER_ROD)], 1:[DisplayPower(POWER_METAL)], \ - and 1:[DisplayPower(POWER_PLASTEEL)], respectively.\n - It can also consume brass sheets for power at a rate of 1:[DisplayPower(POWER_FLOOR)].\n - Use it in-hand to produce 5 brass sheets at a cost of [DisplayPower(POWER_WALL_TOTAL)] power.\n - It has access to [DisplayPower(get_clockwork_power())] of power."} + . += {"It can consume floor tiles, rods, metal, and plasteel for power at rates of 2:[DisplayEnergy(POWER_ROD)], 1:[DisplayEnergy(POWER_ROD)], 1:[DisplayEnergy(POWER_METAL)], \ + and 1:[DisplayEnergy(POWER_PLASTEEL)], respectively.\n + It can also consume brass sheets for power at a rate of 1:[DisplayEnergy(POWER_FLOOR)].\n + Use it in-hand to produce 5 brass sheets at a cost of [DisplayEnergy(POWER_WALL_TOTAL)] power.\n + It has access to [DisplayEnergy(get_clockwork_power())] of power."} /obj/item/clockwork/replica_fabricator/attack_self(mob/living/user) if(is_servant_of_ratvar(user)) if(uses_power) if(!get_clockwork_power(POWER_WALL_TOTAL)) - to_chat(user, "[src] requires [DisplayPower(POWER_WALL_TOTAL)] of power to produce brass sheets!") + to_chat(user, "[src] requires [DisplayEnergy(POWER_WALL_TOTAL)] of power to produce brass sheets!") return adjust_clockwork_power(-POWER_WALL_TOTAL) playsound(src, 'sound/items/deconstruct.ogg', 50, 1) new/obj/item/stack/tile/brass(user.loc, 5) - to_chat(user, "You use [get_clockwork_power() ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now has access to [DisplayPower(get_clockwork_power())] of power.") + to_chat(user, "You use [get_clockwork_power() ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now has access to [DisplayEnergy(get_clockwork_power())] of power.") /obj/item/clockwork/replica_fabricator/pre_attack(atom/target, mob/living/user, params) if(!target || !user || !is_servant_of_ratvar(user) || istype(target, /obj/item/storage)) @@ -177,7 +177,7 @@ if(!silent) var/atom/A = fabrication_values["new_obj_type"] if(A) - to_chat(user, "You need [DisplayPower(fabrication_values["power_cost"])] power to fabricate \a [initial(A.name)] from [target]!") + to_chat(user, "You need [DisplayEnergy(fabrication_values["power_cost"])] power to fabricate \a [initial(A.name)] from [target]!") return FALSE return TRUE @@ -217,7 +217,7 @@ repair_values["power_required"] = round(repair_values["healing_for_cycle"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER) //and get the power cost from that if(!GLOB.ratvar_awakens && !get_clockwork_power(repair_values["power_required"])) if(!silent) - to_chat(user, "You need at least [DisplayPower(repair_values["power_required"])] power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \ - [DisplayPower(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)] to fully repair [target == user ? "yourself" : "[target.p_them()]"]!") + to_chat(user, "You need at least [DisplayEnergy(repair_values["power_required"])] power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \ + [DisplayEnergy(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)] to fully repair [target == user ? "yourself" : "[target.p_them()]"]!") return FALSE return TRUE diff --git a/code/modules/antagonists/clockcult/clock_scripture.dm b/code/modules/antagonists/clockcult/clock_scripture.dm index 3ed2aba80ace..489add98bb91 100644 --- a/code/modules/antagonists/clockcult/clock_scripture.dm +++ b/code/modules/antagonists/clockcult/clock_scripture.dm @@ -10,7 +10,7 @@ Applications: 8 servants, 3 caches, and 100 CV GLOBAL_LIST_INIT(scripture_states,scripture_states_init_value()) //list of clockcult scripture states for announcements /proc/scripture_states_init_value() - return list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE) + return list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE) /datum/clockwork_scripture var/descname = "useless" //a simple name for the scripture's effect @@ -92,7 +92,7 @@ GLOBAL_LIST_INIT(scripture_states,scripture_states_init_value()) //list of clock if(!GLOB.ratvar_awakens && !slab.no_cost) checked_penalty = check_offstation_penalty() if(!get_clockwork_power(power_cost)) - to_chat(invoker, "There isn't enough power to recite this scripture! ([DisplayPower(get_clockwork_power())]/[DisplayPower(power_cost)])") + to_chat(invoker, "There isn't enough power to recite this scripture! ([DisplayEnergy(get_clockwork_power())]/[DisplayEnergy(power_cost)])") return if(multiple_invokers_used && !multiple_invokers_optional && !GLOB.ratvar_awakens && !slab.no_cost) var/nearby_servants = 0 diff --git a/code/modules/antagonists/clockcult/clock_structure.dm b/code/modules/antagonists/clockcult/clock_structure.dm index a9bd9cf7a9c7..60b5be2cc1ca 100644 --- a/code/modules/antagonists/clockcult/clock_structure.dm +++ b/code/modules/antagonists/clockcult/clock_structure.dm @@ -160,7 +160,7 @@ if(!can_access_clockwork_power(src)) . += "It has no access to the power network! Create a sigil of transmission nearby." else - . += "It has access to [DisplayPower(get_clockwork_power())] of power." + . += "It has access to [DisplayEnergy(get_clockwork_power())] of power." /obj/structure/destructible/clockwork/powered/Destroy() SSfastprocess.processing -= src From 05e5f3016750a6daac106ef3ad39355ae705d41e Mon Sep 17 00:00:00 2001 From: yacabo Date: Fri, 8 Nov 2019 14:36:36 -0500 Subject: [PATCH 2/2] Swing and a miss I missed some --- .../antagonists/clockcult/clock_helpers/power_helpers.dm | 2 +- .../modules/antagonists/clockcult/clock_items/clockwork_slab.dm | 2 +- .../antagonists/clockcult/clock_structures/clockwork_obelisk.dm | 2 +- .../antagonists/clockcult/clock_structures/mania_motor.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm index f927fc237d15..6fce859ce2c7 100644 --- a/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm +++ b/code/modules/antagonists/clockcult/clock_helpers/power_helpers.dm @@ -24,7 +24,7 @@ hierophant_message(unlock_message) return TRUE -/proc/can_access_clockwork_power(atom/movable/access_point, amount) //Returns true if the access point has access to clockwork power (and optionally, a number of watts for it) +/proc/can_access_clockwork_power(atom/movable/access_point, amount) //Returns true if the access point has access to clockwork power (and optionally, a number of joules for it) if(amount && !get_clockwork_power(amount)) //No point in trying if we don't have the power anyway return var/list/possible_conduits = view(5, access_point) diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm index 466961bc1ad2..01f6a741168b 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_slab.dm @@ -437,7 +437,7 @@ var/list/temp_info = list("name" = "[S.name]", "descname" = "([S.descname])", "tip" = "[S.desc]\n[S.usage_tip]", - "required" = "([DisplayPower(S.power_cost)][S.special_power_text ? "+ [replacetext(S.special_power_text, "POWERCOST", "[DisplayEnergy(S.special_power_cost)]")]" : ""])", + "required" = "([DisplayEnergy(S.power_cost)][S.special_power_text ? "+ [replacetext(S.special_power_text, "POWERCOST", "[DisplayEnergy(S.special_power_cost)]")]" : ""])", "type" = "[S.type]", "quickbind" = S.quickbind) if(S.important) diff --git a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm index 058bd9d24e92..fb40f93c5912 100644 --- a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm +++ b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm @@ -23,7 +23,7 @@ /obj/structure/destructible/clockwork/powered/clockwork_obelisk/examine(mob/user) . = ..() if(is_servant_of_ratvar(user) || isobserver(user)) - . += "It requires [DisplayPower(hierophant_cost)] to broadcast over the Hierophant Network, and [DisplayPower(gateway_cost)] to open a Spatial Gateway." + . += "It requires [DisplayEnergy(hierophant_cost)] to broadcast over the Hierophant Network, and [DisplayEnergy(gateway_cost)] to open a Spatial Gateway." /obj/structure/destructible/clockwork/powered/clockwork_obelisk/can_be_unfasten_wrench(mob/user, silent) if(active) diff --git a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm index 9b4ac8085c0d..2b106da245fa 100644 --- a/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm +++ b/code/modules/antagonists/clockcult/clock_structures/mania_motor.dm @@ -19,7 +19,7 @@ /obj/structure/destructible/clockwork/powered/mania_motor/examine(mob/user) . = ..() if(is_servant_of_ratvar(user) || isobserver(user)) - . += "It requires [DisplayPower(mania_cost)] to run." + . += "It requires [DisplayEnergy(mania_cost)] to run." /obj/structure/destructible/clockwork/powered/mania_motor/forced_disable(bad_effects) if(active)