config.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //Get this addons macro
  2. //get the macro for the air macro_patch_name(vehicles)
  3. //get generlized macros
  4. #include "../../../RD501_main/config_macros.hpp"
  5. //General name of the vehicle
  6. #define vehicle_addon field_gun
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define macro_new_field_gun_class(name) vehicle_classname##_##name
  10. class CfgPatches
  11. {
  12. class macro_patch_name(field_gun)
  13. {
  14. addonRootClass=macro_patch_name(vehicles)
  15. requiredAddons[]=
  16. {
  17. macro_patch_name(vehicles)
  18. };
  19. requiredVersion=0.1;
  20. units[]=
  21. {
  22. macro_new_vehicle(field_gun,republic),
  23. macro_new_vehicle(field_gun,cis)
  24. };
  25. weapons[]=
  26. {
  27. };
  28. };
  29. };
  30. #include "../../common/sensor_templates.hpp"
  31. class DefaultEventhandlers;
  32. class CfgVehicles
  33. {
  34. class StaticWeapon;
  35. class StaticMGWeapon: StaticWeapon
  36. {
  37. class turrets;
  38. };
  39. class OPTRE_Static_FG75: StaticMGWeapon
  40. {
  41. class turrets: turrets
  42. {
  43. class mainturret;
  44. };
  45. };
  46. class macro_new_vehicle(field_gun,republic): OPTRE_Static_FG75
  47. {
  48. author = "RD501";
  49. scope = 2;
  50. side = 1;
  51. displayname = "Portable Republic Field Gun";
  52. scopeCurator = 2;
  53. crew = "SWOP_L501P1_Fives";
  54. class EventHandlers :DefaultEventhandlers
  55. {
  56. init = "[_this select 0] execVM 'RD501_Vehicles\land\E_Web\setmass.sqf'";
  57. };
  58. class turrets: turrets
  59. {
  60. class mainturret: mainturret
  61. {
  62. weapons[] =
  63. {
  64. macro_new_weapon(mynock_cannon,mbt)
  65. };
  66. magazines[] =
  67. {
  68. macro_new_mag(mynock_mbt_ap,12),
  69. macro_new_mag(mynock_mbt_he,12),
  70. macro_new_mag(mynock_mbt_ap,12),
  71. macro_new_mag(mynock_mbt_he,12)
  72. };
  73. };
  74. };
  75. faction = macro_republic_faction
  76. editorSubcategory = macro_editor_cat(turrets)
  77. vehicleClass = macro_editor_vehicle_type(turrets)
  78. };
  79. class macro_new_vehicle(field_gun,cis): macro_new_vehicle(field_gun,republic)
  80. {
  81. side = 0;
  82. displayname = "Portable CIS Field Gun";
  83. crew=macro_new_unit_class(opfor,B1_crew)
  84. faction = macro_cis_faction
  85. };
  86. };