diff --git a/source/find_item_window.cpp b/source/find_item_window.cpp index b2c5962b..da143409 100644 --- a/source/find_item_window.cpp +++ b/source/find_item_window.cpp @@ -41,8 +41,7 @@ FindItemDialog::FindItemDialog(wxWindow* parent, const wxString &title, bool onl wxBoxSizer* options_box_sizer = newd wxBoxSizer(wxVERTICAL); - wxString radio_boxChoices[] = { "Find by Server ID", - "Find by Client ID", + wxString radio_boxChoices[] = { "Find by Item ID", "Find by Name", "Find by Types", "Find by Tile Types", @@ -370,7 +369,7 @@ void FindItemDialog::RefreshContentsInternal() { continue; } - if ((unpassable->GetValue() && !item.unpassable) || (unmovable->GetValue() && item.moveable) || (block_missiles->GetValue() && !item.blockMissiles) || (block_pathfinder->GetValue() && !item.blockPathfinder) || (readable->GetValue() && !item.canReadText) || (writeable->GetValue() && !item.canWriteText) || (pickupable->GetValue() && !item.pickupable) || (stackable->GetValue() && !item.stackable) || (rotatable->GetValue() && !item.rotable) || (hangable->GetValue() && !item.isHangable) || (hook_east->GetValue() && !item.hookEast) || (hook_south->GetValue() && !item.hookSouth) || (has_elevation->GetValue() && !item.hasElevation) || (ignore_look->GetValue() && !item.ignoreLook) || (floor_change->GetValue() && !item.isFloorChange())) { + if ((unpassable->GetValue() && !item.unpassable) || (unmovable->GetValue() && item.moveable) || (block_missiles->GetValue() && !item.blockMissiles) || (block_pathfinder->GetValue() && !item.blockPathfinder) || (readable->GetValue() && !item.canReadText) || (writeable->GetValue() && !item.canWriteText) || (pickupable->GetValue() && !item.pickupable) || (stackable->GetValue() && !item.stackable) || (rotatable->GetValue() && !item.rotable) || (hangable->GetValue() && !item.isHangable) || (hook_east->GetValue() && (!item.hookEast && item.hook != ITEM_HOOK_EAST)) || (hook_south->GetValue() && (!item.hookSouth && item.hook != ITEM_HOOK_SOUTH)) || (has_elevation->GetValue() && !item.hasElevation) || (ignore_look->GetValue() && !item.ignoreLook) || (floor_change->GetValue() && !item.isFloorChange())) { continue; } diff --git a/source/item.cpp b/source/item.cpp index c2594a06..ad431f50 100644 --- a/source/item.cpp +++ b/source/item.cpp @@ -202,13 +202,13 @@ bool Item::hasProperty(enum ITEMPROPERTY prop) const { break; case HOOK_SOUTH: - if (type.hookSouth || type.hook == ItemHook_t::ITEM_HOOK_SOUTH) { + if (type.hookSouth || type.hook == ITEM_HOOK_SOUTH) { return true; } break; case HOOK_EAST: - if (type.hookEast || type.hook == ItemHook_t::ITEM_HOOK_EAST) { + if (type.hookEast || type.hook == ITEM_HOOK_EAST) { return true; } break; diff --git a/source/raw_brush.cpp b/source/raw_brush.cpp index 548b07b9..d95124e1 100644 --- a/source/raw_brush.cpp +++ b/source/raw_brush.cpp @@ -50,13 +50,15 @@ std::string RAWBrush::getName() const { return "RAWBrush"; } - if (itemtype->hookSouth) { - return i2s(itemtype->id) + " - " + itemtype->name + " (Hook South)"; - } else if (itemtype->hookEast) { - return i2s(itemtype->id) + " - " + itemtype->name + " (Hook East)"; + auto brushName = fmt::format("{} - {}", itemtype->id, itemtype->name); + + if (itemtype->hookSouth || itemtype->hook == ITEM_HOOK_SOUTH) { + return brushName.append(" (Hook South)"); + } else if (itemtype->hookEast || itemtype->hook == ITEM_HOOK_EAST) { + return brushName.append(" (Hook East)"); } - return i2s(itemtype->id) + " - " + itemtype->name + itemtype->editorsuffix; + return brushName.append(itemtype->editorsuffix); } void RAWBrush::undraw(BaseMap* map, Tile* tile) {