Skip to content

Commit

Permalink
Parchments will no longer have an inferiority complex after having be…
Browse files Browse the repository at this point in the history
…en removed from a book, no longer attempting to hide their signed status.

https://discord.com/channels/401855954272124940/1337153413426839662
  • Loading branch information
brightrim committed Feb 7, 2025
1 parent bbe05ac commit 9fdeb54
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions item/base/bookWriting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,8 @@ function removePage(user, book)

local theParchment = world:createItemFromId(Item.parchment, 1, user.pos, true, 333, {})

if not common.IsNilOrEmpty(theSignature) then
theParchment:setData("signatureText", theSignature)
lookat.SetSpecialDescription(theParchment,"Das Pergament ist unterschrieben.","The parchment is signed.")
end

M.convertStringToMultipleParchmentDataValues(theParchment, theText)
M.convertStringToMultipleParchmentDataValues(theParchment, theText, theSignature)

local usersBag = user:getBackPack()

Expand Down Expand Up @@ -308,7 +304,7 @@ M.germanParchmentDescription = "Das Pergament ist beschrieben."
M.englishParchmentDescription = "The parchment has been written on."


function M.convertStringToMultipleParchmentDataValues(theParchment, writtenText)
function M.convertStringToMultipleParchmentDataValues(theParchment, writtenText, theSignature)
local texts = {
string.sub(writtenText, 1, 250),
string.sub(writtenText, 251, 500),
Expand All @@ -324,6 +320,12 @@ function M.convertStringToMultipleParchmentDataValues(theParchment, writtenText)

lookat.SetSpecialDescription(theParchment,M.germanParchmentDescription,M.englishParchmentDescription)

if not common.IsNilOrEmpty(theSignature) then
theParchment:setData("signatureText", theSignature)
lookat.SetSpecialDescription(theParchment,"Das Pergament ist unterschrieben.","The parchment is signed.")
world:changeItem(theParchment)
end

theParchment.wear = 254 -- Written parchments should have maximum rot time to allow message exchange

world:changeItem(theParchment)
Expand Down

0 comments on commit 9fdeb54

Please sign in to comment.