[READY] Widescreen (#20861)

* TM Needed - Widescreen

* A lot of fixes

* TM notice

* Feedback thread

* Minor tweaks

* Expans silicon view stuff

* Fix viewmods

* The preferential option

* Why were these global

* Fix clickcatch sizing, fix parallax issues

* Maybe fixes the runtime

* READY
This commit is contained in:
AffectedArc07
2023-06-07 21:09:16 +01:00
committed by GitHub
parent fa7e321f10
commit 48b0210064
30 changed files with 264 additions and 189 deletions
+13 -3
View File
@@ -322,6 +322,9 @@
// ToS accepted
tos_consent = TRUE
// Setup widescreen
view = prefs.viewrange
prefs.init_keybindings(prefs.keybindings_overrides) //The earliest sane place to do it where prefs are not null, if they are null you can't do crap at lobby
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
@@ -371,6 +374,10 @@
winset(src, null, "command=\".configure graphics-hwmode off\"")
winset(src, null, "command=\".configure graphics-hwmode on\"")
// Try doing this before mob login
generate_clickcatcher()
apply_clickcatcher()
. = ..() //calls mob.Login()
mob.update_client_colour(0) // Activate colourblind mode if they have one set
@@ -394,9 +401,6 @@
// activate_darkmode() calls the CL update button proc, so we dont want it double called
SSchangelog.UpdatePlayerChangelogButton(src)
generate_clickcatcher()
apply_clickcatcher()
if(show_update_prompt)
show_update_notice()
@@ -433,6 +437,7 @@
to_chat(src, "<span class='notice'>You are currently connected [prefs.server_region ? "via the <b>[prefs.server_region]</b> relay" : "directly"] to Paradise.</span>")
to_chat(src, "<span class='notice'>You can change this using the <code>Change Region</code> verb in the OOC tab, as selecting a region closer to you may reduce latency.</span>")
/client/proc/is_connecting_from_localhost()
var/static/list/localhost_addresses = list("127.0.0.1", "::1")
if((!address && !world.port) || (address in localhost_addresses))
@@ -1251,6 +1256,11 @@
winset(src, null, "command=\".configure graphics-hwmode off\"")
winset(src, null, "command=\".configure graphics-hwmode on\"")
/// Returns the biggest number from client.view so we can do easier maths
/client/proc/maxview()
var/list/screensize = getviewsize(view)
return max(screensize[1], screensize[2])
#undef LIMITER_SIZE
#undef CURRENT_SECOND
#undef SECOND_COUNT