diff --git a/GameSettings.cpp b/GameSettings.cpp index aef166f8..d0e2a5bc 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -3157,7 +3157,6 @@ void LoadGameAPBPConstants() APBPConstants[AP_JUMPOFFWALL] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_JUMPOFFWALL",24),24); APBPConstants[AP_FORTIFICATION] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_FORTIFICATION", 250), 250); APBPConstants[AP_REMOVE_FORTIFICATION] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_REMOVE_FORTIFICATION", 150), 150); - APBPConstants[AP_FILL_SANDBAG] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_FILL_SANDBAG", 200), 200); APBPConstants[AP_EAT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_EAT",80),80); APBPConstants[AP_CLEANINGKIT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_CLEANINGKIT",80),80); APBPConstants[AP_DISGUISE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_DISGUISE",80),80); @@ -3228,7 +3227,6 @@ void LoadGameAPBPConstants() APBPConstants[BP_JUMPWALL] = iniReader.ReadInteger("BPConstants","BP_JUMPWALL",500); APBPConstants[BP_FORTIFICATION] = iniReader.ReadInteger("BPConstants","BP_FORTIFICATION", 700); APBPConstants[BP_REMOVE_FORTIFICATION] = iniReader.ReadInteger("BPConstants","BP_REMOVE_FORTIFICATION", 400); - APBPConstants[BP_FILL_SANDBAG] = iniReader.ReadInteger("BPConstants","BP_FILL_SANDBAG", 500); APBPConstants[BP_HANDCUFF] = iniReader.ReadInteger("BPConstants","BP_HANDCUFF", 100); APBPConstants[BP_APPLYITEM] = iniReader.ReadInteger("BPConstants","BP_APPLYITEM", 50); APBPConstants[BP_INVENTORY_ARM] = iniReader.ReadInteger("BPConstants","BP_INVENTORY_ARM", 10); diff --git a/Init.h b/Init.h index 2d7f65fb..1d2be6f6 100644 --- a/Init.h +++ b/Init.h @@ -147,7 +147,6 @@ AP_JUMPWALL, AP_JUMPOFFWALL, AP_FORTIFICATION, AP_REMOVE_FORTIFICATION, -AP_FILL_SANDBAG, AP_EAT, AP_CLEANINGKIT, AP_DISGUISE, @@ -215,7 +214,6 @@ BP_JUMPOFFWALL, BP_JUMPWALL, BP_FORTIFICATION, BP_REMOVE_FORTIFICATION, -BP_FILL_SANDBAG, BP_HANDCUFF, BP_APPLYITEM, BP_INVENTORY_ARM, diff --git a/Tactical/Auto Bandage.cpp b/Tactical/Auto Bandage.cpp index 8493a9d8..213aa5ab 100644 --- a/Tactical/Auto Bandage.cpp +++ b/Tactical/Auto Bandage.cpp @@ -1296,7 +1296,7 @@ BOOLEAN RetreatBandagingPending() } // return the ID of best doctor that has a medkit and is travelling with pPatient -UINT8 GetBestRetreatingMercDoctor( SOLDIERTYPE* pPatient ) +UINT16 GetBestRetreatingMercDoctor( SOLDIERTYPE* pPatient ) { // if this is a travelling, bleeding merc, can somebody who travels with him bandage him/her? if ( pPatient && pPatient->bActive && pPatient->flags.fBetweenSectors && pPatient->bBleeding ) @@ -1341,7 +1341,7 @@ void HandleRetreatBandaging() BOOLEAN needhelpinsector = FALSE; INT16 sX = -1; INT16 sY = -1; - UINT8 possiblepatient = NOBODY; + UINT16 possiblepatient = NOBODY; UINT16 cnt = gTacticalStatus.Team[OUR_TEAM].bFirstID; SOLDIERTYPE* pSoldier = NULL; diff --git a/Tactical/Auto Bandage.h b/Tactical/Auto Bandage.h index 39b9f8cb..796e9dff 100644 --- a/Tactical/Auto Bandage.h +++ b/Tactical/Auto Bandage.h @@ -21,7 +21,7 @@ void SetRetreatBandaging( BOOLEAN aVal ); BOOLEAN RetreatBandagingPending( ); // return the ID of best doctor that has a medkit and is travelling with pPatient -UINT8 GetBestRetreatingMercDoctor( SOLDIERTYPE* pPatient ); +UINT16 GetBestRetreatingMercDoctor( SOLDIERTYPE* pPatient ); void HandleRetreatBandaging( ); diff --git a/Tactical/Handle Items.cpp b/Tactical/Handle Items.cpp index 34324e2d..4a5b1514 100644 --- a/Tactical/Handle Items.cpp +++ b/Tactical/Handle Items.cpp @@ -1153,47 +1153,24 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa } // Flugente: (de-)construct structures - if ( HasItemFlag( usHandItem, EMPTY_SANDBAG ) || IsStructureDeconstructItem( usHandItem, sGridNo, pSoldier ) || IsStructureConstructItem( usHandItem, sGridNo, pSoldier ) ) + if ( IsStructureDeconstructItem( usHandItem, sGridNo, pSoldier ) || IsStructureConstructItem( usHandItem, sGridNo, pSoldier ) ) { - // if we have an empty sandbag in our hands, we also need to have a shovel in our second hand, otherwise we can't fill it - if ( HasItemFlag(usHandItem, EMPTY_SANDBAG) ) + // if there is a structure, see if we can deconstruct it, if not, see if we can construct something + STRUCTURE* pStruct = FindStructure( sGridNo, (STRUCTURE_GENERIC | STRUCTURE_WIREFENCE) ); + + if ( pStruct ) { - sAPCost = GetAPsForMultiTurnAction( pSoldier, MTA_FILL_SANDBAG ); - - // we can only do this on certain terraintypes - INT8 bOverTerrainType = GetTerrainType( sGridNo ); - if ( bOverTerrainType != FLAT_GROUND && bOverTerrainType != DIRT_ROAD && bOverTerrainType != LOW_GRASS ) - { + if ( !IsStructureDeconstructItem( usHandItem, sGridNo, pSoldier ) ) return(ITEM_HANDLE_REFUSAL); - } - // check if we have a shovel in our second hand - OBJECTTYPE* pShovelObj = &(pSoldier->inv[SECONDHANDPOS]); - - if ( !pShovelObj || !(pShovelObj->exists()) || !HasItemFlag(pSoldier->inv[ SECONDHANDPOS ].usItem, (SHOVEL)) ) - { - return( ITEM_HANDLE_REFUSAL ); - } - } + sAPCost = GetAPsForMultiTurnAction( pSoldier, MTA_REMOVE_FORTIFY ); + } else { - // if there is a structure, see if we can deconstruct it, if not, see if we can construct something - STRUCTURE* pStruct = FindStructure( sGridNo, (STRUCTURE_GENERIC | STRUCTURE_WIREFENCE) ); + if ( !IsStructureConstructItem( usHandItem, sGridNo, pSoldier ) ) + return(ITEM_HANDLE_REFUSAL); - if ( pStruct ) - { - if ( !IsStructureDeconstructItem( usHandItem, sGridNo, pSoldier ) ) - return(ITEM_HANDLE_REFUSAL); - - sAPCost = GetAPsForMultiTurnAction( pSoldier, MTA_REMOVE_FORTIFY ); - } - else - { - if ( !IsStructureConstructItem( usHandItem, sGridNo, pSoldier ) ) - return(ITEM_HANDLE_REFUSAL); - - sAPCost = GetAPsForMultiTurnAction( pSoldier, MTA_FORTIFY ); - } + sAPCost = GetAPsForMultiTurnAction( pSoldier, MTA_FORTIFY ); } // we are at pSoldier->sGridNo and the action takes place at sGridNo diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index c8c4dfd4..2fc1af91 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -4511,21 +4511,6 @@ BOOLEAN UIMouseOnValidAttackLocation( SOLDIERTYPE *pSoldier ) if ( pSoldier->pathing.bLevel == 0 ) { - if ( HasItemFlag( (&(pSoldier->inv[HANDPOS]))->usItem, (EMPTY_SANDBAG)) ) - { - // check if we have a shovel in our second hand - OBJECTTYPE* pShovelObj = &(pSoldier->inv[SECONDHANDPOS]); - - if ( pShovelObj && pShovelObj->exists() && HasItemFlag(pSoldier->inv[ SECONDHANDPOS ].usItem, (SHOVEL)) ) - { - INT8 bOverTerrainType = GetTerrainType( usMapPos ); - if( bOverTerrainType == FLAT_GROUND || bOverTerrainType == DIRT_ROAD || bOverTerrainType == LOW_GRASS ) - { - return( TRUE ); - } - } - } - if ( IsFortificationPossibleAtGridNo( usMapPos ) && IsStructureConstructItem( pSoldier->inv[HANDPOS].usItem, usMapPos, pSoldier ) ) { return(TRUE); diff --git a/Tactical/Item Types.h b/Tactical/Item Types.h index 5f64fbe9..bfde530e 100644 --- a/Tactical/Item Types.h +++ b/Tactical/Item Types.h @@ -730,9 +730,9 @@ extern OBJECTTYPE gTempObject; // -------- added by Flugente: various item flags -------- // flags used for various item properties (easier than adding 32 differently named variables). DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!! // note that these should not be used to determine what kind of an attachment an item is, that is determined by attachmentclass and the AC_xxx flags above -#define EMPTY_SANDBAG 0x00000001 //1 +//#define EMPTY_SANDBAG 0x00000001 //1 //#define FULL_SANDBAG 0x00000002 //2 -#define SHOVEL 0x00000004 //4 // a shovel is used for filling sandbags and other building-related tasks +//#define SHOVEL 0x00000004 //4 // a shovel is used for filling sandbags and other building-related tasks //#define CONCERTINA 0x00000008 //8 #define WATER_DRUM 0x00000010 //16 // water drums allow to refill canteens in the sector they are in diff --git a/Tactical/Points.cpp b/Tactical/Points.cpp index 288d66fa..5aa54137 100644 --- a/Tactical/Points.cpp +++ b/Tactical/Points.cpp @@ -4004,12 +4004,9 @@ INT16 GetAPsForMultiTurnAction( SOLDIERTYPE *pSoldier, UINT8 usActionType ) case MTA_REMOVE_FORTIFY: sAPCost += APBPConstants[AP_REMOVE_FORTIFICATION]; break; - case MTA_FILL_SANDBAG: - sAPCost += APBPConstants[AP_FILL_SANDBAG]; - break; } - if ( usActionType == MTA_FORTIFY || usActionType == MTA_REMOVE_FORTIFY || usActionType == MTA_FILL_SANDBAG ) + if ( usActionType == MTA_FORTIFY || usActionType == MTA_REMOVE_FORTIFY ) { sAPCost = (sAPCost * (100 + pSoldier->GetBackgroundValue(BG_FORTIFY))) / 100; } diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index ee97e98a..1ca966a9 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -16039,7 +16039,6 @@ void SOLDIERTYPE::StartMultiTurnAction( UINT8 usActionType, INT32 asGridNo ) { case MTA_FORTIFY: case MTA_REMOVE_FORTIFY: - case MTA_FILL_SANDBAG: if ( this->pathing.bLevel != 0 ) return; break; @@ -16094,8 +16093,7 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction( ) { case MTA_FORTIFY: case MTA_REMOVE_FORTIFY: - case MTA_FILL_SANDBAG: - // building on a roof is forbidden! stopt his! + // building on a roof is forbidden! stop this! if ( this->pathing.bLevel != 0 ) { CancelMultiTurnAction( FALSE ); @@ -16123,7 +16121,7 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction( ) OBJECTTYPE* pObj = &(this->inv[HANDPOS]); // error if the gridno we started working on is not the gridno we are currently looking at - if ( usMultiTurnAction == MTA_FORTIFY || usMultiTurnAction == MTA_REMOVE_FORTIFY || usMultiTurnAction == MTA_FILL_SANDBAG ) + if ( usMultiTurnAction == MTA_FORTIFY || usMultiTurnAction == MTA_REMOVE_FORTIFY ) { if ( !pObj || !(pObj->exists( )) ) fActionStillValid = FALSE; @@ -16141,49 +16139,26 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction( ) INT16 entirebpcost = 0; switch ( usMultiTurnAction ) { - case MTA_FORTIFY: - { - entireapcost = GetAPsForMultiTurnAction( this, MTA_FORTIFY ); - entirebpcost = APBPConstants[BP_FORTIFICATION]; + case MTA_FORTIFY: + { + entireapcost = GetAPsForMultiTurnAction( this, MTA_FORTIFY ); + entirebpcost = APBPConstants[BP_FORTIFICATION]; - if ( !IsFortificationPossibleAtGridNo( this->sMTActionGridNo ) ) - fActionStillValid = FALSE; - else if ( !IsStructureConstructItem( this->inv[HANDPOS].usItem, this->sMTActionGridNo, this ) ) - fActionStillValid = FALSE; - } + if ( !IsFortificationPossibleAtGridNo( this->sMTActionGridNo ) ) + fActionStillValid = FALSE; + else if ( !IsStructureConstructItem( this->inv[HANDPOS].usItem, this->sMTActionGridNo, this ) ) + fActionStillValid = FALSE; + } break; case MTA_REMOVE_FORTIFY: - { - entireapcost = GetAPsForMultiTurnAction( this, MTA_REMOVE_FORTIFY ); - entirebpcost = APBPConstants[BP_REMOVE_FORTIFICATION]; + { + entireapcost = GetAPsForMultiTurnAction( this, MTA_REMOVE_FORTIFY ); + entirebpcost = APBPConstants[BP_REMOVE_FORTIFICATION]; - if ( !IsStructureDeconstructItem( this->inv[HANDPOS].usItem, this->sMTActionGridNo, this ) ) - fActionStillValid = FALSE; - } - break; - - case MTA_FILL_SANDBAG: - { - entireapcost = GetAPsForMultiTurnAction( this, MTA_FILL_SANDBAG ); - entirebpcost = APBPConstants[BP_FILL_SANDBAG]; - - if ( !HasItemFlag( this->inv[HANDPOS].usItem, EMPTY_SANDBAG ) ) - fActionStillValid = FALSE; - else - { - INT8 bOverTerrainType = GetTerrainType( sGridNo ); - if ( bOverTerrainType != FLAT_GROUND && bOverTerrainType != DIRT_ROAD && bOverTerrainType != LOW_GRASS ) - fActionStillValid = FALSE; - else - { - // check if we have a shovel in our second hand - OBJECTTYPE* pShovelObj = &(this->inv[SECONDHANDPOS]); - if ( !pShovelObj || !(pShovelObj->exists( )) || !HasItemFlag( this->inv[SECONDHANDPOS].usItem, SHOVEL ) ) - fActionStillValid = FALSE; - } - } - } + if ( !IsStructureDeconstructItem( this->inv[HANDPOS].usItem, this->sMTActionGridNo, this ) ) + fActionStillValid = FALSE; + } break; } @@ -16196,25 +16171,24 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction( ) // refresh animations switch ( usMultiTurnAction ) { - case MTA_FORTIFY: - case MTA_REMOVE_FORTIFY: - case MTA_FILL_SANDBAG: - { - // if we are not in turnbased and no enemies are around, we reduce the number of necessary action points to 0. No need to keep waiting if there's nobody around anyway - if ( !(gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT) ) - bOverTurnAPS = 0; - // otherwise this might take longer, so we refresh our animation - else - { - if ( !is_networked ) - this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0, FALSE ); - else - this->ChangeSoldierState( CUTTING_FENCE, 0, 0 ); + case MTA_FORTIFY: + case MTA_REMOVE_FORTIFY: + { + // if we are not in turnbased and no enemies are around, we reduce the number of necessary action points to 0. No need to keep waiting if there's nobody around anyway + if ( !(gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT) ) + bOverTurnAPS = 0; + // otherwise this might take longer, so we refresh our animation + else + { + if ( !is_networked ) + this->EVENT_InitNewSoldierAnim( CUTTING_FENCE, 0, FALSE ); + else + this->ChangeSoldierState( CUTTING_FENCE, 0, 0 ); - // as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that - bOverTurnAPS = max( 0, bOverTurnAPS - APBPConstants[AP_USEWIRECUTTERS] ); - } - } + // as setting the new animation costs APBPConstants[AP_USEWIRECUTTERS] APs every time, account for that + bOverTurnAPS = max( 0, bOverTurnAPS - APBPConstants[AP_USEWIRECUTTERS] ); + } + } break; } @@ -16223,59 +16197,27 @@ BOOLEAN SOLDIERTYPE::UpdateMultiTurnAction( ) { switch ( usMultiTurnAction ) { - case MTA_FORTIFY: - { - // Build the thing - if ( BuildFortification( this->sMTActionGridNo, this, pObj ) ) - { - // we gain a bit of experience... - StatChange( this, STRAMT, 4, TRUE ); - StatChange( this, HEALTHAMT, 2, TRUE ); - } - } + case MTA_FORTIFY: + { + // Build the thing + if ( BuildFortification( this->sMTActionGridNo, this, pObj ) ) + { + // we gain a bit of experience... + StatChange( this, STRAMT, 4, TRUE ); + StatChange( this, HEALTHAMT, 2, TRUE ); + } + } break; - case MTA_REMOVE_FORTIFY: - { - if ( RemoveFortification( this->sMTActionGridNo, this, pObj ) ) - { - // we gain a bit of experience... - StatChange( this, STRAMT, 3, TRUE ); - StatChange( this, HEALTHAMT, 2, TRUE ); - } - } - break; - - case MTA_FILL_SANDBAG: - { - // eventually search for the number of a sandbag item - UINT16 fullsandbagnr = Item[this->inv[HANDPOS].usItem].usBuddyItem; - if ( fullsandbagnr ) - { - INT8 bObjSlot = HANDPOS; - UINT16 usItem = pObj->usItem; - - CreateItem( fullsandbagnr, 100, &gTempObject ); - if ( !(gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT) && gfShiftBombPlant ) - { - // sevenfm: drop filled sandbag to the ground and take new empty from inventory - AddItemToPool( this->sGridNo, &gTempObject, 1, 0, 0, -1 ); - DeleteObj( &(this->inv[HANDPOS]) ); - TakeNewItemFromInventory( usItem ); - } - else - { - SwapObjs( this, bObjSlot, &gTempObject, TRUE ); - } - - // sevenfm: added this to correctly update interface - DirtyMercPanelInterface( this, DIRTYLEVEL2 ); - - // we gain a bit of experience... - StatChange( this, STRAMT, 1, TRUE ); - StatChange( this, HEALTHAMT, 1, TRUE ); - } - } + case MTA_REMOVE_FORTIFY: + { + if ( RemoveFortification( this->sMTActionGridNo, this, pObj ) ) + { + // we gain a bit of experience... + StatChange( this, STRAMT, 3, TRUE ); + StatChange( this, HEALTHAMT, 2, TRUE ); + } + } break; } @@ -19793,43 +19735,24 @@ void SOLDIERTYPE::EVENT_SoldierBuildStructure( INT32 sGridNo, UINT8 ubDirection // do checks here... OBJECTTYPE* pObj = &(this->inv[HANDPOS]); - if ( pObj && pObj->exists( ) && (HasItemFlag( this->inv[HANDPOS].usItem, EMPTY_SANDBAG ) || IsStructureConstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) || IsStructureDeconstructItem( this->inv[HANDPOS].usItem, sGridNo, this )) ) + if ( pObj && pObj->exists( ) && ( IsStructureConstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) || IsStructureDeconstructItem( this->inv[HANDPOS].usItem, sGridNo, this )) ) { - if ( HasItemFlag( this->inv[HANDPOS].usItem, EMPTY_SANDBAG ) ) + // it is possible that an item is used in both constructing and deconstructing. We thus check wether a structure already exists at sGridNo to dedcut the players intention + // if there is a structure, we will remove this fortification. If there isn't, then we will dig and create a earth pile + STRUCTURE* pStruct = FindStructure( sGridNo, STRUCTURE_GENERIC ); + + if ( !pStruct && IsStructureConstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) ) { - INT8 bOverTerrainType = GetTerrainType( sGridNo ); - if ( bOverTerrainType == FLAT_GROUND || bOverTerrainType == DIRT_ROAD || bOverTerrainType == LOW_GRASS ) - { - // check if we have a shovel in our second hand - OBJECTTYPE* pShovelObj = &(this->inv[SECONDHANDPOS]); + // Build the thing + this->StartMultiTurnAction( MTA_FORTIFY, sGridNo ); - if ( pShovelObj && pShovelObj->exists( ) && HasItemFlag( this->inv[SECONDHANDPOS].usItem, SHOVEL ) ) - { - this->StartMultiTurnAction( MTA_FILL_SANDBAG, sGridNo ); - - fSuccess = TRUE; - } - } + fSuccess = TRUE; } - else + else if ( IsStructureDeconstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) ) { - // it is possible that an item is used in both constructing and deconstructing. We thus check wether a structure already exists at sGridNo to dedcut the players intention - // if there is a structure, we will remove this fortification. If there isn't, then we will dig and create a earth pile - STRUCTURE* pStruct = FindStructure( sGridNo, STRUCTURE_GENERIC ); + this->StartMultiTurnAction( MTA_REMOVE_FORTIFY, sGridNo ); - if ( !pStruct && IsStructureConstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) ) - { - // Build the thing - this->StartMultiTurnAction( MTA_FORTIFY, sGridNo ); - - fSuccess = TRUE; - } - else if ( IsStructureDeconstructItem( this->inv[HANDPOS].usItem, sGridNo, this ) ) - { - this->StartMultiTurnAction( MTA_REMOVE_FORTIFY, sGridNo ); - - fSuccess = TRUE; - } + fSuccess = TRUE; } } diff --git a/Tactical/Soldier Control.h b/Tactical/Soldier Control.h index a704a71f..6f91b985 100644 --- a/Tactical/Soldier Control.h +++ b/Tactical/Soldier Control.h @@ -561,7 +561,6 @@ enum MTA_NONE = 0, MTA_FORTIFY, MTA_REMOVE_FORTIFY, - MTA_FILL_SANDBAG, NUM_MTA, }; diff --git a/Tactical/UI Cursors.cpp b/Tactical/UI Cursors.cpp index 45aef828..915e3262 100644 --- a/Tactical/UI Cursors.cpp +++ b/Tactical/UI Cursors.cpp @@ -2207,24 +2207,6 @@ UINT8 HandleFortificationCursor( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT32 ui if ( pSoldier->pathing.bLevel != 0 ) return( FORTIFICATION_RED_UICURSOR ); - - // if we have an empty sandbag in our hands, we also need to have a shovel in our second hand, otherwise we can't fill it - if ( HasItemFlag( pSoldier->inv[HANDPOS].usItem, EMPTY_SANDBAG) ) - { - // check if we have a shovel in our second hand - OBJECTTYPE* pShovelObj = &(pSoldier->inv[SECONDHANDPOS]); - - if ( pShovelObj && (pShovelObj->exists()) && HasItemFlag(pSoldier->inv[ SECONDHANDPOS ].usItem, SHOVEL) ) - { - INT8 bOverTerrainType = GetTerrainType( sGridNo ); - if( bOverTerrainType == FLAT_GROUND || bOverTerrainType == DIRT_ROAD || bOverTerrainType == LOW_GRASS ) - { - return( FORTIFICATION_GREY_UICURSOR ); - } - } - - return( FORTIFICATION_RED_UICURSOR ); - } if ( IsFortificationPossibleAtGridNo( sGridNo ) && IsStructureConstructItem( pSoldier->inv[HANDPOS].usItem, sGridNo, pSoldier ) ) { @@ -2820,7 +2802,7 @@ UINT8 GetActionModeCursor( SOLDIERTYPE *pSoldier ) // Flugente: cursor for constructing/deconstructing // at the moment the gridno is not required in these functions, thus 1 suffices - if ( HasItemFlag( usInHand, EMPTY_SANDBAG ) || IsStructureConstructItem( usInHand, 1, pSoldier ) || IsStructureDeconstructItem( usInHand, 1, pSoldier ) ) + if ( IsStructureConstructItem( usInHand, 1, pSoldier ) || IsStructureDeconstructItem( usInHand, 1, pSoldier ) ) ubCursor = FORTICURS; // Flugente: cursor for handcuffs diff --git a/Utils/Text.h b/Utils/Text.h index 8bfe7b55..62b09f0f 100644 --- a/Utils/Text.h +++ b/Utils/Text.h @@ -877,9 +877,8 @@ enum STR_MTA_NONE, STR_MTA_FORTIFY, STR_MTA_REMOVE_FORTIFY, - STR_TA_FILL_SANDBAG, STR_MTA_CANCEL, - STR_MTA_CANNOT_BUILD, + STR_MTA_CANNOT_BUILD, TEXT_NUM_MTA_STR }; diff --git a/Utils/_ChineseText.cpp b/Utils/_ChineseText.cpp index b7cf48bc..b9a2ba25 100644 --- a/Utils/_ChineseText.cpp +++ b/Utils/_ChineseText.cpp @@ -8178,7 +8178,6 @@ STR16 szMTATextStr[]= L"空无一物", L"建造掩体", //L"building a fortification", L"拆除掩体", //L"removing a fortification", - L"填满沙包", //L"filling sandbags", L"%s必须停止%s", //L"%s had to stop %s.", L"所选的路障无法再该分区建造", }; diff --git a/Utils/_DutchText.cpp b/Utils/_DutchText.cpp index 847de141..33226f2b 100644 --- a/Utils/_DutchText.cpp +++ b/Utils/_DutchText.cpp @@ -8189,7 +8189,6 @@ STR16 szMTATextStr[]= // TODO.Translate L"nothing", L"building a fortification", L"removing a fortification", - L"filling sandbags", L"%s had to stop %s.", L"The selected barricade cannot be built in this sector", // TODO.Translate }; diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index bfc4d18a..c45e0bbf 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -8176,7 +8176,6 @@ STR16 szMTATextStr[]= L"nothing", L"building a fortification", L"removing a fortification", - L"filling sandbags", L"%s had to stop %s.", L"The selected barricade cannot be built in this sector", }; diff --git a/Utils/_FrenchText.cpp b/Utils/_FrenchText.cpp index 8c147839..a8372f74 100644 --- a/Utils/_FrenchText.cpp +++ b/Utils/_FrenchText.cpp @@ -8175,7 +8175,6 @@ STR16 szMTATextStr[]= L"rien, en fait.", L"la construction d'une fortification", L"le retrait d'une fortification", - L"le remplissage des sacs de sable", L"%s a dû arrêter... %s", L"Cette sorte de barricade ne peut pas être construite dans ce secteur", }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 4369063a..4813436d 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -8006,7 +8006,6 @@ STR16 szMTATextStr[]= L"nichts", L"baue eine Befestigung", L"entferne eine Befestigung", - L"Sandsäcke befüllen", L"%s musste %s stoppen.", L"The selected barricade cannot be built in this sector", // TODO.Translate }; diff --git a/Utils/_ItalianText.cpp b/Utils/_ItalianText.cpp index 28017204..f1aef806 100644 --- a/Utils/_ItalianText.cpp +++ b/Utils/_ItalianText.cpp @@ -8183,7 +8183,6 @@ STR16 szMTATextStr[]= // TODO.Translate L"nothing", L"building a fortification", L"removing a fortification", - L"filling sandbags", L"%s had to stop %s.", L"The selected barricade cannot be built in this sector", // TODO.Translate }; diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 8d37b9f2..624e01f6 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -8201,7 +8201,6 @@ STR16 szMTATextStr[]= // TODO.Translate L"nothing", L"building a fortification", L"removing a fortification", - L"filling sandbags", L"%s had to stop %s.", L"The selected barricade cannot be built in this sector", // TODO.Translate }; diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 8a431c26..b9ae093a 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -8176,7 +8176,6 @@ STR16 szMTATextStr[]= L"ничего", L"укрепление строится", L"укрепление убирается", - L"наполнение мешков", L"%s был вынужден прекратить %s.", L"Выбранное укрепление не может быть построено в этом секторе", };