Skip to content

Commit

Permalink
Merge pull request #87 from SpaceTradersAPI/sa/ship-condition
Browse files Browse the repository at this point in the history
Ship Condition Update
  • Loading branch information
thebrubaker authored Mar 10, 2024
2 parents beecdb0 + fc1a056 commit c35fa54
Show file tree
Hide file tree
Showing 10 changed files with 396 additions and 12 deletions.
29 changes: 29 additions & 0 deletions models/RepairTransaction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "object",
"properties": {
"waypointSymbol": {
"$ref": "./WaypointSymbol.json"
},
"shipSymbol": {
"type": "string",
"description": "The symbol of the ship."
},
"totalPrice": {
"type": "integer",
"description": "The total price of the transaction.",
"minimum": 0
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the transaction."
}
},
"required": [
"waypointSymbol",
"shipSymbol",
"totalPrice",
"timestamp"
],
"description": "Result of a repair transaction."
}
29 changes: 29 additions & 0 deletions models/ScrapTransaction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"type": "object",
"properties": {
"waypointSymbol": {
"$ref": "./WaypointSymbol.json"
},
"shipSymbol": {
"type": "string",
"description": "The symbol of the ship."
},
"totalPrice": {
"type": "integer",
"description": "The total price of the transaction.",
"minimum": 0
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the transaction."
}
},
"required": [
"waypointSymbol",
"shipSymbol",
"totalPrice",
"timestamp"
],
"description": "Result of a scrap transaction."
}
7 changes: 7 additions & 0 deletions models/ShipComponentCondition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "number",
"format": "double",
"description": "The repairable condition of a component. A value of 0 indicates the component needs significant repairs, while a value of 1 indicates the component is in near perfect condition. As the condition of a component is repaired, the overall integrity of the component decreases.",
"minimum": 0,
"maximum": 1
}
7 changes: 7 additions & 0 deletions models/ShipComponentIntegrity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "number",
"format": "double",
"description": "The overall integrity of the component, which determines the performance of the component. A value of 0 indicates that the component is almost completely degraded, while a value of 1 indicates that the component is in near perfect condition. The integrity of the component is non-repairable, and represents permanent wear over time.",
"minimum": 0,
"maximum": 1
}
6 changes: 0 additions & 6 deletions models/ShipCondition.json

This file was deleted.

60 changes: 60 additions & 0 deletions models/ShipConditionEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"type": "object",
"description": "An event that represents damage or wear to a ship's reactor, frame, or engine, reducing the condition of the ship.",
"properties": {
"symbol": {
"type": "string",
"enum": [
"REACTOR_OVERLOAD",
"ENERGY_SPIKE_FROM_MINERAL",
"SOLAR_FLARE_INTERFERENCE",
"COOLANT_LEAK",
"POWER_DISTRIBUTION_FLUCTUATION",
"MAGNETIC_FIELD_DISRUPTION",
"HULL_MICROMETEORITE_STRIKES",
"STRUCTURAL_STRESS_FRACTURES",
"CORROSIVE_MINERAL_CONTAMINATION",
"THERMAL_EXPANSION_MISMATCH",
"VIBRATION_DAMAGE_FROM_DRILLING",
"ELECTROMAGNETIC_FIELD_INTERFERENCE",
"IMPACT_WITH_EXTRACTED_DEBRIS",
"FUEL_EFFICIENCY_DEGRADATION",
"COOLANT_SYSTEM_AGEING",
"DUST_MICROABRASIONS",
"THRUSTER_NOZZLE_WEAR",
"EXHAUST_PORT_CLOGGING",
"BEARING_LUBRICATION_FADE",
"SENSOR_CALIBRATION_DRIFT",
"HULL_MICROMETEORITE_DAMAGE",
"SPACE_DEBRIS_COLLISION",
"THERMAL_STRESS",
"VIBRATION_OVERLOAD",
"PRESSURE_DIFFERENTIAL_STRESS",
"ELECTROMAGNETIC_SURGE_EFFECTS",
"ATMOSPHERIC_ENTRY_HEAT"
]
},
"component": {
"type": "string",
"enum": [
"FRAME",
"REACTOR",
"ENGINE"
]
},
"name": {
"type": "string",
"description": "The name of the event."
},
"description": {
"type": "string",
"description": "A description of the event."
}
},
"required": [
"symbol",
"component",
"name",
"description"
]
}
7 changes: 6 additions & 1 deletion models/ShipEngine.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"description": "The description of the engine."
},
"condition": {
"$ref": "./ShipCondition.json"
"$ref": "./ShipComponentCondition.json"
},
"integrity": {
"$ref": "./ShipComponentIntegrity.json"
},
"speed": {
"type": "integer",
Expand All @@ -35,6 +38,8 @@
"required": [
"symbol",
"name",
"condition",
"performance",
"description",
"speed",
"requirements"
Expand Down
7 changes: 6 additions & 1 deletion models/ShipFrame.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
"description": "Description of the frame."
},
"condition": {
"$ref": "./ShipCondition.json"
"$ref": "./ShipComponentCondition.json"
},
"integrity": {
"$ref": "./ShipComponentIntegrity.json"
},
"moduleSlots": {
"type": "integer",
Expand All @@ -56,6 +59,8 @@
"required": [
"symbol",
"name",
"condition",
"performance",
"description",
"moduleSlots",
"mountingPoints",
Expand Down
7 changes: 6 additions & 1 deletion models/ShipReactor.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"description": "Description of the reactor."
},
"condition": {
"$ref": "./ShipCondition.json"
"$ref": "./ShipComponentCondition.json"
},
"integrity": {
"$ref": "./ShipComponentIntegrity.json"
},
"powerOutput": {
"type": "integer",
Expand All @@ -36,6 +39,8 @@
"required": [
"symbol",
"name",
"condition",
"performance",
"description",
"powerOutput",
"requirements"
Expand Down
Loading

0 comments on commit c35fa54

Please sign in to comment.