<commit_before>//tgstation-server DMAPI

//All functions and datums outside this document are subject to change with any version and should not be relied on

//CONFIGURATION

//create this define if you want to do configuration outside of this file
#ifndef TGS_EXTERNAL_CONFIGURATION

//Comment this out once you've filled in the below
#error TGS API unconfigured

//Required interfaces (fill in with your codebase equivalent):

//create a global variable named `Name` and set it to `Value`
//These globals must not be modifiable from anywhere outside of the server tools
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value)

//Read the value in the global variable `Name`
#define TGS_READ_GLOBAL(Name)

//Set the value in the global variable `Name` to `Value`
#define TGS_WRITE_GLOBAL(Name, Value)

//Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game priveledge escalation
#define TGS_PROTECT_DATUM(Path)

//display an announcement `message` from the server to all players
#define TGS_WORLD_ANNOUNCE(message)

//Notify current in-game administrators of a string `event`
#define TGS_NOTIFY_ADMINS(event)

//Write an info `message` to a server log
#define TGS_INFO_LOG(message)

//Write an error `message` to a server log
#define TGS_ERROR_LOG(message)

//Get the number of connected /clients
#define TGS_CLIENT_COUNT

#endif

//EVENT CODES

#define TGS_EVENT_PORT_SWAP 1	//before a port change is about to happen, extra parameter is new port
#define TGS_EVENT_REBOOT_MODE_CHANGE 2	//before a reboot mode change, extras parameters are the current and new reboot mode enums

//OTHER ENUMS

#define TGS_REBOOT_MODE_NORMAL 0
#define TGS_REBOOT_MODE_SHUTDOWN 1
#define TGS_REBOOT_MODE_RESTART 2

//TODO

//REQUIRED HOOKS

//Call this somewhere in /world/New() that is always run
//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels
/world/proc/TgsNew(datum/tgs_event_handler/event_handler)
	return

//Call this when your initializations are complete and your game is ready to play before any player interactions happen
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
/world/proc/TgsInitializationComplete()
	return

//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(T); if(tgs_topic_return) return tgs_topic_return

//Call this at the beginning of world/Reboot(reason)
/world/proc/TgsReboot()
	return
<commit_msg>Change values of some builtin DMAPI events<commit_after>//tgstation-server DMAPI

//All functions and datums outside this document are subject to change with any version and should not be relied on

//CONFIGURATION

//create this define if you want to do configuration outside of this file
#ifndef TGS_EXTERNAL_CONFIGURATION

//Comment this out once you've filled in the below
#error TGS API unconfigured

//Required interfaces (fill in with your codebase equivalent):

//create a global variable named `Name` and set it to `Value`
//These globals must not be modifiable from anywhere outside of the server tools
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value)

//Read the value in the global variable `Name`
#define TGS_READ_GLOBAL(Name)

//Set the value in the global variable `Name` to `Value`
#define TGS_WRITE_GLOBAL(Name, Value)

//Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game priveledge escalation
#define TGS_PROTECT_DATUM(Path)

//display an announcement `message` from the server to all players
#define TGS_WORLD_ANNOUNCE(message)

//Notify current in-game administrators of a string `event`
#define TGS_NOTIFY_ADMINS(event)

//Write an info `message` to a server log
#define TGS_INFO_LOG(message)

//Write an error `message` to a server log
#define TGS_ERROR_LOG(message)

//Get the number of connected /clients
#define TGS_CLIENT_COUNT

#endif

//EVENT CODES

#define TGS_EVENT_PORT_SWAP -2	//before a port change is about to happen, extra parameter is new port
#define TGS_EVENT_REBOOT_MODE_CHANGE -1	//before a reboot mode change, extras parameters are the current and new reboot mode enums

//OTHER ENUMS

#define TGS_REBOOT_MODE_NORMAL 0
#define TGS_REBOOT_MODE_SHUTDOWN 1
#define TGS_REBOOT_MODE_RESTART 2

//TODO

//REQUIRED HOOKS

//Call this somewhere in /world/New() that is always run
//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels
/world/proc/TgsNew(datum/tgs_event_handler/event_handler)
	return

//Call this when your initializations are complete and your game is ready to play before any player interactions happen
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
/world/proc/TgsInitializationComplete()
	return

//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(T); if(tgs_topic_return) return tgs_topic_return

//Call this at the beginning of world/Reboot(reason)
/world/proc/TgsReboot()
	return

{'fraction_non_alphanumeric': 0.0642816146929405, 'fraction_numerical': 0.001913143294432753, 'mean_word_length': 4.880764904386951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4692254', 'n_tokens_mistral': 1579, 'n_tokens_neox': 1556, 'n_words': 670}