Better UIs (#9355)

Improved the UIs of: Memories/Notes, cult tomes, autolathes, biogenerators, chem heaters, wizard spellbooks, cryopods, soulstones, space heaters.
This commit is contained in:
Geeves
2020-07-18 00:10:28 +03:00
committed by GitHub
parent 5ffb4c4486
commit 2b81cdd077
21 changed files with 262 additions and 120 deletions
@@ -78,14 +78,15 @@ var/list/artefact_feedback = list(/obj/structure/closet/wizard/armor = "HS",
var/name = "" //name of target
var/desc = "" //description of target
var/info = "" //additional information
dat += "<div class='spell-block'>"
if(ispath(spellbook.spells[i],/datum/spellbook))
var/datum/spellbook/S = spellbook.spells[i]
name = initial(S.name)
name = html_decode(capitalize_first_letters(initial(S.name)))
desc = initial(S.book_desc)
info = "<font color='#ff33cc'>[initial(S.max_uses)] Spell Slots</font>"
else if(ispath(spellbook.spells[i],/obj))
var/obj/O = spellbook.spells[i]
name = "Artefact: [capitalize(initial(O.name))]" //because 99.99% of objects dont have capitals in them and it makes it look weird.
name = "Artefact: [capitalize_first_letters(initial(O.name))]" //because 99.99% of objects dont have capitals in them and it makes it look weird.
desc = initial(O.desc)
else if(ispath(spellbook.spells[i],/spell))
var/spell/S = spellbook.spells[i]
@@ -110,9 +111,14 @@ var/list/artefact_feedback = list(/obj/structure/closet/wizard/armor = "HS",
if(spellbook.book_flags & CAN_MAKE_CONTRACTS)
dat += " <A href='byond://?src=\ref[src];path=[spellbook.spells[i]];contract=1;'>Make Contract</a>"
dat += "<br><i>[desc]</i><br>"
dat += "</div>"
dat += "<center><A href='byond://?src=\ref[src];reset=1'>Re-memorize your spellbook.</a></center>"
dat += "<center><A href='byond://?src=\ref[src];lock=1'>[spellbook.book_flags & LOCKED ? "Unlock" : "Lock"] the spellbook.</a></center>"
user << browse(dat,"window=spellbook")
var/datum/browser/spellbook_win = new(user, "spellbook", spellbook.title)
spellbook_win.set_content(dat)
spellbook_win.add_stylesheet("spellbook", 'html/browser/spellbook.css')
spellbook_win.open()
/obj/item/spellbook/Topic(href,href_list)
..()
@@ -233,7 +239,7 @@ var/list/artefact_feedback = list(/obj/structure/closet/wizard/armor = "HS",
return "You learn the spell [S]"
/datum/spellbook
var/name = "\improper book of tomes"
var/name = "book of tomes"
var/desc = "The legendary book of spells of the wizard."
var/book_desc = "Holds information on the various tomes available to a wizard"
var/feedback = "" //doesn't need one.
@@ -3,7 +3,7 @@
/datum/spellbook/battlemage
name = "\improper battlemage's bible"
name = "battlemage's bible"
feedback = "BM"
desc = "A treatise on the use of magic in combat situation."
book_desc = "Mix physical with the mystical in head to head combat."
@@ -2,7 +2,7 @@
spellbook_type = /datum/spellbook/cleric
/datum/spellbook/cleric
name = "\improper cleric's tome"
name = "cleric's tome"
feedback = "CR"
desc = "For those who do not harm, or at least feel sorry about it."
book_desc = "All about healing and control. Mobility and offense comes at a higher price but not impossible."
@@ -2,7 +2,7 @@
spellbook_type = /datum/spellbook/druid
/datum/spellbook/druid
name = "\improper druid's leaflet"
name = "druid's leaflet"
feedback = "DL"
desc = "It smells like an air freshener."
book_desc = "Summons, nature, and a bit o' healin."
@@ -3,7 +3,7 @@
/datum/spellbook/necromancer
name = "\improper necromancer's grimoire"
name = "necromancer's grimoire"
feedback = "NG"
desc = "A grimoire full of spells dealing with the death and the afterlife."
book_desc = "A spellbook full of dark magic dealing mostly with the afterlife."
@@ -2,7 +2,7 @@
spellbook_type = /datum/spellbook/spatial
/datum/spellbook/spatial
name = "\improper spatial manual"
name = "spatial manual"
feedback = "SP"
desc = "You feel like this might disappear from out of under you."
book_desc = "Movement and teleportation. Run from your problems!"
@@ -2,7 +2,7 @@
spellbook_type = /datum/spellbook/standard
/datum/spellbook/standard
name = "\improper standard spellbook"
name = "standard spellbook"
feedback = "SB"
title = "Book of Spells and Artefacts"
title_desc = "Buy spells using your available spell slots. Artefacts may also be bought however their cost is permanent."
@@ -9,7 +9,7 @@
..()
/datum/spellbook/student
name = "\improper student's spellbook"
name = "student's spellbook"
feedback = "ST"
desc = "This spell book has a sticker on it that says, 'certified for children 5 and older'."
book_desc = "This spellbook is dedicated to teaching neophytes in the ways of magic."