Complete Library Overhaul Part 1 (#17832)

* first edits

* more commits yay

* more changes

* Update paradise.dme

* changes

* more edits

* more edits

* changes

* more changes

* changes

* more stuff

stuff

Update tgui.bundle.js

* FUCK

* Many UI changes

* Update Lib Computer UI and Correct Map Issues

* squashed commits :)

Guts Old Book/Manual Code and Reworks it
final (almost) touches

* this should pass tests now

* fixes random ruin having a removed object

* adds review suggestions

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* squashed commits :)

update schema
adds python requested changes
implements proper python & sql scripts
applies some requested changes + minor fixes
bump SQL version to 40

Co-Authored-By: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* applies requested changes from code review

* lets pass some tests today

more fixes

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* more requested changes fulfilled

* should fix map issues + a couple other things

* fixes & sanitization stuff

* Apply suggestions from code review

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* updates UI and implements more requested changes

* mother of bug fixes & UI cleanup

* removes unused code

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* fixes

* adds GC checks

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* requested changes + TGUI Cleanup and Styling

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Sirryan2002
2022-07-09 09:55:12 -04:00
committed by GitHub
parent 49817b4122
commit f2813a6730
62 changed files with 4366 additions and 2712 deletions
-58
View File
@@ -3273,64 +3273,6 @@
usr << browse("<HTML><HEAD><TITLE>Details</TITLE></HEAD><BODY><TT>[replacetext(text, "\n", "<BR>")]</TT></BODY></HTML>",
"window=show_details;size=500x200")
// Library stuff
else if(href_list["library_book_id"])
var/isbn = text2num(href_list["library_book_id"])
if(href_list["view_library_book"])
var/datum/db_query/query_view_book = SSdbcore.NewQuery("SELECT content, title FROM library WHERE id=:isbn", list(
"isbn" = isbn
))
if(!query_view_book.warn_execute())
qdel(query_view_book)
return
var/content = ""
var/title = ""
while(query_view_book.NextRow())
content = query_view_book.item[1]
title = html_encode(query_view_book.item[2])
var/dat = "<pre><code>"
dat += "[html_encode(html_to_pencode(content))]"
dat += "</code></pre>"
var/datum/browser/popup = new(usr, "admin_view_book", "[title]", 700, 400)
popup.set_content(dat)
popup.open(0)
qdel(query_view_book)
log_admin("[key_name(usr)] has viewed the book [isbn].")
message_admins("[key_name_admin(usr)] has viewed the book [isbn].")
return
else if(href_list["unflag_library_book"])
var/datum/db_query/query_unflag_book = SSdbcore.NewQuery("UPDATE library SET flagged = 0 WHERE id=:isbn", list(
"isbn" = isbn
))
if(!query_unflag_book.warn_execute())
qdel(query_unflag_book)
return
qdel(query_unflag_book)
log_admin("[key_name(usr)] has unflagged the book [isbn].")
message_admins("[key_name_admin(usr)] has unflagged the book [isbn].")
else if(href_list["delete_library_book"])
var/datum/db_query/query_delbook = SSdbcore.NewQuery("DELETE FROM library WHERE id=:isbn", list(
"isbn" = isbn
))
if(!query_delbook.warn_execute())
qdel(query_delbook)
return
qdel(query_delbook)
log_admin("[key_name(usr)] has deleted the book [isbn].")
message_admins("[key_name_admin(usr)] has deleted the book [isbn].")
// Refresh the page
src.view_flagged_books()
else if(href_list["create_outfit_finalize"])
if(!check_rights(R_EVENT))
return