diff --git a/Documentation/api/output_data.md b/Documentation/api/output_data.md index d26a2e890..c8b620612 100644 --- a/Documentation/api/output_data.md +++ b/Documentation/api/output_data.md @@ -510,6 +510,7 @@ A message sent when a Magnebot arrives at a target. | Function | Description | Return type | | --- | --- | --- | | `get_id()` | The ID of the Magnebot. | `int` | +| `get_success()` | If True, the Magnebot arrived at the target. | `bool` | ## Meshes diff --git a/Python/tdw/FBOutput/MagnebotWheels.py b/Python/tdw/FBOutput/MagnebotWheels.py index f2df57580..bd7b09583 100644 --- a/Python/tdw/FBOutput/MagnebotWheels.py +++ b/Python/tdw/FBOutput/MagnebotWheels.py @@ -25,6 +25,14 @@ def Id(self): return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos) return 0 -def MagnebotWheelsStart(builder): builder.StartObject(1) + # MagnebotWheels + def Success(self): + o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return bool(self._tab.Get(tdw.flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) + return False + +def MagnebotWheelsStart(builder): builder.StartObject(2) def MagnebotWheelsAddId(builder, id): builder.PrependInt32Slot(0, id, 0) +def MagnebotWheelsAddSuccess(builder, success): builder.PrependBoolSlot(1, success, 0) def MagnebotWheelsEnd(builder): return builder.EndObject() diff --git a/Python/tdw/output_data.py b/Python/tdw/output_data.py index 82e6331a3..3cf610928 100644 --- a/Python/tdw/output_data.py +++ b/Python/tdw/output_data.py @@ -1054,3 +1054,6 @@ def get_data(self) -> MWheels.MagnebotWheels: def get_id(self) -> int: return self.data.Id() + + def get_success(self) -> bool: + return self.data.Success()