Skip to content

Commit 23a1ed9

Browse files
authored
Lagswitch 845 (#847)
* Makes #845 a lag switch * fuck * Overwrite the previous AutoChangelog
1 parent 2ca7768 commit 23a1ed9

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

code/__DEFINES/lag_switch.dm

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
#define DISABLE_PARALLAX 7
1717
/// Disables footsteps, TRAIT_BYPASS_MEASURES exempted
1818
#define DISABLE_FOOTSTEPS 8
19+
/// Disable icon VV render preview. Unlikely to be of use in 90% of circumstances, unless GFI starts shitting bricks again.
20+
#define DISABLE_VV_ICON_PREVIEW 9
1921

20-
#define MEASURES_AMOUNT 8 // The total number of switches defined above
22+
#define MEASURES_AMOUNT 9 // The total number of switches defined above

code/_globalvars/admin.dm

-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ GLOBAL_LIST_INIT(vv_special_lists, init_special_list_names())
2828
if(isnull(locate(REF(value))))
2929
output += varname
3030
return output
31-
32-
/// Disable rendering icon previews in VV.
33-
GLOBAL_VAR_INIT(debug_disable_vv_icon_render, FALSE)

code/modules/admin/verbs/admingame.dm

+1
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
458458
dat += "<br/><b>SET ALL MEASURES: <a href='?_src_=holder;[HrefToken()];change_lag_switch=ALL_ON'>ON</a> | <a href='?_src_=holder;[HrefToken()];change_lag_switch=ALL_OFF'>OFF</a></b><br/>"
459459
dat += "<br/>Disable ghosts zoom and t-ray verbs (except staff): <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_GHOST_ZOOM_TRAY]'><b>[SSlag_switch.measures[DISABLE_GHOST_ZOOM_TRAY] ? "On" : "Off"]</b></a><br/>"
460460
dat += "Disable late joining: <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_NON_OBSJOBS]'><b>[SSlag_switch.measures[DISABLE_NON_OBSJOBS] ? "On" : "Off"]</b></a><br/>"
461+
dat += "Disable VV Icon Preview Generation: <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_VV_ICON_PREVIEW]'><b>[SSlag_switch.measures[DISABLE_VV_ICON_PREVIEW] ? "On" : "Off"]</b></a><br/>"
461462
dat += "<br/>============! MAD GHOSTS ZONE !============<br/>"
462463
dat += "Disable deadmob keyLoop (except staff, informs dchat): <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_DEAD_KEYLOOP]'><b>[SSlag_switch.measures[DISABLE_DEAD_KEYLOOP] ? "On" : "Off"]</b></a><br/>"
463464
dat += "==========================================<br/>"

code/modules/admin/view_variables/view_variables.dm

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
var/type = islist? /list : thing.type
2727
var/no_icon = FALSE
2828

29-
if(!GLOB.debug_disable_vv_icon_render)
29+
if(!SSlag_switch.measures[DISABLE_VV_ICON_PREVIEW])
3030
if(isatom(thing))
3131
sprite = getFlatIcon(thing)
3232
if(!sprite)
@@ -37,8 +37,8 @@
3737
sprite = icon(image_object.icon, image_object.icon_state)
3838

3939
var/sprite_text
40-
if(GLOB.debug_disable_vv_icon_render)
41-
sprite_text = "\[RENDER DISABLED\]"
40+
if(SSlag_switch.measures[DISABLE_VV_ICON_PREVIEW])
41+
sprite_text = span_redtext("\[RENDER DISABLED\]")
4242
if(sprite)
4343
hash = md5(sprite)
4444
src << browse_rsc(sprite, "vv[hash].png")
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
author: francinum
22
delete-after: true
33
changes:
4-
- admin: GLOB.debug_disable_vv_icon_render can be used to disable VV's usage of
5-
GetFlatIcon at runtime.
4+
- admin: A Lag Switch has been added to disable VV Icon Previews.

0 commit comments

Comments
 (0)