-
Notifications
You must be signed in to change notification settings - Fork 42
Add Misc Items from @voiperr #8
base: master
Are you sure you want to change the base?
Conversation
I've removed items such as bandage, blood bag, defib, pain killers etc from the original PR. This is done to avoid confusion with those items because they have no functionality and sound like they could be used for medical. I would appriciate some more eyes over the entire list and spot anything that could potentially be confused for an item that has functionality within ACE or something that is already done in one of the existing modules. |
The following items could be confusing:
|
I'd just remove those that could be confusing at any time. |
Original PR acemod/ACE3#2324
fa2c9f2
to
9e5dfd1
Compare
Glowbal did you check any of the new misc objects added with 1.76? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'd like to get this merged soon. As for confusing items, I wouldn't mind if we'd suffix them all with something (maybe |
and switch over to CBA_MiscItem_ItemInfo
vehicleClass = "ACEX_Misc_Items"; | ||
}; | ||
|
||
class ACEX_Item_FMRadio_Item: ACEX_MiscItem_F { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is basically all copy-paste. How about using macros?
Maybe X-Macros.
//classname, displayname
#define ITEMS(XX) \
XX(Item_FMRadio, CSTRING(FMRadio)) \
XX(Item_ExtensionCord, CSTRING(ExtensionCord)) \
#define DEFINE_ITEM_VEHICLECLASS(classname, displayN) \
class TRIPLES(ACEX,classname,Item) : ACEX_MiscItem_F { \
scope = 2; \
scopeCurator = 2; \
displayName = displayN; \
author = ACECSTRING(common,ACETeam); \
vehicleClass = "ACE_Misc_Items"; \
class TransportItems { \
class DOUBLES(ACEX,classname) { \
name = QUOTE(DOUBLES(ACEX,classname)); \
count = 1; \
}; \
}; \
};
Can also combine that with CfgWeapons by adding model path and icon and such.
//classname, displayname, description, modelpath, picturepath, mass
#define ITEMS(XX) \
XX(Item_FMRadio, CSTRING(FMRadio), CSTRING(Prop), "a3\structures_f\Items\Electronics\FMradio_F.p3d", 20) \
XX(Item_ExtensionCord, CSTRING(ExtensionCord), CSTRING(Prop), "a3\structures_f\Items\Electronics\ExtensionCord_F.p3d", 20) \
#define DEFINE_ITEM_WEAPONCLASS(classname, displayN, description, modelpath, picturepath, itemMass) \
class TRIPLES(ACEX,classname,Item) : ACE_ItemCore { \
scope = 2; \
displayName = displayN; \
descriptionShort = description; \
author = ACECSTRING(common,ACETeam); \
model = modelpath; \
picture = picturepath; \
class ItemInfo: CBA_MiscItem_ItemInfo { \
mass = itemMass; \
}; \
};
End result would be
CfgWeapons.hpp:
#include "..."
ITEMS(DEFINE_ITEM_WEAPONCLASS)
CfgVehicles.hpp:
#include "..."
ITEMS(DEFINE_ITEM_VEHICLECLASS)
scopeCurator = 2; | ||
displayName = CSTRING(FMRadio); | ||
author = ACECSTRING(common,ACETeam); | ||
vehicleClass = "ACE_Misc_Items"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being re-set in every subclass? It's already set to this in parent.
Original PR acemod/ACE3#2324