feat: enhance MapViewer with city selection and layout integration
- Added support for city selection in MapViewer, allowing users to click on cities to view details. - Integrated map layout data to improve city rendering and positioning. - Introduced SelectedCityPanel to display information about the selected city. - Updated map asset handling with utility functions for building asset URLs. - Enhanced state management in mapViewer store to track selected city. - Improved responsiveness and styling of map components. - Added new API endpoint for loading map layouts from legacy data.
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
import { buildBattleSimJobPayload } from './battleSim/environment.js';
|
||||
import { zBattleSimJobId, zBattleSimRequest } from './battleSim/schema.js';
|
||||
import { loadWorldMap } from './maps/worldMap.js';
|
||||
import { loadMapLayout } from './maps/mapLayout.js';
|
||||
|
||||
const zRunReason = z.enum(['schedule', 'manual', 'poke']);
|
||||
const zMessageType = z.enum(['private', 'public', 'national', 'diplomacy']);
|
||||
@@ -168,6 +169,9 @@ export const appRouter = router({
|
||||
const state = await ctx.db.worldState.findFirst();
|
||||
return state ? toWorldStateSnapshot(state) : null;
|
||||
}),
|
||||
getMapLayout: procedure.query(async ({ ctx }) => {
|
||||
return loadMapLayout(ctx.profile.scenario);
|
||||
}),
|
||||
getMap: procedure
|
||||
.input(
|
||||
z.object({
|
||||
|
||||
Reference in New Issue
Block a user