From 9be4b985a05f30cf88ac14ac36de29f350cdee62 Mon Sep 17 00:00:00 2001 From: shizcalev Date: Mon, 28 Aug 2017 14:25:02 -0400 Subject: [PATCH] Updated clockwork cult to use DisplayPower() --- .../clock_cult/clock_effects/clock_sigils.dm | 6 +++--- .../clock_helpers/fabrication_helpers.dm | 2 +- .../clock_cult/clock_items/clockwork_slab.dm | 2 +- .../clock_items/replica_fabricator.dm | 20 +++++++++---------- .../gamemodes/clock_cult/clock_structure.dm | 2 +- .../clock_structures/clockwork_obelisk.dm | 2 +- .../clock_structures/mania_motor.dm | 2 +- .../clock_structures/prolonging_prism.dm | 4 ++-- .../clock_structures/tinkerers_daemon.dm | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm index 507c6739214..d607adb37fa 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm @@ -193,13 +193,13 @@ var/structure_number = 0 for(var/obj/structure/destructible/clockwork/powered/P in range(SIGIL_ACCESS_RANGE, src)) structure_number++ - to_chat(user, "It is storing [GLOB.ratvar_awakens ? "INFINITY":"[power_charge]"]W of power, \ + to_chat(user, "It is storing [GLOB.ratvar_awakens ? "INFINITE":"[DisplayPower(power_charge)] of"] power, \ and [structure_number] Clockwork Structure[structure_number == 1 ? " is":"s are"] in range.") to_chat(user, "While active, it will gradually drain power from nearby electronics. It is currently [isprocessing ? "active":"disabled"].") if(iscyborg(user)) to_chat(user, "You can recharge from the [sigil_name] by crossing it.") else if(!GLOB.ratvar_awakens) - to_chat(user, "Hitting the [sigil_name] with brass sheets will convert them to power at a rate of 1 brass sheet to [POWER_FLOOR]W power.") + to_chat(user, "Hitting the [sigil_name] with brass sheets will convert them to power at a rate of 1 brass sheet to [DisplayPower(POWER_FLOOR)] power.") if(!GLOB.ratvar_awakens) to_chat(user, "You can recharge Replica Fabricators from the [sigil_name].") @@ -207,7 +207,7 @@ if(is_servant_of_ratvar(user) && istype(I, /obj/item/stack/tile/brass) && !GLOB.ratvar_awakens) var/obj/item/stack/tile/brass/B = I user.visible_message("[user] places [B] on [src], causing it to disintegrate into glowing orange energy!", \ - "You charge the [sigil_name] with [B], providing it with [B.amount * POWER_FLOOR]W of power.") + "You charge the [sigil_name] with [B], providing it with [DisplayPower(B.amount * POWER_FLOOR)] of power.") modify_charge(-(B.amount * POWER_FLOOR)) playsound(src, 'sound/effects/light_flicker.ogg', (B.amount * POWER_FLOOR) * 0.01, 1) qdel(B) diff --git a/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm b/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm index 0c740d7f363..0028264630c 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/fabrication_helpers.dm @@ -272,7 +272,7 @@ fabricator.recharging = null if(user) user.visible_message("[user]'s [fabricator.name] stops draining glowing orange energy from [src].", \ - "You finish recharging your [fabricator.name]. It now contains [fabricator.get_power()]W/[fabricator.get_max_power()]W power.") + "You finish recharging your [fabricator.name]. It now contains [DisplayPower(fabricator.get_power())]/[DisplayPower(fabricator.get_max_power())] power.") //Fabricator mob heal proc, to avoid as much copypaste as possible. /mob/living/proc/fabricator_heal(mob/living/user, obj/item/clockwork/replica_fabricator/fabricator) diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm index 343f2e70e78..eecfec77802 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm @@ -500,7 +500,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 [POWER_FLOOR]W 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 [DisplayPower(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.

" diff --git a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm index 3f7e826017a..42be2ccddb6 100644 --- a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm +++ b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm @@ -126,22 +126,22 @@ to_chat(user, "Can be used to replace walls, floors, tables, windows, windoors, and airlocks with Clockwork variants.") to_chat(user, "Can construct Clockwork Walls on Clockwork Floors and deconstruct Clockwork Walls to Clockwork Floors.") if(uses_power) - to_chat(user, "It can consume floor tiles, rods, metal, and plasteel for power at rates of 2:[POWER_ROD]W, 1:[POWER_ROD]W, 1:[POWER_METAL]W, \ - and 1:[POWER_PLASTEEL]W, respectively.") - to_chat(user, "It can also consume brass sheets for power at a rate of 1:[POWER_FLOOR]W.") - to_chat(user, "It is storing [get_power()]W/[get_max_power()]W of power[charge_rate ? ", and is gaining [charge_rate*0.5]W of power per second":""].") - to_chat(user, "Use it in-hand to produce 5 brass sheets at a cost of [POWER_WALL_TOTAL]W power.") + to_chat(user, "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.") + to_chat(user, "It can also consume brass sheets for power at a rate of 1:[DisplayPower(POWER_FLOOR)].") + to_chat(user, "It is storing [DisplayPower(get_power())]/[DisplayPower(get_max_power())] of power[charge_rate ? ", and is gaining [DisplayPower(charge_rate*0.5)] of power per second":""].") + to_chat(user, "Use it in-hand to produce 5 brass sheets at a cost of [DisplayPower(POWER_WALL_TOTAL)] power.") /obj/item/clockwork/replica_fabricator/attack_self(mob/living/user) if(is_servant_of_ratvar(user)) if(uses_power) if(!can_use_power(POWER_WALL_TOTAL)) - to_chat(user, "[src] requires [POWER_WALL_TOTAL]W of power to produce brass sheets!") + to_chat(user, "[src] requires [DisplayPower(POWER_WALL_TOTAL)] of power to produce brass sheets!") return modify_stored_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 [stored_power ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now stores [get_power()]W/[get_max_power()]W of power.") + to_chat(user, "You use [stored_power ? "some":"all"] of [src]'s power to produce 5 brass sheets. It now stores [DisplayPower(get_power())]/[DisplayPower(get_max_power())] of power.") /obj/item/clockwork/replica_fabricator/pre_attackby(atom/target, mob/living/user, params) if(!target || !user || !is_servant_of_ratvar(user) || istype(target, /obj/item/storage)) @@ -276,7 +276,7 @@ if(!silent) var/atom/A = fabrication_values["new_obj_type"] if(A) - to_chat(user, "You need [fabrication_values["power_cost"]]W power to fabricate \a [initial(A.name)] from [target]!") + to_chat(user, "You need [DisplayPower(fabrication_values["power_cost"])] power to fabricate \a [initial(A.name)] from [target]!") else if(stored_power - fabrication_values["power_cost"] > max_power) if(!silent) var/atom/A = fabrication_values["new_obj_type"] @@ -323,8 +323,8 @@ repair_values["power_required"] = round(repair_values["healing_for_cycle"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER) //and get the power cost from that if(!can_use_power(RATVAR_POWER_CHECK) && !can_use_power(repair_values["power_required"])) if(!silent) - to_chat(user, "You need at least [repair_values["power_required"]]W power to start repairin[target == user ? "g yourself" : "g [target]"], and at least \ - [round(repair_values["amount_to_heal"]*MIN_CLOCKCULT_POWER, MIN_CLOCKCULT_POWER)]W to fully repair [target == user ? "yourself" : "[target.p_them()]"]!") + 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()]"]!") return FALSE return TRUE diff --git a/code/game/gamemodes/clock_cult/clock_structure.dm b/code/game/gamemodes/clock_cult/clock_structure.dm index 0c29361e591..1da30536050 100644 --- a/code/game/gamemodes/clock_cult/clock_structure.dm +++ b/code/game/gamemodes/clock_cult/clock_structure.dm @@ -160,7 +160,7 @@ if(is_servant_of_ratvar(user) || isobserver(user)) var/powered = total_accessable_power() var/sigil_number = LAZYLEN(check_apc_and_sigils()) - to_chat(user, "It has access to [powered == INFINITY ? "INFINITY":"[powered]"]W of power, \ + to_chat(user, "It has access to [powered == INFINITY ? "INFINITE":"[DisplayPower(powered)] of"] power, \ and [sigil_number] Sigil[sigil_number == 1 ? "":"s"] of Transmission [sigil_number == 1 ? "is":"are"] in range.") /obj/structure/destructible/clockwork/powered/Destroy() diff --git a/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm b/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm index 4df615450fc..de6b058b783 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/clockwork_obelisk.dm +++ b/code/game/gamemodes/clock_cult/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)) - to_chat(user, "It requires [hierophant_cost]W to broadcast over the Hierophant Network, and [gateway_cost]W to open a Spatial Gateway.") + to_chat(user, "It requires [DisplayPower(hierophant_cost)] to broadcast over the Hierophant Network, and [DisplayPower(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/game/gamemodes/clock_cult/clock_structures/mania_motor.dm b/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm index 732897fda48..23a50fdd4ce 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/mania_motor.dm +++ b/code/game/gamemodes/clock_cult/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)) - to_chat(user, "It requires [mania_cost]W to run.") + to_chat(user, "It requires [DisplayPower(mania_cost)] to run.") /obj/structure/destructible/clockwork/powered/mania_motor/forced_disable(bad_effects) if(active) diff --git a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm index cf730189e3a..82ec287d0d0 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm @@ -26,8 +26,8 @@ to_chat(user, "An emergency shuttle has arrived and this prism is no longer useful; attempt to activate it to gain a partial refund of components used.") else var/efficiency = get_efficiency_mod(TRUE) - to_chat(user, "It requires at least [get_delay_cost()]W of power to attempt to delay the arrival of an emergency shuttle by [2 * efficiency] minutes.") - to_chat(user, "This cost increases by [delay_cost_increase]W for every previous activation.") + to_chat(user, "It requires at least [DisplayPower(get_delay_cost())] of power to attempt to delay the arrival of an emergency shuttle by [2 * efficiency] minutes.") + to_chat(user, "This cost increases by [DisplayPower(delay_cost_increase)] for every previous activation.") /obj/structure/destructible/clockwork/powered/prolonging_prism/forced_disable(bad_effects) if(active) diff --git a/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm index 079fd081fe3..4ceb7c3e260 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_daemon.dm @@ -33,7 +33,7 @@ to_chat(user, "It is currently producing random components.") to_chat(user, "It will produce a component every [round((production_cooldown*0.1) * get_efficiency_mod(TRUE), 0.1)] seconds and requires at least the following power for each component type:") for(var/i in GLOB.clockwork_component_cache) - to_chat(user, "[get_component_icon(i)] [get_component_name(i)]: [get_component_cost(i)]W ([GLOB.clockwork_component_cache[i]] exist[GLOB.clockwork_component_cache[i] == 1 ? "s" : ""])") + to_chat(user, "[get_component_icon(i)] [get_component_name(i)]: [DisplayPower(get_component_cost(i))] ([GLOB.clockwork_component_cache[i]] exist[GLOB.clockwork_component_cache[i] == 1 ? "s" : ""])") /obj/structure/destructible/clockwork/powered/tinkerers_daemon/forced_disable(bad_effects) if(active) @@ -80,7 +80,7 @@ if("Specific Component") var/list/components = list() for(var/i in GLOB.clockwork_component_cache) - components["[get_component_name(i)] ([get_component_cost(i)]W)"] = i + components["[get_component_name(i)] ([DisplayPower(get_component_cost(i))])"] = i var/input_component = input(user, "Choose a component type.", name) as null|anything in components component_id_to_produce = components[input_component] servants = 0