Version: 1.0.0 Category: lifecycle Description: Detailed workflow for StructSweepDelay behavior after struct destruction
Query struct to verify it exists and get slot information.
Endpoint: GET /structs/struct/{structId}
Expected Fields:
| Field | Expected Value |
|---|---|
struct.id |
5-1 |
struct.locationType |
1 |
struct.locationId |
2-1 |
struct.status |
online |
struct.destroyed |
false |
Slot Info – GET /structs/planet/{planetId}:
{
"planet.slots": {
"space": ["5-1", null, null, null]
}
}
Struct occupies slot 0 in space ambit.
Destroy struct (via combat, planet completion, or explicit action).
Triggers:
Expected Result:
| Field | Value |
|---|---|
struct.destroyed |
true |
struct.status |
0 |
Note: Struct is marked as destroyed but persists for StructSweepDelay period.
Query struct to confirm destroyed status.
Endpoint: GET /structs/struct/{structId}
Expected Fields:
| Field | Expected Value |
|---|---|
struct.destroyed |
true |
struct.status |
0 |
Database Query:
SELECT * FROM struct WHERE id = ? AND destroyed = true
Destroyed structs are queryable during delay period.
Query planet/fleet slots during StructSweepDelay period (blocks 0-4).
During blocks 0 through 4, the slot still references the destroyed struct ID.
Endpoint: GET /structs/planet/{planetId}
| Block | planet.slots.space[0] |
Note |
|---|---|---|
| 0 | 5-1 |
Slot still references destroyed struct ID |
| 1 | 5-1 |
Slot still references destroyed struct ID |
| 2 | 5-1 |
Slot still references destroyed struct ID |
| 3 | 5-1 |
Slot still references destroyed struct ID |
| 4 | 5-1 |
Last block of delay |
Wait for StructSweepDelay (5 blocks) to complete.
Monitoring:
| Parameter | Value |
|---|---|
| Method | Poll planet/fleet slots |
| Interval | Every block |
| Max Blocks | 5 |
| Check Field | planet.slots.space[0] |
Query planet/fleet after StructSweepDelay to confirm slot is cleared.
Endpoint: GET /structs/planet/{planetId}
Expected Fields:
| Field | Expected Value |
|---|---|
planet.slots.space[0] |
null |
Slot is cleared after 5 blocks, available for new structs.
Database Query:
SELECT slots FROM planet WHERE id = ?
Expected Result:
{
"slots": {
"space": [null, null, null, null]
}
}
Slot 0 is now null (cleared).
Confirm destroyed struct is no longer queryable after delay.
Endpoint: GET /structs/struct/{structId}
Expected Response:
{
"code": 404,
"error": "ENTITY_NOT_FOUND"
}
Struct is fully removed after sweep delay.
Database Query:
SELECT * FROM struct WHERE id = ?
Returns 0 rows. Struct removed from database after sweep delay.
| Block | Event | struct.destroyed |
Slot Status | Struct Queryable |
|---|---|---|---|---|
| 0 | Struct destroyed | true |
occupied (references destroyed struct) | Yes |
| 1 | Delay period continues | true |
occupied (references destroyed struct) | Yes |
| 2 | Delay period continues | true |
occupied (references destroyed struct) | Yes |
| 3 | Delay period continues | true |
occupied (references destroyed struct) | Yes |
| 4 | Last block of delay | true |
occupied (references destroyed struct) | Yes |
| 5 | Sweep delay complete | true |
cleared (null) | No |
Note: At block 5, struct is fully removed and slot is available for new structs.
| Property | Value |
|---|---|
| Slot Status | occupied |
| Slot Value | destroyed struct ID |
| Available for New Struct | No |
Slot back reference persists during delay.
| Property | Value |
|---|---|
| Slot Status | cleared |
| Slot Value | null |
| Available for New Struct | Yes |
Slot is fully cleared and available.
Before Destruction:
{
"space": ["5-1", "5-2", null, null],
"air": [null, null, null, null],
"land": [null, null, null, null],
"water": [null, null, null, null]
}
During Delay: Slot 0 still references destroyed struct 5-1:
{
"space": ["5-1", "5-2", null, null]
}
After Delay: Slot 0 is cleared, slot 1 still has struct 5-2:
{
"space": [null, "5-2", null, null]
}
Before Destruction:
{
"space": ["5-3", null, null, null]
}
During Delay: Slot still references destroyed struct:
{
"space": ["5-3", null, null, null]
}
After Delay: Slot is cleared:
{
"space": [null, null, null, null]
}
Query Destroyed Struct – GET /structs/struct/{structId}:
| Field | Value |
|---|---|
struct.destroyed |
true |
struct.status |
0 |
Struct is queryable but destroyed.
Query Planet Slots – GET /structs/planet/{planetId}:
| Field | Value |
|---|---|
planet.slots.space[0] |
destroyed struct ID |
Slot still references destroyed struct.
Query All Destroyed Structs (database):
SELECT * FROM struct WHERE destroyed = true
Returns all destroyed structs including those in delay period.
Query Destroyed Struct – GET /structs/struct/{structId}:
Returns 404 ENTITY_NOT_FOUND. Struct no longer exists.
Query Planet Slots – GET /structs/planet/{planetId}:
| Field | Value |
|---|---|
planet.slots.space[0] |
null |
Slot is cleared and available.
Query All Destroyed Structs (database):
SELECT * FROM struct WHERE destroyed = true
Returns only structs still in delay period, not fully swept ones.
| State | Status | Destroyed | Queryable | Slot Occupied | Note |
|---|---|---|---|---|---|
| Before Destruction | online |
false |
Yes | Yes | – |
| After Destruction | 0 |
true |
Yes | Yes | In StructSweepDelay period |
| After Sweep Delay | removed | true |
No | No | Fully removed after delay |
| State | Status | Value | Available |
|---|---|---|---|
| Before Destruction | occupied | struct ID | No |
| During Delay | occupied | destroyed struct ID | No |
| After Delay | cleared | null |
Yes |
SELECT * FROM struct WHERE destroyed = trueGET /structs/planet/{planetId}planet.slots.space[slotIndex] === null