Table of Contents

Interface IMapModeHandler

Namespace
Map.MapModes
Assembly
MapAssembly.dll

Interface for map mode handlers following the new architecture Each map mode is responsible for its own data textures and rendering logic Performance: <0.1ms mode switching, specialized texture updates

public interface IMapModeHandler

Properties

Mode

Map mode type this handler manages

MapMode Mode { get; }

Property Value

MapMode

Name

Display name for UI

string Name { get; }

Property Value

string

RequiresFrequentUpdates

Whether this mode requires frequent texture updates

bool RequiresFrequentUpdates { get; }

Property Value

bool

ShaderModeID

Shader mode ID for the GPU

int ShaderModeID { get; }

Property Value

int

Methods

GetProvinceTooltip(ushort, ProvinceQueries, CountryQueries)

Get tooltip text for a specific province in this map mode

string GetProvinceTooltip(ushort provinceId, ProvinceQueries provinceQueries, CountryQueries countryQueries)

Parameters

provinceId ushort
provinceQueries ProvinceQueries
countryQueries CountryQueries

Returns

string

GetUpdateFrequency()

Get update frequency for this map mode's textures

UpdateFrequency GetUpdateFrequency()

Returns

UpdateFrequency

OnActivate(Material, MapModeDataTextures)

Called when this map mode becomes active Set up shader properties, enable keywords, etc.

void OnActivate(Material mapMaterial, MapModeDataTextures dataTextures)

Parameters

mapMaterial Material
dataTextures MapModeDataTextures

OnDeactivate(Material)

Called when this map mode becomes inactive Clean up, disable keywords, etc.

void OnDeactivate(Material mapMaterial)

Parameters

mapMaterial Material

UpdateTextures(MapModeDataTextures, ProvinceQueries, CountryQueries, ProvinceMapping, object)

Update the mode-specific data textures from Core simulation data Only called when data has changed or mode requires frequent updates

void UpdateTextures(MapModeDataTextures dataTextures, ProvinceQueries provinceQueries, CountryQueries countryQueries, ProvinceMapping provinceMapping, object gameProvinceSystem = null)

Parameters

dataTextures MapModeDataTextures
provinceQueries ProvinceQueries
countryQueries CountryQueries
provinceMapping ProvinceMapping
gameProvinceSystem object

Optional game-specific province system - engine passes through without knowing type