diff options
| author | Alexander Gavrilov | 2012-05-26 14:49:27 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-05-26 14:49:27 +0400 |
| commit | e72bf1ac9aa4d9c56f8435c5b86f538c06d651b9 (patch) | |
| tree | 3b463c2c3a32eb9410c06faa75ba9b87b8bed31f /plugins/forceequip.cpp | |
| parent | 8644ea4dc0ec3e40b27a047623b66e56b8dd309b (diff) | |
| download | dfhack-e72bf1ac9aa4d9c56f8435c5b86f538c06d651b9.tar.gz dfhack-e72bf1ac9aa4d9c56f8435c5b86f538c06d651b9.tar.bz2 dfhack-e72bf1ac9aa4d9c56f8435c5b86f538c06d651b9.tar.xz | |
Sync to changes in df-structures.
Diffstat (limited to 'plugins/forceequip.cpp')
| -rw-r--r-- | plugins/forceequip.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/forceequip.cpp b/plugins/forceequip.cpp index 0d493143..723f2947 100644 --- a/plugins/forceequip.cpp +++ b/plugins/forceequip.cpp @@ -292,7 +292,7 @@ static bool moveToInventory(MapExtras::MapCache &mc, df::item *item, df::unit *u else if (bpIndex < unit->body.body_plan->body_parts.size()) { // The current body part is not the one that was specified in the function call, but we can keep searching - if (verbose) { Core::printerr("Found bodypart %s; not a match; continuing search.\n", currPart->part_code.c_str()); } + if (verbose) { Core::printerr("Found bodypart %s; not a match; continuing search.\n", currPart->token.c_str()); } continue; } else @@ -302,35 +302,35 @@ static bool moveToInventory(MapExtras::MapCache &mc, df::item *item, df::unit *u return false; } - if (verbose) { Core::print("Inspecting bodypart %s.\n", currPart->part_code.c_str()); } + if (verbose) { Core::print("Inspecting bodypart %s.\n", currPart->token.c_str()); } // Inspect the current bodypart if (item->getType() == df::enums::item_type::GLOVES && currPart->flags.is_set(df::body_part_template_flags::GRASP) && ((item->getGloveHandedness() == const_GloveLeftHandedness && currPart->flags.is_set(df::body_part_template_flags::LEFT)) || (item->getGloveHandedness() == const_GloveRightHandedness && currPart->flags.is_set(df::body_part_template_flags::RIGHT)))) { - if (verbose) { Core::print("Hand found (%s)...", currPart->part_code.c_str()); } + if (verbose) { Core::print("Hand found (%s)...", currPart->token.c_str()); } } else if (item->getType() == df::enums::item_type::HELM && currPart->flags.is_set(df::body_part_template_flags::HEAD)) { - if (verbose) { Core::print("Head found (%s)...", currPart->part_code.c_str()); } + if (verbose) { Core::print("Head found (%s)...", currPart->token.c_str()); } } else if (item->getType() == df::enums::item_type::ARMOR && currPart->flags.is_set(df::body_part_template_flags::UPPERBODY)) { - if (verbose) { Core::print("Upper body found (%s)...", currPart->part_code.c_str()); } + if (verbose) { Core::print("Upper body found (%s)...", currPart->token.c_str()); } } else if (item->getType() == df::enums::item_type::PANTS && currPart->flags.is_set(df::body_part_template_flags::LOWERBODY)) { - if (verbose) { Core::print("Lower body found (%s)...", currPart->part_code.c_str()); } + if (verbose) { Core::print("Lower body found (%s)...", currPart->token.c_str()); } } else if (item->getType() == df::enums::item_type::SHOES && currPart->flags.is_set(df::body_part_template_flags::STANCE)) { - if (verbose) { Core::print("Foot found (%s)...", currPart->part_code.c_str()); } + if (verbose) { Core::print("Foot found (%s)...", currPart->token.c_str()); } } else if (targetBodyPart && ignoreRestrictions) { // The BP in question would normally be considered ineligible for equipment. But since it was deliberately specified by the user, we'll proceed anyways. - if (verbose) { Core::print("Non-standard bodypart found (%s)...", targetBodyPart->part_code.c_str()); } + if (verbose) { Core::print("Non-standard bodypart found (%s)...", targetBodyPart->token.c_str()); } } else if (targetBodyPart) { @@ -538,16 +538,16 @@ command_result df_forceequip(color_ostream &out, vector <string> & parameters) { // Tentatively assume that the part is a match targetBodyPart = targetUnit->body.body_plan->body_parts.at(bpIndex); - if (targetBodyPart->part_code.compare(targetBodyPartCode) == 0) + if (targetBodyPart->token.compare(targetBodyPartCode) == 0) { // It is indeed a match; exit the loop (while leaving the variable populated) - if (verbose) { out.print("Matching bodypart (%s) found.\n", targetBodyPart->part_name.c_str()); } + if (verbose) { out.print("Matching bodypart (%s) found.\n", targetBodyPart->token.c_str()); } break; } else { // Not a match; nullify the variable (it will get re-populated on the next pass through the loop) - if (verbose) { out.printerr("Bodypart \"%s\" does not match \"%s\".\n", targetBodyPart->part_code.c_str(), targetBodyPartCode.c_str()); } + if (verbose) { out.printerr("Bodypart \"%s\" does not match \"%s\".\n", targetBodyPart->token.c_str(), targetBodyPartCode.c_str()); } targetBodyPart = NULL; } } |
