/
client_defines.dm
240 lines (187 loc) · 9.14 KB
/
client_defines.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/client
/// Client is casted to /datum so that we're able to use datum variables, search for clients through datums, and not need to duplicate code for GCing
parent_type = /datum
////////////////
//ADMIN THINGS//
////////////////
/// hides the byond verb panel as we use our own custom version
show_verb_panel = FALSE
var/datum/admins/holder = null
var/last_message = "" //contains the last message sent by this client - used to protect against copy-paste spamming.
var/last_message_count = 0 //contains a number of how many times a message identical to last_message was sent.
var/last_message_time = 0 //holds the last time (based on world.time) a message was sent
var/datum/pm_tracker/pm_tracker
/////////
//OTHER//
/////////
var/datum/preferences/prefs = null
var/skip_antag = FALSE //TRUE when a player declines to be included for the selection process of game mode antagonists.
var/move_delay = 1
var/moving = null
var/area = null
// why the hell do we track this when you can just file > reconnect to bypass it
var/time_died_as_mouse = null //when the client last died as a mouse
var/typing = FALSE // Prevents typing window stacking
var/adminhelped = 0
///////////////
//SOUND STUFF//
///////////////
var/ambience_playing = FALSE
////////////
//SECURITY//
////////////
/// Used for limiting the rate of topic sends by the client to avoid abuse
var/list/topiclimiter
// comment out the line below when debugging locally to enable the options & messages menu
control_freak = CONTROL_FREAK_ALL
var/ssd_warning_acknowledged = FALSE
////////////////////////////////////
//things that require the database//
////////////////////////////////////
var/player_age = "--" //So admins know why it isn't working - Used to determine how old the account is - in days.
var/list/related_accounts_ip = list() //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
var/list/related_accounts_cid = list() //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
preload_rsc = 0 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server.
var/atom/movable/screen/click_catcher/void
var/ip_intel = "Disabled"
var/datum/click_intercept/click_intercept = null
/// Time when the click was intercepted
var/click_intercept_time = 0
//datum that controls the displaying and hiding of tooltips
var/datum/tooltip/tooltips
// Overlay for showing debug info
var/atom/movable/screen/debugtextholder/debug_text_overlay
/// Persistent storage for the flavour text of examined atoms.
var/list/description_holders = list()
// Donator stuff.
var/donator_level = 0
// If set to true, this client can interact with atoms such as buttons and doors on top of regular machinery interaction
var/advanced_admin_interaction = FALSE
/// Messages currently seen by this client
var/list/seen_messages
/// list of tabs containing spells and abilities
var/list/spell_tabs = list()
/// our current tab
var/stat_tab
/// list of all tabs
var/list/panel_tabs = list()
// Last world.time that the player tried to request their resources.
var/last_ui_resource_send = 0
/// If true, client cannot ready up, late join, or observe. Used for players with EXTREMELY old byond versions.
var/version_blocked = FALSE
/// Date the client registered their BYOND account on
var/byondacc_date
/// Days since the client's BYOND account was created
var/byondacc_age = 0
// Do not attempt to merge these vars together. They are for different things
/// Last world.time that a PM was send to discord by a player
var/last_discord_pm_time = 0
/// Last world/time that a PM was sent to the player by an admin
var/received_discord_pm = -99999 // Yes this super low number is intentional
///world.time they connected
var/connection_time
/// Has the client accepted the TOS about data collection and other stuff
var/tos_consent = FALSE
/// Is the client watchlisted
var/watchlisted = FALSE
/// Client's pAI save
var/datum/pai_save/pai_save
/// List of the clients CUIs
var/list/datum/custom_user_item/cui_entries = list()
/// The client's job ban holder
var/datum/job_ban_holder/jbh = new()
/// Input datum, what the client is pressing.
var/datum/input_data/input_data = new()
/// The client's active keybindings, depending on their active mob.
var/list/active_keybindings = list()
/// The client's movement keybindings to directions, which work regardless of modifiers.
var/list/movement_kb_dirs = list()
/// Used to make a special mouse cursor, this one for mouse up icon
var/mouse_up_icon = null
/// Used to make a special mouse cursor, this one for mouse up icon
var/mouse_down_icon = null
/// Used to override the mouse cursor so it doesnt get reset
var/mouse_override_icon = null
/// Autoclick list of two elements, first being the clicked thing, second being the parameters.
var/list/atom/selected_target[2]
/// Used in MouseDrag to preserve the original mouse click parameters
var/mouseParams = ""
/// Used in MouseDrag to preserve the last mouse-entered location.
var/mouse_location_UID
/// Used in MouseDrag to preserve the last mouse-entered object.
var/mouse_object_UID
/// When we started the currently active drag
var/drag_start = 0
/// The params we passed at the start of the drag, in list form
var/list/drag_details
/// The client's currently moused over datum, limited to movable and stored as UID
var/atom/movable/moused_over
/// A lazy list of atoms we've examined in the last RECENT_EXAMINE_MAX_WINDOW (default 2) seconds, so that we will call [/atom/proc/examine_more] instead of [/atom/proc/examine] on them when examining
/// A lazy list of atoms we've examined in the last RECENT_EXAMINE_MAX_WINDOW (default 2) seconds, so that we will call [/atom/proc/examine_more] instead of [/atom/proc/examine] on them when examining
var/list/recent_examines
/// Used to throw an admin warning if someone used a mouse macro. Also stores the world time so we can send funny noises to them
var/next_mouse_macro_warning
/*
DEPRECIATED VIEWMODS
*/
/// Was used to handle view modifications. Now only used for a mecha module. Please just edit the string in the future
var/list/ViewMods = list()
/// Stores the viewmod we set using this system. Only used for a mecha module
var/ViewModsActive = FALSE
/// Stores the icon size we use for skins. As the server has control freak enabled, this is always static
var/ViewPreferedIconSize = 0
/// Basically a local variable on a client datum. Used when setting macros and nowhere else
var/list/macro_sets
/// List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s
var/list/sent_assets = list()
/// List of all completed blocking send jobs awaiting acknowledgement by send_asset
var/list/completed_asset_jobs = list()
/*
ASSET SENDING
*/
/// The ID of the last asset job
var/last_asset_job = 0
/// The ID of the last asset job that was properly finished
var/last_completed_asset_job = 0
/*
PARALAX RELATED VARIABLES
*/
/// List of parallax layers a client is viewing. Accessed when paralax is updated
var/list/parallax_layers
/// A cached list of available parallax layers. This may potentially be changeable to a static variable. Updated upon changing parallax prefs
var/list/parallax_layers_cached
/// Added to parallax layers when parallax settings are changed
var/static/list/parallax_static_layers_tail = newlist(/atom/movable/screen/parallax_pmaster, /atom/movable/screen/parallax_space_whitifier)
/// Used with parallax to update the parallax offsets when the subsystem fires. Compared to the clients Eye variable
var/atom/movable/movingmob
/// Used with parallax to grab the offset needed. Uses the X and Y coords of the turf stored here
var/turf/previous_turf
/// Stored world.tim of the last parallax update. Used to make sure parallax isn't updated too often
var/last_parallax_shift
/// Deciseconds of added delay to parallax by client preferences
var/parallax_throttle = 0
/// The direction parallax will be moved it. References parallax_move_direction on areas
var/parallax_movedir = 0
/// The amount of parallax layers that will exist on your screen. Affected by the parallax preference
var/parallax_layers_max = 4
/// Handles how parallax loops in situations like shuttles leaving. Stores the timer that handles that
var/parallax_animate_timer
/// Used with the camera console to clear out the screen objects it adds to the client when the console is deleted
var/list/screen_maps = list()
/// Assigned say modal of the client
var/datum/tgui_say/tgui_say
/// Our object window datum. It stores info about and handles behavior for the object tab
var/datum/object_window_info/obj_window
/client/vv_edit_var(var_name, var_value)
switch(var_name)
// I know we will never be in a world where admins are editing client vars to let people bypass TOS
// But guess what, if I have the ability to overengineer something, I am going to do it
if("tos_consent")
return FALSE
// Dont fuck with this
if("cui_entries")
return FALSE
// or this
if("jbh")
return FALSE
return ..()