From 6c825a7016c3fdfc1cbba40b5f79f53d5fb23410 Mon Sep 17 00:00:00 2001 From: Firefox13 <57810301+Firefox13@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:13:50 +0300 Subject: [PATCH] Excelsior machinery only works shipside (#8366) * jehkgahd * Update code/modules/power/power.dm * add warning * Update code/game/antagonist/station/revolutionary/excel_faction.dm * prevent debuff stacking --- .../station/revolutionary/excel_faction.dm | 4 ++-- code/game/machinery/autodoc_excelsior.dm | 1 + code/game/machinery/excelsior/autolathe.dm | 3 ++- code/game/machinery/excelsior/boombox.dm | 13 +++++++------ code/game/machinery/excelsior/diesel.dm | 1 + code/game/machinery/excelsior/ex_teleporter.dm | 1 + code/game/machinery/excelsior/ex_turret.dm | 1 + code/game/machinery/excelsior/field.dm | 4 ++-- code/game/machinery/excelsior/implantmaker.dm | 3 ++- code/game/machinery/machinery.dm | 1 + code/modules/power/power.dm | 6 +++++- 11 files changed, 25 insertions(+), 13 deletions(-) diff --git a/code/game/antagonist/station/revolutionary/excel_faction.dm b/code/game/antagonist/station/revolutionary/excel_faction.dm index c7180c9c1c4..afbbdc89b46 100755 --- a/code/game/antagonist/station/revolutionary/excel_faction.dm +++ b/code/game/antagonist/station/revolutionary/excel_faction.dm @@ -6,9 +6,9 @@ welcome_text = "You are Excelsior, Ever Upward. You have infiltrated this vessel to further the Revolution.\n\ The People's strength lies in securing our position, gathering the oppressed, spreading propaganda and producing arms and armor for the final revolution. A methodical approach is recommended. \n\n\ Our first phase is to retrieve the cache of manufacturing materials and circuit boards. Without a means of production our revolution is in peril.\n\n\ - Our second phase is to establish a fortified position in secret. The People will send additional resources through the teleporter once it is established. This and our autolathe can be protected further with turrets and shield generators, in addition to loyal comrades.\n\n\ + Our second phase is to establish a fortified position in secret. The People will send additional resources through the teleporter once it is established. This and our autolathe can be protected further with turrets and shield generators, in addition to loyal comrades. To prevent technology theft, your machinery, but not handheld weapons, implanters, and armor, is designed to work only on target vessel, CEV \"Eris\".\n\n\ Our third phase is expansion. Complete mandates for power and to delay detection by automated ship systems, which is sped up by the presence of additional brute-force implanted recruits. Aquire implants, prosthetics or robotic parts and convert them into new implants. These can be injected into the oppressed to formally induct them to the Revolution. Use their labor to produce the weapons of their liberation.\n\n\ - When the People are ready, break the chains of the oppressor and seize control of the ship" + When the People are ready, break the chains of the oppressor and seize control of the ship." hud_indicator = "excelsior" diff --git a/code/game/machinery/autodoc_excelsior.dm b/code/game/machinery/autodoc_excelsior.dm index 4457275ef28..9b1aaf91006 100644 --- a/code/game/machinery/autodoc_excelsior.dm +++ b/code/game/machinery/autodoc_excelsior.dm @@ -16,6 +16,7 @@ use_power = IDLE_POWER_USE idle_power_usage = 60 active_power_usage = 10000 + shipside_only = TRUE var/cover_closed = FALSE var/cover_locked = FALSE var/cover_moving = FALSE diff --git a/code/game/machinery/excelsior/autolathe.dm b/code/game/machinery/excelsior/autolathe.dm index 74738809b84..282d706e158 100755 --- a/code/game/machinery/excelsior/autolathe.dm +++ b/code/game/machinery/excelsior/autolathe.dm @@ -1,10 +1,11 @@ /obj/machinery/autolathe/excelsior - name = "Excelsior autoforge" + name = "excelsior autoforge" desc = "It produces items using metal and glass." icon = 'icons/obj/machines/excelsior/autolathe.dmi' description_info = "A highly efficient autoforge, can also employ biomatter printing" icon_state = "stanok" circuit = /obj/item/electronics/circuitboard/excelsiorautolathe + shipside_only = TRUE build_type = AUTOLATHE | BIOPRINTER speed = 4 diff --git a/code/game/machinery/excelsior/boombox.dm b/code/game/machinery/excelsior/boombox.dm index d5dd4bdb923..d945cc7a141 100644 --- a/code/game/machinery/excelsior/boombox.dm +++ b/code/game/machinery/excelsior/boombox.dm @@ -11,6 +11,7 @@ circuit = /obj/item/electronics/circuitboard/excelsior_boombox var/active = FALSE var/update_time = 0 // Made so callbacks can't be spamed + shipside_only = TRUE /obj/machinery/excelsior_boombox/attack_hand(mob/user) ..() @@ -35,7 +36,7 @@ active = FALSE else active = TRUE - if (world.time >= update_time + 20 SECONDS) + if (world.time >= update_time + 30 SECONDS) send_propaganda() update_time = world.time @@ -44,9 +45,9 @@ for (var/mob/living/carbon/M in range(10, src)) if (is_excelsior(M)) to_chat(M, SPAN_NOTICE("You hear a motivating tune, you feel ready for a fight!")) - M.stats.addTempStat(STAT_TGH, STAT_LEVEL_ADEPT, 20 SECONDS, "ex_boombox") - M.stats.addTempStat(STAT_VIG, STAT_LEVEL_BASIC, 20 SECONDS, "ex_boombox") + M.stats.addTempStat(STAT_TGH, STAT_LEVEL_ADEPT, 30 SECONDS, "ex_boombox") + M.stats.addTempStat(STAT_VIG, STAT_LEVEL_BASIC, 30 SECONDS, "ex_boombox") else - to_chat(M, SPAN_WARNING("You hear some stupid propaganda, you dont belive it but... what if they are right?")) - M.stats.addTempStat(STAT_TGH, -STAT_LEVEL_BASIC, 20 SECONDS, "ex_boombox_m") - addtimer(CALLBACK(src, PROC_REF(send_propaganda)), 20 SECONDS) + to_chat(M, SPAN_WARNING("You hear some stupid distracting communistic propaganda.")) + M.stats.addTempStat(STAT_VIG, -STAT_LEVEL_BASIC, 30 SECONDS, "ex_boombox_m") + addtimer(CALLBACK(src, PROC_REF(send_propaganda)), 30 SECONDS) diff --git a/code/game/machinery/excelsior/diesel.dm b/code/game/machinery/excelsior/diesel.dm index ee55ad04872..a5a8c3cd73e 100644 --- a/code/game/machinery/excelsior/diesel.dm +++ b/code/game/machinery/excelsior/diesel.dm @@ -7,6 +7,7 @@ circuit = /obj/item/electronics/circuitboard/diesel max_fuel_volume = 300 power_gen = 16000 // produces 20% less watts output per power level setting. + shipside_only = TRUE // even if it's just a "diesel" generator, it's still excelsior... time_per_fuel_unit = 12 reagent_flags = OPENCONTAINER diff --git a/code/game/machinery/excelsior/ex_teleporter.dm b/code/game/machinery/excelsior/ex_teleporter.dm index 30c2dc2bc74..c4ed22411e3 100644 --- a/code/game/machinery/excelsior/ex_teleporter.dm +++ b/code/game/machinery/excelsior/ex_teleporter.dm @@ -17,6 +17,7 @@ var/global/excelsior_last_draft = 0 idle_power_usage = 40 active_power_usage = 15000 circuit = /obj/item/electronics/circuitboard/excelsior_teleporter + shipside_only = TRUE var/max_energy = 100 var/energy_gain = 1 diff --git a/code/game/machinery/excelsior/ex_turret.dm b/code/game/machinery/excelsior/ex_turret.dm index 10b73c62491..4a6ee68f5fb 100644 --- a/code/game/machinery/excelsior/ex_turret.dm +++ b/code/game/machinery/excelsior/ex_turret.dm @@ -18,6 +18,7 @@ var/burst_lenght = 8 health = 300 shot_delay = 0 + shipside_only = TRUE /obj/machinery/porta_turret/excelsior/proc/has_power_source_nearby() for (var/a in excelsior_teleporters) diff --git a/code/game/machinery/excelsior/field.dm b/code/game/machinery/excelsior/field.dm index b429b0a233f..f76f8aa40f8 100644 --- a/code/game/machinery/excelsior/field.dm +++ b/code/game/machinery/excelsior/field.dm @@ -1,12 +1,12 @@ //Todo: make this thing work under new shield system /obj/machinery/shieldwallgen/excelsior - - name = "Excelsior Shield Generator" + name = "excelsior shield generator" desc = "A shield generator." icon = 'icons/obj/machines/excelsior/field.dmi' stun_chance = 3 shield_type = /obj/machinery/shieldwall/excelsior circuit = /obj/item/electronics/circuitboard/excelsiorshieldwallgen + shipside_only = TRUE req_access = list() /obj/machinery/shieldwallgen/excelsior/can_stun(var/mob/M) diff --git a/code/game/machinery/excelsior/implantmaker.dm b/code/game/machinery/excelsior/implantmaker.dm index f39fce0d0f9..0d7313079dd 100644 --- a/code/game/machinery/excelsior/implantmaker.dm +++ b/code/game/machinery/excelsior/implantmaker.dm @@ -1,5 +1,5 @@ /obj/machinery/complant_maker - name = "implant reconstructor" + name = "excelsior implant reconstructor" desc = "This machine repurposes implants, robot components and bionics, reworking their circuitry into the Excelsior implant pattern which allows recruitment." description_antag = "The compliancy implants cannot be implanted into NT personnel" icon = 'icons/obj/machines/excelsior/reconstructor.dmi' @@ -7,6 +7,7 @@ circuit = /obj/item/electronics/circuitboard/excelsiorreconstructor anchored = TRUE density = TRUE + shipside_only = TRUE var/build_time = 40 var/working = FALSE diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index b17cfe4e5d2..c5f52b70b53 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -114,6 +114,7 @@ var/area/current_power_area // What area are we powering currently var/hacked = FALSE // If this machine has had its access requirements hacked or not + var/shipside_only = FALSE // Does this mechanism need to be on the ship? Used for excel /obj/machinery/Initialize(mapload, d=0) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index edbeb740bfe..c5b21ce43ba 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -69,9 +69,13 @@ // return 1 var/area/A = get_area(src) + if(A) + if(src.shipside_only && !(A in ship_areas)) // some machinery is only destined to work on Eris (excelsior) + return FALSE return A.powered(chan) // return power status of the area - return 0 + return FALSE + // increment the power usage stats for an area /obj/machinery/proc/use_power(var/amount, var/chan = power_channel) // defaults to power_channel