forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'TGUIv4-TestMerge' of https://github.com/Aylong220/Parad…
…ise-SS220 into tgui4-translate
- Loading branch information
Showing
797 changed files
with
39,355 additions
and
26,995 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) 2020 Aleksej Komarov | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
/// How many chat payloads to keep in history | ||
#define CHAT_RELIABILITY_HISTORY_SIZE 5 | ||
/// How many resends to allow before giving up | ||
#define CHAT_RELIABILITY_MAX_RESENDS 3 | ||
|
||
#define MESSAGE_TYPE_SYSTEM "system" | ||
#define MESSAGE_TYPE_LOCALCHAT "localchat" | ||
#define MESSAGE_TYPE_RADIO "radio" | ||
#define MESSAGE_TYPE_INFO "info" | ||
#define MESSAGE_TYPE_WARNING "warning" | ||
#define MESSAGE_TYPE_DEADCHAT "deadchat" | ||
#define MESSAGE_TYPE_OOC "ooc" | ||
#define MESSAGE_TYPE_ADMINPM "adminpm" | ||
#define MESSAGE_TYPE_COMBAT "combat" | ||
#define MESSAGE_TYPE_ADMINCHAT "adminchat" | ||
#define MESSAGE_TYPE_MENTORCHAT "mentorchat" | ||
#define MESSAGE_TYPE_EVENTCHAT "eventchat" | ||
#define MESSAGE_TYPE_ADMINLOG "adminlog" | ||
#define MESSAGE_TYPE_ATTACKLOG "attacklog" | ||
#define MESSAGE_TYPE_DEBUG "debug" |
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
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,8 +1,46 @@ | ||
// TGUI defines | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// Generate a filename for this asset | ||
/// The same asset will always lead to the same asset name | ||
/// (Generated names do not include file extention.) | ||
/proc/generate_asset_name(file) | ||
return "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 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.