mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Port: Wirecutting from AGM
by gpgpgpgp, edited by commy2 Doesn't really work as well as I'd like (some fences are uncuttable)
This commit is contained in:
parent
3b3944b56c
commit
39a4977efe
@ -2,4 +2,4 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
QGVAR(CurrentTooltip) pushBack (_this select 0);
|
||||
GVAR(CurrentTooltip) pushBack (_this select 0);
|
||||
|
1
addons/logistics_wirecutter/$PBOPREFIX$
Normal file
1
addons/logistics_wirecutter/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\logistics_wirecutter
|
6
addons/logistics_wirecutter/CfgEventHandlers.hpp
Normal file
6
addons/logistics_wirecutter/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
12
addons/logistics_wirecutter/CfgSounds.hpp
Normal file
12
addons/logistics_wirecutter/CfgSounds.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
class CfgSounds {
|
||||
class ACE_Wirecutter_sound {
|
||||
name = "ACE_wirecutter_sound";
|
||||
sound[] = {QUOTE(PATHTOF(sound\wire_cut.ogg)), "db-0", 1};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Wirecutter_sound_long {
|
||||
name = "ACE_wirecutter_sound_long";
|
||||
sound[] = {QUOTE(PATHTOF(sound\wire_cut_long.ogg)), "db-0", 1};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
98
addons/logistics_wirecutter/CfgVehicles.hpp
Normal file
98
addons/logistics_wirecutter/CfgVehicles.hpp
Normal file
@ -0,0 +1,98 @@
|
||||
#define MACRO_CUTWIRE \
|
||||
class ACE_Wirecutter_cut { \
|
||||
displayName = "$STR_ACE_CutFence"; \
|
||||
distance = 4; \
|
||||
condition = QUOTE('ToolKit' in items _player && {alive _target}); \
|
||||
statement = QUOTE([ARR_2(5, _target)] call FUNC(cutDownFence)); \
|
||||
showDisabled = 1; \
|
||||
priority = 2.1; \
|
||||
icon = QUOTE(PATHTOF(ui\wirecutter_ca.paa)); \
|
||||
};
|
||||
|
||||
#define MACRO_CUTWIRE_LONG \
|
||||
class ACE_Wirecutter_cut { \
|
||||
displayName = "$STR_ACE_CutFence"; \
|
||||
distance = 4; \
|
||||
condition = QUOTE('ToolKit' in items _player && {alive _target}); \
|
||||
statement = QUOTE([ARR_2(5, _target)] call FUNC(cutDownFence)); \
|
||||
showDisabled = 1; \
|
||||
priority = 2.1; \
|
||||
icon = QUOTE(PATHTOF(ui\wirecutter_ca.paa)); \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
|
||||
class Wall_F;
|
||||
class Land_Net_Fence_4m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_Net_Fence_8m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE_LONG
|
||||
};
|
||||
};
|
||||
class Land_Net_FenceD_8m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_New_WiredFence_5m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_New_WiredFence_10m_Dam_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_New_WiredFence_10m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE_LONG
|
||||
};
|
||||
};
|
||||
class Land_Pipe_fence_4m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_Pipe_fence_4mNoLC_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_SportGround_fence_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_Wired_Fence_4m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_Wired_Fence_4mD_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
class Land_Wired_Fence_8m_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE_LONG
|
||||
};
|
||||
};
|
||||
class Land_Wired_Fence_8mD_F: Wall_F {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
|
||||
class NonStrategic;
|
||||
class Land_Razorwire_F: NonStrategic {
|
||||
class ACE_Actions {
|
||||
MACRO_CUTWIRE
|
||||
};
|
||||
};
|
||||
};
|
9
addons/logistics_wirecutter/XEH_preInit.sqf
Normal file
9
addons/logistics_wirecutter/XEH_preInit.sqf
Normal file
@ -0,0 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(cutDownFence);
|
||||
PREP(cutDownFenceAbort);
|
||||
PREP(cutDownFenceCallback);
|
||||
|
||||
ADDON = true;
|
17
addons/logistics_wirecutter/config.cpp
Normal file
17
addons/logistics_wirecutter/config.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"gpgpgpgp"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgSounds.hpp"
|
24
addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf
Normal file
24
addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
// by gpgpgpgp, edited by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_timeToCut,_fenceObject);
|
||||
|
||||
// if (cadetMode) then {
|
||||
// {
|
||||
// [ACE_player, "{_this groupChat localize 'STR_ACE_CuttingFenceChat'}", _x] call ACE_Core_fnc_execRemoteFnc;
|
||||
// } forEach units group ACE_player;
|
||||
// };
|
||||
|
||||
if !([ACE_player] call EFUNC(common,isEngineer)) then {
|
||||
_timeToCut = _timeToCut + 5;
|
||||
};
|
||||
|
||||
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
||||
if (_timeToCut > 4.5) then {
|
||||
playSound "ACE_wirecutter_sound_long";
|
||||
} else {
|
||||
playSound "ACE_wirecutter_sound";
|
||||
};
|
||||
|
||||
[_timeToCut, [_fenceObject], {(_this select 0) call FUNC(cutDownFenceCallback)}, {(_this select 0) call FUNC(cutDownFenceAbort)}, localize "STR_ACE_CuttingFence"] call EFUNC(common,progressBar);
|
@ -0,0 +1,4 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_fenceObject);
|
||||
|
||||
_fenceObject setdamage 1;
|
||||
[localize "STR_ACE_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\logistics_wirecutter\script_component.hpp"
|
12
addons/logistics_wirecutter/script_component.hpp
Normal file
12
addons/logistics_wirecutter/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT logistics_wirecutter
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_LOGISTICS_WIRECUTTER
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_LOGISTICS_WIRECUTTER
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_LOGISTICS_WIRECUTTER
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
BIN
addons/logistics_wirecutter/sound/wire_cut.ogg
Normal file
BIN
addons/logistics_wirecutter/sound/wire_cut.ogg
Normal file
Binary file not shown.
BIN
addons/logistics_wirecutter/sound/wire_cut_long.ogg
Normal file
BIN
addons/logistics_wirecutter/sound/wire_cut_long.ogg
Normal file
Binary file not shown.
54
addons/logistics_wirecutter/stringtable.xml
Normal file
54
addons/logistics_wirecutter/stringtable.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-21 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Wirecutter">
|
||||
<Key ID="STR_ACE_CutFence">
|
||||
<English>Cut Fence</English>
|
||||
<German>Zaun schneiden</German>
|
||||
<Spanish>Cortar alambrado</Spanish>
|
||||
<Polish>Przetnij płot</Polish>
|
||||
<Czech>Přestřihnout plot</Czech>
|
||||
<French>Cisailler Clôture</French>
|
||||
<Portuguese>Cortar Cerca</Portuguese>
|
||||
<Italian>Taglia</Italian>
|
||||
<Hungarian>Drótkerítés átvágása</Hungarian>
|
||||
<Russian>Вырезать забор</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CuttingFence">
|
||||
<English>Cutting Fences / Wires ...</English>
|
||||
<German>Zaun / Draht schneiden ...</German>
|
||||
<Spanish>Cortando alambrado / cables ...</Spanish>
|
||||
<Polish>Przecinanie płotu / drutów ...</Polish>
|
||||
<Czech>Přestřihnout plot / dráty ...</Czech>
|
||||
<French>Cisaille l'obstacle ...</French>
|
||||
<Portuguese>Cortando Cerca / Arame ...</Portuguese>
|
||||
<Italian>Sto tagliando ...</Italian>
|
||||
<Hungarian>Drótok elvágása ...</Hungarian>
|
||||
<Russian>Вырезаем забор / провода ...</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CuttingFenceChat">
|
||||
<English>Cutting Fences!</English>
|
||||
<German>Schneide Zaun!</German>
|
||||
<Spanish>Cortando alambrado!</Spanish>
|
||||
<Polish>Przecinanie płotu!</Polish>
|
||||
<Czech>Stříhání plotu!</Czech>
|
||||
<French>Cisaillage!</French>
|
||||
<Portuguese>Cortando Cerca!</Portuguese>
|
||||
<Italian>La sto tagliando!</Italian>
|
||||
<Hungarian>Átvágom a drótkerítést!</Hungarian>
|
||||
<Russian>Вырезаем забор!</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_FenceCut">
|
||||
<English>Fence cut</English>
|
||||
<German>Zaun geschnitten</German>
|
||||
<Spanish>Alambrado cortado</Spanish>
|
||||
<Polish>Płot przecięty</Polish>
|
||||
<Czech>Plot přestřižen</Czech>
|
||||
<French>Clôture cisaillée</French>
|
||||
<Portuguese>Cerca cortada</Portuguese>
|
||||
<Italian>Fatto!</Italian>
|
||||
<Hungarian>Drótkerítés átvágva</Hungarian>
|
||||
<Russian>Забор вырезан</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
BIN
addons/logistics_wirecutter/ui/wirecutter_ca.paa
Normal file
BIN
addons/logistics_wirecutter/ui/wirecutter_ca.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user