| 121 | } |
| 122 | |
| 123 | bool matchesHeatSafety(int16_t mat_type, int32_t mat_index, HeatSafety heat) { |
| 124 | if (heat == HEAT_SAFETY_ANY) |
| 125 | return true; |
| 126 | |
| 127 | MaterialInfo minfo(mat_type, mat_index); |
| 128 | df::job_item_flags2 ok; |
| 129 | df::job_item_flags2 mask; |
| 130 | minfo.getMatchBits(ok, mask); |
| 131 | |
| 132 | if (heat >= HEAT_SAFETY_MAGMA) |
| 133 | return ok.bits.magma_safe; |
| 134 | if (heat == HEAT_SAFETY_FIRE) |
| 135 | return ok.bits.fire_safe || ok.bits.magma_safe; |
| 136 | return false; |
| 137 | } |
| 138 | |
| 139 | bool matchesFilters(df::item * item, const df::job_item * jitem, HeatSafety heat, const ItemFilter &item_filter, const std::set<string> &specials) { |
| 140 | // check the properties that are not checked by Job::isSuitableItem() |
no test coverage detected