CivMC / FactoryMod

Configurable factories for automating item production - Built for Paper 1.16.5
Other
0 stars 11 forks source link

Combine printing plate pages when printing notes #22

Closed MelnCat closed 1 year ago

MelnCat commented 2 years ago

This joins the pages of printing plates when printing notes with newlines. Previously, printing notes would only consider the first page of the printing plate, so any content past the first page would be ignored. However, this severely limited the amount of content that could be put into notes, such as formatting, coloring, and wide unicode characters. With this change, more content can be added to the notes by creating more pages, and each page will be joined by a newline.

Lodish commented 2 years ago

"each page will be joined by a newline." I don't understand what this means. how do I avoid it using more than the first page, and will this change notes created from previously made printing plates? I've printed over 2000 notes it'd be pretty annoying if new ones don't stack.

MelnCat commented 2 years ago

Every page from the book used to make the printing press will be combined with line breaks as a delimiter to make the note. Previously, pages above 1 were ignored, so existing printing presses for notes will only be affected if content was written on the second page, third, etc. However, there was no reason to use any pages past the first before, since the pages would be ignored.

Gjum commented 2 years ago

pretty annoying if new ones don't stack

Since this is just using string concatenation, as long as your book originals only had one page the notes should still stack.

how do I avoid it using more than the first page

@Lodish Do you have note plates with more than one page? Or is this a hypothetical? The proposed change would not allow this, as subsequent pages will change the resulting note.

MelnCat commented 2 years ago

Actually, it might be better to not have newlines between the pages, so if a newline is desired between two pages, then the writer would need to add a trailing newline to the first page.

Diet-Cola commented 2 years ago

@Lodish @Gjum Do we have any further thoughts on this?

Lodish commented 2 years ago

@Lodish @Gjum Do we have any further thoughts on this?

I dunno. I'm biased as I'll have to redo some plates. I'm sure the extra large notes might be useful to some people

MelnCat commented 2 years ago

I'll go try to make it backwards compatible.

MelnCat commented 2 years ago

Existing printing plates will no longer be affected by this change.