From 8a6643f64ff49f2d8e08761e994f35e66b0d20e0 Mon Sep 17 00:00:00 2001
From: DGamerL <108773801+DGamerL@users.noreply.github.com>
Date: Tue, 9 Jul 2024 02:20:19 +0200
Subject: [PATCH] Consolidation (#26139)
---
.../datums/rep_purchases/balloon.dm | 27 ----
.../contractor/datums/rep_purchases/baton.dm | 9 --
.../datums/rep_purchases/blackout.dm | 25 ----
.../datums/rep_purchases/contractor_fulton.dm | 17 ---
.../contractor/datums/rep_purchases/flare.dm | 9 --
.../datums/rep_purchases/rep_pinpointer.dm | 9 --
.../datums/rep_purchases/rep_purchases.dm | 131 ++++++++++++++++++
.../contractor/datums/rep_purchases/reroll.dm | 28 ----
.../contractor/datums/rep_purchases/zippo.dm | 15 --
paradise.dme | 9 +-
10 files changed, 132 insertions(+), 147 deletions(-)
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/balloon.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/baton.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/blackout.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/contractor_fulton.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/flare.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_pinpointer.dm
create mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_purchases.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/reroll.dm
delete mode 100644 code/modules/antagonists/traitor/contractor/datums/rep_purchases/zippo.dm
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/balloon.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/balloon.dm
deleted file mode 100644
index 217136766ce..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/balloon.dm
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * # Rep Purchase - Contractor Balloon
- */
-/datum/rep_purchase/item/balloon
- name = "Contractor Balloon"
- description = "An unique black and gold balloon with no purpose other than showing off. All contracts must be completed in the hardest location to unlock this."
- cost = 12
- stock = 1
- item_type = /obj/item/toy/syndicateballoon/contractor
-
-/datum/rep_purchase/item/balloon/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
- var/eligible = TRUE
- for(var/c in hub.contracts)
- var/datum/syndicate_contract/C = c
- if(C.status != CONTRACT_STATUS_COMPLETED || C.chosen_difficulty != EXTRACTION_DIFFICULTY_HARD)
- eligible = FALSE
- break
- if(!eligible)
- to_chat(user, "All of your contracts must be completed in the hardest location to be eligible for this item.")
- return FALSE
- return ..()
-
-/obj/item/toy/syndicateballoon/contractor
- name = "contractor balloon"
- desc = "A black and gold balloon carried only by legendary Syndicate agents."
- icon_state = "contractorballoon"
- item_state = "contractorballoon"
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/baton.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/baton.dm
deleted file mode 100644
index c2b3951f390..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/baton.dm
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * # Rep Purchase - Contractor Baton
- */
-/datum/rep_purchase/item/baton
- name = "Replacement Contractor Baton"
- description = "A compact, specialised baton issued to Syndicate contractors. Applies light electrical shocks to targets. Never know when you will get disarmed."
- cost = 2
- stock = 2
- item_type = /obj/item/melee/classic_baton/telescopic/contractor
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/blackout.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/blackout.dm
deleted file mode 100644
index e4d0fc3fa8e..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/blackout.dm
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * # Rep Purchase - Blackout
- */
-/datum/rep_purchase/blackout
- name = "Blackout"
- description = "Overloads the station's power net, shorting random APCs."
- cost = 3
- // Settings
- /// How long a contractor must wait before calling another blackout, in deciseconds.
- var/static/cooldown = 45 MINUTES
- // Variables
- /// Static cooldown variable for blackouts.
- var/static/next_blackout = -1
-
-/datum/rep_purchase/blackout/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
- if(next_blackout > world.time)
- var/timeleft = (next_blackout - world.time) / 10
- to_chat(user, "Another blackout may not be requested for [seconds_to_clock(timeleft)].")
- return FALSE
- return ..()
-
-/datum/rep_purchase/blackout/on_buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
- ..()
- next_blackout = world.time + cooldown
- power_failure()
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/contractor_fulton.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/contractor_fulton.dm
deleted file mode 100644
index 689bb2ec63f..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/contractor_fulton.dm
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * # Rep Purchase - Fulton Extraction Kit
- */
-/datum/rep_purchase/item/fulton
- name = "Fulton Extraction Kit"
- description = "A balloon that can be used to extract equipment or personnel to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand. Beacon can be placed inside the station, but the Fulton will not work inside the station."
- cost = 1
- stock = 1
- item_type = /obj/item/storage/box/syndie_kit/fulton_kit
-
-/obj/item/storage/box/syndie_kit/fulton_kit
- name = "fulton extraction kit"
- icon_state = "doom_box"
-
-/obj/item/storage/box/syndie_kit/fulton_kit/populate_contents()
- new /obj/item/extraction_pack(src)
- new /obj/item/fulton_core(src)
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/flare.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/flare.dm
deleted file mode 100644
index 005a6f60c34..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/flare.dm
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * # Rep Purchase - Emergency escape flare
- */
-/datum/rep_purchase/item/flare
- name = "Emergency extraction kit"
- description = "A kit that comes with an emergency escape flare, which will allow you to teleport to any beacon after a short activation delay. Also comes with a Syndicate teleporter beacon that only these flares and emagged teleporters can target."
- cost = 2
- stock = 3
- item_type = /obj/item/storage/box/syndie_kit/escape_flare
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_pinpointer.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_pinpointer.dm
deleted file mode 100644
index 94e35bbcae3..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_pinpointer.dm
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * # Rep Purchase - Contractor Pinpointer
- */
-/datum/rep_purchase/item/pinpointer
- name = "Contractor Pinpointer"
- description = "A low accuracy pinpointer that can track anyone in the sector without the need for suit sensors. Can only be used by the first person to activate it."
- cost = 1
- stock = 2
- item_type = /obj/item/pinpointer/crew/contractor
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_purchases.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_purchases.dm
new file mode 100644
index 00000000000..d53e3b1b822
--- /dev/null
+++ b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/rep_purchases.dm
@@ -0,0 +1,131 @@
+/**
+ * # Rep Purchases MARK: Tools
+ */
+/datum/rep_purchase/item/baton
+ name = "Replacement Contractor Baton"
+ description = "A compact, specialised baton issued to Syndicate contractors. Applies light electrical shocks to targets. Never know when you will get disarmed."
+ cost = 2
+ stock = 2
+ item_type = /obj/item/melee/classic_baton/telescopic/contractor
+
+/datum/rep_purchase/item/fulton
+ name = "Fulton Extraction Kit"
+ description = "A balloon that can be used to extract equipment or personnel to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand. Beacon can be placed inside the station, but the Fulton will not work inside the station."
+ cost = 1
+ stock = 1
+ item_type = /obj/item/storage/box/syndie_kit/fulton_kit
+
+/obj/item/storage/box/syndie_kit/fulton_kit
+ name = "fulton extraction kit"
+ icon_state = "doom_box"
+
+/obj/item/storage/box/syndie_kit/fulton_kit/populate_contents()
+ new /obj/item/extraction_pack(src)
+ new /obj/item/fulton_core(src)
+
+/datum/rep_purchase/item/flare
+ name = "Emergency extraction kit"
+ description = "A kit that comes with an emergency escape flare, which will allow you to teleport to any beacon after a short activation delay. Also comes with a Syndicate teleporter beacon that only these flares and emagged teleporters can target."
+ cost = 2
+ stock = 3
+ item_type = /obj/item/storage/box/syndie_kit/escape_flare
+
+/datum/rep_purchase/item/pinpointer
+ name = "Contractor Pinpointer"
+ description = "A low accuracy pinpointer that can track anyone in the sector without the need for suit sensors. Can only be used by the first person to activate it."
+ cost = 1
+ stock = 2
+ item_type = /obj/item/pinpointer/crew/contractor
+
+/**
+ * # Rep Purchase MARK: Assorted Badassery
+ */
+/datum/rep_purchase/item/balloon
+ name = "Contractor Balloon"
+ description = "An unique black and gold balloon with no purpose other than showing off. All contracts must be completed in the hardest location to unlock this."
+ cost = 12
+ stock = 1
+ item_type = /obj/item/toy/syndicateballoon/contractor
+
+/datum/rep_purchase/item/balloon/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
+ var/eligible = TRUE
+ for(var/c in hub.contracts)
+ var/datum/syndicate_contract/C = c
+ if(C.status != CONTRACT_STATUS_COMPLETED || C.chosen_difficulty != EXTRACTION_DIFFICULTY_HARD)
+ eligible = FALSE
+ break
+ if(!eligible)
+ to_chat(user, "All of your contracts must be completed in the hardest location to be eligible for this item.")
+ return FALSE
+ return ..()
+
+/obj/item/toy/syndicateballoon/contractor
+ name = "contractor balloon"
+ desc = "A black and gold balloon carried only by legendary Syndicate agents."
+ icon_state = "contractorballoon"
+ item_state = "contractorballoon"
+
+/datum/rep_purchase/item/zippo
+ name = "Contractor Zippo Lighter"
+ description = "An unique black and gold zippo lighter with no purpose other than showing off."
+ cost = 12
+ stock = 1
+ item_type = /obj/item/lighter/zippo/contractor
+
+/obj/item/lighter/zippo/contractor
+ name = "contractor zippo lighter"
+ desc = "An unique black and gold zippo commonly carried by elite Syndicate agents."
+ icon_state = "zippo-contractor"
+ item_state = "zippo-black"
+
+/**
+ * # Rep Purchase MARK: Actions
+ */
+/datum/rep_purchase/blackout
+ name = "Blackout"
+ description = "Overloads the station's power net, shorting random APCs."
+ cost = 3
+ // Settings
+ /// How long a contractor must wait before calling another blackout, in deciseconds.
+ var/static/cooldown = 45 MINUTES
+ // Variables
+ /// Static cooldown variable for blackouts.
+ var/static/next_blackout = -1
+
+/datum/rep_purchase/blackout/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
+ if(next_blackout > world.time)
+ var/timeleft = (next_blackout - world.time) / 10
+ to_chat(user, "Another blackout may not be requested for [seconds_to_clock(timeleft)].")
+ return FALSE
+ return ..()
+
+/datum/rep_purchase/blackout/on_buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
+ ..()
+ next_blackout = world.time + cooldown
+ power_failure()
+
+/datum/rep_purchase/reroll
+ name = "Contract Reroll"
+ description = "Replaces your inactive contracts with new ones, containing a new target and extraction zones."
+ cost = 2
+
+/datum/rep_purchase/reroll/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
+ var/eligible = FALSE
+ for(var/datum/syndicate_contract/C as anything in hub.contracts)
+ if(C.status == CONTRACT_STATUS_INACTIVE)
+ eligible = TRUE
+ break
+ if(!eligible)
+ to_chat(user, "There are no inactive contracts that can be rerolled.")
+ return FALSE
+ return ..()
+
+/datum/rep_purchase/reroll/on_buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
+ ..()
+ var/changed = 0
+ for(var/datum/syndicate_contract/C as anything in hub.contracts)
+ if(C.status == CONTRACT_STATUS_INACTIVE && C.generate())
+ changed++
+ hub.contractor_uplink?.message_holder("Agent, we have replaced [changed] contract\s with new ones.")
+
+
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/reroll.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/reroll.dm
deleted file mode 100644
index 117b45ca31a..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/reroll.dm
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * # Rep Purchase - Contract Reroll
- */
-/datum/rep_purchase/reroll
- name = "Contract Reroll"
- description = "Replaces your inactive contracts with new ones, containing a new target and extraction zones."
- cost = 2
-
-/datum/rep_purchase/reroll/buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
- var/eligible = FALSE
- for(var/c in hub.contracts)
- var/datum/syndicate_contract/C = c
- if(C.status == CONTRACT_STATUS_INACTIVE)
- eligible = TRUE
- break
- if(!eligible)
- to_chat(user, "There are no inactive contracts that can be rerolled.")
- return FALSE
- return ..()
-
-/datum/rep_purchase/reroll/on_buy(datum/contractor_hub/hub, mob/living/carbon/human/user)
- ..()
- var/changed = 0
- for(var/c in hub.contracts)
- var/datum/syndicate_contract/C = c
- if(C.status == CONTRACT_STATUS_INACTIVE && C.generate())
- changed++
- hub.contractor_uplink?.message_holder("Agent, we have replaced [changed] contract\s with new ones.")
diff --git a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/zippo.dm b/code/modules/antagonists/traitor/contractor/datums/rep_purchases/zippo.dm
deleted file mode 100644
index 5964acf38d3..00000000000
--- a/code/modules/antagonists/traitor/contractor/datums/rep_purchases/zippo.dm
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * # Rep Purchase - Contractor Zippo Lighter
- */
-/datum/rep_purchase/item/zippo
- name = "Contractor Zippo Lighter"
- description = "An unique black and gold zippo lighter with no purpose other than showing off."
- cost = 12
- stock = 1
- item_type = /obj/item/lighter/zippo/contractor
-
-/obj/item/lighter/zippo/contractor
- name = "contractor zippo lighter"
- desc = "An unique black and gold zippo commonly carried by elite Syndicate agents."
- icon_state = "zippo-contractor"
- item_state = "zippo-black"
diff --git a/paradise.dme b/paradise.dme
index 7e4b1ec5258..10817d1a1b6 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1482,15 +1482,8 @@
#include "code\modules\antagonists\traitor\contractor\datums\contractor_hub_ui.dm"
#include "code\modules\antagonists\traitor\contractor\datums\objective_contract.dm"
#include "code\modules\antagonists\traitor\contractor\datums\syndicate_contract.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\balloon.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\baton.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\blackout.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\contractor_fulton.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\flare.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\rep_pinpointer.dm"
#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\rep_purchase_base.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\reroll.dm"
-#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\zippo.dm"
+#include "code\modules\antagonists\traitor\contractor\datums\rep_purchases\rep_purchases.dm"
#include "code\modules\antagonists\traitor\contractor\items\contractor_baton.dm"
#include "code\modules\antagonists\traitor\contractor\items\contractor_kit.dm"
#include "code\modules\antagonists\traitor\contractor\items\contractor_pinpointer.dm"