Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round extension and enemy spawning tweaks #2572

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions nsv13/code/controllers/subsystem/overmap_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,18 @@ SUBSYSTEM_DEF(overmap_mode)
*/

var/text = "<b>[GLOB.station_name]</b>, <br>You have been assigned the following mission by <b>[capitalize(mode.starting_faction)]</b> 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] <br><br> [mode.brief] <br><br> Objectives:"

for(var/datum/overmap_objective/O in mode.objectives)
text = "[text] <br> - [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)
Expand Down Expand Up @@ -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()

Expand Down
9 changes: 8 additions & 1 deletion nsv13/code/datums/starsystem_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
6 changes: 4 additions & 2 deletions nsv13/code/game/gamemodes/overmap/objectives/rubicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
DeltaFire15 marked this conversation as resolved.
Show resolved Hide resolved
required_players = 10
Bokkiewokkie marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion nsv13/code/modules/overmap/factions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion tgui/packages/tgui/interfaces/StarsystemManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ export const StarsystemManager = (props, context) => {
return (
<Section title={`${system.name}`}>
<Button
content={"Send Fleet"}
content={"Send fleet"}
icon={"hammer"}
onClick={() => act('createFleet', { sys_id: system.sys_id })} />
<Button
content={"Create object"}
icon={"sun"}
onClick={() => act('createObject', { sys_id: system.sys_id })} />
<Button
content={"Hide/Unhide system"}
icon={"eye-slash"}
onClick={() => act('hideSystem', { sys_id: system.sys_id })} />
<Button
content={"Variables"}
icon={"eye"}
Expand Down
Loading