Library Fixes (#18414)

* library fixes

* apply code review suggestions

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>

Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
This commit is contained in:
Sirryan2002
2022-07-19 06:03:57 -04:00
committed by GitHub
parent 5a1ea81b44
commit 8e6d00ea42
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -167,7 +167,7 @@
user << browse("<body bgcolor='[book_bgcolor]'>[dat]<br>" + "[pages[current_page]]", "window=book[UID()]")
/obj/item/book/Topic(href, href_list)
if(..())
if(..() || isobserver(usr))
return
if(href_list["next_page"])
if(current_page > length(pages)) //should never be false, but just in-case
+2 -2
View File
@@ -444,7 +444,7 @@
user_data.search_rating["max"] = clamp(text2num(answer), user_data.search_rating["min"], 10)
populate_booklist()
if("edit_search_ratingmin")
if(!text2num(answer))
if(isnull(text2num(answer)))
return
user_data.search_rating["min"] = clamp(text2num(answer), 0, user_data.search_rating["max"])
populate_booklist()
@@ -463,8 +463,8 @@
if("setpagenumber")
if(!text2num(answer))
return
archive_page_num = clamp(text2num(answer), 1, getmaxpages())
populate_booklist()
archive_page_num = clamp(text2num(answer), 1, getmaxpages())
else
return FALSE
else