9e9977d5f1
Surface the inactivity-removal countdown the rules promise but the engine never reported. A race within five turns of being auto-removed for inactivity gets a personal warning in its own report; every race within three turns is listed publicly to all participants. - model: Report.PersonalExitWarning + RacesLeavingSoon ([]RaceExitNotice) - fbs: RaceExitNotice table + Report.personal_exit_warning / races_leaving_soon (regenerated Go + TS bindings) - transcoder: encode/decode both fields - engine: ReportExitWarnings fills the recipient's TTL (1..5) and lists other non-extinct races with TTL 1..3, excluding the recipient itself - ui: danger-styled personal banner + "races leaving soon" section (hidden when empty), wired into the report view, EN/RU i18n - docs: rules.txt report-section list, FUNCTIONAL.md 6.4 + RU mirror Voluntary quit and idle timeout share the TTL countdown and are not distinguished, per the agreed scope.
261 lines
4.7 KiB
Plaintext
261 lines
4.7 KiB
Plaintext
// report reflects model/report/Report data object
|
|
include "common.fbs";
|
|
|
|
namespace report;
|
|
|
|
table RouteEntry {
|
|
key:uint64;
|
|
value:string;
|
|
}
|
|
|
|
table TechEntry {
|
|
key:string;
|
|
value:float32;
|
|
}
|
|
|
|
table Route {
|
|
planet:uint64;
|
|
route:[RouteEntry];
|
|
}
|
|
|
|
table Player {
|
|
name:string;
|
|
drive:float32;
|
|
weapons:float32;
|
|
shields:float32;
|
|
cargo:float32;
|
|
population:float32;
|
|
industry:float32;
|
|
planets:uint16;
|
|
relation:string;
|
|
votes:float32;
|
|
extinct:bool;
|
|
}
|
|
|
|
table Science {
|
|
name:string;
|
|
drive:float32;
|
|
weapons:float32;
|
|
shields:float32;
|
|
cargo:float32;
|
|
}
|
|
|
|
table OtherScience {
|
|
race:string;
|
|
name:string;
|
|
drive:float32;
|
|
weapons:float32;
|
|
shields:float32;
|
|
cargo:float32;
|
|
}
|
|
|
|
table ShipClass {
|
|
name:string;
|
|
drive:float32;
|
|
armament:uint64;
|
|
weapons:float32;
|
|
shields:float32;
|
|
cargo:float32;
|
|
mass:float32;
|
|
}
|
|
|
|
table OthersShipClass {
|
|
race:string;
|
|
name:string;
|
|
drive:float32;
|
|
armament:uint64;
|
|
weapons:float32;
|
|
shields:float32;
|
|
cargo:float32;
|
|
mass:float32;
|
|
}
|
|
|
|
table ShipProduction {
|
|
planet:uint64;
|
|
class:string;
|
|
cost:float32;
|
|
prod_used:float32;
|
|
percent:float32;
|
|
free:float32;
|
|
}
|
|
|
|
table IncomingGroup {
|
|
origin:uint64;
|
|
destination:uint64;
|
|
distance:float32;
|
|
speed:float32;
|
|
mass:float32;
|
|
}
|
|
|
|
table Bombing {
|
|
number:uint64;
|
|
planet:string;
|
|
owner:string;
|
|
attacker:string;
|
|
production:string;
|
|
industry:float32;
|
|
population:float32;
|
|
colonists:float32;
|
|
capital:float32;
|
|
material:float32;
|
|
attack_power:float32;
|
|
wiped:bool;
|
|
}
|
|
|
|
table UnidentifiedPlanet {
|
|
x:float32;
|
|
y:float32;
|
|
number:uint64;
|
|
}
|
|
|
|
table UninhabitedPlanet {
|
|
x:float32;
|
|
y:float32;
|
|
number:uint64;
|
|
size:float32;
|
|
name:string;
|
|
resources:float32;
|
|
capital:float32;
|
|
material:float32;
|
|
}
|
|
|
|
table LocalPlanet {
|
|
x:float32;
|
|
y:float32;
|
|
number:uint64;
|
|
size:float32;
|
|
name:string;
|
|
resources:float32;
|
|
capital:float32;
|
|
material:float32;
|
|
industry:float32;
|
|
population:float32;
|
|
colonists:float32;
|
|
production:string;
|
|
free_industry:float32;
|
|
}
|
|
|
|
table OtherPlanet {
|
|
owner:string;
|
|
x:float32;
|
|
y:float32;
|
|
number:uint64;
|
|
size:float32;
|
|
name:string;
|
|
resources:float32;
|
|
capital:float32;
|
|
material:float32;
|
|
industry:float32;
|
|
population:float32;
|
|
colonists:float32;
|
|
production:string;
|
|
free_industry:float32;
|
|
}
|
|
|
|
table UnidentifiedGroup {
|
|
x:float32;
|
|
y:float32;
|
|
}
|
|
|
|
table OtherGroup {
|
|
number:uint64;
|
|
class:string;
|
|
tech:[TechEntry];
|
|
cargo:string;
|
|
load:float32;
|
|
destination:uint64;
|
|
origin:uint64 = null;
|
|
range:float32 = null;
|
|
speed:float32;
|
|
mass:float32;
|
|
race:string;
|
|
}
|
|
|
|
table LocalGroup {
|
|
number:uint64;
|
|
class:string;
|
|
tech:[TechEntry];
|
|
cargo:string;
|
|
load:float32;
|
|
destination:uint64;
|
|
origin:uint64 = null;
|
|
range:float32 = null;
|
|
speed:float32;
|
|
mass:float32;
|
|
id:common.UUID (required);
|
|
state:string;
|
|
fleet:string;
|
|
race:string;
|
|
}
|
|
|
|
table LocalFleet {
|
|
name:string;
|
|
groups:uint64;
|
|
destination:uint64;
|
|
origin:uint64 = null;
|
|
range:float32 = null;
|
|
speed:float32;
|
|
state:string;
|
|
}
|
|
|
|
// BattleSummary identifies one battle the report recipient
|
|
// participated in or could see on a planet. `planet` lets the map
|
|
// place a battle marker without fetching the full BattleReport;
|
|
// `shots` lets the marker scale its stroke with the protocol length
|
|
// (1 shot → thinnest cross, 100+ shots → maximum cross thickness).
|
|
table BattleSummary {
|
|
id:common.UUID (required);
|
|
planet:uint64;
|
|
shots:uint64;
|
|
}
|
|
|
|
// RaceExitNotice is a public notice that a race is within a few turns of being
|
|
// auto-removed for inactivity; turns_left is the number of turns until removal.
|
|
table RaceExitNotice {
|
|
race:string;
|
|
turns_left:uint32;
|
|
}
|
|
|
|
table Report {
|
|
version:uint64;
|
|
turn:uint64;
|
|
width:uint32;
|
|
height:uint32;
|
|
planet_count:uint32;
|
|
race:string;
|
|
votes:float32;
|
|
vote_for:string;
|
|
player:[Player];
|
|
local_science:[Science];
|
|
other_science:[OtherScience];
|
|
local_ship_class:[ShipClass];
|
|
other_ship_class:[OthersShipClass];
|
|
battle:[BattleSummary];
|
|
bombing:[Bombing];
|
|
incoming_group:[IncomingGroup];
|
|
local_planet:[LocalPlanet];
|
|
ship_production:[ShipProduction];
|
|
route:[Route];
|
|
other_planet:[OtherPlanet];
|
|
uninhabited_planet:[UninhabitedPlanet];
|
|
unidentified_planet:[UnidentifiedPlanet];
|
|
local_fleet:[LocalFleet];
|
|
local_group:[LocalGroup];
|
|
other_group:[OtherGroup];
|
|
unidentified_group:[UnidentifiedGroup];
|
|
personal_exit_warning:uint32 = 0;
|
|
races_leaving_soon:[RaceExitNotice];
|
|
}
|
|
|
|
// GameReportRequest is the signed-gRPC request payload for
|
|
// `MessageTypeUserGamesReport`. Gateway transcodes this into the
|
|
// engine's `?player=&turn=` query string after resolving the caller's
|
|
// race name from the runtime player mapping; only `game_id` and `turn`
|
|
// travel on the wire.
|
|
table GameReportRequest {
|
|
game_id:common.UUID (required);
|
|
turn:uint32;
|
|
}
|
|
|
|
root_type Report;
|