Proof of concept/proposal: Add page-seeking URL capability to books. (#31007)

* Add page-seeking URL capability to books; Update bar manual.

* Capitalize all instances of 'back to Table of Contents'
This commit is contained in:
Alan
2025-11-25 21:25:24 +00:00
committed by GitHub
parent 0cfe0594be
commit 07074ec6fe
2 changed files with 444 additions and 23 deletions
+10
View File
@@ -210,6 +210,16 @@
playsound(loc, "pageturn", 50, 1)
read_book(usr) //scuffed but this is how you update the UI
updateUsrDialog()
if(href_list["seek_page"]) //to use page-seeking urls, define pages of the book on initialize and structure urls like this: byond://?src=[UID()];seek_page=1
var/requested_page = text2num(href_list["seek_page"])
current_page = requested_page
if(requested_page < 1)
current_page = 0
if(requested_page > length(pages))
current_page = length(pages) - 1
playsound(loc, "pageturn", 50, 1)
read_book(usr) //scuffed but this is how you update the UI
updateUsrDialog()
/**
* Edit Book Proc