Repository navigation
Conversation
tailor will now select the "best" coverage item instead of just using the first one, and will handle different body plans for oddly shaped fort members correctly also, a bug that sometimes caused over-ordering has been fixed
quietust
reviewed
Nov 12, 2026
| // torso part, and the worn part must be an ancestor of the target, otherwise | ||
| // no distance is reported. | ||
| static void body_step_distance(df::caste_body_info *body, int16_t worn, int16_t target, | ||
| bool *main, int16_t *ub_steps, int16_t *lb_steps) |
Member
There was a problem hiding this comment.
Remark: main/ub_steps/lb_steps should probably be references (just like in DF) so that nothing can pass NULL to them and cause a crash
quietust
reviewed
Nov 12, 2026
| switch (ty) { | ||
| case df::item_type::ARMOR: { | ||
| auto def = world->raws.itemdefs.armor[sub]; | ||
| if (!def) |
Member
There was a problem hiding this comment.
If sub is out of range, def is going to be garbage rather than NULL (and could crash). Same for the others below.
quietust
reviewed
Nov 12, 2026
| { | ||
| switch (ty) { | ||
| case df::item_type::ARMOR: | ||
| return world->raws.itemdefs.armor[sub] && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tailor will now select the "best" coverage item instead of just using the first one, and will handle different body plans for oddly shaped fort members correctly
also, a bug that sometimes caused over-ordering has been fixed