diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index a5a14d589ae..29f74d4ba38 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -76,7 +76,8 @@ var/contact_poison_volume = 0 dropshrink = 0.5 var/textper = 100 - var/maxlen = 2000 + var/maxlen = 5000 // Caustic Edit + var/maxfields = 50 // Caustic Edit var/cached_mailer var/cached_mailedto @@ -158,7 +159,7 @@ /obj/item/paper/examine(mob/user) . = ..() if(!mailer) - . += "Read (Help)" + . += "Read (\[?\])" else . += "It's from [mailer], addressed to [mailedto]." @@ -167,8 +168,8 @@ // assets.send(user) if(!user.client || !user.hud_used) return - if(!user.hud_used.reads) - return + //if(!user.hud_used.reads) // Caustic Edit. Apparently this line breaks ghosts' ability to read + // return if(!user.can_read(src)) if(info) user.adjust_experience(/datum/skill/misc/reading, 2, FALSE) @@ -295,7 +296,7 @@ /obj/item/paper/proc/updateinfolinks() info_links = info - for(var/i in 1 to min(fields, 15)) + for(var/i in 1 to min(fields, maxfields)) addtofield(i, "write (\[?\])", 1) info_links = info_links + "write \[?\]" @@ -310,10 +311,54 @@ /obj/item/paper/proc/parsepencode(t, obj/item/P, mob/user, iscrayon = 0) +// Caustic Edit start +/* if(length(t) < 1) //No input means nothing needs to be parsed return t = parsemarkdown(t, user, iscrayon) +*/ + + t = replacetext(t, "\[center\]", "
") + t = replacetext(t, "\[/center\]", "
") + if(findtext(t, "\[sign\]")) + t = replacetext(t, "\[sign\]", "[user.real_name]") + t = replacetext(t, "\[tab\]", "      ") + t = replacetext(t, "\n", "
") + t = replacetext(t, "\[center\]", "
") + t = replacetext(t, "\[/center\]", "
") + t = replacetext(t, "\[br\]", "
") + t = replacetext(t, "\[b\]", "") + t = replacetext(t, "\[/b\]", "") + t = replacetext(t, "\[i\]", "") + t = replacetext(t, "\[/i\]", "") + t = replacetext(t, "\[u\]", "") + t = replacetext(t, "\[/u\]", "") + t = replacetext(t, "\[time\]", "[station_time_timestamp()]") + t = replacetext(t, "\[date\]", "[get_ic_date_short_as_string()]") + t = replacetext(t, "\[large\]", "") + t = replacetext(t, "\[/large\]", "") + t = replacetext(t, "\[field\]", "") + t = replacetext(t, "\[h1\]", "

") + t = replacetext(t, "\[/h1\]", "

") + t = replacetext(t, "\[h2\]", "

") + t = replacetext(t, "\[/h2\]", "

") + t = replacetext(t, "\[h3\]", "

") + t = replacetext(t, "\[/h3\]", "

") + t = replacetext(t, "\[*\]", "
  • ") + t = replacetext(t, "\[hr\]", "
    ") + t = replacetext(t, "\[small\]", "") + t = replacetext(t, "\[/small\]", "") + t = replacetext(t, "\[list\]", "") + t = replacetext(t, "\[table\]", "") + t = replacetext(t, "\[/table\]", "
    ") + t = replacetext(t, "\[grid\]", "") + t = replacetext(t, "\[/grid\]", "
    ") + t = replacetext(t, "\[row\]", "") + t = replacetext(t, "\[cell\]", "") + +// Caustic Edit end if(istype(P, /obj/item/natural/thorn)) t = "[t]" @@ -322,7 +367,7 @@ // Count the fields var/laststart = 1 - while(fields < 15) + while(fields < maxfields) var/i = findtext(t, "", laststart) if(i == 0) break @@ -334,7 +379,7 @@ /obj/item/paper/proc/reload_fields() // Useful if you made the paper programicly and want to include fields. Also runs updateinfolinks() for you. fields = 0 var/laststart = 1 - while(fields < 15) + while(fields < maxfields) var/i = findtext(info, "", laststart) if(i == 0) break @@ -348,18 +393,25 @@ You can use backslash (\\) to escape special characters.

    - # text : Defines a header.
    - |text| : Centers the text.
    - **text** : Makes the text bold.
    - *text* : Makes the text italic.
    - ^text^ : Increases the size of the text.
    - %s : Inserts a signature of your name in a foolproof way.
    - %f : Inserts an invisible field which lets you start type from there. Useful for forms.
    - ((text)) : Decreases the size of the text.
    - * item : An unordered list item.
    -   * item: An unordered list child item.
    - --- : Adds a horizontal rule.
    - -=FFFFFFtext=- : Adds a specific colour to text. + \[h1\] text \[/h1\], \[h2\] text \[/h2\], \[h3\] text \[/h3\] : Defines headers.
    + \[center\] text \[/center\] : Centers the text.
    + \[b\] text \[/b\] : Makes the text bold.
    + \[i\] text \[/i\] : Makes the text italic.
    + \[u\] text \[/u\] : Makes the text underlined.
    + \[large\] text \[/large\] : Increases the size of the text.
    + \[small\] text \[/small\] : Decreases the size of the text.
    + \[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.
    + \[list\] \[*\]text \[/list\] : An unordered list
    + \[*\] item : An unordered list item.
    + \[hr\] : Adds a horizontal rule.
    + \[time\] : Inserts the current in-game time of day.
    + \[date\] : Inserts the current in-game date.
    + \[grid\] text \[/grid\] : Inserts a borderless table.
    + \[table\] text \[/table\] : Inserts a bordered table. Useful for spreadsheets.
    + \[row\] : Inserts a new row to the table.
    + \[cell\] : Inserts a new cell to the row of the table.
    + \[table\] \[row\]\[cell\]text\[cell\]text2\[row\]\[cell\]text3\[cell\]text4 \[/table\] : An example usage for tables, makes a 2 row, 2 cell each table.
    + "https://ps.muck.im" can be used to preview most of the functions and see how it looks (Go to settings and set the pen style to fancy to make it 1 to 1) "}, "window=paper_help") @@ -377,7 +429,7 @@ user << browse(null, "window=reading") var/literate = usr.is_literate() - if(!usr.canUseTopic(src, BE_CLOSE, literate)) + if(!usr.canUseTopic(src, BE_CLOSE, literate) && !isobserver(usr)) // Caustic Edit. Ghosts can read return if(href_list["read"]) diff --git a/code/modules/paperwork/rogue.dm b/code/modules/paperwork/rogue.dm index cb2ef6fcca4..2d8dbf46c0d 100644 --- a/code/modules/paperwork/rogue.dm +++ b/code/modules/paperwork/rogue.dm @@ -7,7 +7,8 @@ firefuel = 30 SECONDS sellprice = 2 textper = 108 - maxlen = 2000 + maxlen = 10000 // Caustic Edit. If regular parchment is 5000, scrolls can be made to be double + maxfields = 100 // Caustic Edit throw_range = 3 @@ -59,20 +60,13 @@ return if(!user.client || !user.hud_used) return - if(!user.hud_used.reads) - return + //if(!user.hud_used.reads) // Caustic Edit. Apparently this line breaks ghosts' ability to read + // return if(!user.can_read(src)) return /*font-size: 125%;*/ if(in_range(user, src) || isobserver(user)) - user.hud_used.reads.icon_state = "scroll" - user.hud_used.reads.show() - user.hud_used.reads.maptext = MAPTEXT_LEGIBLE(info) - user.hud_used.reads.maptext_width = 230 - user.hud_used.reads.maptext_height = 200 - user.hud_used.reads.maptext_y = 150 - user.hud_used.reads.maptext_x = 120 - onclose(user, "reading", src) + . = ..() // Caustic Edit. No more fancy scroll-only stuff that breaks. Scrolls are bigger pieces of paper else return span_warning("I'm too far away to read it.") diff --git a/html/book.png b/html/book.png index ca92fe57b41..e37fb1ff9b0 100644 Binary files a/html/book.png and b/html/book.png differ