add shared function file
This commit is contained in:
@@ -23,6 +23,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Scripts": [
|
"Scripts": [
|
||||||
|
{
|
||||||
|
"Path": "toneapi_shared.nut",
|
||||||
|
"RunOn": "SERVER"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Path": "matchstat.nut",
|
"Path": "matchstat.nut",
|
||||||
"RunOn": "SERVER",
|
"RunOn": "SERVER",
|
||||||
|
|||||||
@@ -35,15 +35,13 @@ function killstat_Init() {
|
|||||||
AddCallback_OnClientConnected(JoinMessage)
|
AddCallback_OnClientConnected(JoinMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
string prefix = "\x1b[38;5;81m[TONE API]\x1b[0m "
|
|
||||||
|
|
||||||
bool function hasCustomAirAccel(){
|
bool function hasCustomAirAccel(){
|
||||||
return Code_GetCurrentPlaylistVarOrUseValue("custom_air_accel_pilot", "null") != "null"
|
return Code_GetCurrentPlaylistVarOrUseValue("custom_air_accel_pilot", "null") != "null"
|
||||||
}
|
}
|
||||||
|
|
||||||
void function JoinMessage(entity player) {
|
void function JoinMessage(entity player) {
|
||||||
//Chat_ServerPrivateMessage(player, prefix + "This server collects data using the Tone API. Check your data here: \x1b[34mtoneapi.com/" + player.GetPlayerName()+ "\x1b[0m", false, false)
|
//Chat_ServerPrivateMessage(player, killstat_prefix + "This server collects data using the Tone API. Check your data here: \x1b[34mtoneapi.com/" + player.GetPlayerName()+ "\x1b[0m", false, false)
|
||||||
Chat_ServerPrivateMessage(player, prefix + "This server collects data using the WIP Tone API. View statistics at https://toneapi.github.io/ToneAPI_webclient/", false, false)
|
Chat_ServerPrivateMessage(player, killstat_prefix + "This server collects data using the WIP Tone API. View statistics at https://toneapi.github.io/ToneAPI_webclient/", false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -276,11 +274,6 @@ var function GetTitan(entity player) {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
function Log(string s) {
|
|
||||||
print(prefix + s)
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
function Tone_Test_Auth() {
|
function Tone_Test_Auth() {
|
||||||
HttpRequest request
|
HttpRequest request
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
globalize_all_functions
|
||||||
|
|
||||||
|
global string killstat_prefix = "\x1b[38;5;81m[TONE API]\x1b[0m "
|
||||||
|
|
||||||
|
void function Log(string s) {
|
||||||
|
print(killstat_prefix + s)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user