mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
*************************
* HAM 3.6 (by Headrock) * ************************* - Info: Needed GameDir files for HAM 3.6 are not committed yet to the SVN GameDir. Will do that in the next few days - For more infos on HAM 3.6 check out: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=244808&page=0&fpart=1 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3323 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+37
-2
@@ -17,6 +17,10 @@
|
||||
#include "LaptopSave.h"
|
||||
#include "Campaign Types.h"
|
||||
#include "strategicmap.h"
|
||||
// HEADROCK HAM 3.6: Added facilities for calculating hourly expenses
|
||||
#include "Facilities.h"
|
||||
// HEADROCK HAM 3.6: Militia upkeep
|
||||
#include "Town Militia.h"
|
||||
#endif
|
||||
|
||||
// the global defines
|
||||
@@ -402,7 +406,27 @@ INT32 GetProjectedTotalDailyIncome( void )
|
||||
// then there is how many deposits have been made, now look at how many mines we have, thier rate, amount of ore left and predict if we still
|
||||
// had these mines how much more would we get?
|
||||
|
||||
return( PredictIncomeFromPlayerMines() );
|
||||
// HEADROCK HAM 3.6: Facilities can make you money, and this is figured into your daily income.
|
||||
|
||||
INT32 iRate = 0;
|
||||
iRate = PredictIncomeFromPlayerMines() + (15 * GetTotalFacilityHourlyCosts( TRUE )); // 15 hours is the average time a merc can work per day
|
||||
|
||||
return( iRate );
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3.6: Predict expenses today. Takes into account facilities, and in the future merc contracts.
|
||||
INT32 GetProjectedExpenses( void )
|
||||
{
|
||||
INT32 iTotalExpenses = 0;
|
||||
|
||||
INT32 iFacilityExpenses = GetTotalFacilityHourlyCosts( FALSE );
|
||||
INT32 iContractExpenses = GetTotalContractExpenses();
|
||||
|
||||
iTotalExpenses += (iFacilityExpenses*15); // 15 hours is the average time a merc can work every day.
|
||||
iTotalExpenses += iContractExpenses;
|
||||
iTotalExpenses += guiTotalUpkeepForMilitia;
|
||||
|
||||
return (iTotalExpenses);
|
||||
}
|
||||
|
||||
INT32 GetProjectedBalance( void )
|
||||
@@ -1224,7 +1248,8 @@ UINT32 ProcessAndEnterAFinacialRecord( UINT8 ubCode, UINT32 uiDate, INT32 iAmoun
|
||||
else
|
||||
{
|
||||
// alloc space
|
||||
uiId = ReadInLastElementOfFinanceListAndReturnIdNumber( );
|
||||
// HEADROCK HAM 3.6: Fix by Warmsteel to prevent repetitive entries on finance list. Next line commented out.
|
||||
// uiId = ReadInLastElementOfFinanceListAndReturnIdNumber( );
|
||||
pFinance = (FinanceUnitPtr) MemAlloc(sizeof(FinanceUnit));
|
||||
|
||||
// setup info passed
|
||||
@@ -1534,6 +1559,16 @@ void ProcessTransactionString(STR16 pString, FinanceUnitPtr pFinance)
|
||||
swprintf(pString, pTransactionText[ MERC_DEPOSITED_MONEY_TO_PLAYER_ACCOUNT ], gMercProfiles[ pFinance->ubSecondCode ].zNickname );
|
||||
break;
|
||||
|
||||
// HEADROCK HAM 3.6: Paid for Facility Use
|
||||
case( FACILITY_OPERATIONS ):
|
||||
swprintf(pString, L"%s", pTransactionText[ FACILITY_OPERATIONS ]);
|
||||
break;
|
||||
|
||||
// HEADROCK HAM 3.6: Paid for militia upkeep
|
||||
case( MILITIA_UPKEEP ):
|
||||
swprintf(pString, L"%s", pTransactionText[ MILITIA_UPKEEP ]);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user