mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
[MIRROR] Fixes null-named painting issue (#2683)
* Fixes null-named painting issue (#56113) There was an issue where you could name paintings nothing, which would cause issues with persistency. This was because the stripped_input didn't actually check that you put something in, so the PR adds that check. It now ensures, both when saved and loaded, that there is a title. If not, it sets them to the default 'Untitled Artwork' * Fixes null-named painting issue Co-authored-by: Coffee <CoffeeDragon16@gmail.com>
This commit is contained in:
@@ -323,6 +323,8 @@
|
||||
var/title = chosen["title"]
|
||||
var/author = chosen["ckey"]
|
||||
var/png = "data/paintings/[persistence_id]/[chosen["md5"]].png"
|
||||
if(!title)
|
||||
title = "Untitled Artwork" //Should prevent NULL named art from loading as NULL, if you're still getting the admin log chances are persistence is broken
|
||||
if(!title)
|
||||
message_admins("<span class='notice'>Painting with NO TITLE loaded on a [persistence_id] frame in [get_area(src)]. Please delete it, it is saved in the database with no name and will create bad assets.</span>")
|
||||
if(!fexists(png))
|
||||
@@ -353,7 +355,7 @@
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
return
|
||||
if(!C.painting_name)
|
||||
return
|
||||
C.painting_name = "Untitled Artwork"
|
||||
var/data = C.get_data_string()
|
||||
var/md5 = md5(lowertext(data))
|
||||
var/list/current = SSpersistence.paintings[persistence_id]
|
||||
|
||||
Reference in New Issue
Block a user