diff --git a/README.md b/README.md index 39da29f3a4..512c58e203 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ docker run \ --name="tgs" \ # Name for the container --cap-add=sys_nice \ # Recommended, allows tgs to schedule DreamDaemon as a higher priority process --init \ #Highly recommended, reaps potential zombie processes - -p : \ # Port bridge for accessing TGS + -p 5000:5000 \ # Port bridge for accessing TGS, you can change this if you need -p 0.0.0.0:: \ # Port bridge for accessing DreamDaemon -v /path/to/your/configfile/directory:/config_data \ # Recommended, create a volume mapping for server configuration -v /path/to/store/instances:/tgs4_instances \ # Recommended, create a volume mapping for server instances diff --git a/build/Version.props b/build/Version.props index 6898cf6b0c..3b64b3ff67 100644 --- a/build/Version.props +++ b/build/Version.props @@ -3,13 +3,13 @@ - 4.7.0 - 2.2.0 - 8.0.0 - 9.0.0 - 5.2.8 + 4.6.0 + 2.1.1 + 7.4.0 + 8.4.0 + 5.2.9 1.1.0 - 1.1.1 + 1.2.0 diff --git a/build/tgs.docker.sh b/build/tgs.docker.sh index 1ca8007756..490f318a42 100755 --- a/build/tgs.docker.sh +++ b/build/tgs.docker.sh @@ -1,6 +1,6 @@ #!/bin/sh -SCRIPT_VERSION="1.1.1" +SCRIPT_VERSION="1.2.0" echo "tgstation-server 4 container startup script v$SCRIPT_VERSION" echo "PWD: $PWD" @@ -23,4 +23,4 @@ if [ ! -f "$HOST_CONFIG" ]; then fi echo "Executing console runner..." -exec dotnet Tgstation.Server.Host.Console.dll +exec dotnet Tgstation.Server.Host.Console.dll $@ diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm index e70955845c..2562bfe4d3 100644 --- a/src/DMAPI/tgs.dm +++ b/src/DMAPI/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "5.2.8" +#define TGS_DMAPI_VERSION "5.2.9" // All functions and datums outside this document are subject to change with any version and should not be relied on. @@ -117,22 +117,22 @@ //REQUIRED HOOKS /** - * Call this somewhere in [/world/proc/New] that is always run. This function may sleep! - * - * * event_handler - Optional user defined [/datum/tgs_event_handler]. - * * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED]. - */ + * Call this somewhere in [/world/proc/New] that is always run. This function may sleep! + * + * * event_handler - Optional user defined [/datum/tgs_event_handler]. + * * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED]. + */ /world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE) return /** - * Call this when your initializations are complete and your game is ready to play before any player interactions happen. - * - * This may use [/world/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running. - * Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184 - * Before this point, note that any static files or directories may be in use by another server. Your code should account for this. - * This function should not be called before ..() in [/world/proc/New]. - */ + * Call this when your initializations are complete and your game is ready to play before any player interactions happen. + * + * This may use [/world/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running. + * Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184 + * Before this point, note that any static files or directories may be in use by another server. Your code should account for this. + * This function should not be called before ..() in [/world/proc/New]. + */ /world/proc/TgsInitializationComplete() return @@ -140,8 +140,8 @@ #define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return /** - * Call this at the beginning of [world/proc/Reboot]. - */ + * Call this at the beginning of [world/proc/Reboot]. + */ /world/proc/TgsReboot() return @@ -175,16 +175,16 @@ var/deprefixed_parameter /** - * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. - */ + * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. + */ /datum/tgs_version/proc/Wildcard() return /** - * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] equals some other version. - * - * other_version - The [/datum/tgs_version] to compare against. - */ + * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] equals some other version. + * + * other_version - The [/datum/tgs_version] to compare against. + */ /datum/tgs_version/proc/Equals(datum/tgs_version/other_version) return @@ -234,10 +234,10 @@ var/datum/tgs_chat_channel/channel /** - * User definable callback for handling TGS events. - * - * event_code - One of the TGS_EVENT_ defines. Extra parameters will be documented in each - */ + * User definable callback for handling TGS events. + * + * event_code - One of the TGS_EVENT_ defines. Extra parameters will be documented in each + */ /datum/tgs_event_handler/proc/HandleEvent(event_code, ...) set waitfor = FALSE return @@ -252,11 +252,11 @@ var/admin_only = FALSE /** - * Process command activation. Should return a string to respond to the issuer with. - * - * sender - The [/datum/tgs_chat_user] who issued the command. - * params - The trimmed string following the command `/datum/tgs_chat_command/var/name]. - */ + * Process command activation. Should return a string to respond to the issuer with. + * + * sender - The [/datum/tgs_chat_user] who issued the command. + * params - The trimmed string following the command `/datum/tgs_chat_command/var/name]. + */ /datum/tgs_chat_command/proc/Run(datum/tgs_chat_user/sender, params) CRASH("[type] has no implementation for Run()") @@ -271,48 +271,48 @@ return /** - * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. - */ + * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. + */ /world/proc/TgsAvailable() return // No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called. /** - * Forces a hard reboot of DreamDaemon by ending the process. - * - * Unlike del(world) clients will try to reconnect. - * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again - */ + * Forces a hard reboot of DreamDaemon by ending the process. + * + * Unlike del(world) clients will try to reconnect. + * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again + */ /world/proc/TgsEndProcess() return /** - * Send a message to connected chats. - * - * message - The string to send. - * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. - */ + * Send a message to connected chats. + * + * message - The string to send. + * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. + */ /world/proc/TgsTargetedChatBroadcast(message, admin_only = FALSE) return /** - * Send a private message to a specific user. - * - * message - The string to send. - * user: The [/datum/tgs_chat_user] to PM. - */ + * Send a private message to a specific user. + * + * message - The string to send. + * user: The [/datum/tgs_chat_user] to PM. + */ /world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user) return // The following functions will sleep if a call to TgsNew() is sleeping /** - * Send a message to connected chats that are flagged as game-related in TGS. - * - * message - The string to send. - * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. - */ + * Send a message to connected chats that are flagged as game-related in TGS. + * + * message - The string to send. + * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. + */ /world/proc/TgsChatBroadcast(message, list/channels = null) return diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs index e9843b2294..83ed8294c1 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs @@ -360,6 +360,8 @@ namespace Tgstation.Server.Host.Components.Watchdog CancellationToken cancellationToken) { Logger.LogTrace("Begin LaunchImplNoLock"); + if (startMonitor && Status != WatchdogStatus.Offline) + throw new JobException(ErrorCode.WatchdogRunning); if (reattachInfo == null && !DmbFactory.DmbAvailable) throw new JobException(ErrorCode.WatchdogCompileJobCorrupted); diff --git a/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs b/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs index f9cc75d330..02b3251622 100644 --- a/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs +++ b/tests/Tgstation.Server.Tests/Instance/RepositoryTest.cs @@ -209,7 +209,7 @@ namespace Tgstation.Server.Tests.Instance var mergingAgain = await repositoryClient.Update(withMerge, cancellationToken); Assert.IsNotNull(mergingAgain.ActiveJob); - await WaitForJob(mergingAgain.ActiveJob, 30, false, null, cancellationToken); + await WaitForJob(mergingAgain.ActiveJob, 60, false, null, cancellationToken); var final = await repositoryClient.Read(cancellationToken); Assert.AreEqual("asdffdsa", final.RevisionInformation.PrimaryTestMerge.Comment);