From 792fe8b2505875f7cbe1bb2001f9106020dbbca1 Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Wed, 27 Aug 2025 10:20:13 +1000 Subject: [PATCH] Add planet type to status body --- docs/Empire.pod | 10 +++++----- lib/Lacuna/DB/Result/Empire.pm | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/Empire.pod b/docs/Empire.pod index 6fcfedcc..988db8c4 100644 --- a/docs/Empire.pod +++ b/docs/Empire.pod @@ -217,15 +217,15 @@ B You should probably B call this method directly, as it is a wast "bodies" : { "colonies" : [ # bodies are provided sorted by name already. - { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "orbit": #, "empire_name": "your name", "empire_id": 12345 }, + { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "type": "xxx", "orbit": #, "empire_name": "your name", "empire_id": 12345 }, ... ], "mystations" : [ - { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "orbit": #, "empire_name": "your name", "empire_id": 12345 }, + { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "type": "xxx", "orbit": #, "empire_name": "your name", "empire_id": 12345 }, ... ], "ourstations" : [ - { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "orbit": #, "empire_name": "their name", "empire_id": 12346 }, + { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "type": "xxx", "orbit": #, "empire_name": "their name", "empire_id": 12346 }, ... ], "babies" : { @@ -234,7 +234,7 @@ B You should probably B call this method directly, as it is a wast "id" : 12355, # empire ID "has_new_messages" : 30, "bodies" : [ - { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "orbit": #, "empire_name": "their name", "empire_id": 12346 }, + { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "type": "xxx", "orbit": #, "empire_name": "their name", "empire_id": 12346 }, ... ], }, @@ -242,7 +242,7 @@ B You should probably B call this method directly, as it is a wast "has_new_messages" : 30, "id" : 12884, "bodies" : [ - { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "orbit": #, "empire_name": "their name too", "empire_id": 12347 }, + { "id" : "xxxx", "name" : "...", "x": "#", "y": "#", "type": "xxx", "orbit": #, "empire_name": "their name too", "empire_id": 12347 }, ... ], } diff --git a/lib/Lacuna/DB/Result/Empire.pm b/lib/Lacuna/DB/Result/Empire.pm index d459e2e6..9c80a60a 100644 --- a/lib/Lacuna/DB/Result/Empire.pm +++ b/lib/Lacuna/DB/Result/Empire.pm @@ -614,8 +614,9 @@ sub get_status { star_id => $planet->star_id, star_name => $planet->star->name, orbit => $planet->orbit, + type => $planet->image, x => $planet->x, - y => $planet->y, #,,, + y => $planet->y, empire_name => $planet->empire->name, empire_id => $planet->empire_id, } -- 2.51.2