mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
General - Add replacement items for editor inventory management (#10216)
Add replacement items for editor inventory management
This commit is contained in:
parent
6304a9e5f3
commit
1dae884fff
17
addons/intelitems/CfgWeapons.hpp
Normal file
17
addons/intelitems/CfgWeapons.hpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
class CfgWeapons {
|
||||||
|
class ACE_ItemCore;
|
||||||
|
class CBA_MiscItem_ItemInfo;
|
||||||
|
|
||||||
|
// Since base game doesn't support misc. items, this is needed to filling inventories in the editor
|
||||||
|
class GVAR(notepad_Item): ACE_ItemCore {
|
||||||
|
displayName = CSTRING(Notepad_DisplayName);
|
||||||
|
author = ECSTRING(common,ACETeam);
|
||||||
|
scope = 2;
|
||||||
|
scopeArsenal = 0;
|
||||||
|
descriptionShort = CSTRING(Notepad_Description);
|
||||||
|
picture = QPATHTOF(ui\notepad_ca.paa);
|
||||||
|
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||||
|
mass = 0.1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -1,5 +1,8 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
// Notepad item to magazine
|
||||||
|
[QGVAR(notepad_Item), QXGVAR(notepad)] call EFUNC(common,registerItemReplacement);
|
||||||
|
|
||||||
// Only handle loadout change when on map or have open controls
|
// Only handle loadout change when on map or have open controls
|
||||||
["loadout", {
|
["loadout", {
|
||||||
if (!visibleMap && {GVAR(controlsGroups) isEqualTo []}) exitWith {};
|
if (!visibleMap && {GVAR(controlsGroups) isEqualTo []}) exitWith {};
|
||||||
|
@ -8,7 +8,7 @@ class CfgPatches {
|
|||||||
QXGVAR(document),
|
QXGVAR(document),
|
||||||
QXGVAR(photo)
|
QXGVAR(photo)
|
||||||
};
|
};
|
||||||
weapons[] = {};
|
weapons[] = {QGVAR(notepad_Item)};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_interact_menu", "ace_zeus"};
|
requiredAddons[] = {"ace_interact_menu", "ace_zeus"};
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
@ -23,5 +23,6 @@ class CfgPatches {
|
|||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgEditorSubcategories.hpp"
|
#include "CfgEditorSubcategories.hpp"
|
||||||
#include "CfgMagazines.hpp"
|
#include "CfgMagazines.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "gui.hpp"
|
#include "gui.hpp"
|
||||||
|
@ -310,4 +310,17 @@ class CfgWeapons {
|
|||||||
hiddenSelectionsTextures[] = {QPATHTOF(data\bodybagItem_white_co.paa)};
|
hiddenSelectionsTextures[] = {QPATHTOF(data\bodybagItem_white_co.paa)};
|
||||||
GVAR(bodyBagObject) = "ACE_bodyBagObject_white";
|
GVAR(bodyBagObject) = "ACE_bodyBagObject_white";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Since base game doesn't support misc. items, this is needed to filling inventories in the editor
|
||||||
|
class ACE_painkillers_Item: ACE_ItemCore {
|
||||||
|
displayName = CSTRING(painkillers_Display);
|
||||||
|
author = ECSTRING(common,ACETeam);
|
||||||
|
scope = 2;
|
||||||
|
scopeArsenal = 0;
|
||||||
|
descriptionShort = CSTRING(painkillers_Desc_Short);
|
||||||
|
picture = QPATHTOF(ui\painkillers_ca.paa);
|
||||||
|
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||||
|
mass = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
// Pain killers item to magazine
|
||||||
|
["ACE_painkillers_Item", "ACE_painkillers"] call EFUNC(common,registerItemReplacement);
|
||||||
|
|
||||||
[QEGVAR(medical_status,initialized), {
|
[QEGVAR(medical_status,initialized), {
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class CfgPatches {
|
|||||||
class ADDON {
|
class ADDON {
|
||||||
name = COMPONENT_NAME;
|
name = COMPONENT_NAME;
|
||||||
units[] = {"ACE_fieldDressingItem","ACE_packingBandageItem","ACE_elasticBandageItem","ACE_tourniquetItem","ACE_splintItem","ACE_painkillersItem","ACE_morphineItem","ACE_adenosineItem","ACE_epinephrineItem","ACE_plasmaIVItem","ACE_bloodIVItem","ACE_salineIVItem","ACE_quikClotItem","ACE_personalAidKitItem","ACE_surgicalKitItem","ACE_sutureItem","ACE_bodyBagItem","ACE_medicalSupplyCrate","ACE_medicalSupplyCrate_advanced"};
|
units[] = {"ACE_fieldDressingItem","ACE_packingBandageItem","ACE_elasticBandageItem","ACE_tourniquetItem","ACE_splintItem","ACE_painkillersItem","ACE_morphineItem","ACE_adenosineItem","ACE_epinephrineItem","ACE_plasmaIVItem","ACE_bloodIVItem","ACE_salineIVItem","ACE_quikClotItem","ACE_personalAidKitItem","ACE_surgicalKitItem","ACE_sutureItem","ACE_bodyBagItem","ACE_medicalSupplyCrate","ACE_medicalSupplyCrate_advanced"};
|
||||||
weapons[] = {"ACE_fieldDressing","ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_painkillers","ACE_morphine","ACE_adenosine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_bloodIV","ACE_bloodIV_500","ACE_bloodIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_suture","ACE_bodyBag","ACE_bodyBag_blue","ACE_bodyBag_white"};
|
weapons[] = {"ACE_fieldDressing","ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_painkillers","ACE_morphine","ACE_adenosine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_bloodIV","ACE_bloodIV_500","ACE_bloodIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_suture","ACE_bodyBag","ACE_bodyBag_blue","ACE_bodyBag_white","ACE_painkillers_Item"};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_medical_status", "ace_medical_damage", "ace_apl"};
|
requiredAddons[] = {"ace_medical_status", "ace_medical_damage", "ace_apl"};
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
@ -97,17 +97,19 @@ class CfgWeapons {
|
|||||||
GVAR(closedBolt) = 1;
|
GVAR(closedBolt) = 1;
|
||||||
GVAR(jamTypesAllowed)[] = {"Fire", "Dud"};
|
GVAR(jamTypesAllowed)[] = {"Fire", "Dud"};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_ItemCore;
|
class ACE_ItemCore;
|
||||||
class CBA_MiscItem_ItemInfo;
|
class CBA_MiscItem_ItemInfo;
|
||||||
|
|
||||||
// Deprecated, 3.16.0 Arsenal supports showing magazines as misc items
|
// Deprecated, 3.16.0 Arsenal supports showing magazines as misc. items
|
||||||
|
// However, since base game doesn't support misc. items, it's still needed to filling inventories in the editor
|
||||||
class ACE_SpareBarrel_Item: ACE_ItemCore {
|
class ACE_SpareBarrel_Item: ACE_ItemCore {
|
||||||
displayName = CSTRING(SpareBarrelName);
|
displayName = CSTRING(SpareBarrelName);
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
scope = 1;
|
scope = 2;
|
||||||
scopeArsenal = 0;
|
scopeArsenal = 0;
|
||||||
descriptionshort = CSTRING(SpareBarrelDescription);
|
descriptionShort = CSTRING(SpareBarrelDescription);
|
||||||
picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
|
picture = QPATHTOF(UI\spare_barrel_ca.paa);
|
||||||
class ItemInfo: CBA_MiscItem_ItemInfo {
|
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||||
mass = 25;
|
mass = 25;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user