Skip to content

Commit

Permalink
Identify written contents variable and flag names (#136)
Browse files Browse the repository at this point in the history
* name item_flags2[3] "has_written_content"

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.)

* name itemimprovement_writingst::anon_1

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.
  • Loading branch information
kane-t authored and lethosor committed Jun 14, 2016
1 parent 0b4cbdf commit 5a9ded8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion df.itemimprovements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</class-type>

<class-type type-name='itemimprovement_writingst' inherits-from='itemimprovement'>
<stl-vector type-name='int32_t'/>
<stl-vector name='contents' type-name='int32_t' ref-target='written_content'/>
</class-type>

<enum-type type-name='written_content_type' base-type='int32_t'>
Expand Down
1 change: 1 addition & 0 deletions df.items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<flag-bit name='has_rider' comment='vehicle with a rider'/>
<flag-bit name='unk1'/>
<flag-bit name='grown'/>
<flag-bit name='has_written_content'/>
</bitfield-type>

<enum-type type-name='item_magicness_type' base-type='int16_t'>
Expand Down

0 comments on commit 5a9ded8

Please sign in to comment.