Removes widescreen config (#91419)

19x15 forever, or 15x15 if you're non widescreen user.

Idek why this is a config
This commit is contained in:
John Willard
2025-06-21 22:38:18 -04:00
committed by Roxy
parent 4869f40874
commit 2a79d6424e
10 changed files with 22 additions and 38 deletions
+5
View File
@@ -15,6 +15,11 @@
/// Used for HUD objects
#define APPEARANCE_UI (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE)
//used to set the default viewport to the user's preference.
#define VIEWPORT_USE_PREF "use_pref"
#define WIDESCREEN_VIEWPORT_SIZE "21x15" // BUBBER EDIT CHANGE - ORIGINAL: #define WIDESCREEN_VIEWPORT_SIZE "19x15"
#define SQUARE_VIEWPORT_SIZE "15x15"
/*
These defines specificy screen locations. For more information, see the byond documentation on the screen_loc var.
@@ -633,12 +633,6 @@
default = -1
min_val = 0
/datum/config_entry/string/default_view
default = "15x15"
/datum/config_entry/string/default_view_square
default = "15x15"
/datum/config_entry/flag/log_pictures
/datum/config_entry/flag/picture_logging_camera
+11 -8
View File
@@ -20,9 +20,9 @@
/// The client that owns this view packet
var/client/chief = null
/datum/view_data/New(client/owner, view_string)
default = view_string
/datum/view_data/New(client/owner)
chief = owner
default = getScreenSize()
apply()
/datum/view_data/Destroy()
@@ -30,7 +30,10 @@
return ..()
/datum/view_data/proc/setDefault(string)
default = string
if(string == VIEWPORT_USE_PREF)
default = getScreenSize()
else
default = string
apply()
/datum/view_data/proc/afterViewChange()
@@ -56,6 +59,11 @@
/datum/view_data/proc/isZooming()
return (width || height)
/datum/view_data/proc/getScreenSize()
if(chief.prefs.read_preference(/datum/preference/toggle/widescreen))
return WIDESCREEN_VIEWPORT_SIZE
return SQUARE_VIEWPORT_SIZE
/datum/view_data/proc/resetToDefault()
width = 0
height = 0
@@ -137,8 +145,3 @@
animate(chief, pixel_x = ICON_SIZE_X*_x, pixel_y = ICON_SIZE_Y*_y, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW)
//Ready for this one?
setTo(radius)
/proc/getScreenSize(widescreen)
if(widescreen)
return CONFIG_GET(string/default_view)
return CONFIG_GET(string/default_view_square)
+1 -1
View File
@@ -363,7 +363,7 @@ ADMIN_VERB(toggle_view_range, R_ADMIN, "Change View Range", "Switch between 1x a
if(user.view_size.getView() == user.view_size.default)
user.view_size.setTo(input(user, "Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,37) - 7)
else
user.view_size.resetToDefault(getScreenSize(user.prefs.read_preference(/datum/preference/toggle/widescreen)))
user.view_size.resetToDefault()
log_admin("[key_name(user)] changed their view range to [user.view].")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Change View Range", "[user.view]")) // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+1 -1
View File
@@ -572,7 +572,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
loot_panel = new(src)
view_size = new(src, getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
view_size = new(src)
set_fullscreen(logging_in = TRUE)
view_size.resetFormat()
view_size.setZoomMode()
+1 -1
View File
@@ -4,7 +4,7 @@
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/widescreen/apply_to_client(client/client, value)
client.view_size?.setDefault(getScreenSize(value))
client.view_size?.setDefault(VIEWPORT_USE_PREF)
/datum/preference/toggle/fullscreen_mode
default_value = FALSE
+1 -1
View File
@@ -379,7 +379,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(mind.current.key && !IS_FAKE_KEY(mind.current.key)) //makes sure we don't accidentally kick any clients
to_chat(usr, span_warning("Another consciousness is in your body...It is resisting you."))
return
client.view_size.setDefault(getScreenSize(client.prefs.read_preference(/datum/preference/toggle/widescreen)))//Let's reset so people can't become allseeing gods
client.view_size.resetToDefault()//Let's reset so people can't become allseeing gods
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
if(mind.current.stat == DEAD && SSlag_switch.measures[DISABLE_DEAD_KEYLOOP])
to_chat(src, span_warning("To leave your body again use the Ghost verb."))
+1 -4
View File
@@ -105,10 +105,7 @@
stop_sound_channel(CHANNEL_AMBIENCE)
if(client)
if(client.view_size)
client.view_size.resetToDefault() // Resets the client.view in case it was changed.
else
client.change_view(getScreenSize(client.prefs.read_preference(/datum/preference/toggle/widescreen)))
client.view_size.resetToDefault() // Resets the client.view in case it was changed.
for(var/datum/action/A as anything in persistent_client.player_actions)
A.Grant(src)
+1 -2
View File
@@ -174,7 +174,6 @@
var/turf/target_turf = get_turf(target)
if(isnull(target_turf))
return FALSE
if(isAI(user))
return can_ai_target(target_turf)
if(ismob(user))
@@ -198,7 +197,7 @@
/// Check whether a mob could take a picture of the target turf.
/obj/item/camera/proc/can_mob_target(turf/target_turf, mob/user)
var/user_view = user.client ? user.client.view : CONFIG_GET(string/default_view)
var/user_view = user.client ? user.client.view : WIDESCREEN_VIEWPORT_SIZE
var/user_eye = user.client ? user.client.eye : user
if(!(target_turf in get_hear(user_view, user_eye)))
return FALSE
-14
View File
@@ -490,20 +490,6 @@ DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
## Uncomment to set the number of /world/Reboot()s before the DreamDaemon restarts itself. 0 means restart every round. Requires tgstation server tools.
#ROUNDS_UNTIL_HARD_RESTART 10
##Default view size, in tiles.
## By default, this is 15x15, which gets simplified to 7 by byond
## 15x15 would be the standard square view. 21x15 is what goonstation uses for widescreen.
## Setting this to something different from DEFAULT_VIEW_SQUARE will enable widescreen toggles
## Do note that changing this value will affect the title screen. The title screen will have to be updated manually if this is changed.
DEFAULT_VIEW 21x15
##Default view size, in tiles. Should *always* be square.
## The alternative square viewport size if you're using a widescreen view size
## You probably shouldn't ever be changing this, but it's here if you want to.
DEFAULT_VIEW_SQUARE 15x15
## Enable automatic profiling - Byond 513.1506 and newer only.
#AUTO_PROFILE