mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Trenches - Add camouflage action using surfaceTexture (#8935)
* Port 7833 to use surfaceTexture * Add camo action * Remove unused args from statement call * Rogue missing space * Add animation + delay for camo action * Add authors
This commit is contained in:
parent
15deea56cb
commit
1a95070b80
@ -68,6 +68,7 @@ Clon1998 <ps.patti1998@gmail.com>
|
||||
Codingboy
|
||||
Coren <coren4@gmail.com>
|
||||
Crusty
|
||||
Cyruz143
|
||||
dabako <dabako@dabakoworld.de>
|
||||
dgibso29 <gibson@earringpranks.com>
|
||||
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
||||
@ -130,6 +131,7 @@ meat <p.humberdroz@gmail.com>
|
||||
Michail Nikolaev
|
||||
MikeMatrix <m.braun92@gmail.com>
|
||||
mjc4wilton <mjc4wilton@gmail.com>
|
||||
Mysteryjuju
|
||||
nic547 <nic547@outlook.com>
|
||||
nikolauska <nikolauska1@gmail.com>
|
||||
nomisum <nomisum@gmail.com>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -18,11 +18,14 @@ class CfgModels {
|
||||
skeletonName = "";
|
||||
};
|
||||
class ace_entrchtool: Default {};
|
||||
class ace_envelope_big: Default {};
|
||||
class ace_envelope_big4: Default {};
|
||||
class ace_envelope_big4_nogeo: Default {};
|
||||
class ace_envelope_small: Default {};
|
||||
class ace_envelope_small4: Default {};
|
||||
class ace_envelope_small4_nogeo: Default {};
|
||||
class ace_envelope: Default {
|
||||
sections[] = {"velka"};
|
||||
};
|
||||
class ace_envelope_big: ace_envelope {};
|
||||
class ace_envelope_big4: ace_envelope {};
|
||||
class ace_envelope_big4_nogeo: ace_envelope {};
|
||||
class ace_envelope_small: ace_envelope {};
|
||||
class ace_envelope_small4: ace_envelope {};
|
||||
class ace_envelope_small4_nogeo: ace_envelope {};
|
||||
class LWTS_optic: Default {};
|
||||
};
|
@ -16,6 +16,11 @@ class CBA_Extended_EventHandlers;
|
||||
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canRemoveTrench)); \
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench);); \
|
||||
}; \
|
||||
class ACE_CamouflageTrench { \
|
||||
displayName = CSTRING(CamouflageTrench); \
|
||||
condition = QUOTE([ARR_2(_target,_player)] call FUNC(canCamouflageTrench)); \
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(camouflageTrench)); \
|
||||
}; \
|
||||
}; \
|
||||
}
|
||||
|
||||
@ -62,6 +67,8 @@ class CfgVehicles {
|
||||
class EventHandlers {
|
||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||
};
|
||||
hiddenSelections[] = {"velka"};
|
||||
hiddenSelectionsTextures[] = {"a3\map_data\gdt_mud_co.paa"};
|
||||
};
|
||||
class ACE_envelope_big: BagFence_base_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
@ -78,6 +85,8 @@ class CfgVehicles {
|
||||
class EventHandlers {
|
||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||
};
|
||||
hiddenSelections[] = {"velka"};
|
||||
hiddenSelectionsTextures[] = {"a3\map_data\gdt_mud_co.paa"};
|
||||
};
|
||||
|
||||
class ACE_envelope_small_NoGeo: ACE_envelope_small {
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
PREP(camouflageTrench);
|
||||
PREP(canCamouflageTrench);
|
||||
PREP(canContinueDiggingTrench);
|
||||
PREP(canDigTrench);
|
||||
PREP(canRemoveTrench);
|
||||
|
26
addons/trenches/functions/fnc_camouflageTrench.sqf
Normal file
26
addons/trenches/functions/fnc_camouflageTrench.sqf
Normal file
@ -0,0 +1,26 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Cyruz
|
||||
* Apply surfaceTexture to a completed trench.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Trench <OBJECT>
|
||||
* 1: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [TrenchObj, ACE_player] call ace_trenches_fnc_camouflageTrench
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_trench", "_unit"];
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
|
||||
[{
|
||||
_this setObjectTextureGlobal [0, surfaceTexture getPosATL _this];
|
||||
_this setVariable [QGVAR(camouflaged), true, true];
|
||||
}, _trench, 2] call CBA_fnc_waitAndExecute;
|
29
addons/trenches/functions/fnc_canCamouflageTrench.sqf
Normal file
29
addons/trenches/functions/fnc_canCamouflageTrench.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Cyruz
|
||||
* Checks if a unit can camouflage a trench.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Trench <OBJECT>
|
||||
* 1: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Can camouflage <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [TrenchObj, ACE_player] call ace_trenches_fnc_canCamouflageTrench
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_trench", "_unit"];
|
||||
|
||||
if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) exitWith {false};
|
||||
|
||||
// Prevent camouflage if not fully dug
|
||||
if ((_trench getVariable [QGVAR(progress), 0]) != 1) exitWith {false};
|
||||
|
||||
// Prevent camouflage being applied once already camouflaged
|
||||
if (_trench getVariable [QGVAR(camouflaged), false]) exitWith {false};
|
||||
|
||||
true
|
@ -226,6 +226,10 @@
|
||||
<Turkish>Siperi Kaldır</Turkish>
|
||||
<Spanish>Eliminar trinchera</Spanish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Trenches_CamouflageTrench">
|
||||
<English>Camouflage Trench</English>
|
||||
<Polish>Zakamufluj Okop</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Trenches_RemovingTrench">
|
||||
<English>Removing Trench</English>
|
||||
<Polish>Usuwanie wnęki</Polish>
|
||||
|
Loading…
Reference in New Issue
Block a user