SpecificCityInfoDirty
From Civilization Modding Wiki
Revision as of 06:52, 14 February 2012 by Killmeplease (talk | contribs) (Created page with "Fired when something in a particular city was changed. Example (from SmoothCityBanner v.2 mod): function OnSpecificCityInfoDirty(iPlayerID, iCityID, eUpdateType) if (eUpdate...")
Fired when something in a particular city was changed.
Example (from SmoothCityBanner v.2 mod): function OnSpecificCityInfoDirty(iPlayerID, iCityID, eUpdateType)
if (eUpdateType == [[1]].CITY_UPDATE_TYPE_BANNER) then local playerTable = Instances[ iPlayerID ]; if playerTable == nil then return; end local instance = playerTable[ iCityID ]; if instance == nil then return; end RefreshCityBanner(instance); end
end Events.SpecificCityInfoDirty.Add(OnSpecificCityInfoDirty);