From d16f68b4dad1cf1e398df5ae89565c910f2420f5 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 29 Jul 2017 01:52:02 -0500 Subject: [PATCH] Sigils of Transmission can now drain power, but Interdiction Lenses have been removed (#2173) --- .../clock_cult/clock_effects/clock_sigils.dm | 46 +++++++++++++++---- .../clock_helpers/clock_powerdrain.dm | 23 +++------- .../clock_cult/clock_items/clockwork_slab.dm | 22 ++++----- .../scripture_applications.dm | 32 ++----------- .../effects/temporary_visuals/clockcult.dm | 14 ++++++ tgstation.dme | 1 - 6 files changed, 73 insertions(+), 65 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 dcd160c601..297021ff5a 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm @@ -20,7 +20,7 @@ return ..() /obj/effect/clockwork/sigil/attack_hand(mob/user) - if(iscarbon(user) && !user.stat && (!is_servant_of_ratvar(user) || (is_servant_of_ratvar(user) && user.a_intent == INTENT_HARM))) + if(iscarbon(user) && !user.stat && !is_servant_of_ratvar(user)) user.visible_message("[user] stamps out [src]!", "You stomp on [src], scattering it into thousands of particles.") qdel(src) return 1 @@ -175,7 +175,7 @@ /obj/effect/clockwork/sigil/transmission name = "suspicious sigil" desc = "A glowing orange sigil. The air around it feels staticky." - clockwork_desc = "A sigil that will serve as a battery for clockwork structures." + clockwork_desc = "A sigil that serves as power generation and a battery for clockwork structures." icon_state = "sigiltransmission" alpha = 50 color = "#EC8A2D" @@ -183,7 +183,12 @@ resist_string = "glows faintly" sigil_name = "Sigil of Transmission" affects_servants = TRUE - var/power_charge = CLOCKCULT_POWER_UNIT //starts with CLOCKCULT_POWER_UNIT by default + var/power_charge = 0 //starts with no power + var/drain_range = 14 + +/obj/effect/clockwork/sigil/transmission/Initialize() + . = ..() + update_glow() /obj/effect/clockwork/sigil/transmission/ex_act(severity) if(severity == 3) @@ -199,7 +204,8 @@ 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, \ - and [structure_number] Clockwork Structure[structure_number == 1 ? "":"s"] [structure_number == 1 ? "is":"are"] in range.") + 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) @@ -218,6 +224,20 @@ return TRUE return ..() +/obj/effect/clockwork/sigil/transmission/attack_ai(mob/user) + if(is_servant_of_ratvar(user)) + attack_hand(user) + +/obj/effect/clockwork/sigil/transmission/attack_hand(mob/user) + if(is_servant_of_ratvar(user)) + visible_message("[user] [isprocessing ? "de":""]activates [src].", "You [isprocessing ? "de":""]activate the [sigil_name].") + if(isprocessing) + STOP_PROCESSING(SSobj, src) + else + START_PROCESSING(SSobj, src) + else + return ..() + /obj/effect/clockwork/sigil/transmission/sigil_effects(mob/living/L) if(is_servant_of_ratvar(L)) if(iscyborg(L)) @@ -225,6 +245,20 @@ else if(power_charge) to_chat(L, "You feel a slight, static shock.") +/obj/effect/clockwork/sigil/transmission/process() + var/power_drained = 0 + + for(var/t in spiral_range_turfs(drain_range, src)) + var/turf/T = t + for(var/M in T) + var/atom/movable/A = M + power_drained += A.power_drain(TRUE) + + CHECK_TICK + + modify_charge(-Floor(power_drained, MIN_CLOCKCULT_POWER)) + new /obj/effect/temp_visual/ratvar/sigil/transmission(loc, 1 + (power_drained * 0.0035)) + /obj/effect/clockwork/sigil/transmission/proc/charge_cyborg(mob/living/silicon/robot/cyborg) if(!cyborg_checks(cyborg)) return @@ -259,10 +293,6 @@ return FALSE return TRUE -/obj/effect/clockwork/sigil/transmission/Initialize() - . = ..() - update_glow() - /obj/effect/clockwork/sigil/transmission/proc/modify_charge(amount) if(GLOB.ratvar_awakens) update_glow() diff --git a/code/game/gamemodes/clock_cult/clock_helpers/clock_powerdrain.dm b/code/game/gamemodes/clock_cult/clock_helpers/clock_powerdrain.dm index cdde45bb4c..ef1099d3e0 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/clock_powerdrain.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/clock_powerdrain.dm @@ -6,7 +6,7 @@ if(cell && cell.charge) playsound(src, "sparks", 50, 1) flick("apc-spark", src) - . = min(cell.charge, 250) + . = min(cell.charge, MIN_CLOCKCULT_POWER*3) cell.use(.) //Better than a power sink! if(!cell.charge && !shorted) shorted = 1 @@ -16,7 +16,7 @@ /obj/machinery/power/smes/power_drain(clockcult_user) if(charge) - . = min(charge, 250) + . = min(charge, MIN_CLOCKCULT_POWER*3) charge -= . * 50 if(!charge && !panel_open) panel_open = TRUE @@ -27,29 +27,18 @@ /obj/item/weapon/stock_parts/cell/power_drain(clockcult_user) if(charge) - . = min(charge, 250) + . = min(charge, MIN_CLOCKCULT_POWER*3) charge = use(.) update_icon() -/obj/machinery/light/power_drain(clockcult_user) - if(on) - playsound(src, 'sound/effects/light_flicker.ogg', 50, 1) - . = 250 - if(prob(50)) - burn_out() - /mob/living/silicon/robot/power_drain(clockcult_user) if((!clockcult_user || !is_servant_of_ratvar(src)) && cell && cell.charge) - . = min(cell.charge, 250) + . = min(cell.charge, MIN_CLOCKCULT_POWER*4) cell.use(.) - if(prob(20)) - to_chat(src, "ERROR: Power loss detected!") spark_system.start() /obj/mecha/power_drain(clockcult_user) - if((!clockcult_user || !occupant || occupant && !is_servant_of_ratvar(occupant)) && cell && cell.charge) - . = min(cell.charge, 250) + if((!clockcult_user || (occupant && !is_servant_of_ratvar(occupant))) && cell && cell.charge) + . = min(cell.charge, MIN_CLOCKCULT_POWER*4) cell.use(.) - if(prob(20)) - occupant_message("Power loss detected!") spark_system.start() 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 3411bb1a28..1985ada22e 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm @@ -51,9 +51,9 @@ maximum_quickbound = 6 //we usually have one or two unique scriptures, so if ratvar is up let us bind one more actions_types = list() -/obj/item/clockwork/slab/cyborg/engineer //five scriptures, plus a fabricator +/obj/item/clockwork/slab/cyborg/engineer //four scriptures, plus a fabricator quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/create_object/cogscarab, \ - /datum/clockwork_scripture/create_object/soul_vessel, /datum/clockwork_scripture/create_object/sigil_of_transmission, /datum/clockwork_scripture/create_object/interdiction_lens) + /datum/clockwork_scripture/create_object/soul_vessel, /datum/clockwork_scripture/create_object/sigil_of_transmission) /obj/item/clockwork/slab/cyborg/medical //five scriptures, plus a spear quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/ranged_ability/sentinels_compromise, \ @@ -422,17 +422,16 @@ dat += "Marauder: A clockwork marauder, which is a powerful bodyguard that hides in its owner.

" dat += "Structures (* = requires power)
" dat += "Warden: An ocular warden, which is a ranged turret that damages non-Servants that see it.
" - dat += "Daemon*: A tinkerer's daemon, which quickly creates components.
" - dat += "Lens*: An interdiction lens, which sabotages machinery in a large area to create power.
" - dat += "Obelisk*: A clockwork obelisk, which can broadcast large messages and allows limited teleportation.
" - dat += "Motor*: A mania motor, which serves as area-denial through negative effects and eventual conversion.
" dat += "Prism*: A prolonging prism, which delays the shuttle for two minutes at a huge power cost.

" + dat += "Motor*: A mania motor, which serves as area-denial through negative effects and eventual conversion.
" + dat += "Daemon*: A tinkerer's daemon, which quickly creates components.
" + dat += "Obelisk*: A clockwork obelisk, which can broadcast large messages and allows limited teleportation.
" dat += "Sigils
" dat += "Note: Sigils can be stacked on top of one another, making certain sigils very effective when paired!
" dat += "Transgression: Stuns the first non-Servant to cross it for ten seconds and blinds others nearby. Disappears on use.
" dat += "Submission: Converts the first non-Servant to stand on the sigil for seven seconds. Disappears on use.
" dat += "Accession: Identical to the Sigil of Submission, but doesn't disappear on use. It can also convert a single mindshielded target, but will disappear after doing this.
" - dat += "Transmission: Stores power for clockwork structures. Feeding it brass sheets will create power.

" + dat += "Transmission: Drains and stores power for clockwork structures. Feeding it brass sheets will create power.

" dat += "-=-=-=-=-=-" if("Components") var/servants = 0 //Calculate the current production time for slab components @@ -501,12 +500,11 @@ becomes necessary: power. Almost all clockwork structures require power to function in some way. There is nothing special about this power; it's mere electricity, \ and can be harnessed in several ways.

" dat += "To begin with, if there is no other source of power nearby, structures will draw from the area's APC, assuming it has one. This is inefficient and ill-advised as \ - anything but a last resort. Instead, it is recommended that a sigil of transmission is created. This sigil serves as a sort of battery for nearby clockwork \ + 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 pathetic APCs and other sources of energy.

" - 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.) There are also structures that generate power instead of consuming it; for instance, the interdiction lens sabotages all non-clockwork machines in a \ - very large area and creates power from doing so. This allows Servants to simultaneously cripple an entire department as well as fueling their own machinery.

" + dat += "The most reliable and efficient way to generate power is by 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.) \ + 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.

" dat += "-=-=-=-=-=-" diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm index 27bf4551eb..57b7effc71 100644 --- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm +++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm @@ -171,46 +171,24 @@ quickbind_desc = "Creates a Fragment Shell, which produces an Anima Fragment when filled with a Soul Vessel." -//Sigil of Transmission: Creates a sigil of transmission that can store power for clockwork structures. +//Sigil of Transmission: Creates a sigil of transmission that can drain and store power for clockwork structures. /datum/clockwork_scripture/create_object/sigil_of_transmission - descname = "Structure Battery" + descname = "Structure Power Generator & Battery" name = "Sigil of Transmission" - desc = "Places a sigil that stores energy to power clockwork structures." + desc = "Places a sigil that can drain and will store energy to power clockwork structures." invocations = list("Divinity...", "...power our creations!") channel_time = 70 consumed_components = list(VANGUARD_COGWHEEL = 2, GEIS_CAPACITOR = 2, HIEROPHANT_ANSIBLE = 4) whispered = TRUE object_path = /obj/effect/clockwork/sigil/transmission - creator_message = "A sigil silently appears below you. It will automatically power clockwork structures near it." + creator_message = "A sigil silently appears below you. It will automatically power clockwork structures near it and will drain power when activated." usage_tip = "Cyborgs can charge from this sigil by remaining over it for 5 seconds." tier = SCRIPTURE_APPLICATION one_per_tile = TRUE primary_component = HIEROPHANT_ANSIBLE sort_priority = 5 quickbind = TRUE - quickbind_desc = "Creates a Sigil of Transmission, which stores power for clockwork structures." - - -//Interdiction Lens: Creates a powerful totem that disables radios and cameras and drains power into nearby sigils of transmission. -/datum/clockwork_scripture/create_object/interdiction_lens - descname = "Structure, Area Sabotage, Power Generator" - name = "Interdiction Lens" - desc = "Creates a clockwork totem that sabotages nearby machinery and funnels drained power into nearby Sigils of Transmission or the area's APC." - invocations = list("May this totem...", "...shroud the false suns!") - channel_time = 80 - consumed_components = list(BELLIGERENT_EYE = 5, REPLICANT_ALLOY = 2, HIEROPHANT_ANSIBLE = 2) - object_path = /obj/structure/destructible/clockwork/powered/interdiction_lens - creator_message = "You form an interdiction lens, which disrupts cameras and radios and drains power." - observer_message = "A brass totem rises from the ground, a purple gem appearing in its center!" - invokers_required = 2 - multiple_invokers_used = TRUE - usage_tip = "If it fails to funnel power into a nearby Sigil of Transmission or the area's APC and fails to disable even one thing, it will disable itself for two minutes." - tier = SCRIPTURE_APPLICATION - one_per_tile = TRUE - primary_component = BELLIGERENT_EYE - sort_priority = 6 - quickbind = TRUE - quickbind_desc = "Creates an Interdiction Lens, which drains power into nearby Sigils of Transmission." + quickbind_desc = "Creates a Sigil of Transmission, which can drain and will store power for clockwork structures." //Prolonging Prism: Creates a prism that will delay the shuttle at a power cost diff --git a/code/game/objects/effects/temporary_visuals/clockcult.dm b/code/game/objects/effects/temporary_visuals/clockcult.dm index ff788ef580..b550871389 100644 --- a/code/game/objects/effects/temporary_visuals/clockcult.dm +++ b/code/game/objects/effects/temporary_visuals/clockcult.dm @@ -210,6 +210,20 @@ animate(src, transform = matrix()*2, time = 5) animate(transform = oldtransform, alpha = 0, time = 65) +/obj/effect/temp_visual/ratvar/sigil/transmission + color = "#EC8A2D" + layer = ABOVE_MOB_LAYER + duration = 20 + light_range = 3 + light_power = 1 + light_color = "#EC8A2D" + +/obj/effect/temp_visual/ratvar/sigil/transmission/Initialize(mapload, transform_multiplier) + . = ..() + var/oldtransform = transform + transform = matrix()*transform_multiplier + animate(src, transform = oldtransform, alpha = 0, time = 20) + /obj/effect/temp_visual/ratvar/sigil/vitality color = "#1E8CE1" icon_state = "sigilactivepulse" diff --git a/tgstation.dme b/tgstation.dme index 9cc65f7f46..0cda536cdd 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -473,7 +473,6 @@ #include "code\game\gamemodes\clock_cult\clock_structures\clock_shells.dm" #include "code\game\gamemodes\clock_cult\clock_structures\clockwork_obelisk.dm" #include "code\game\gamemodes\clock_cult\clock_structures\geis_binding.dm" -#include "code\game\gamemodes\clock_cult\clock_structures\interdiction_lens.dm" #include "code\game\gamemodes\clock_cult\clock_structures\mania_motor.dm" #include "code\game\gamemodes\clock_cult\clock_structures\ocular_warden.dm" #include "code\game\gamemodes\clock_cult\clock_structures\prolonging_prism.dm"