@@ -199,14 +199,30 @@ namespace Simulator
199199 // / @param techLevel
200200 static void FillPlanetDataForTechLevel (cPlanetRecord* planetRecord, TechLevel techLevel);
201201
202- // / Calculates the current spice production of a planet, which is the sum of the
202+ // / Calculates the current total spice of a planet, which is the sum of the
203203 // / production of all its cities. If 'removeSpice' is not 0, that amount of spice will be
204204 // / removed from the planet.
205205 // / @param planetRecord
206206 // / @param removeSpice
207207 // / @returns The total spice production of the planet.
208208 static int CalculateSpiceProduction (cPlanetRecord* planetRecord, int removeSpice = 0 );
209209
210+ // / Method that calculates how much spice is being produced on a single planet, based on difficulty tunings
211+ // / and number of cities. This method is called every X ticks to update the total spice held on each city.
212+ // / @param baseValue Base value of the computation (e.g. cCityData::mSpiceProduction)
213+ // / @param maxOutput Maximum output value, only applied if `limitOutput` is true
214+ // / @param extraFactor Extra multilpier for the base value
215+ // / @param isHomeWorld
216+ // / @param useSuperpowerMultiplier
217+ // / @param useStorageMultiplier
218+ // / @param finalFactor Extra multiplied applied to the final output value
219+ // / @param numCities
220+ // / @param limitOutput If true, the output value will be capped at `maxOutput`
221+ // / @returns
222+ static float CalculateDeltaSpiceProduction (
223+ float baseValue, float maxOutput, float extraFactor, bool isHomeWorld,
224+ bool useSuperpowerMultiplier, bool useStorageMultiplier, float finalFactor, int numCities, bool limitOutput);
225+
210226 public:
211227 /* 18h */ eastl::string16 mName ;
212228 // / The type of the planet, which determines whether it is a gas giant, asteroid belt, or regular rocky planet.
@@ -261,6 +277,7 @@ namespace Simulator
261277 DeclareAddress (GetPerihelion); // 0xC70190 0xC70FC0
262278 DeclareAddress (FillPlanetDataForTechLevel); // 0xB96820 0xB97090
263279 DeclareAddress (CalculateSpiceProduction); // 0xC6F920 0xC70760
280+ DeclareAddress (CalculateDeltaSpiceProduction); // 0xC71200 0xC720A0
264281 }
265282
266283 inline ResourceKey cPlanetRecord::GenerateTerrainKey ()
0 commit comments