New feature: factories allows facilities to create items

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360075&#msg_360075

Requires GameDir >= r2534

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8804 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-05-17 20:52:27 +00:00
parent 4dc40912e4
commit ea1892c788
31 changed files with 1446 additions and 12 deletions
+44
View File
@@ -92,6 +92,7 @@
#include "PMC.h" // added by Flugente
#include "MilitiaWebsite.h" // added by Flugente
#include "Intelmarket.h" // added by Flugente
#include "FacilityProduction.h" // added by Flugente
#endif
#include "connect.h"
@@ -1075,6 +1076,11 @@ INT32 EnterLaptop()
if ( !gGameExternalOptions.fIntelResource )
RemoveBookmark( INTELMARKET_BOOKMARK );
if ( gGameExternalOptions.fFactories )
SetBookMark( PRODUCTION_BOOKMARK );
else
RemoveBookmark( PRODUCTION_BOOKMARK );
}
LoadLoadPending( );
@@ -1521,6 +1527,10 @@ void RenderLaptop()
case LAPTOP_MODE_INTELMARKET_ABOUT:
RenderIntelmarket_About();
break;
case LAPTOP_MODE_FACILITY_PRODUCTION:
RenderFacilityProduction();
break;
}
if( guiCurrentLaptopMode >= LAPTOP_MODE_WWW )
@@ -1997,6 +2007,10 @@ void EnterNewLaptopMode()
case LAPTOP_MODE_INTELMARKET_ABOUT:
EnterIntelmarket_About();
break;
case LAPTOP_MODE_FACILITY_PRODUCTION:
EnterFacilityProduction();
break;
}
// first time using webbrowser in this laptop session
@@ -2288,6 +2302,10 @@ void HandleLapTopHandles()
case LAPTOP_MODE_INTELMARKET_ABOUT:
HandleIntelmarket_About();
break;
case LAPTOP_MODE_FACILITY_PRODUCTION:
HandleFacilityProduction();
break;
}
}
@@ -2886,6 +2904,10 @@ UINT32 ExitLaptopMode(UINT32 uiMode)
case LAPTOP_MODE_INTELMARKET_ABOUT:
ExitIntelmarket_About();
break;
case LAPTOP_MODE_FACILITY_PRODUCTION:
ExitFacilityProduction();
break;
}
if( ( uiMode != LAPTOP_MODE_NONE )&&( uiMode < LAPTOP_MODE_WWW ) )
@@ -4551,6 +4573,27 @@ void GoToWebPage(INT32 iPageId )
}
}
break;
case PRODUCTION_BOOKMARK:
{
guiCurrentWWWMode = LAPTOP_MODE_FACILITY_PRODUCTION;
guiCurrentLaptopMode = LAPTOP_MODE_FACILITY_PRODUCTION;
// do we have to have a World Wide Wait
if ( LaptopSaveInfo.fVisitedBookmarkAlready[PRODUCTION_BOOKMARK] == FALSE )
{
// reset flag and set load pending flag
LaptopSaveInfo.fVisitedBookmarkAlready[PRODUCTION_BOOKMARK] = TRUE;
fLoadPendingFlag = TRUE;
}
else
{
// fast reload
fLoadPendingFlag = TRUE;
fFastLoadFlag = TRUE;
}
}
break;
}
#ifdef JA2UB
@@ -6346,6 +6389,7 @@ void HandleKeyBoardShortCutsForLapTop( UINT16 usEvent, UINT32 usParam, UINT16 us
SetBookMark( PMC_BOOKMARK );
SetBookMark( MILITIAROSTER_BOOKMARK );
SetBookMark( INTELMARKET_BOOKMARK );
SetBookMark( PRODUCTION_BOOKMARK );
}
}