Yogstation 13 - Modules - TypesDefine Details

code/__DEFINES/tgs.dm

TGS_FILE2TEXT_NATIVECreate this define if you want to do TGS configuration outside of this file.
TGS_EVENT_REBOOT_MODE_CHANGEBefore a reboot mode change, extras parameters are the current and new reboot mode enums.
TGS_EVENT_PORT_SWAPBefore a port change is about to happen, extra parameters is new port.
TGS_EVENT_INSTANCE_RENAMEDBefore the instance is renamed, extra parameter is the new name.
TGS_EVENT_WATCHDOG_REATTACHAfter the watchdog reattaches to DD, extra parameter is the new /datum/tgs_version of the server.
TGS_EVENT_HEALTH_CHECKWhen the watchdog sends a health check to DD. No parameters.
TGS_EVENT_REPO_RESET_ORIGINWhen the repository is reset to its origin reference. Parameters: Reference name, Commit SHA.
TGS_EVENT_REPO_CHECKOUTWhen the repository performs a checkout. Parameters: Checkout git object.
TGS_EVENT_REPO_FETCHWhen the repository performs a fetch operation. No parameters.
TGS_EVENT_REPO_MERGE_PULL_REQUESTWhen the repository test merges. Parameters: PR Number, PR Sha, (Nullable) Comment made by TGS user.
TGS_EVENT_REPO_PRE_SYNCHRONIZEBefore the repository makes a sychronize operation. Parameters: Absolute repostiory path.
TGS_EVENT_ENGINE_INSTALL_STARTBefore a engine install operation begins. Parameters: Version string of the installing engine.
TGS_EVENT_ENGINE_INSTALL_FAILWhen a engine install operation fails. Parameters: Error message
TGS_EVENT_ENGINE_ACTIVE_VERSION_CHANGEWhen the active engine version changes. Parameters: (Nullable) Version string of the current engine, version string of the new engine.
TGS_EVENT_COMPILE_STARTWhen the compiler starts running. Parameters: Game directory path, origin commit SHA.
TGS_EVENT_COMPILE_CANCELLEDWhen a compile is cancelled. No parameters.
TGS_EVENT_COMPILE_FAILUREWhen a compile fails. Parameters: Game directory path, [TRUE]/[FALSE] based on if the cause for failure was DMAPI validation.
TGS_EVENT_COMPILE_COMPLETEWhen a compile operation completes. Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead. Parameters: Game directory path.
TGS_EVENT_INSTANCE_AUTO_UPDATE_STARTWhen an automatic update for the current instance begins. No parameters.
TGS_EVENT_REPO_MERGE_CONFLICTWhen the repository encounters a merge conflict: Parameters: Base SHA, target SHA, base reference, target reference.
TGS_EVENT_DEPLOYMENT_COMPLETEWhen a deployment completes. No Parameters.
TGS_EVENT_WATCHDOG_SHUTDOWNBefore the watchdog shuts down. Not sent for graceful shutdowns. No parameters.
TGS_EVENT_WATCHDOG_DETACHBefore the watchdog detaches for a TGS update/restart. No parameters.
TGS_EVENT_WORLD_PRIMEWatchdog event when TgsInitializationComplete() is called. No parameters.
TGS_EVENT_REPO_SUBMODULE_UPDATEAfter a single submodule update is performed. Parameters: Updated submodule name.
TGS_EVENT_PRE_DREAM_MAKERAfter CodeModifications are applied, before DreamMaker is run. Parameters: Game directory path, origin commit sha, version string of the used engine.
TGS_EVENT_DEPLOYMENT_CLEANUPWhenever a deployment folder is deleted from disk. Parameters: Game directory path.
TGS_REBOOT_MODE_NORMALThe server will reboot normally.
TGS_REBOOT_MODE_SHUTDOWNThe server will stop running on reboot.
TGS_REBOOT_MODE_RESTARTThe watchdog will restart on reboot.
TGS_SECURITY_TRUSTEDDreamDaemon Trusted security level.
TGS_SECURITY_SAFEDreamDaemon Safe security level.
TGS_SECURITY_ULTRASAFEDreamDaemon Ultrasafe security level.
TGS_VISIBILITY_PUBLICDreamDaemon public visibility level.
TGS_VISIBILITY_PRIVATEDreamDaemon private visibility level.
TGS_VISIBILITY_INVISIBLEDreamDaemon invisible visibility level.
TGS_ENGINE_TYPE_BYONDThe Build Your Own Net Dream engine.
TGS_ENGINE_TYPE_OPENDREAMThe OpenDream engine.
TGS_TOPICPut this at the start of [/world/proc/Topic].
/datum/tgs_revision_informationRepresents git revision information.
/datum/tgs_versionRepresents a version.
/datum/tgs_revision_information/test_mergeRepresents a merge of a GitHub pull request.
/datum/tgs_chat_channelRepresents a connected chat channel.
/datum/tgs_event_handlerUser definable handler for TGS events.
/datum/tgs_chat_commandUser definable chat command.
/datum/tgs_message_contentUser definable chat message.
/datum/tgs_chat_embed/structureUser definable chat embed. Currently mirrors Discord chat embeds. See https://discord.com/developers/docs/resources/channel#embed-object-embed-structure for details.
/datum/tgs_chat_embed/mediaCommon datum for similar discord embed medias.
/datum/tgs_chat_embed/footerSee https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure for details.
/datum/tgs_chat_embed/providerSee https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure for details.
/datum/tgs_chat_embed/provider/authorSee https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure for details. Must have name set in New().
/datum/tgs_chat_embed/fieldSee https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure for details. Must have name and value set in New().

Define Details

TGS_ENGINE_TYPE_BYOND

The Build Your Own Net Dream engine.

TGS_ENGINE_TYPE_OPENDREAM

The OpenDream engine.

TGS_EVENT_COMPILE_CANCELLED

When a compile is cancelled. No parameters.

TGS_EVENT_COMPILE_COMPLETE

When a compile operation completes. Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead. Parameters: Game directory path.

TGS_EVENT_COMPILE_FAILURE

When a compile fails. Parameters: Game directory path, [TRUE]/[FALSE] based on if the cause for failure was DMAPI validation.

TGS_EVENT_COMPILE_START

When the compiler starts running. Parameters: Game directory path, origin commit SHA.

TGS_EVENT_DEPLOYMENT_CLEANUP

Whenever a deployment folder is deleted from disk. Parameters: Game directory path.

TGS_EVENT_DEPLOYMENT_COMPLETE

When a deployment completes. No Parameters.

TGS_EVENT_ENGINE_ACTIVE_VERSION_CHANGE

When the active engine version changes. Parameters: (Nullable) Version string of the current engine, version string of the new engine.

TGS_EVENT_ENGINE_INSTALL_FAIL

When a engine install operation fails. Parameters: Error message

TGS_EVENT_ENGINE_INSTALL_START

Before a engine install operation begins. Parameters: Version string of the installing engine.

TGS_EVENT_HEALTH_CHECK

When the watchdog sends a health check to DD. No parameters.

TGS_EVENT_INSTANCE_AUTO_UPDATE_START

When an automatic update for the current instance begins. No parameters.

TGS_EVENT_INSTANCE_RENAMED

Before the instance is renamed, extra parameter is the new name.

TGS_EVENT_PORT_SWAP

Before a port change is about to happen, extra parameters is new port.

TGS_EVENT_PRE_DREAM_MAKER

After CodeModifications are applied, before DreamMaker is run. Parameters: Game directory path, origin commit sha, version string of the used engine.

TGS_EVENT_REBOOT_MODE_CHANGE

Before a reboot mode change, extras parameters are the current and new reboot mode enums.

TGS_EVENT_REPO_CHECKOUT

When the repository performs a checkout. Parameters: Checkout git object.

TGS_EVENT_REPO_FETCH

When the repository performs a fetch operation. No parameters.

TGS_EVENT_REPO_MERGE_CONFLICT

When the repository encounters a merge conflict: Parameters: Base SHA, target SHA, base reference, target reference.

TGS_EVENT_REPO_MERGE_PULL_REQUEST

When the repository test merges. Parameters: PR Number, PR Sha, (Nullable) Comment made by TGS user.

TGS_EVENT_REPO_PRE_SYNCHRONIZE

Before the repository makes a sychronize operation. Parameters: Absolute repostiory path.

TGS_EVENT_REPO_RESET_ORIGIN

When the repository is reset to its origin reference. Parameters: Reference name, Commit SHA.

TGS_EVENT_REPO_SUBMODULE_UPDATE

After a single submodule update is performed. Parameters: Updated submodule name.

TGS_EVENT_WATCHDOG_DETACH

Before the watchdog detaches for a TGS update/restart. No parameters.

TGS_EVENT_WATCHDOG_REATTACH

After the watchdog reattaches to DD, extra parameter is the new /datum/tgs_version of the server.

TGS_EVENT_WATCHDOG_SHUTDOWN

Before the watchdog shuts down. Not sent for graceful shutdowns. No parameters.

TGS_EVENT_WORLD_PRIME

Watchdog event when TgsInitializationComplete() is called. No parameters.

TGS_FILE2TEXT_NATIVE

Create this define if you want to do TGS configuration outside of this file.

TGS_REBOOT_MODE_NORMAL

The server will reboot normally.

TGS_REBOOT_MODE_RESTART

The watchdog will restart on reboot.

TGS_REBOOT_MODE_SHUTDOWN

The server will stop running on reboot.

TGS_SECURITY_SAFE

DreamDaemon Safe security level.

TGS_SECURITY_TRUSTED

DreamDaemon Trusted security level.

TGS_SECURITY_ULTRASAFE

DreamDaemon Ultrasafe security level.

TGS_TOPIC

Put this at the start of [/world/proc/Topic].

TGS_VISIBILITY_INVISIBLE

DreamDaemon invisible visibility level.

TGS_VISIBILITY_PRIVATE

DreamDaemon private visibility level.

TGS_VISIBILITY_PUBLIC

DreamDaemon public visibility level.