forked from ss220-space/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: port tgui4 from paradise (ss220-space#4981)
- Loading branch information
Showing
719 changed files
with
41,833 additions
and
31,820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,51 @@ | ||
{ | ||
"eslint.workingDirectories": ["tgui/"], | ||
"eslint.nodePath": "tgui/.yarn/sdks", | ||
"prettier.configPath": "tgui/.prettierrc.yml", | ||
"prettier.prettierPath": "tgui/.yarn/sdks/prettier/index.cjs", | ||
"typescript.tsdk": "tgui/.yarn/sdks/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"eslint.format.enable": true, | ||
"eslint.rules.customizations": [ | ||
{ "rule": "*", "severity": "warn" } | ||
], | ||
|
||
"[javascript]": { | ||
"editor.rulers": [80], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascriptreact]": { | ||
"editor.rulers": [80], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescript]": { | ||
"editor.rulers": [80], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[typescriptreact]": { | ||
"editor.rulers": [80], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
"[scss]": { | ||
"editor.rulers": [80], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
}, | ||
|
||
"editor.formatOnSave": true, | ||
"gitlens.advanced.blame.customArguments": [ | ||
"--ignore-revs-file", | ||
"${workspaceRoot}/.git-blame-ignore-revs" | ||
], | ||
"workbench.editorAssociations": { | ||
"*.dmi": "dmiEditor.dmiEditor" | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/// Get html to load a url. | ||
/// for use inside of browse() calls to html assets that might be loaded on a cdn. | ||
#define URL2HTMLLOADER(url) {"<html><head><meta http-equiv="refresh" content="0;URL='[url]'"/></head><body onLoad="parent.location='[url]'"></body></html>"} | ||
|
||
/// Generate a filename for this asset | ||
/// The same asset will always lead to the same asset name | ||
/// Generated names do not include file extension. | ||
#define GENERATE_ASSET_NAME(file) "asset.[md5(fcopy_rsc(file))]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// TGUI Modal defines | ||
#define UI_MODAL_INPUT_MAX_LENGTH 1024 | ||
#define UI_MODAL_INPUT_MAX_LENGTH_NAME 64 // Names for generally anything don't go past 32, let alone 64. | ||
|
||
#define UI_MODAL_OPEN 1 | ||
#define UI_MODAL_DELEGATE 2 | ||
#define UI_MODAL_ANSWER 3 | ||
#define UI_MODAL_CLOSE 4 | ||
|
||
/// Green eye; fully interactive | ||
#define UI_INTERACTIVE 2 | ||
/// Orange eye; updates but is not interactive | ||
#define UI_UPDATE 1 | ||
/// Red eye; disabled, does not update | ||
#define UI_DISABLED 0 | ||
/// UI Should close | ||
#define UI_CLOSE -1 | ||
|
||
/// Maximum number of windows that can be suspended/reused | ||
#define TGUI_WINDOW_SOFT_LIMIT 5 | ||
/// Maximum number of open windows | ||
#define TGUI_WINDOW_HARD_LIMIT 9 | ||
|
||
/// Maximum ping timeout allowed to detect zombie windows | ||
#define TGUI_PING_TIMEOUT (4 SECONDS) | ||
/// Used for rate-limiting to prevent DoS by excessively refreshing a TGUI window | ||
#define TGUI_REFRESH_FULL_UPDATE_COOLDOWN (1 SECONDS) | ||
|
||
/// Window does not exist | ||
#define TGUI_WINDOW_CLOSED 0 | ||
/// Window was just opened, but is still not ready to be sent data | ||
#define TGUI_WINDOW_LOADING 1 | ||
/// Window is free and ready to receive data | ||
#define TGUI_WINDOW_READY 2 | ||
|
||
/// Get a window id based on the provided pool index | ||
#define TGUI_WINDOW_ID(index) "tgui-window-[index]" | ||
/// Get a pool index of the provided window id | ||
#define TGUI_WINDOW_INDEX(window_id) text2num(copytext(window_id, 13)) | ||
|
||
/// Creates a message packet for sending via output() | ||
#define TGUI_CREATE_MESSAGE(type, payload) ( \ | ||
url_encode(json_encode(list( \ | ||
"type" = type, \ | ||
"payload" = payload, \ | ||
)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.