From b5a3b3308dcaba31fb8bfe2f9123210fdf9db043 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 1 Feb 2022 16:02:13 +0100 Subject: [PATCH] [MIRROR] Rebalances some things about progression traitors and adds some uplink items. [MDB IGNORE] (#11178) * Rebalances some things about progression traitors and adds some uplink items. * Rebalances some things about progression traitors and adds some uplink items. Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> --- code/__HELPERS/spawns.dm | 7 ++-- .../game/machinery/computer/communications.dm | 2 +- code/game/objects/items/emags.dm | 2 ++ .../traitor/objectives/assassination.dm | 13 ++++--- .../traitor/objectives/destroy_item.dm | 6 ++-- .../final_objective/battlecruiser.dm | 17 +++++++++- .../traitor/objectives/kill_pet.dm | 4 +-- .../antagonists/traitor/objectives/steal.dm | 14 ++++---- .../antagonists/traitor/uplink_handler.dm | 7 ++-- .../mob_spawn/ghost_roles/space_roles.dm | 4 +++ .../modules/shuttle/battlecruiser_starfury.dm | 15 ++++---- code/modules/uplink/uplink_items/nukeops.dm | 7 ---- .../uplink/uplink_items/stealthy_tools.dm | 34 +++++++++++++++++++ code/modules/uplink/uplink_items/suits.dm | 19 +++++++++++ .../packages/tgui/interfaces/Uplink/index.tsx | 10 +++++- 15 files changed, 120 insertions(+), 41 deletions(-) diff --git a/code/__HELPERS/spawns.dm b/code/__HELPERS/spawns.dm index da3d7c82642..2c93e4ba19e 100644 --- a/code/__HELPERS/spawns.dm +++ b/code/__HELPERS/spawns.dm @@ -25,8 +25,11 @@ var/obj/structure/closet/supplypod/podspawn/pod = new spawn_type(null, style) if(paths_to_spawn && !islist(paths_to_spawn)) paths_to_spawn = list(paths_to_spawn) - for(var/atom/path as anything in paths_to_spawn) - path = new path(pod) + for(var/atom/movable/path as anything in paths_to_spawn) + if(!ispath(path)) + path.forceMove(pod) + else + path = new path(pod) //remove non var edits from specifications specifications -= "target" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index b187a4217c0..82ea923c5b7 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -139,7 +139,7 @@ GLOBAL_VAR_INIT(cops_arrived, FALSE) return battlecruiser_called = TRUE caller_card.use_charge(user) - addtimer(CALLBACK(GLOBAL_PROC, /proc/summon_battlecruiser), rand(3 MINUTES, 5 MINUTES)) //skyrat edit: original values (20 SECONDS, 1 MINUTES) + addtimer(CALLBACK(GLOBAL_PROC, /proc/summon_battlecruiser, caller_card.team), rand(3 MINUTES, 5 MINUTES)) //skyrat edit: original values (20 SECONDS, 1 MINUTES) playsound(src, 'sound/machines/terminal_alert.ogg', 50, FALSE) priority_announce("Attention crew: deep-space sensors detect a Syndicate battlecruiser-class signature subspace rift forming near your station. Estimated time until arrival: three to five minutes.", "[command_name()] High-Priority Update") //skyrat add: announcement on battlecruiser call return diff --git a/code/game/objects/items/emags.dm b/code/game/objects/items/emags.dm index 5af3ce53824..dea07ab43cf 100644 --- a/code/game/objects/items/emags.dm +++ b/code/game/objects/items/emags.dm @@ -144,6 +144,8 @@ worn_icon_state = "battlecruisercaller" ///whether we have called the battlecruiser var/used = FALSE + /// The battlecruiser team that the battlecruiser will get added to + var/datum/team/battlecruiser/team /obj/item/card/emag/battlecruiser/proc/use_charge(mob/user) used = TRUE diff --git a/code/modules/antagonists/traitor/objectives/assassination.dm b/code/modules/antagonists/traitor/objectives/assassination.dm index b3013453cd8..cc7df5d2cac 100644 --- a/code/modules/antagonists/traitor/objectives/assassination.dm +++ b/code/modules/antagonists/traitor/objectives/assassination.dm @@ -21,9 +21,8 @@ progression_minimum = 30 MINUTES - //this is a prototype so this progression is for all basic level kill objectives - progression_reward = list(5 MINUTES, 7 MINUTES) - telecrystal_reward = list(2, 4) + progression_reward = 2 MINUTES + telecrystal_reward = list(1, 2) // The code below is for limiting how often you can get this objective. You will get this objective at a maximum of maximum_objectives_in_period every objective_period /// The objective period at which we consider if it is an 'objective'. Set to 0 to accept all objectives. @@ -52,8 +51,8 @@ var/obj/item/paper/calling_card/card /datum/traitor_objective/assassinate/calling_card/heads_of_staff - progression_reward = list(7 MINUTES, 10 MINUTES) - telecrystal_reward = list(4, 8) + progression_reward = 4 MINUTES + telecrystal_reward = list(3, 4) heads_of_staff = TRUE @@ -67,8 +66,8 @@ var/obj/item/bodypart/head/behead_goal /datum/traitor_objective/assassinate/behead/heads_of_staff - progression_reward = list(7 MINUTES, 15 MINUTES) - telecrystal_reward = list(4, 8) + progression_reward = 4 MINUTES + telecrystal_reward = list(3, 4) heads_of_staff = TRUE diff --git a/code/modules/antagonists/traitor/objectives/destroy_item.dm b/code/modules/antagonists/traitor/objectives/destroy_item.dm index 6645de21b70..dfcc8a4606f 100644 --- a/code/modules/antagonists/traitor/objectives/destroy_item.dm +++ b/code/modules/antagonists/traitor/objectives/destroy_item.dm @@ -4,7 +4,7 @@ progression_minimum = 20 MINUTES progression_reward = 5 MINUTES - telecrystal_reward = list(2, 4) + telecrystal_reward = 0 var/list/possible_items = list() /// The current target item that we are stealing. @@ -20,7 +20,7 @@ progression_minimum = 10 MINUTES progression_maximum = 35 MINUTES progression_reward = list(5 MINUTES, 10 MINUTES) - telecrystal_reward = list(2, 4) + telecrystal_reward = 1 possible_items = list( /datum/objective_item/steal/low_risk/bartender_shotgun, @@ -31,7 +31,7 @@ /datum/traitor_objective/destroy_item/very_risky progression_minimum = 40 MINUTES progression_reward = 15 MINUTES - telecrystal_reward = list(4, 6) + telecrystal_reward = 3 possible_items = list( /datum/objective_item/steal/blackbox, diff --git a/code/modules/antagonists/traitor/objectives/final_objective/battlecruiser.dm b/code/modules/antagonists/traitor/objectives/final_objective/battlecruiser.dm index 995014aef5d..93179a8ed9a 100644 --- a/code/modules/antagonists/traitor/objectives/final_objective/battlecruiser.dm +++ b/code/modules/antagonists/traitor/objectives/final_objective/battlecruiser.dm @@ -9,6 +9,8 @@ /// Checks whether we have sent the card to the traitor yet. var/sent_accesscard = FALSE + /// Battlecruiser team that we get assigned to + var/datum/team/battlecruiser/team /datum/traitor_objective/final/battlecruiser/generate_objective(datum/mind/generating_for, list/possible_duplicates) if(!can_take_final_objective()) @@ -25,6 +27,17 @@ return TRUE +/datum/traitor_objective/final/battlecruiser/on_objective_taken(mob/user) + . = ..() + team = new() + var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list + if(nuke.r_code == "ADMIN") + nuke.r_code = random_nukecode() + team.nuke = nuke + team.update_objectives() + handler.owner.add_antag_datum(/datum/antagonist/battlecruiser/ally, team) + + /datum/traitor_objective/final/battlecruiser/generate_ui_buttons(mob/user) var/list/buttons = list() if(!sent_accesscard) @@ -38,10 +51,12 @@ if(sent_accesscard) return sent_accesscard = TRUE + var/obj/item/card/emag/battlecruiser/emag_card = new() + emag_card.team = team podspawn(list( "target" = get_turf(user), "style" = STYLE_SYNDICATE, - "spawn" = /obj/item/card/emag/battlecruiser, + "spawn" = emag_card, )) #undef MIN_GHOSTS_FOR_BATTLECRUISER diff --git a/code/modules/antagonists/traitor/objectives/kill_pet.dm b/code/modules/antagonists/traitor/objectives/kill_pet.dm index 1be2f5a8cb0..9ad19c01630 100644 --- a/code/modules/antagonists/traitor/objectives/kill_pet.dm +++ b/code/modules/antagonists/traitor/objectives/kill_pet.dm @@ -11,7 +11,7 @@ /datum/traitor_objective/kill_pet name = "Kill the %DEPARTMENT HEAD%'s beloved %PET%" description = "The %DEPARTMENT HEAD% has particularly annoyed us by sending us spam emails and we want their %PET% dead to show them what happens when they cross us. " - telecrystal_reward = list(1, 3) + telecrystal_reward = list(1, 2) progression_reward = list(3 MINUTES, 6 MINUTES) @@ -40,7 +40,7 @@ /datum/traitor_objective/kill_pet/high_risk progression_minimum = 25 MINUTES progression_reward = list(14 MINUTES, 18 MINUTES) - telecrystal_reward = list(3, 5) + telecrystal_reward = list(2, 3) limited_to_department_head = FALSE possible_heads = list( diff --git a/code/modules/antagonists/traitor/objectives/steal.dm b/code/modules/antagonists/traitor/objectives/steal.dm index a861ef4f509..37de558a352 100644 --- a/code/modules/antagonists/traitor/objectives/steal.dm +++ b/code/modules/antagonists/traitor/objectives/steal.dm @@ -51,7 +51,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) progression_minimum = 20 MINUTES progression_reward = 5 MINUTES - telecrystal_reward = list(2, 4) + telecrystal_reward = 0 var/list/possible_items = list() /// The current target item that we are stealing. @@ -76,7 +76,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) progression_maximum = 20 MINUTES progression_reward = list(5 MINUTES, 10 MINUTES) - telecrystal_reward = 2 + telecrystal_reward = 0 possible_items = list( /datum/objective_item/steal/low_risk/techboard/borgupload, /datum/objective_item/steal/low_risk/techboard/aiupload, @@ -87,7 +87,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) progression_minimum = 10 MINUTES progression_maximum = 35 MINUTES progression_reward = list(5 MINUTES, 10 MINUTES) - telecrystal_reward = 2 + telecrystal_reward = 0 possible_items = list( /datum/objective_item/steal/low_risk/cargo_budget, @@ -97,7 +97,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /datum/traitor_objective/steal_item/somewhat_risky progression_minimum = 20 MINUTES progression_reward = 5 MINUTES - telecrystal_reward = list(2, 3) + telecrystal_reward = 1 possible_items = list( /datum/objective_item/steal/magboots, @@ -110,7 +110,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /datum/traitor_objective/steal_item/risky progression_minimum = 30 MINUTES progression_reward = 13 MINUTES - telecrystal_reward = list(3, 5) + telecrystal_reward = 2 possible_items = list( /datum/objective_item/steal/reflector, @@ -122,7 +122,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /datum/traitor_objective/steal_item/very_risky progression_minimum = 40 MINUTES progression_reward = 17 MINUTES - telecrystal_reward = list(4, 7) + telecrystal_reward = 3 possible_items = list( /datum/objective_item/steal/hoslaser, @@ -134,7 +134,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /datum/traitor_objective/steal_item/most_risky progression_minimum = 50 MINUTES progression_reward = 25 MINUTES - telecrystal_reward = list(8, 12) + telecrystal_reward = 5 possible_items = list( /datum/objective_item/steal/nukedisc, diff --git a/code/modules/antagonists/traitor/uplink_handler.dm b/code/modules/antagonists/traitor/uplink_handler.dm index 6c48e71156f..92430c5a60c 100644 --- a/code/modules/antagonists/traitor/uplink_handler.dm +++ b/code/modules/antagonists/traitor/uplink_handler.dm @@ -65,7 +65,8 @@ if(length(to_purchase.restricted_species) && !(assigned_species in to_purchase.restricted_species)) return FALSE - var/stock = item_stock[to_purchase] || INFINITY + var/current_stock = item_stock[to_purchase] + var/stock = current_stock != null? current_stock : INFINITY if(telecrystals < to_purchase.cost || stock <= 0 || (has_progression && progression_points < to_purchase.progression_minimum)) return FALSE @@ -75,13 +76,13 @@ if(!can_purchase_item(user, to_purchase)) return - if(to_purchase.limited_stock != -1 && !(to_purchase.type in item_stock)) + if(to_purchase.limited_stock != -1 && !(to_purchase in item_stock)) item_stock[to_purchase] = to_purchase.limited_stock telecrystals -= to_purchase.cost to_purchase.purchase(user, src) - if(to_purchase.type in item_stock) + if(to_purchase in item_stock) item_stock[to_purchase] -= 1 SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(to_purchase.name)]", "[to_purchase.cost]")) diff --git a/code/modules/mob_spawn/ghost_roles/space_roles.dm b/code/modules/mob_spawn/ghost_roles/space_roles.dm index b9a06c5b3a8..40b6a4241fa 100644 --- a/code/modules/mob_spawn/ghost_roles/space_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/space_roles.dm @@ -154,6 +154,10 @@ to_chat(owner, span_big("You are a [name]!")) owner.announce_objectives() +/datum/antagonist/battlecruiser/ally + name = "Battlecruiser Ally" + show_to_ghosts = FALSE + /datum/antagonist/battlecruiser/captain name = "Battlecruiser Captain" antag_hud_name = "battlecruiser_lead" diff --git a/code/modules/shuttle/battlecruiser_starfury.dm b/code/modules/shuttle/battlecruiser_starfury.dm index 7039ac6527a..72b837dcb5d 100644 --- a/code/modules/shuttle/battlecruiser_starfury.dm +++ b/code/modules/shuttle/battlecruiser_starfury.dm @@ -139,7 +139,7 @@ * Summons the SBC Starfury, a large syndicate battlecruiser, in Deep Space. * It can be piloted into the station's area. */ -/proc/summon_battlecruiser() +/proc/summon_battlecruiser(datum/team/battlecruiser/team) var/list/candidates = poll_ghost_candidates("Do you wish to be considered for battlecruiser crew?", ROLE_TRAITOR) shuffle_inplace(candidates) @@ -158,12 +158,13 @@ if(!ship.load(battlecruiser_loading_turf)) CRASH("Loading battlecruiser ship failed!") - var/datum/team/battlecruiser/team = new() - var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list - if(nuke.r_code == "ADMIN") - nuke.r_code = random_nukecode() - team.nuke = nuke - team.update_objectives() + if(!team) + team = new() + var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in GLOB.nuke_list + if(nuke.r_code == "ADMIN") + nuke.r_code = random_nukecode() + team.nuke = nuke + team.update_objectives() for(var/turf/open/spawned_turf as anything in ship.get_affected_turfs(battlecruiser_loading_turf)) //not as anything to filter out closed turfs for(var/obj/effect/mob_spawn/ghost_role/human/syndicate/battlecruiser/spawner in spawned_turf) diff --git a/code/modules/uplink/uplink_items/nukeops.dm b/code/modules/uplink/uplink_items/nukeops.dm index 88a532a0e18..3a816708866 100644 --- a/code/modules/uplink/uplink_items/nukeops.dm +++ b/code/modules/uplink/uplink_items/nukeops.dm @@ -626,13 +626,6 @@ cost = 15 purchasable_from = UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS -/datum/uplink_item/suits/noslip - name = "MODsuit Anti-Slip Module" - desc = "A MODsuit module preventing the user from slipping on water." - item = /obj/item/mod/module/noslip - cost = 4 - purchasable_from = UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS - /datum/uplink_item/suits/paint name = "MODsuit Funny Paint Kit" desc = "A highly advanced piece of technology that will change the theme \ diff --git a/code/modules/uplink/uplink_items/stealthy_tools.dm b/code/modules/uplink/uplink_items/stealthy_tools.dm index 86b5b3d0a33..1415d30b0a6 100644 --- a/code/modules/uplink/uplink_items/stealthy_tools.dm +++ b/code/modules/uplink/uplink_items/stealthy_tools.dm @@ -92,3 +92,37 @@ item = /obj/item/clothing/shoes/chameleon/noslip cost = 2 purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) + +// High progression cost + +/datum/uplink_item/stealthy_tools/telecomm_blackout + name = "Disable Telecomms" + desc = "When purchased, a virus will be uploaded to the telecommunication processing servers to temporarily disable themselves." + item = /obj/effect/gibspawner/generic + surplus = 0 + progression_minimum = 30 MINUTES + limited_stock = 1 + cost = 4 + restricted = TRUE + purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) + +/datum/uplink_item/stealthy_tools/telecomm_blackout/spawn_item(spawn_path, mob/user, datum/uplink_handler/uplink_handler, atom/movable/source) + var/datum/round_event_control/event = locate(/datum/round_event_control/communications_blackout) in SSevents.control + event.runEvent() + return source //For log icon + +/datum/uplink_item/stealthy_tools/blackout + name = "Trigger Stationwide Blackout" + desc = "When purchased, a virus will be uploaded to the engineering processing servers to force a routine power grid check, forcing all APCs on the station to be temporarily disabled." + item = /obj/effect/gibspawner/generic + surplus = 0 + progression_minimum = 40 MINUTES + limited_stock = 1 + cost = 6 + restricted = TRUE + purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) + +/datum/uplink_item/stealthy_tools/blackout/spawn_item(spawn_path, mob/user, datum/uplink_handler/uplink_handler, atom/movable/source) + var/datum/round_event_control/event = locate(/datum/round_event_control/grid_check) in SSevents.control + event.runEvent() + return source //For log icon diff --git a/code/modules/uplink/uplink_items/suits.dm b/code/modules/uplink/uplink_items/suits.dm index 0f1f14340f3..39ad7065638 100644 --- a/code/modules/uplink/uplink_items/suits.dm +++ b/code/modules/uplink/uplink_items/suits.dm @@ -49,3 +49,22 @@ item = /obj/item/mod/module/visor/night progression_minimum = 20 MINUTES cost = 2 + +// Very high progression cost + +/datum/uplink_item/suits/modsuit/elite_traitor + name = "Elite Syndicate MODsuit" + desc = "An upgraded, elite version of the Syndicate MODsuit. It features fireproofing, and also \ + provides the user with superior armor and mobility compared to the standard Syndicate MODsuit." + item = /obj/item/mod/control/pre_equipped/elite + // This one costs more than the nuke op counterpart + purchasable_from = ~(UPLINK_NUKE_OPS | UPLINK_CLOWN_OPS) + progression_minimum = 90 MINUTES + cost = 16 + +/datum/uplink_item/suits/noslip + name = "MODsuit Anti-Slip Module" + desc = "A MODsuit module preventing the user from slipping on water." + item = /obj/item/mod/module/noslip + progression_minimum = 90 MINUTES + cost = 4 diff --git a/tgui/packages/tgui/interfaces/Uplink/index.tsx b/tgui/packages/tgui/interfaces/Uplink/index.tsx index 6cfd4edc5cf..c337aa5db84 100644 --- a/tgui/packages/tgui/interfaces/Uplink/index.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/index.tsx @@ -170,9 +170,17 @@ export class Uplink extends Component<{}, UplinkState> { } for (let i = 0; i < itemsToAdd.length; i++) { const item = itemsToAdd[i]; - const canBuy = telecrystals >= item.cost; const hasEnoughProgression = progression_points >= item.progression_minimum; + + let stock: number|null = current_stock[item.id]; + if (item.ref) { + stock = extra_purchasable_stock[item.ref]; + } + if (!stock && stock !== 0) { + stock = null; + } + const canBuy = telecrystals >= item.cost && (stock === null || stock > 0); items.push({ id: item.id, name: item.name,