Add rider ID to creatures

develop
Japa 2017-07-27 18:41:46 +05:30
parent 92a962a9c0
commit 8ae7a1235d
2 changed files with 5 additions and 0 deletions

@ -336,6 +336,7 @@ message UnitDefinition
optional UnitAppearance appearance = 16; optional UnitAppearance appearance = 16;
optional int32 profession_id = 17; optional int32 profession_id = 17;
repeated string noble_positions = 18; repeated string noble_positions = 18;
optional int32 rider_id = 19;
} }
message UnitList message UnitList

@ -105,6 +105,8 @@
#include "df/plant_tree_tile.h" #include "df/plant_tree_tile.h"
#endif #endif
#include "df/unit_relationship_type.h"
#include "building_reader.h" #include "building_reader.h"
using namespace DFHack; using namespace DFHack;
@ -1574,6 +1576,8 @@ static command_result GetUnitList(color_ostream &stream, const EmptyMessage *in,
send_unit->add_noble_positions(noble_positon.position->code); send_unit->add_noble_positions(noble_positon.position->code);
} }
} }
send_unit->set_rider_id(unit->relationship_ids[df::unit_relationship_type::RiderMount]);
} }
return CR_OK; return CR_OK;
} }