City view: How to capture change in production

ww2commander

Emperor
Joined
Aug 23, 2003
Messages
1,243
Location
Australia
I was hoping one of the more experienced modders here might point me in the right direction as I am not good at figuring out these UI files.

I am looking for the code that triggers when a player chooses a new production item in a city view and accepts it.

The reason I need this is to compare the new production item to any previous one that might have been under construction (assuming player changes it before previous production was completed) and to also run some custom lua if the new item is a specific unit.

Cheers.

EDIT: I think I was looking to hard at the file that I completely missed function OnProductionClick()!
I will give what I am trying a go and see if it is what I need.
 
You'll then need to chase the ButtonPopupTypes value (in this case BUTTONPOPUP_CHOOSEPRODUCTION) to it's associated popup dialog code (UI/InGame/Popups/ProductionPopup.lua)
 
Back
Top Bottom