| 33 | } |
| 34 | |
| 35 | static command_result RenameUnit(color_ostream &stream, const RenameUnitIn *in) { |
| 36 | df::unit *unit = df::unit::find(in->unit_id()); |
| 37 | if (!unit) |
| 38 | return CR_NOT_FOUND; |
| 39 | |
| 40 | if (in->has_nickname()) |
| 41 | Units::setNickname(unit, UTF2DF(in->nickname())); |
| 42 | if (in->has_profession()) |
| 43 | unit->custom_profession = UTF2DF(in->profession()); |
| 44 | |
| 45 | return CR_OK; |
| 46 | } |
| 47 | |
| 48 | static command_result RenameBuilding(color_ostream &stream, const RenameBuildingIn *in) { |
| 49 | auto building = df::building::find(in->building_id()); |