ui/phase-18: ship-class calc bridge with live designer preview
Wires pkg/calc/ship.go into the WASM Core boundary as seven thin
wrappers (DriveEffective, EmptyMass, WeaponsBlockMass, FullMass,
Speed, CargoCapacity, CarryingMass). The ship-class designer reads
Core through a new CORE_CONTEXT_KEY populated by the in-game layout
and renders a five-row preview pane (mass, full-load mass, max
speed, range at full load, cargo capacity) that updates reactively
on every form edit and on the player's localPlayer{Drive,Weapons,
Shields,Cargo} tech levels — three of which are now decoded from
the report's Player block alongside the existing localPlayerDrive.
CarryingMass is the seventh wrapper added to the original six-function
list so that "full-load mass" composes through pkg/calc/ functions
without putting math in TypeScript.
This commit is contained in:
@@ -239,6 +239,13 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"game.designer.ship_class.invalid.cargo_value": "трюм должен быть 0 или ≥ 1",
|
||||
"game.designer.ship_class.invalid.armament_weapons_pair": "вооружённость и оружие должны быть оба нулевыми или оба ненулевыми",
|
||||
"game.designer.ship_class.invalid.all_zero": "хотя бы одно значение должно быть ненулевым",
|
||||
"game.designer.ship_class.preview.title": "превью при ваших технологиях",
|
||||
"game.designer.ship_class.preview.mass": "масса",
|
||||
"game.designer.ship_class.preview.full_load_mass": "масса с полной загрузкой",
|
||||
"game.designer.ship_class.preview.max_speed": "максимальная скорость (св.лет/ход)",
|
||||
"game.designer.ship_class.preview.range": "дальность при полной загрузке (св.лет/ход)",
|
||||
"game.designer.ship_class.preview.cargo_capacity": "грузоподъёмность одного корабля",
|
||||
"game.designer.ship_class.preview.unavailable": "—",
|
||||
};
|
||||
|
||||
export default ru;
|
||||
|
||||
Reference in New Issue
Block a user