mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user