[MIRROR] Fixes a few runtimes with armor, spatial grids, and notes [MDB IGNORE] (#11126)

* Fixes a few runtimes with armor, spatial grids, and notes (#64514)

* Atoms  (mostly new players caused by logout) can get deleted before spatial grid initializes.

* Fixes images when viewing your notes before SSassets initializes.

* Fixes abandoned crate runtime.

* Fixes armor runtimes on eating clothes (this really needs alternative solution)

* Fixes a few runtimes with armor, spatial grids, and notes

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-01-30 05:06:14 +01:00
committed by GitHub
parent bca5c1945c
commit 5ed2dfe5f3
4 changed files with 22 additions and 14 deletions
+4 -1
View File
@@ -372,6 +372,10 @@
if(!SSdbcore.Connect())
to_chat(usr, span_danger("Failed to establish database connection."), confidential = TRUE)
return
//Needs to be requested before url retrieval since you can view your notes before SSassets finishes initialization
var/datum/asset/notes_assets = get_asset_datum(/datum/asset/simple/notes)
var/list/output = list()
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
var/list/navbar = list("<a href='?_src_=holder;[HrefToken()];nonalpha=1'>All</a><a href='?_src_=holder;[HrefToken()];nonalpha=2'>#</a>")
@@ -624,7 +628,6 @@
output += "<center><a href='?_src_=holder;[HrefToken()];addmessageempty=1'>Add message</a><a href='?_src_=holder;[HrefToken()];addwatchempty=1'>Add watchlist entry</a><a href='?_src_=holder;[HrefToken()];addnoteempty=1'>Add note</a></center>"
output += ruler
var/datum/browser/browser = new(usr, "Note panel", "Manage player notes", 1000, 500)
var/datum/asset/notes_assets = get_asset_datum(/datum/asset/simple/notes)
notes_assets.send(usr.client)
browser.set_content(jointext(output, ""))
browser.open()