From 2a1f8b50871753b6b49e7134a6dff8d6505fdcb6 Mon Sep 17 00:00:00 2001
From: Bokkiewokkie <43698041+Bokkiewokkie@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:26:07 +0100
Subject: [PATCH] Round extension and enemy spawning tweaks (#2572)
---
nsv13/code/controllers/subsystem/overmap_mode.dm | 15 ++++++++++++---
nsv13/code/datums/starsystem_manager.dm | 9 ++++++++-
.../game/gamemodes/overmap/objectives/rubicon.dm | 6 ++++--
nsv13/code/modules/overmap/factions.dm | 2 +-
.../packages/tgui/interfaces/StarsystemManager.js | 6 +++++-
5 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/nsv13/code/controllers/subsystem/overmap_mode.dm b/nsv13/code/controllers/subsystem/overmap_mode.dm
index c0690a54508..51d0613b765 100644
--- a/nsv13/code/controllers/subsystem/overmap_mode.dm
+++ b/nsv13/code/controllers/subsystem/overmap_mode.dm
@@ -273,14 +273,18 @@ SUBSYSTEM_DEF(overmap_mode)
*/
var/text = "[GLOB.station_name],
You have been assigned the following mission by [capitalize(mode.starting_faction)] and are expected to complete it with all due haste. Please ensure your crew is properly informed of your objectives and delegate tasks accordingly."
- var/title = "Mission Briefing: [random_capital_letter()][random_capital_letter()][random_capital_letter()]-[GLOB.round_id]"
+ var/static/title = ""
+ if(!announced_objectives)
+ title += "Mission Briefing: [random_capital_letter()][random_capital_letter()][random_capital_letter()]-[GLOB.round_id]"
+ else //Add an extension if this isn't roundstart
+ title += "-Ext."
text = "[text]
[mode.brief]
Objectives:"
for(var/datum/overmap_objective/O in mode.objectives)
text = "[text]
- [O.brief]"
- if ( !SSovermap_mode.announced_objectives ) // Prevents duplicate report spam when assigning additional objectives
+ if(!SSovermap_mode.announced_objectives) // Prevents duplicate report spam when assigning additional objectives
O.print_objective_report()
print_command_report(text, title, TRUE)
@@ -325,10 +329,15 @@ SUBSYSTEM_DEF(overmap_mode)
mode.objectives += new /datum/overmap_objective/tickets
*/
- if(get_active_player_count(TRUE,TRUE,FALSE) > 4)
+ var/datum/star_system/rubicon = SSstar_system.system_by_id("Rubicon")
+ if(get_active_player_count(TRUE,TRUE,FALSE) > 10 && length(rubicon.enemies_in_system)) //Make sure there are enemies to fight
mode.objectives += new /datum/overmap_objective/clear_system/rubicon
else
mode.objectives += new /datum/overmap_objective/tickets
+ for(var/datum/faction/F in SSstar_system.factions)
+ F.send_fleet(custom_difficulty = (mode.difficulty + 1)) //Extension is more challenging
+ escalation += 1
+ message_admins("Overmap difficulty has been increased by 1!")
instance_objectives()
diff --git a/nsv13/code/datums/starsystem_manager.dm b/nsv13/code/datums/starsystem_manager.dm
index 4931393b614..77692b51d3d 100644
--- a/nsv13/code/datums/starsystem_manager.dm
+++ b/nsv13/code/datums/starsystem_manager.dm
@@ -49,10 +49,12 @@
sys_inf["visited"] = 0
sys_inf["hidden"] = (SS.sector != current_sector)
var/label = ""
+ if(SS.hidden)
+ label += " HIDDEN"
if(SS.is_hypergate)
label += " HYPERGATE"
if(SS.is_capital && !label)
- label = "CAPITAL"
+ label = " CAPITAL"
if(SS.trader && SS.sector != 3) //Use shortnames in brazil for readability
label = " [SS.trader.name]"
if(SS.trader && SS.sector == 3) //Use shortnames in brazil for readability
@@ -220,6 +222,11 @@
usr.client.debug_variables(target)
if(command == "Delete")
usr.client.cmd_admin_delete(target)
+ if("hideSystem")
+ var/datum/star_system/target = locate(params["sys_id"])
+ if(!istype(target))
+ return
+ target.hidden = !target.hidden
if("systemVV")
var/datum/star_system/target = locate(params["sys_id"])
if(!istype(target))
diff --git a/nsv13/code/game/gamemodes/overmap/objectives/rubicon.dm b/nsv13/code/game/gamemodes/overmap/objectives/rubicon.dm
index 09061c2c5d4..621e1067838 100644
--- a/nsv13/code/game/gamemodes/overmap/objectives/rubicon.dm
+++ b/nsv13/code/game/gamemodes/overmap/objectives/rubicon.dm
@@ -26,6 +26,7 @@
desc = "Defeat all enemies in the [system_name] system"
brief = desc
target_system = SSstar_system.system_by_id(system_name)
+ target_system.hidden = FALSE
RegisterSignal(SSstar_system.find_main_overmap(), COMSIG_SHIP_KILLED_FLEET, PROC_REF(check_completion))
/datum/overmap_objective/clear_system/check_completion()
@@ -38,8 +39,9 @@
/datum/overmap_objective/clear_system/rubicon
system_name = "Rubicon"
extension_supported = TRUE
- required_players = 4
+ required_players = 10
/datum/overmap_objective/clear_system/dolos
system_name = "Dolos Remnants"
- required_players = 4
+ extension_supported = TRUE //Only if Rubicon is not available
+ required_players = 10
diff --git a/nsv13/code/modules/overmap/factions.dm b/nsv13/code/modules/overmap/factions.dm
index e7ea53482de..c01aef381d2 100644
--- a/nsv13/code/modules/overmap/factions.dm
+++ b/nsv13/code/modules/overmap/factions.dm
@@ -74,7 +74,7 @@ Set up relationships.
if(main_ship)
current_system = SSstar_system.ships[main_ship]["current_system"]
var/list/possible_spawns = list()
- for(var/datum/star_system/starsys in SSstar_system.systems)
+ for(var/datum/star_system/starsys in SSstar_system.neutral_zone_systems) //Neutral zone to prevent overcrowding the Syndicate and friendly sectors
if(starsys != current_system && !starsys.hidden && (lowertext(starsys.alignment) == lowertext(src.name) || starsys.alignment == "unaligned" || starsys.alignment == "uncharted")) //Find one of our base systems and try to send a fleet out from there.
possible_spawns += starsys
if(!possible_spawns.len && !override)
diff --git a/tgui/packages/tgui/interfaces/StarsystemManager.js b/tgui/packages/tgui/interfaces/StarsystemManager.js
index 7ad69b1d5d9..66ec246f72f 100644
--- a/tgui/packages/tgui/interfaces/StarsystemManager.js
+++ b/tgui/packages/tgui/interfaces/StarsystemManager.js
@@ -46,13 +46,17 @@ export const StarsystemManager = (props, context) => {
return (