adaneslavo / More-Unique-Components-for-VP

Adds 3rd and 4th unique component to each civilization.
1 stars 6 forks source link

Coca Monopoly #104

Closed pineappledan closed 6 years ago

pineappledan commented 6 years ago

The coca monopoly is not working.

I built 3 tambos and had 3 coca, but coca is not listed in the monopoly summary screen (no % towards monopoly info)

pineappledan commented 6 years ago

Created a new branch called PDanCoca. It has my attempts at fixing the sql, art assets and lua to get it to spawn underneath the city with the tambo, and to be removed if the city is razed.

uses model assets for figs. I thought there were unique art assets for the coca plantation, but the original mod just used the cocoa art assets.

pineappledan commented 6 years ago

so a few questions on how to optimize this/get this lua working:

Do I need to define iCityPlot? because the other code examples simply designate it as "1", as a way of iterating city plots around it. I didn't think this would be necessary, since there is only 1 possible plot in this code.

for the lua when the city is razed, should the game check if the Inca were in the game first? setting RESOURCE_COCA=0 is a simple calculation, and razing is a fairly rare event, so I did not think that adding conditions would help reduce computing cycles

pineappledan commented 6 years ago

Added a (commented out) lua code for checking if a player has a coca monopoly.

If we decide to go with the Coca being supplied via SQL with building, then we can scrap the lua for placing the coca and combine the monopoly check with the lua which grants the unique promotions.

pineappledan commented 6 years ago

we are back to drawing board on Incan UB, closing this issue