| 704 | return true; |
| 705 | } |
| 706 | bool save(string directory) |
| 707 | { |
| 708 | std::ofstream outfile(directory + "/" + name); |
| 709 | if (outfile.bad()) |
| 710 | return false; |
| 711 | |
| 712 | outfile << "NAME " << name << std::endl; |
| 713 | if (mask) |
| 714 | outfile << "MASK" << std::endl; |
| 715 | |
| 716 | for (size_t i = 0; i < NUM_COLUMNS; i++) |
| 717 | { |
| 718 | if (hasLabor(columns[i].labor)) |
| 719 | { |
| 720 | outfile << ENUM_KEY_STR(unit_labor, columns[i].labor) << std::endl; |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | outfile.flush(); |
| 725 | outfile.close(); |
| 726 | return true; |
| 727 | } |
| 728 | |
| 729 | void apply(UnitInfo* u) |
| 730 | { |
no test coverage detected