From acedab1004e49e2265d34ba549fcb4fb715ce6ce Mon Sep 17 00:00:00 2001 From: Bokkiewokkie Date: Thu, 17 Aug 2023 15:16:43 +0200 Subject: [PATCH 1/4] Stop message spam --- code/game/machinery/computer/communications.dm | 4 ++-- nsv13/code/controllers/subsystem/overmap_mode.dm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 60468d9de16..e50c30c6c6f 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -338,12 +338,12 @@ log_game("[key_name(usr)] enabled emergency maintenance access.") message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.") deadchat_broadcast("[usr.real_name] enabled emergency maintenance access at [get_area_name(usr, TRUE)].", usr) - if("checkObjectives") + if("checkObjectives") //NSV13 overmap objectives if (!authenticated(usr)) return . = TRUE SSovermap_mode.mode.check_completion() - if(SSovermap_mode.objectives_completed && SSovermap_mode.round_extended) + if(SSovermap_mode.objectives_completed && SSovermap_mode.round_extended && !SSovermap_mode.already_ended) priority_announce("Auto-recall to Outpost 45 will occur once you are out of combat.", "[SSovermap_mode.mode.reminder_origin]") state = STATE_OBJECTIVES diff --git a/nsv13/code/controllers/subsystem/overmap_mode.dm b/nsv13/code/controllers/subsystem/overmap_mode.dm index d8db9194b93..e2cb707c811 100644 --- a/nsv13/code/controllers/subsystem/overmap_mode.dm +++ b/nsv13/code/controllers/subsystem/overmap_mode.dm @@ -303,7 +303,7 @@ SUBSYSTEM_DEF(overmap_mode) /datum/controller/subsystem/overmap_mode/proc/request_additional_objectives() for(var/datum/overmap_objective/O in mode.objectives) - O.ignore_check = TRUE //We no longer care about checking these objective against completeion + O.ignore_check = TRUE //We no longer care about checking these objective against completion var/list/extension_pool = subtypesof(/datum/overmap_objective) var/players = get_active_player_count(TRUE, TRUE, FALSE) //Number of living, non-AFK players including non-humanoids @@ -414,6 +414,7 @@ SUBSYSTEM_DEF(overmap_mode) return if(SSovermap_mode.objectives_completed) victory() + return var/objective_length = objectives.len var/objective_check = 0 @@ -435,9 +436,8 @@ SUBSYSTEM_DEF(overmap_mode) 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/X in SSstar_system.factions) + for(var/datum/faction/F in SSstar_system.factions) var/datum/game_mode/pvp/mode = SSticker.mode - var/datum/faction/F = X if(F.tickets >= 700) mode.winner = F //This should allow the mode to finish up by itself mode.check_finished() From 9e61ad671ca99c15d20d950005b8084c73393c12 Mon Sep 17 00:00:00 2001 From: Bokkiewokkie Date: Thu, 17 Aug 2023 17:14:42 +0200 Subject: [PATCH 2/4] Bag of marbles --- code/controllers/subsystem/vote.dm | 11 +++--- code/datums/map_config.dm | 3 ++ .../game/machinery/computer/communications.dm | 6 ++-- nsv13.dme | 3 +- nsv13/code/__DEFINES/overmap.dm | 9 +++++ nsv13/code/__DEFINES/ships.dm | 7 ---- nsv13/code/__DEFINES/starsystem.dm | 15 ++++++++ nsv13/code/_globalvars/starsystem.dm | 2 ++ .../controllers/subsystem/overmap_mode.dm | 17 +++++----- .../code/controllers/subsystem/starsystem.dm | 15 +++----- nsv13/code/game/gamemodes/overmap/armada.dm | 2 +- .../modules/overmap/FTL/components/drive.dm | 2 +- nsv13/code/modules/overmap/FTL/ftl_jump.dm | 34 +++++++++---------- 13 files changed, 73 insertions(+), 53 deletions(-) delete mode 100644 nsv13/code/__DEFINES/ships.dm create mode 100644 nsv13/code/__DEFINES/starsystem.dm create mode 100644 nsv13/code/_globalvars/starsystem.dm diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index e419df7e624..09752ac5e7b 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -91,9 +91,10 @@ SUBSYSTEM_DEF(vote) factor = 1.4 choices["Initiate Crew Transfer"] += round(non_voters.len * factor) else if(mode == "Press On Or Return Home?") //NSV13 - Round extension vote - choices["Return to Outpost 45"] += non_voters.len - if(choices["Return to Outpost 45"] >= greatest_votes) - greatest_votes = choices["Return to Outpost 45"] + var/datum/star_system/target = SSstar_system.return_system + choices["Return to [target.name]]"] += non_voters.len + if(choices["Return to [target.name]]"] >= greatest_votes) + greatest_votes = choices["Return to [target.name]"] //get all options with that many votes and return them in a list . = list() if(greatest_votes) @@ -182,9 +183,9 @@ SUBSYSTEM_DEF(vote) SSovermap_mode.already_ended = FALSE SSovermap_mode.objectives_completed = FALSE else - priority_announce("Returning to Outpost 45") //TEMP + priority_announce("Returning to [SSstar_system.return_system.name]") //TEMP var/obj/structure/overmap/OM = SSstar_system.find_main_overmap() - OM.force_return_jump(SSstar_system.system_by_id("Outpost 45")) + OM.force_return_jump() if(restart) var/active_admins = FALSE diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm index 3908227e93f..bee3792f3b4 100644 --- a/code/datums/map_config.dm +++ b/code/datums/map_config.dm @@ -26,6 +26,7 @@ var/list/omode_blacklist = list() //NSV13 - Blacklisted overmap modes - ie remove modes var/list/omode_whitelist = list() //NSV13 - Whitelisted overmap modes - ie add modes var/starmap_path = CONFIG_DIRECTORY + "/" + STARMAP_FILE //NSV13 - What starmap should this map load? + var/return_system = "Outpost 45" //NSV13 - Which system are we jumping back to when the round ends? var/mine_traits = null //NSV13 - special mapvote things @@ -188,6 +189,8 @@ omode_whitelist = json["omode_whitelist"] if("starmap_path" in json) starmap_path = json["starmap_path"] + if("return_system" in json) + starmap_path = json["return_system"] if("map_description" in json) map_description = json["map_description"] if("manufacturer" in json) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index e50c30c6c6f..2ea279dd3d7 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -342,10 +342,12 @@ if (!authenticated(usr)) return . = TRUE + state = STATE_OBJECTIVES + if(SSovermap_mode.already_ended) + return SSovermap_mode.mode.check_completion() - if(SSovermap_mode.objectives_completed && SSovermap_mode.round_extended && !SSovermap_mode.already_ended) + if(SSovermap_mode.objectives_completed && SSovermap_mode.round_extended) priority_announce("Auto-recall to Outpost 45 will occur once you are out of combat.", "[SSovermap_mode.mode.reminder_origin]") - state = STATE_OBJECTIVES /obj/machinery/computer/communications/ui_data(mob/user) var/list/data = list( diff --git a/nsv13.dme b/nsv13.dme index 7cc3e96c69a..9dd9cb92e3d 100644 --- a/nsv13.dme +++ b/nsv13.dme @@ -3672,8 +3672,8 @@ #include "nsv13\code\__DEFINES\paths.dm" #include "nsv13\code\__DEFINES\research.dm" #include "nsv13\code\__DEFINES\robot_defines.dm" -#include "nsv13\code\__DEFINES\ships.dm" #include "nsv13\code\__DEFINES\skynet.dm" +#include "nsv13\code\__DEFINES\starsystem.dm" #include "nsv13\code\__DEFINES\traits.dm" #include "nsv13\code\__DEFINES\weapons.dm" #include "nsv13\code\__DEFINES\dcs\signals.dm" @@ -3688,6 +3688,7 @@ #include "nsv13\code\__HELPERS\text.dm" #include "nsv13\code\_globalvars\misc.dm" #include "nsv13\code\_globalvars\ships.dm" +#include "nsv13\code\_globalvars\starsystem.dm" #include "nsv13\code\_globalvars\lists\holomap.dm" #include "nsv13\code\_globalvars\lists\names.dm" #include "nsv13\code\_globalvars\lists\weapons.dm" diff --git a/nsv13/code/__DEFINES/overmap.dm b/nsv13/code/__DEFINES/overmap.dm index 2d170aa1bc8..2367ba94c23 100644 --- a/nsv13/code/__DEFINES/overmap.dm +++ b/nsv13/code/__DEFINES/overmap.dm @@ -99,3 +99,12 @@ GLOBAL_LIST_INIT(overmap_impact_sounds, list('nsv13/sound/effects/ship/freespace #define INTERIOR_READY 2 #define INTERIOR_DELETING 3 #define INTERIOR_DELETED 4 + +//Ship mass +#define MASS_TINY 1 //1 Player - Fighters +#define MASS_SMALL 2 //2-5 Players - FoB/Mining Ship +#define MASS_MEDIUM 3 //10-20 Players - Small Capital Ships +#define MASS_MEDIUM_LARGE 5 //10-20 Players - Small Capital Ships +#define MASS_LARGE 7 //20-40 Players - Medium Capital Ships +#define MASS_TITAN 150 //40+ Players - Large Capital Ships +#define MASS_IMMOBILE 200 //Things that should not be moving. See: stations diff --git a/nsv13/code/__DEFINES/ships.dm b/nsv13/code/__DEFINES/ships.dm deleted file mode 100644 index 1e238ff9c69..00000000000 --- a/nsv13/code/__DEFINES/ships.dm +++ /dev/null @@ -1,7 +0,0 @@ -#define MASS_TINY 1 //1 Player - Fighters -#define MASS_SMALL 2 //2-5 Players - FoB/Mining Ship -#define MASS_MEDIUM 3 //10-20 Players - Small Capital Ships -#define MASS_MEDIUM_LARGE 5 //10-20 Players - Small Capital Ships -#define MASS_LARGE 7 //20-40 Players - Medium Capital Ships -#define MASS_TITAN 150 //40+ Players - Large Capital Ships -#define MASS_IMMOBILE 200 //Things that should not be moving. See: stations diff --git a/nsv13/code/__DEFINES/starsystem.dm b/nsv13/code/__DEFINES/starsystem.dm new file mode 100644 index 00000000000..47dbd5c63e7 --- /dev/null +++ b/nsv13/code/__DEFINES/starsystem.dm @@ -0,0 +1,15 @@ + +//Time between each 'combat cycle' of starsystems. Every combat cycle, every system that has opposing fleets in it gets iterated through, with the fleets firing at eachother. +#define COMBAT_CYCLE_INTERVAL 180 SECONDS + +//Threat level of star systems +#define THREAT_LEVEL_NONE 0 +#define THREAT_LEVEL_UNSAFE 2 +#define THREAT_LEVEL_DANGEROUS 4 + +//The different sectors, keep this updated +#define ALL_STARMAP_SECTORS 1,2,3 + +#define SECTOR_SOL 1 +#define SECTOR_NEUTRAL 2 +#define SECTOR_SYNDICATE 3 diff --git a/nsv13/code/_globalvars/starsystem.dm b/nsv13/code/_globalvars/starsystem.dm new file mode 100644 index 00000000000..83d4705fc53 --- /dev/null +++ b/nsv13/code/_globalvars/starsystem.dm @@ -0,0 +1,2 @@ +//Set when the ship successfully returns after the mission +GLOBAL_VAR_INIT(crew_transfer_risa, FALSE) diff --git a/nsv13/code/controllers/subsystem/overmap_mode.dm b/nsv13/code/controllers/subsystem/overmap_mode.dm index e2cb707c811..aa9b2e5833a 100644 --- a/nsv13/code/controllers/subsystem/overmap_mode.dm +++ b/nsv13/code/controllers/subsystem/overmap_mode.dm @@ -242,19 +242,20 @@ SUBSYSTEM_DEF(overmap_mode) objective_reminder_stacks = 0 else var/obj/structure/overmap/OM = SSstar_system.find_main_overmap() + var/datum/star_system/S = SSstar_system.return_system if(length(OM.current_system?.enemies_in_system)) if(objective_reminder_stacks == 3) - priority_announce("Auto-recall to Outpost 45 will occur once you are out of combat.", "[mode.reminder_origin]") + priority_announce("Auto-recall to [S.name] will occur once you are out of combat.", "[mode.reminder_origin]") return // Don't send them home while there are enemies to kill switch(objective_reminder_stacks) //Less Stacks Here, Prevent The Post-Round Stalling if(1) - priority_announce("Auto-recall to Outpost 45 will occur in [(mode.objective_reminder_interval * 2) / 600] Minutes.", "[mode.reminder_origin]") + priority_announce("Auto-recall to [S.name] will occur in [(mode.objective_reminder_interval * 2) / 600] Minutes.", "[mode.reminder_origin]") if(2) - priority_announce("Auto-recall to Outpost 45 will occur in [(mode.objective_reminder_interval * 1) / 600] Minutes.", "[mode.reminder_origin]") + priority_announce("Auto-recall to [S.name] will occur in [(mode.objective_reminder_interval * 1) / 600] Minutes.", "[mode.reminder_origin]") else - priority_announce("Auto-recall to Outpost 45 activated, additional objective aborted.", "[mode.reminder_origin]") + priority_announce("Auto-recall to [S.name] activated, additional objective aborted.", "[mode.reminder_origin]") mode.victory() /datum/controller/subsystem/overmap_mode/proc/start_reminder() @@ -452,16 +453,16 @@ SUBSYSTEM_DEF(overmap_mode) if(SSvote.mode == "Press On Or Return Home?") // We're still voting return - var/datum/star_system/S = SSstar_system.system_by_id("Outpost 45") + var/datum/star_system/S = SSstar_system.return_system S.hidden = FALSE if(!SSovermap_mode.round_extended) //If we haven't yet extended the round, let us vote! priority_announce("Mission Complete - Vote Pending") //TEMP get better words SSvote.initiate_vote("Press On Or Return Home?", "Centcomm", forced=TRUE, popup=FALSE) - else //Begin FTL jump to Outpost 45 + else //Begin FTL return jump var/obj/structure/overmap/OM = SSstar_system.find_main_overmap() if(!length(OM.current_system?.enemies_in_system)) - priority_announce("Mission Complete - Returning to Outpost 45") //TEMP get better words - OM.force_return_jump(SSstar_system.system_by_id("Outpost 45")) + priority_announce("Mission Complete - Returning to [S.name]") //TEMP get better words + OM.force_return_jump() /datum/overmap_gamemode/proc/defeat() //Override this if defeat is to be called based on an objective priority_announce("Mission Critical Failure - Standby for carbon asset liquidation") diff --git a/nsv13/code/controllers/subsystem/starsystem.dm b/nsv13/code/controllers/subsystem/starsystem.dm index 73936404f79..8265b05f589 100644 --- a/nsv13/code/controllers/subsystem/starsystem.dm +++ b/nsv13/code/controllers/subsystem/starsystem.dm @@ -1,11 +1,3 @@ -GLOBAL_VAR_INIT(crew_transfer_risa, FALSE) - -#define COMBAT_CYCLE_INTERVAL 180 SECONDS //Time between each 'combat cycle' of starsystems. Every combat cycle, every system that has opposing fleets in it gets iterated through, with the fleets firing at eachother. - -#define THREAT_LEVEL_NONE 0 -#define THREAT_LEVEL_UNSAFE 2 -#define THREAT_LEVEL_DANGEROUS 4 - //Subsystem to control overmap events and the greater gameworld SUBSYSTEM_DEF(star_system) name = "star_system" @@ -24,6 +16,7 @@ SUBSYSTEM_DEF(star_system) var/list/neutral_zone_systems = list() var/list/all_missions = list() var/time_limit = FALSE //Do we want to end the round after a specific time? Mostly used for galconquest. + var/datum/star_system/return_system //Which system should we jump to at the end of the round? var/enable_npc_combat = TRUE //If you are running an event and don't want fleets to shoot eachother, set this to false. var/next_combat_cycle = 0 @@ -56,6 +49,7 @@ SUBSYSTEM_DEF(star_system) /datum/controller/subsystem/star_system/Initialize(start_timeofday) instantiate_systems() . = ..() + return_system = system_by_id(SSmapping.config.return_system) enemy_types = subtypesof(/obj/structure/overmap/syndicate/ai) for(var/type in enemy_blacklist) enemy_types -= type @@ -66,7 +60,7 @@ SUBSYSTEM_DEF(star_system) F.setup_relationships() //Set up faction relationships AFTER they're all initialised to avoid errors. for(var/datum/star_system/S in systems) //Setup the neutral zone for easier access - Bit of overhead but better than having to search for sector 2 systems everytime we want a new neutral zone occupier) - if(S.sector != 2) //Magic numbers bad I know, but there is no sector defines. + if(S.sector != SECTOR_NEUTRAL) continue neutral_zone_systems += S @@ -749,7 +743,7 @@ Returns a faction datum by its name (case insensitive!) anomaly_type = /obj/effect/overmap_anomaly/singularity parallax_property = "pitchblack" if("blacksite") //this a special one! - adjacency_list += "Outpost 45" //you're going to risa, damnit. + adjacency_list += SSstar_system.return_system.name //you're going to risa, damnit. SSstar_system.spawn_anomaly(/obj/effect/overmap_anomaly/wormhole, src, center=TRUE) if(alignment == "syndicate") spawn_enemies() //Syndicate systems are even more dangerous, and come pre-loaded with some Syndie ships. @@ -1600,4 +1594,3 @@ Welcome to the endgame. This sector is the hardest you'll encounter in game and fleet_type = /datum/fleet/border adjacency_list = list("Rubicon", "Aeterna Victrix") -#define ALL_STARMAP_SECTORS 1,2,3 //KEEP THIS UPDATED. diff --git a/nsv13/code/game/gamemodes/overmap/armada.dm b/nsv13/code/game/gamemodes/overmap/armada.dm index d273cb4d1e3..b1547949700 100644 --- a/nsv13/code/game/gamemodes/overmap/armada.dm +++ b/nsv13/code/game/gamemodes/overmap/armada.dm @@ -30,7 +30,7 @@ if(S.alignment == "nanotrasen") candidate += S.name - candidate -= "Outpost 45" + candidate -= SSmapping.config.return_system selected_system = pick(candidate) brief = "Fleet Intelligence indicates that the Syndicate are preparing an invasion fleet to capture [selected_system], rally defences to repel the Armada by freeing up fleet assets and prepare to defend the system." diff --git a/nsv13/code/modules/overmap/FTL/components/drive.dm b/nsv13/code/modules/overmap/FTL/components/drive.dm index c9d26fcabe8..82e85bcbe22 100644 --- a/nsv13/code/modules/overmap/FTL/components/drive.dm +++ b/nsv13/code/modules/overmap/FTL/components/drive.dm @@ -323,7 +323,7 @@ Preset classes of FTL drive with pre-programmed behaviours if(!target_system) radio.talk_into(src, "ERROR. Specified star_system no longer exists.", radio_channel) return - linked?.begin_jump(target_system, force) + linked.begin_jump(target_system, force) playsound(src, 'nsv13/sound/voice/ftl_start.wav', 100, FALSE) radio.talk_into(src, "Initiating FTL translation.", radio_channel) playsound(src, 'nsv13/sound/effects/ship/freespace2/computer/escape.wav', 100, 1) diff --git a/nsv13/code/modules/overmap/FTL/ftl_jump.dm b/nsv13/code/modules/overmap/FTL/ftl_jump.dm index 89b4e216946..6b27bb6df72 100644 --- a/nsv13/code/modules/overmap/FTL/ftl_jump.dm +++ b/nsv13/code/modules/overmap/FTL/ftl_jump.dm @@ -146,28 +146,31 @@ desired_angle = 90 //90 degrees AKA face EAST to match the FTL parallax. addtimer(CALLBACK(src, PROC_REF(jump_start), target_system, force), ftl_drive.ftl_startup_time) -/obj/structure/overmap/proc/force_return_jump(datum/star_system/target_system) +/obj/structure/overmap/proc/force_return_jump(datum/star_system/target_system = SSstar_system.return_system) SSovermap_mode.already_ended = TRUE - if(ftl_drive) //Do we actually have an ftl drive? + if(ftl_drive && target_system) //Do we actually have an ftl drive? ftl_drive.lockout = TRUE //Prevent further jumps if(ftl_drive.ftl_state == FTL_STATE_JUMPING) - addtimer(CALLBACK(src, PROC_REF(force_return_jump), target_system), 30 SECONDS) - message_admins("[src] is already jumping, delaying recall for 30 seconds") - log_runtime("DEBUG: force_return_jump: Players were already jumping, trying again in 30 seconds") + RegisterSignal(src, COMSIG_SHIP_ARRIVED, PROC_REF(force_return_jump)) + message_admins("[src] is already jumping, delaying recall") + log_game("DEBUG: force_return_jump: Players were already jumping, trying again when jump is complete") else - target_system.hidden = FALSE //Reveal where we are going + SSstar_system.return_system.hidden = FALSE //Reveal where we are going - log_runtime("DEBUG: force_return_jump: Beginning jump to outpost 45") + log_game("DEBUG: force_return_jump: Beginning jump to [target_system.name]") ftl_drive.force_jump(target_system) //Jump home addtimer(CALLBACK(src, PROC_REF(check_return_jump)), SSstar_system.ships[src]["to_time"] + 35 SECONDS) + else if(target_system) + message_admins("Failed to force return jump! [src] does not have an FTL Drive!") + log_runtime("DEBUG: force_return_jump: [src] had no FTL drive") else - message_admins("Target does not have an FTL Drive!") - log_runtime("DEBUG: force_return_jump: Ship had no FTL drive") + message_admins("Failed to force return jump! No target system was specified! (Tell a coder)") + log_runtime("DEBUG: force_return_jump: No target system") /obj/structure/overmap/proc/check_return_jump() - log_runtime("DEBUG: check_return_jump called") - var/datum/star_system/S = SSstar_system.system_by_id("Outpost 45") + log_game("DEBUG: check_return_jump called") + var/datum/star_system/S = SSstar_system.return_system if(current_system != S && SSstar_system.ships[src]["target_system"] != S) // Not in 45 and not on our way there log_runtime("DEBUG: check_return_jump detected bad state, trying to force_return_jump") force_return_jump(S) @@ -191,19 +194,17 @@ /obj/structure/overmap/proc/jump_start(datum/star_system/target_system, force=FALSE) if(ftl_drive?.ftl_state != FTL_STATE_JUMPING) - if(force) + if(force && ftl_drive) ftl_drive.ftl_state = FTL_STATE_JUMPING else log_runtime("DEBUG: jump_start: aborted jump to [target_system], drive state = [ftl_drive?.ftl_state]") return if((SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CHECK_INTERDICT, src) & BEING_INTERDICTED) && !force) // Override interdiction if the game is over - ftl_drive?.radio?.talk_into(ftl_drive, "Warning. Local energy anomaly detected - calculated jump parameters invalid. Performing emergency reboot.", ftl_drive.radio_channel) + ftl_drive.radio.talk_into(ftl_drive, "Warning. Local energy anomaly detected - calculated jump parameters invalid. Performing emergency reboot.", ftl_drive.radio_channel) relay('sound/magic/lightning_chargeup.ogg', channel=CHANNEL_IMPORTANT_SHIP_ALERT) - ftl_drive?.depower() - log_runtime("DEBUG: jump_start: aborted jump to [target_system] due to interdiction") + ftl_drive.depower() return - log_runtime("DEBUG: jump_start: jump to [target_system] passed initial checks") relay_to_nearby('nsv13/sound/effects/ship/FTL.ogg', null, ignore_self=TRUE)//Ships just hear a small "crack" when another one jumps if(reserved_z) //Actual overmap parallax behaviour var/datum/space_level/SL = SSmapping.z_list[reserved_z] @@ -213,7 +214,6 @@ relay(ftl_drive.ftl_loop, "You feel the ship lurch forward", loop=TRUE, channel = CHANNEL_SHIP_ALERT) var/datum/star_system/curr = SSstar_system.ships[src]["current_system"] - log_runtime("DEBUG: jump_start: starting jump to [target_system] from [curr]") SEND_SIGNAL(src, COMSIG_SHIP_DEPARTED) // Let missions know we have left the system curr.remove_ship(src) var/speed = (curr.dist(target_system) / (ftl_drive.get_jump_speed() * 10)) //TODO: FTL drive speed upgrades. From 5ad1f1758ecb22e27460185b21f49192aaf9fd48 Mon Sep 17 00:00:00 2001 From: Bokkiewokkie Date: Fri, 25 Aug 2023 22:31:18 +0200 Subject: [PATCH 3/4] Crying about it --- nsv13/code/modules/overmap/FTL/ftl_jump.dm | 2 +- nsv13/code/modules/overmap/starmap.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nsv13/code/modules/overmap/FTL/ftl_jump.dm b/nsv13/code/modules/overmap/FTL/ftl_jump.dm index 6b27bb6df72..88d10b1dcb8 100644 --- a/nsv13/code/modules/overmap/FTL/ftl_jump.dm +++ b/nsv13/code/modules/overmap/FTL/ftl_jump.dm @@ -156,7 +156,7 @@ log_game("DEBUG: force_return_jump: Players were already jumping, trying again when jump is complete") else SSstar_system.return_system.hidden = FALSE //Reveal where we are going - + UnregisterSignal(src, COMSIG_SHIP_ARRIVED) log_game("DEBUG: force_return_jump: Beginning jump to [target_system.name]") ftl_drive.force_jump(target_system) //Jump home addtimer(CALLBACK(src, PROC_REF(check_return_jump)), SSstar_system.ships[src]["to_time"] + 35 SECONDS) diff --git a/nsv13/code/modules/overmap/starmap.dm b/nsv13/code/modules/overmap/starmap.dm index cabf6ed6ae3..5bcc048483e 100644 --- a/nsv13/code/modules/overmap/starmap.dm +++ b/nsv13/code/modules/overmap/starmap.dm @@ -75,13 +75,13 @@ . = TRUE if("jump") if(linked.ftl_drive.lockout) - visible_message("[icon2html(src, viewers(src))] Unable to comply. Invalid authkey to unlock remove override code.") + to_chat(usr, "[icon2html(src, viewers(src))] Unable to comply. Invalid authkey to unlock remove override code.") return linked.ftl_drive.jump(selected_system) . = TRUE if("cancel_jump") if(linked.ftl_drive.lockout) - visible_message("[icon2html(src, viewers(src))] Unable to comply. Invalid authkey to unlock remove override code.") + to_chat(usr, "[icon2html(src, viewers(src))] Unable to comply. Invalid authkey to unlock remove override code.") return if(linked.ftl_drive.cancel_ftl()) linked.stop_relay(CHANNEL_IMPORTANT_SHIP_ALERT) From 52d2a3ed9013949fb245d0f78c3e71bf5f07dca2 Mon Sep 17 00:00:00 2001 From: Bokkiewokkie Date: Mon, 28 Aug 2023 12:36:58 +0200 Subject: [PATCH 4/4] Sobbing, even --- nsv13/code/modules/overmap/FTL/ftl_jump.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nsv13/code/modules/overmap/FTL/ftl_jump.dm b/nsv13/code/modules/overmap/FTL/ftl_jump.dm index 88d10b1dcb8..e6b585cf61c 100644 --- a/nsv13/code/modules/overmap/FTL/ftl_jump.dm +++ b/nsv13/code/modules/overmap/FTL/ftl_jump.dm @@ -146,7 +146,9 @@ desired_angle = 90 //90 degrees AKA face EAST to match the FTL parallax. addtimer(CALLBACK(src, PROC_REF(jump_start), target_system, force), ftl_drive.ftl_startup_time) -/obj/structure/overmap/proc/force_return_jump(datum/star_system/target_system = SSstar_system.return_system) +/obj/structure/overmap/proc/force_return_jump() + SIGNAL_HANDLER + var/datum/star_system/target_system = SSstar_system.return_system SSovermap_mode.already_ended = TRUE if(ftl_drive && target_system) //Do we actually have an ftl drive? ftl_drive.lockout = TRUE //Prevent further jumps @@ -165,7 +167,7 @@ message_admins("Failed to force return jump! [src] does not have an FTL Drive!") log_runtime("DEBUG: force_return_jump: [src] had no FTL drive") else - message_admins("Failed to force return jump! No target system was specified! (Tell a coder)") + message_admins("Failed to force return jump! No target system was found! (Tell a coder)") log_runtime("DEBUG: force_return_jump: No target system") /obj/structure/overmap/proc/check_return_jump() @@ -173,7 +175,7 @@ var/datum/star_system/S = SSstar_system.return_system if(current_system != S && SSstar_system.ships[src]["target_system"] != S) // Not in 45 and not on our way there log_runtime("DEBUG: check_return_jump detected bad state, trying to force_return_jump") - force_return_jump(S) + force_return_jump() /obj/structure/overmap/proc/force_parallax_update(ftl_start)