Whitespace Standardization [MDB IGNORE] (#15748)

* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d844.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d.

* Attempt to normalize example.yml (and another file I guess)

* Try again
This commit is contained in:
Drathek
2024-02-20 11:28:51 +01:00
committed by GitHub
parent 3b61f677b3
commit 7c8bb85de3
1175 changed files with 818171 additions and 818145 deletions
@@ -1,52 +1,52 @@
GLOBAL_VAR(managed_browser_id_ticker)
// This holds information on managing a /datum/browser object.
// Managing can include things like persisting the state of specific information inside of this object, receiving Topic() calls, or deleting itself when the window is closed.
// This is useful for browser windows to be able to stand 'on their own' instead of being tied to something in the game world, like an object or mob.
/datum/managed_browser
var/client/my_client = null
var/browser_id = null
var/base_browser_id = null
var/title = null
var/size_x = 200
var/size_y = 400
var/display_when_created = TRUE
/datum/managed_browser/New(client/new_client)
if(!new_client)
stack_trace("Managed browser object was not given a client.")
return
if(!base_browser_id)
stack_trace("Managed browser object does not have a base browser id defined in its type.")
return
my_client = new_client
browser_id = "[base_browser_id]-[GLOB.managed_browser_id_ticker++]"
if(display_when_created)
display()
/datum/managed_browser/Destroy()
my_client = null
return ..()
// Override if you want to have the browser title change conditionally.
// Otherwise it's easier to just change the title variable directly.
/datum/managed_browser/proc/get_title()
return title
// Override to display the html information.
// It is suggested to build it with a list, and use list.Join() at the end.
// This helps prevent excessive concatination, which helps preserves BYOND's string tree from becoming a laggy mess.
/datum/managed_browser/proc/get_html()
return
/datum/managed_browser/proc/display()
interact(get_html(), get_title(), my_client)
/datum/managed_browser/proc/interact(html, title, client/C)
var/datum/browser/popup = new(C.mob, browser_id, title, size_x, size_y, src)
popup.set_content(html)
GLOBAL_VAR(managed_browser_id_ticker)
// This holds information on managing a /datum/browser object.
// Managing can include things like persisting the state of specific information inside of this object, receiving Topic() calls, or deleting itself when the window is closed.
// This is useful for browser windows to be able to stand 'on their own' instead of being tied to something in the game world, like an object or mob.
/datum/managed_browser
var/client/my_client = null
var/browser_id = null
var/base_browser_id = null
var/title = null
var/size_x = 200
var/size_y = 400
var/display_when_created = TRUE
/datum/managed_browser/New(client/new_client)
if(!new_client)
stack_trace("Managed browser object was not given a client.")
return
if(!base_browser_id)
stack_trace("Managed browser object does not have a base browser id defined in its type.")
return
my_client = new_client
browser_id = "[base_browser_id]-[GLOB.managed_browser_id_ticker++]"
if(display_when_created)
display()
/datum/managed_browser/Destroy()
my_client = null
return ..()
// Override if you want to have the browser title change conditionally.
// Otherwise it's easier to just change the title variable directly.
/datum/managed_browser/proc/get_title()
return title
// Override to display the html information.
// It is suggested to build it with a list, and use list.Join() at the end.
// This helps prevent excessive concatination, which helps preserves BYOND's string tree from becoming a laggy mess.
/datum/managed_browser/proc/get_html()
return
/datum/managed_browser/proc/display()
interact(get_html(), get_title(), my_client)
/datum/managed_browser/proc/interact(html, title, client/C)
var/datum/browser/popup = new(C.mob, browser_id, title, size_x, size_y, src)
popup.set_content(html)
popup.open()