puts paintings on scoreboard (#31720)

* puts paintings on scoreboard

* allows admemes to ban specific paintings from the scoreboard

* lost in translation

* adds artistbans

* attempt at sorting by artist

* sorting works but it's not grabbing the multiple entries anymore

* better artistban

* 100% functional, blessed exxion

* remove debug

* good catch, linter

* now with 100% more tables!

* now with 100% less ckeys!
This commit is contained in:
SonixApache
2022-01-01 00:18:13 +01:00
committed by GitHub
parent f5f1da26f0
commit 38be48b608
5 changed files with 55 additions and 1 deletions

View File

@@ -114,6 +114,7 @@
var/author = ""
var/title = ""
var/description = ""
var/contributing_artists = list()
/datum/custom_painting/New(parent, bitmap_width, bitmap_height, offset_x=0, offset_y=0, base_color=src.base_color)
src.parent = parent
@@ -182,6 +183,10 @@
interface.updateContent("content", file2text("code/modules/html_interface/paintTool/canvas.tmpl"))
/datum/custom_painting/proc/interact(mob/user, datum/painting_utensil/p)
if(jobban_isbanned(user, "artist"))
to_chat(user, "<span class='warning'>Try as you might, you cannot possibly work out the intricacies of fine art!</span>")
return
var/paint_init_inputs = json_encode(list(
"width" = bitmap_width,
"height" = bitmap_height,
@@ -239,6 +244,7 @@
author = copytext(sanitize(url_decode(href_list["author"])), 1, MAX_NAME_LEN)
title = copytext(sanitize(url_decode(href_list["title"])), 1, MAX_NAME_LEN)
description = copytext(sanitize(url_decode(href_list["description"])), 1, MAX_MESSAGE_LEN)
contributing_artists += usr.ckey
return TRUE
/datum/custom_painting/proc/render_on(icon/ico, offset_x = src.offset_x, offset_y = src.offset_y)