Vessel interaction update
This commit is contained in:
parent
e24554a0a0
commit
4a3951938a
2 changed files with 27 additions and 2 deletions
|
|
@ -11,19 +11,23 @@ private:
|
|||
static entity_id __global_id;
|
||||
|
||||
entity_id _id;
|
||||
entity_id _skipper_id;
|
||||
entity_id _harbor_id;
|
||||
unsigned int _capacity;
|
||||
QVector<cargo_entity> _cargo;
|
||||
|
||||
public:
|
||||
vessel_entity() = default;
|
||||
vessel_entity(entity_id harbor_id, unsigned int capacity);
|
||||
vessel_entity(entity_id skipper_id, entity_id harbor_id, unsigned int capacity);
|
||||
|
||||
entity_id id() const;
|
||||
entity_id harbor() const;
|
||||
unsigned int capacity() const;
|
||||
const QVector<cargo_entity> cargo();
|
||||
|
||||
void add_cargo(cargo_entity object, bool &success);
|
||||
void withdraw_cargo(entity_id oid, bool &success);
|
||||
|
||||
void serialize(QDataStream &output);
|
||||
void deserialize(QDataStream &input);
|
||||
static void preloadGlobalId(entity_id gid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue