New feature: transport groups (#172)

https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=365395
This commit is contained in:
rftrdev
2023-07-04 20:58:56 -07:00
committed by GitHub
parent 8d3e6fce40
commit fb03cba2fa
37 changed files with 1471 additions and 102 deletions
+1
View File
@@ -3590,6 +3590,7 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
case NPC_ACTION_SEND_SOLDIERS_TO_BALIME:
case NPC_ACTION_GLOBAL_OFFENSIVE_1:
case NPC_ACTION_GLOBAL_OFFENSIVE_2:
case NPC_ACTION_DEPLOY_TRANSPORT_GROUP:
break;
case NPC_ACTION_TRIGGER_QUEEN_BY_SAM_SITES_CONTROLLED:
+4
View File
@@ -1220,6 +1220,10 @@ typedef struct
BOOLEAN fProvidesRobotLaserBonus;
//shadooow: bitflag controlling what system needs to be in play for item to appear
UINT8 usLimitedToSystem;
// rftr: the progress bounds that allow a transport group to drop an item
INT8 iTransportGroupMinProgress;
INT8 iTransportGroupMaxProgress;
} INVTYPE;
+3 -1
View File
@@ -2469,7 +2469,9 @@ void ReduceAmmoDroppedByNonPlayerSoldiers( SOLDIERTYPE *pSoldier, INT32 iInvSlot
OBJECTTYPE *pObj = &( pSoldier->inv[ iInvSlot ] );
// if it's ammo
if ( Item[ pObj->usItem ].usItemClass == IC_AMMO )
if ( Item[ pObj->usItem ].usItemClass == IC_AMMO
&& Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_BOX
&& Magazine[Item[pObj->usItem].ubClassIndex].ubMagType != AMMO_CRATE)
{
//don't drop all the clips, just a random # of them between 1 and how many there are
pObj->ubNumberOfObjects = ( UINT8 ) ( 1 + Random( pObj->ubNumberOfObjects ) );
+4
View File
@@ -387,6 +387,10 @@ enum
NPC_ACTION_GLOBAL_OFFENSIVE_1,
NPC_ACTION_GLOBAL_OFFENSIVE_2,
// rftr: transport groups
NPC_ACTION_DEPLOY_TRANSPORT_GROUP,
NPC_ACTION_RETURN_TRANSPORT_GROUP,
NPC_ACTION_RECRUIT_PROFILE_TO_EPC = 700,
NPC_ACTION_UNRECRUIT_EPC = 701,