Skip to content
Open
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
34 changes: 0 additions & 34 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -457,40 +457,6 @@
give_show_report_button(C)
CHECK_TICK

/datum/controller/subsystem/ticker/proc/overmap_report() //NSV13
var/list/parts = list()
parts += "<b>[SSovermap_mode.mode.name]</b>"
parts += "" //Line Break
parts += "Objectives:"
for(var/datum/overmap_objective/O in SSovermap_mode.mode.objectives)
switch(O.status)
if(0,2)
parts += "[O.brief]: <font color=red><b>FAILED</b></font>"
if(1,3)
parts += "[O.brief]: <font color=green><b>COMPLETED</b></font>"

parts += "" //Line Break
var/did_you_win_son = FALSE
var/objective_check = 0
for(var/datum/overmap_objective/O in SSovermap_mode.mode.objectives)
if(O.status == 3) //Victory override check
did_you_win_son = TRUE
break

else if(O.status == 1)
objective_check ++

if(objective_check >= SSovermap_mode.mode.objectives.len)
did_you_win_son = TRUE

if(did_you_win_son)
parts += "The crew of the [GLOB.station_name] <font color=green><b>COMPLETED</b></font> their mission for [capitalize(SSovermap_mode.mode.starting_faction)]<b>"
return "<div class='panel greenborder'>[parts.Join("<br>")]</div>"

else
parts += "The crew of the [GLOB.station_name] <font color=red><b>FAILED</b></font> their mission for [capitalize(SSovermap_mode.mode.starting_faction)]<b>"
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"

/datum/controller/subsystem/ticker/proc/law_report()
var/list/parts = list()
var/borg_spacer = FALSE //inserts an extra linebreak to seperate AIs from independent borgs, and then multiple independent borgs.
Expand Down
2 changes: 2 additions & 0 deletions nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3708,6 +3708,7 @@
#include "nsv13\code\__HELPERS\names.dm"
#include "nsv13\code\__HELPERS\overmap.dm"
#include "nsv13\code\__HELPERS\priority_announce.dm"
#include "nsv13\code\__HELPERS\roundend.dm"
#include "nsv13\code\__HELPERS\text.dm"
#include "nsv13\code\_globalvars\misc.dm"
#include "nsv13\code\_globalvars\ships.dm"
Expand Down Expand Up @@ -3769,6 +3770,7 @@
#include "nsv13\code\game\gamemodes\overmap\shakedown.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\apnw_efficiency.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\board_ship.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\control_system.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\destroy_fleet.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\perform_jumps.dm"
#include "nsv13\code\game\gamemodes\overmap\objectives\rubicon.dm"
Expand Down
11 changes: 11 additions & 0 deletions nsv13/code/__DEFINES/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,14 @@ GLOBAL_LIST_INIT(overmap_impact_sounds, list('nsv13/sound/effects/ship/freespace

//Interior instancing comsig, aka cursed things.
#define COMSIG_INTERIOR_DONE_LOADING "interior_done_loading"

//Overmap mode
#define OBJECTIVE_STATUS_INPROGRESS 0
#define OBJECTIVE_STATUS_COMPLETED 1
#define OBJECTIVE_STATUS_FAILED 2
#define OBJECTIVE_STATUS_OVERRIDE 3

#define MODE_REMINDER_OBJECTIVES 0
#define MODE_REMINDER_COMBAT_RESET 1
#define MODE_REMINDER_COMBAT_DELAY 2
#define MODE_REMINDER_OVERRIDE 3
33 changes: 33 additions & 0 deletions nsv13/code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/datum/controller/subsystem/ticker/proc/overmap_report()
var/list/parts = list()
parts += "<b>[SSovermap_mode.mode.name]</b>"
parts += "" //Line Break
parts += "Objectives:"
for(var/datum/overmap_objective/O in SSovermap_mode.mode.objectives)
switch(O.status)
if(OBJECTIVE_STATUS_INPROGRESS,OBJECTIVE_STATUS_FAILED)
parts += "[O.brief]: <font color=red><b>FAILED</b></font>"
if(OBJECTIVE_STATUS_COMPLETED,OBJECTIVE_STATUS_OVERRIDE)
parts += "[O.brief]: <font color=green><b>COMPLETED</b></font>"

parts += "" //Line Break
var/did_you_win_son = FALSE
var/objective_check = 0
for(var/datum/overmap_objective/O in SSovermap_mode.mode.objectives)
if(O.status == OBJECTIVE_STATUS_OVERRIDE) //Victory override check
did_you_win_son = TRUE
break

else if(O.status == OBJECTIVE_STATUS_COMPLETED)
objective_check ++

if(objective_check >= SSovermap_mode.mode.objectives.len)
did_you_win_son = TRUE

if(did_you_win_son)
parts += "The crew of the [GLOB.station_name] <font color=green><b>COMPLETED</b></font> their mission for [capitalize(SSovermap_mode.mode.starting_faction)]<b>"
return "<div class='panel greenborder'>[parts.Join("<br>")]</div>"

else
parts += "The crew of the [GLOB.station_name] <font color=red><b>FAILED</b></font> their mission for [capitalize(SSovermap_mode.mode.starting_faction)]<b>"
return "<div class='panel redborder'>[parts.Join("<br>")]</div>"
62 changes: 19 additions & 43 deletions nsv13/code/controllers/subsystem/overmap_mode.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
//The NSV13 Version of Game Mode, except it for the overmap and runs parallel to Game Mode

#define STATUS_INPROGRESS 0
#define STATUS_COMPLETED 1
#define STATUS_FAILED 2
#define STATUS_OVERRIDE 3

#define REMINDER_OBJECTIVES 0
#define REMINDER_COMBAT_RESET 1
#define REMINDER_COMBAT_DELAY 2
#define REMINDER_OVERRIDE 3

SUBSYSTEM_DEF(overmap_mode)
name = "overmap_mode"
wait = 10
Expand Down Expand Up @@ -151,14 +141,14 @@ SUBSYSTEM_DEF(overmap_mode)
return
mode_initialised = TRUE
switch(mode.objective_reminder_setting) //Load the reminder settings
if(REMINDER_OBJECTIVES)
if(MODE_REMINDER_OBJECTIVES)
objective_resets_reminder = TRUE
if(REMINDER_COMBAT_RESET)
if(MODE_REMINDER_COMBAT_RESET)
combat_resets_reminder = TRUE
if(REMINDER_COMBAT_DELAY)
if(MODE_REMINDER_COMBAT_DELAY)
combat_delays_reminder = TRUE
combat_delay_amount = mode.combat_delay
if(REMINDER_OVERRIDE)
if(MODE_REMINDER_OVERRIDE)
objective_reminder_override = TRUE

var/list/objective_pool = list() //Create instances of our objectives
Expand Down Expand Up @@ -395,7 +385,7 @@ SUBSYSTEM_DEF(overmap_mode)
var/difficulty = null //Difficulty of the gamemode as determined by player count / abus abuse: 1 is minimum, 10 is maximum
var/starting_system = null //Here we define where our player ships will start
var/starting_faction = null //Here we define which faction our player ships belong
var/objective_reminder_setting = REMINDER_OBJECTIVES //0 - Objectives reset remind. 1 - Combat resets reminder. 2 - Combat delays reminder. 3 - Disables reminder
var/objective_reminder_setting = MODE_REMINDER_OBJECTIVES //0 - Objectives reset remind. 1 - Combat resets reminder. 2 - Combat delays reminder. 3 - Disables reminder
var/objective_reminder_interval = 15 MINUTES //Interval between objective reminders
var/combat_delay = 0 //How much time is added to the reminder timer
var/list/objectives = list() //The actual gamemode objectives go here after being selected
Expand All @@ -413,11 +403,6 @@ SUBSYSTEM_DEF(overmap_mode)
var/reminder_four = "This is Centcomm to the vessel currently assigned to the Rosetta Cluster, you are expected to fulfill your assigned mission"
var/reminder_five = "This is Centcomm, due to your slow pace, a Syndicate Interdiction fleet has tracked you down, prepare for combat!"

/datum/overmap_gamemode/New()
objectives = list(
/datum/overmap_objective/perform_jumps
)

/datum/overmap_gamemode/Destroy()
if(length(objectives))
QDEL_LIST(objectives)
Expand Down Expand Up @@ -463,25 +448,27 @@ SUBSYSTEM_DEF(overmap_mode)
var/failed = FALSE
for(var/datum/overmap_objective/O in objectives)
O.check_completion() //First we try to check completion on each objective
if(O.status == STATUS_OVERRIDE) //Victory override check
if(O.status == OBJECTIVE_STATUS_OVERRIDE) //Victory override check
victory()
return
else if(O.status == STATUS_COMPLETED)
else if(O.status == OBJECTIVE_STATUS_COMPLETED)
objective_check ++
successes++
else if(O.status == STATUS_FAILED)
else if(O.status == OBJECTIVE_STATUS_FAILED)
objective_check ++
if(O.ignore_check == TRUE) //This was a gamemode objective
failed = TRUE
if(successes > SSovermap_mode.highest_objective_completion)
SSovermap_mode.modify_threat_elevation(-TE_OBJECTIVE_THREAT_NEGATION * (successes - SSovermap_mode.highest_objective_completion))
SSovermap_mode.highest_objective_completion = successes
/*
if(istype(SSticker.mode, /datum/game_mode/pvp)) //If the gamemode is PVP and a faction has over a 700 points, they win.
for(var/datum/faction/F in SSstar_system.factions)
var/datum/game_mode/pvp/mode = SSticker.mode
if(F.tickets >= 700)
mode.winner = F //This should allow the mode to finish up by itself
mode.check_finished()
*/
if((objective_check >= objective_length) && !failed)
var/achievement_type
if(!SSovermap_mode.round_extended)
Expand Down Expand Up @@ -538,16 +525,14 @@ SUBSYSTEM_DEF(overmap_mode)
var/binary = TRUE //Is this just a simple T/F objective?
var/tally = 0 //How many of the objective goal has been completed
var/target = 0 //How many of the objective goal is required
var/status = STATUS_INPROGRESS //0 = In-progress, 1 = Completed, 2 = Failed, 3 = Victory Override (this will end the round)
var/status = OBJECTIVE_STATUS_INPROGRESS //0 = In-progress, 1 = Completed, 2 = Failed, 3 = Victory Override (this will end the round)
var/extension_supported = FALSE //Is this objective available to be a random extended round objective?
var/ignore_check = FALSE //Used for checking extended rounds
var/instanced = FALSE //Have we yet run the instance proc for this objective?
var/objective_number = 0 //The objective's index in the list. Useful for creating arbitrary report titles
var/required_players = 0 //Minimum number of players to get this if it's a random/extended objective
var/maximum_players = 0 //Maximum number of players to get this if it's a random/extended objective. 0 is unlimited.

/datum/overmap_objective/New()

/datum/overmap_objective/proc/instance() //Used to generate any in world assets
if ( SSovermap_mode.announced_objectives )
// If this objective was manually added by admins after announce, prints a new report. Otherwise waits for the gamemode to be announced before instancing reports
Expand Down Expand Up @@ -665,13 +650,13 @@ SUBSYSTEM_DEF(overmap_mode)
"Victory Override")
var/new_state = input("Select state to set", "Change Objective State") as null|anything in o_state
if(new_state == "In-Progress")
new_state = STATUS_INPROGRESS
new_state = OBJECTIVE_STATUS_INPROGRESS
else if(new_state == "Completed")
new_state = STATUS_COMPLETED
new_state = OBJECTIVE_STATUS_COMPLETED
else if(new_state == "Failed")
new_state = STATUS_FAILED
new_state = OBJECTIVE_STATUS_FAILED
else if(new_state == "Victory Override")
new_state = STATUS_OVERRIDE
new_state = OBJECTIVE_STATUS_OVERRIDE
var/datum/overmap_objective/O = locate(params["target"])
O.status = new_state
return TRUE
Expand Down Expand Up @@ -778,24 +763,15 @@ SUBSYSTEM_DEF(overmap_mode)
objective_data["name"] = O.name
objective_data["desc"] = O.desc
switch(O.status)
if(STATUS_INPROGRESS)
if(OBJECTIVE_STATUS_INPROGRESS)
objective_data["status"] = "In-Progress"
if(STATUS_COMPLETED)
if(OBJECTIVE_STATUS_COMPLETED)
objective_data["status"] = "Completed"
if(STATUS_FAILED)
if(OBJECTIVE_STATUS_FAILED)
objective_data["status"] = "Failed"
if(STATUS_OVERRIDE)
if(OBJECTIVE_STATUS_OVERRIDE)
objective_data["status"] = "Completed - VICTORY OVERRIDE"
objective_data["datum"] = "\ref[O]"
objectives[++objectives.len] = objective_data
data["objectives_list"] = objectives
return data

#undef STATUS_INPROGRESS
#undef STATUS_COMPLETED
#undef STATUS_FAILED
#undef STATUS_OVERRIDE
#undef REMINDER_OBJECTIVES
#undef REMINDER_COMBAT_RESET
#undef REMINDER_COMBAT_DELAY
#undef REMINDER_OVERRIDE
4 changes: 2 additions & 2 deletions nsv13/code/game/gamemodes/overmap/armada.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
starting_system = "Argo"
starting_faction = "nanotrasen"

objective_reminder_setting = 0 //We have strict timelines on this
objective_reminder_setting = MODE_REMINDER_OBJECTIVES //We have strict timelines on this
objective_reminder_interval = 3 MINUTES //60 Minutes Until Vanguard Arrives
reminder_one = "" //Countdown 1
reminder_two = "" //Countdown 2
Expand Down Expand Up @@ -55,7 +55,7 @@

for(var/datum/overmap_objective/O in objectives)
O.check_completion()
if(O.status == 1) //STATUS_COMPLETED
if(O.status == OBJECTIVE_STATUS_COMPLETED)
reinforcements ++ //For each side objective completed, add an NT fleet

addtimer(CALLBACK(src, PROC_REF(vanguard)), 1 MINUTES)
Expand Down
4 changes: 2 additions & 2 deletions nsv13/code/game/gamemodes/overmap/boarding_gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
brief = "You have been assigned to capture a syndicate vessel. Locate the target, eliminate any Syndicate forces with extreme prejudice, then change its transponder codes and bring it home."
starting_system = "Argo"
starting_faction = "nanotrasen"
objective_reminder_setting = 2 // Combat can postpone, but it's not the goal
objective_reminder_setting = MODE_REMINDER_COMBAT_DELAY // Combat can postpone, but it's not the goal
combat_delay = 10 MINUTES
selection_weight = 5
required_players = 14
fixed_objectives = list(/datum/overmap_objective/board_ship)
fixed_objectives = list(/datum/overmap_objective/perform_jumps, /datum/overmap_objective/board_ship)
3 changes: 2 additions & 1 deletion nsv13/code/game/gamemodes/overmap/courier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
starting_system = "Argo"
starting_faction = "nanotrasen"

objective_reminder_setting = 0
objective_reminder_setting = MODE_REMINDER_OBJECTIVES
reminder_one = "This is Centcomm to all vessels assigned to patrol the Rosetta Cluster, please continue on your delivery."
reminder_two = "This is Centcomm to all vessels assigned to patrol the Rosetta Cluster, we are not paying you to idle in space during your assignment."
reminder_three = "This is Centcomm to all vessels assigned to patrol the Rosetta Cluster, your inactivity has been noted and will not be tolerated."
Expand All @@ -21,6 +21,7 @@
debug_mode = FALSE

/datum/overmap_gamemode/courier/New()
. = ..()
random_objectives = subtypesof( /datum/overmap_objective/cargo/donation ) + subtypesof( /datum/overmap_objective/cargo/transfer )

if ( debug_mode ) // I upend your code for my personal pleasure
Expand Down
12 changes: 8 additions & 4 deletions nsv13/code/game/gamemodes/overmap/galactic_conquest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
brief = "Intel suggests that the Syndicate are mounting an all out assault on the Sol sector. Patrol this area and eliminate any Syndicate forces with extreme prejudice."
starting_system = "Argo"
starting_faction = "nanotrasen"
objective_reminder_setting = 3 //No external pressure in this round...
objective_reminder_setting = MODE_REMINDER_OVERRIDE //No external pressure in this round...
fixed_objectives = list(/datum/overmap_objective/tickets/nt) //Placeholder for now


/datum/overmap_gamemode/galactic_conquest/New()
fixed_objectives = list(/datum/overmap_objective/tickets/nt)
//Alternate mode of the galactic conquest gamemode - control a specific deepspace system.
/datum/overmap_gamemode/galactic_conquest/system_control
name = "System Control"
config_tag = "conquest"
desc = "PVP Gamemode - Control the target system for a certain amount of time, or destroy the enemy flagship."
brief = "Intel suggests that the Syndicate are attempting to stabilize a wormhole corridor leading directly to the core of the Sol sector. Make haste and prevent their success."
fixed_objectives = list(/datum/overmap_objective/control_system)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
APNW = locate() in GLOB.machines
if(!APNW)
message_admins("Overmap gamemode failed to locate APNW! Setting to auto-complete.")
status = 1
status = OBJECTIVE_STATUS_COMPLETED
else
target_efficiency = rand(60, 90) / 100
START_PROCESSING(SSprocessing, src)
Expand All @@ -24,10 +24,10 @@
check_completion()

/datum/overmap_objective/apnw_efficiency/check_completion()
if(status != 0)
if(status != OBJECTIVE_STATUS_INPROGRESS)
STOP_PROCESSING(SSprocessing, src)
return
if(APNW.repair_efficiency >= target_efficiency)
SSovermap_mode.update_reminder(objective=TRUE)
status = 1
status = OBJECTIVE_STATUS_COMPLETED
STOP_PROCESSING(SSprocessing, src)
4 changes: 2 additions & 2 deletions nsv13/code/game/gamemodes/overmap/objectives/board_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@

/datum/overmap_objective/board_ship/check_completion()
if (target_ship.faction == SSovermap_mode.mode.starting_faction)
status = 1
status = OBJECTIVE_STATUS_COMPLETED
target_ship.block_deletion = FALSE
target_ship.essential = FALSE
UnregisterSignal(target_ship, COMSIG_SHIP_BOARDED)
UnregisterSignal(target_ship, COMSIG_SHIP_RELEASE_BOARDING)

/datum/overmap_objective/board_ship/proc/release_boarding()
// Don't let them kill the ship if they haven't won yet
if(status != 1 && status != 3) // complete or admin override
if(status != OBJECTIVE_STATUS_COMPLETED && status != OBJECTIVE_STATUS_OVERRIDE) // complete or admin override
return COMSIG_SHIP_BLOCKS_RELEASE_BOARDING
return 0
6 changes: 3 additions & 3 deletions nsv13/code/game/gamemodes/overmap/objectives/cargo/_cargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
else
message_admins( "BUG: A cargo objective was assigned with no delivery item types set! Automatically marking as completed" )
brief = "Succeed"
status = 1
status = OBJECTIVE_STATUS_COMPLETED

/datum/overmap_objective/cargo/proc/pick_station()
// Pick a random existing station to give this objective to
Expand Down Expand Up @@ -95,7 +95,7 @@
if ( !delivered_package ) // Do not resend prepackaged contents
if ( !freight_type_group.deliver_package() )
message_admins( "BUG: A cargo objective failed to deliver a prepackaged item to the ship! Automatically marking the objective as completed." )
status = 1
status = OBJECTIVE_STATUS_COMPLETED
delivered_package = TRUE
SSovermap_mode.update_reminder(objective=TRUE) // Picking up objective cargo resets the timer

Expand Down Expand Up @@ -186,5 +186,5 @@
// No, I will not implement soft approvals where the players' trash is auto shipped back. If players can't follow basic directions on supply requests they shouldn't be allowed to greentext their basic objectives.
if ( last_freight_type_check.group_status && !length( last_freight_type_check.untracked_contents ) )
tally = target
status = 1
status = OBJECTIVE_STATUS_COMPLETED
return TRUE
Loading