[MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)

* tgui Preferences Menu + total rewrite of the preferences backend

* nah, we dont need to ping those people

* trying to remove the funny stuff

* unmodularizing this

* prefs reset

* this may need to be reverted, who knows

* okay, this part

* perhaps

* EEEEEEEEE

* unsanitary

* E

* Stage 1 + loadout system

* more fixes

* E

* I mean, it launches?

* More fixes and reorganisation

* E

* customisation code is spaget.

* disable ERP prefs

* Update erp_preferences.dm

* Update erp_preferences.dm

* E

* Slowly getting there

* It may be time for help :)

* tri...colors... help

* preferences now pass preferences

* Update dna.dm

* Fuck this man

* missing savefile return, set_species works, removed dumb stuff from updateappearance

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224

* https://github.com/tgstation/tgstation/pull/61519

* https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278

* e

* le butonAZARAK HELLO

* hhh

* Proper recognition where it's due, MrMelbert!

* EEEE

* examine block

* Better gen hit sounds from whitedream

* final loadout touches, more bug fixes im sure to come

* i said there would be bugfixes

* Update LoadoutManager.js

* Missing preferences in the html menu

* LIVE TESTING PHASE BABY

* Update LoadoutManager.js

* EEE

* LAUNCH TEST FIRE

* Update job.dm

* Update new_player.dm

* 50gb DAY ONE PATCH

* EEE

* Update preferences.dm

* buggle fixes

* Update examine.dm

* >LOOC starts on

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2021-09-23 00:40:37 +01:00
committed by GitHub
co-authored by Mothblocks jjpark-kb Gandalf Azarak
parent a5bfc42228
commit 124ddd7cca
582 changed files with 19548 additions and 8366 deletions
+12 -12
View File
@@ -256,7 +256,7 @@
/obj/structure/sign/painting/Initialize(mapload, dir, building)
. = ..()
SSpersistence.painting_frames += src
SSpersistent_paintings.painting_frames += src
if(dir)
setDir(dir)
if(building)
@@ -265,7 +265,7 @@
/obj/structure/sign/painting/Destroy()
. = ..()
SSpersistence.painting_frames -= src
SSpersistent_paintings.painting_frames -= src
/obj/structure/sign/painting/attackby(obj/item/I, mob/user, params)
if(!current_canvas && istype(I, /obj/item/canvas))
@@ -336,12 +336,12 @@
* Deleting paintings leaves their json, so this proc will remove the json and try again if it finds one of those.
*/
/obj/structure/sign/painting/proc/load_persistent()
if(!persistence_id || !SSpersistence.paintings || !SSpersistence.paintings[persistence_id])
if(!persistence_id || !SSpersistent_paintings.paintings[persistence_id])
return
var/list/painting_category = SSpersistence.paintings[persistence_id]
var/list/painting_category = SSpersistent_paintings.paintings[persistence_id]
var/list/painting
while(!painting)
if(!length(SSpersistence.paintings[persistence_id]))
if(!length(SSpersistent_paintings.paintings[persistence_id]))
return //aborts loading anything this category has no usable paintings
var/list/chosen = pick(painting_category)
if(!fexists("data/paintings/[persistence_id]/[chosen["md5"]].png")) //shitmin deleted this art, lets remove json entry to avoid errors
@@ -383,7 +383,7 @@
current_canvas.painting_name = "Untitled Artwork"
var/data = current_canvas.get_data_string()
var/md5 = md5(lowertext(data))
var/list/current = SSpersistence.paintings[persistence_id]
var/list/current = SSpersistent_paintings.paintings[persistence_id]
if(!current)
current = list()
for(var/list/entry in current)
@@ -395,7 +395,7 @@
if(result)
CRASH("Error saving persistent painting: [result]")
current += list(list("title" = current_canvas.painting_name , "md5" = md5, "ckey" = current_canvas.author_ckey))
SSpersistence.paintings[persistence_id] = current
SSpersistent_paintings.paintings[persistence_id] = current
/obj/item/canvas/proc/fill_grid_from_icon(icon/I)
var/h = I.Height() + 1
@@ -437,16 +437,16 @@
return
var/md5 = md5(lowertext(current_canvas.get_data_string()))
var/author = current_canvas.author_ckey
var/list/current = SSpersistence.paintings[persistence_id]
var/list/current = SSpersistent_paintings.paintings[persistence_id]
if(current)
for(var/list/entry in current)
if(entry["md5"] == md5)
current -= entry
var/png = "data/paintings/[persistence_id]/[md5].png"
fdel(png)
for(var/obj/structure/sign/painting/P in SSpersistence.painting_frames)
if(P.current_canvas && md5(P.current_canvas.get_data_string()) == md5)
QDEL_NULL(P.current_canvas)
P.update_appearance()
for(var/obj/structure/sign/painting/painting as anything in SSpersistent_paintings.painting_frames)
if(painting.current_canvas && md5(painting.current_canvas.get_data_string()) == md5)
QDEL_NULL(painting.current_canvas)
painting.update_appearance()
log_admin("[key_name(user)] has deleted a persistent painting made by [author].")
message_admins(span_notice("[key_name_admin(user)] has deleted persistent painting made by [author]."))