Skip to content

Commit

Permalink
Stretcher - Rework helistretcher to use ace interaction menu (#571)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Rework helistretcher to use ace interaction menu

TODO: 
[x] test in MP
[x] move out stretcher related stuff (including this) into separate
addon
[x] possibly improve conditions for actions so you cant adjust ropes
during function call

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
MiszczuZPolski authored Aug 29, 2024
1 parent df80908 commit 02acfea
Show file tree
Hide file tree
Showing 57 changed files with 1,106 additions and 694 deletions.
128 changes: 1 addition & 127 deletions addons/misc/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class CBA_Extended_EventHandlers_base;
class CfgVehicles {
#include "vehicle_stretcher.hpp"
class Land_IntravenStand_01_base_F;

class Land_IntravenStand_01_empty_F: Land_IntravenStand_01_base_F {
Expand Down Expand Up @@ -46,128 +44,6 @@ class CfgVehicles {
ace_dragging_carryDirection = 0;
};

class weapon_bag_base;
class kat_stretcherBag: weapon_bag_base {
class assembleInfo {
displayName = CSTRING(Stretcher_Display);
assembleTo = "kat_stretcher";
base = "";
primary = 1;
dissasembleTo[] = {};
};
author = "Katalam";
scope = 2;
editorCategory = "EdCat_Equipment";
editorSubcategory = "EdSubcat_DismantledWeapons";
displayName = CSTRING(StretcherPacked_Display);
mass = 60;
};

class Tank_F;
class kat_stretcher: Tank_F {
explosionEffect = "";
fuelExplosionPower = 0;
editorForceEmpty = 1;
editorSubcategory = "edSubcat_Storage";
crew = "C_man_1";
icon = "iconObject_1x1";
hasDriver = 0;
scope = 2;
side = 3;
faction = "CIV_F";
accuracy = 0.001;
camouflage = 10;
armor = 20;
displayName = CSTRING(Stretcher_Display);
model = QPATHTOF(models\stretcher\vurtual_stretcher.p3d);
simulation = "tankX";
crewVulnerable = 1;
explosionShielding = 0;
irTarget = 0;
allowTabLock = 0;
memoryPointsGetInCargo = "pos cargo";
memoryPointsGetInCargoDir = "pos cargo dir";
cargoAction[] = {"kat_stretcher"};
tf_isolatedAmount = 0;
numberPhysicalWheels = 0;
hideProxyInCombat = 0;
hideWeaponsCargo = "true";
ejectDeadCargo = 0;
class Damage {
tex[] = {};
mat[] = {
QPATHTOF(models\stretcher\seat.rvmat),
QPATHTOF(models\stretcher\seat_destruct.rvmat)
};
};
class animationSources {
class seat_hide {
source = "user";
initPhase = 0;
animPeriod = 0.1;
displayName = "Hide Stretcher";
forceAnimatePhase = 1;
forceAnimate[] = {"legs_hide", 1};
};
};
maximumLoad = 0;
transportMaxBackpacks = 0;
transportMaxMagazines = 64;
class TransportItems;
class Turrets {};
transportSoldier = 1;
ace_cargo_canLoad = 0;
ace_Cargo_hasCargo = 0;
ace_dragging_canDrag = 1;
ace_dragging_canCarry = 1;
ace_dragging_dragPosition[] = {0,1.7,0};
ace_dragging_carryPosition[] = {0, 1.7, 0};
ace_dragging_dragDirection = 0;
ace_Carry_carryDirection = 0;
ace_cookoff_probability = 0;
slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1", "SlingLoadCargo2", "SlingLoadCargo3", "SlingLoadCargo4"};
destrType = "destructDefault";
fuelCapacity = 0;

//pretend static weapon since some mods don't like unconscious people in static weapons
nameSound = "veh_static_s";
vehicleClass = "static";
unitInfoType = "RscUnitInfoStatic";
crewExplosionProtection = 0;
class DestructionEffects {};
class VehicleTransport {
class Cargo {
parachuteClass = "B_Parachute_02_F";
parachuteHeightLimit = 5;
canBeTransported = 1;
dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"};
};
};
class EventHandlers {
init = QUOTE(_this call FUNC(stretcher));
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
};
};
class Land_Stretcher_01_base_F;
class Land_Stretcher_01_olive_F: Land_Stretcher_01_base_F {
ace_cargo_canLoad = 1;
ace_Cargo_hasCargo = 0;
ace_dragging_canDrag = 1;
ace_dragging_canCarry = 1;
ace_dragging_dragPosition[] = {0,1.7,0};
ace_dragging_carryPosition[] = {0, 1.7, 0};
ace_dragging_dragDirection = 0;
ace_Carry_carryDirection = 0;
ace_cookoff_probability = 0;
class VehicleTransport {
class Cargo {
parachuteClass = "B_Parachute_02_F";
parachuteHeightLimit = 5;
canBeTransported = 1;
dimensions[] = {"VTV_Cargo_Base", "VTV_Cargo_Corner"};
};
};
};
class Items_base_F;
class kat_Armband_Red_Cross_Object: Items_base_F {
scope = 2;
Expand Down Expand Up @@ -1383,8 +1259,6 @@ class CfgVehicles {

class Car_F: Car {};
class Quadbike_01_base_F: Car_F {
stretcherPos[] = {0,0.8,-0.56};
stretcherVector[] = {{1, 0, 0}, {0, 0, 1}};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
class KAT_UnloadAndCarryPatient {
Expand Down Expand Up @@ -1483,4 +1357,4 @@ class CfgVehicles {
};
};
};
};
};
14 changes: 0 additions & 14 deletions addons/misc/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
class CfgWeapons
{
class ToolKit;
class ACE_ItemCore;
class ACE_NVGoggles_WP;
class CBA_MiscItem_ItemInfo;
class Attachable_Helistretcher: ToolKit {
author = "Battlekeeper";
picture = QPATHTOF(ui\stretcher.paa);
displayName = CSTRING(Helistretcher_Display);
descriptionShort = CSTRING(Helistretcher_Desc);
class ItemInfo {
mass = 20;
uniformModel = "\A3\Weapons_F\Items\Toolkit";
type = 620;
allowedSlots[] = {801,701,901};
scope = 0;
};
};

class kat_Armband_Red_Cross_Item: ACE_ItemCore {
author = "Miss Heda, vccv9040 (Swedish Forces Pack)";
Expand Down
6 changes: 0 additions & 6 deletions addons/misc/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
PREP(actionLowerBy10);
PREP(addActionRaise);
PREP(addIVbag);
PREP(addVehicleCarryLoadActions);
PREP(addVehicleUnloadCarryPatientActions);
PREP(attachStretcher);
PREP(BubbleWrap);
PREP(canCheckDogtag);
PREP(canStitchFullBody);
Expand All @@ -29,8 +26,6 @@ PREP(groupID);
PREP(handleRespawn);
PREP(handleTourniquetEffects);
PREP(handleUnconscious);
PREP(heliAddActionDeploy);
PREP(heliStretcherAttach);
PREP(incompatibilityWarning);
PREP(init);
PREP(removeIVbag);
Expand All @@ -39,7 +34,6 @@ PREP(setTourniquetTime);
PREP(removeTourniquetTime);
PREP(slingArmband);
PREP(stopCarryingPrompt);
PREP(stretcher);
PREP(stringToArray);
PREP(surgicalKitProgressFullBody);
PREP(switchMagItems);
Expand Down
5 changes: 0 additions & 5 deletions addons/misc/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
[QGVAR(addIV_2), LLSTRING(Action_add_IV_Display_250), "", {[_target, _player, 250] call FUNC(addIVbag)}, {[_player, "ACE_salineIV_250"] call FUNC(conditionIVstand)}] call ACEFUNC(interact_menu,createAction)
] call ACEFUNC(interact_menu,addActionToClass);

["Attachable_Helistretcher", ["CONTAINER","CLOTHES"], [LLSTRING(helistretcher_attach)], [], "", [{true},{params ["_unit", "_container", "_item", "_slot", "_params"];_unit == vehicle _unit}], {
params ["_unit", "_container", "_item", "_slot", "_params"];
[_unit,_item] call kat_misc_fnc_heliStretcherAttach;
},true] call CBA_fnc_addItemContextMenuOption;

if (GVAR(incompatibilityWarning)) then {
call FUNC(incompatibilityWarning);
};
Expand Down
8 changes: 2 additions & 6 deletions addons/misc/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
requiredVersion = REQUIRED_VERSION;
units[] = {
"kat_stretcher",
"kat_stretcherBag"
};
weapons[] = { "Attachable_Helistretcher" };
units[] = {};
weapons[] = {};
magazines[] = { };
requiredAddons[] = {
"kat_main",
Expand All @@ -34,7 +31,6 @@ class CfgPatches {
};
};

#include "CfgMoves.hpp"
#include "CfgFunctions.hpp"
#include "CfgGlasses.hpp"
#include "CfgEventHandlers.hpp"
Expand Down
74 changes: 0 additions & 74 deletions addons/misc/functions/fnc_actionLowerBy10.sqf

This file was deleted.

77 changes: 0 additions & 77 deletions addons/misc/functions/fnc_addActionRaise.sqf

This file was deleted.

Loading

0 comments on commit 02acfea

Please sign in to comment.