Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify written contents variable and flag names #136

Merged
merged 2 commits into from
Jun 14, 2016

Conversation

kane-t
Copy link
Contributor

@kane-t kane-t commented May 30, 2016

Finally got around to doing this myself: this names the item_flags2 flag and the vector in itemimprovement_writingst which are used for written contents things in quires, scrolls, and books.

The name for the flag comes from the [HAS_WRITTEN_CONTENTS] requirement in the BIND_BOOK reaction. The name for itemimprovement_writingst::anon_1 comes from the apparently-identical vector in itemimprovement_pagesst. (I haven't personally seen a pagesst, myself, but the ref says it points to written_contents, and that's what the writingst one does.)

item_flags2[3] is the flag that indicates that a quire or scroll has one or more itemimprovement_writingst improvements on it.  It's used by workshops to determine if an object might meet the [HAS_WRITING_IMPROVEMENT] requirement for reactions like BIND_BOOK.  (There's also a further check to see if there's an actual improvement in the improvements list.)
itemimprovement_writingst::anon_1 contains the writings in a quire, scroll, or book.  The elements are IDs into df.global.world.written_contents.all.  Naming this variable will also fix the inconvenient name collision with the anon_1 in the base class.
@kane-t kane-t changed the title Written contents variable and flag names Identify written contents variable and flag names May 30, 2016
@BenLubar
Copy link
Member

I haven't personally seen a pagesst, myself

That's used for codices, whereas writingst is used for scrolls. The difference being that writingst is for items with something written on them (and then the scroll rollers are defined by the itemspecificst improvement) and pagesst is for items with things that have writing in them (the book material is the binding and the pagesst has the paper material).

@kane-t
Copy link
Contributor Author

kane-t commented May 30, 2016

That's used for codices, whereas writingst is used for scrolls.

Ah! Cheers.

Funnily enough, I looked at more than 20 random things in my library before submitting the pull request, to try to find a pagesst, and somehow all of them were quires and scrolls. I really wish the UI differentiated between quires, scrolls, and codices in the item name.

@lethosor lethosor merged commit 5a9ded8 into DFHack:master Jun 14, 2016
@kane-t kane-t deleted the written-contents-details branch June 14, 2016 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants