We love config inheritance

This commit is contained in:
lambdatiger 2024-01-12 21:19:18 -06:00
parent 12c5a69d23
commit 6257dd3ee2
3 changed files with 30 additions and 20 deletions

View File

@ -2,9 +2,16 @@
#define HD_MULT 5
#define BASE_DRAG_HD (BASE_DRAG * HD_MULT)
#define ACE_FRAG_RM_EH class EventHandlers: EventHandlers {\
delete ADDON;\
class ADDON {\
init = "";\
};\
}
#define ACE_FRAG_ADD_EH class EventHandlers {\
#define ACE_FRAG_ADD_EH_BASE class EventHandlers {\
class ADDON {\
init = QUOTE(if (isServer) then {_this call FUNC(initRound);};);\
};\
}
#define ACE_FRAG_ADD_EH class EventHandlers: EventHandlers {\
class ADDON {\
init = QUOTE(if (isServer) then {_this call FUNC(initRound);};);\
};\

View File

@ -1,37 +1,37 @@
// We need this since autocannons generally inherit from BulletBase
class BulletCore;
class BulletBase: BulletCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class GrenadeCore;
class GrenadeBase: GrenadeCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class LaserBombCore;
class ammo_Bomb_LaserGuidedBase: LaserBombCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class MissileCore;
class MissileBase: MissileCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class RocketCore;
class RocketBase: RocketCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
GVAR(skip) = 1;
};
class ArtilleryRocketCore: RocketCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class ShellCore;
class ShellBase: ShellCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class ShotDeployCore;
@ -41,30 +41,30 @@ class ShotDeployBase: ShotDeployCore {
class ShotgunCore;
class ShotgunBase: ShotgunCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class SubmunitionCore;
class SubmunitionBase: SubmunitionCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class BoundingMineCore;
class BoundingMineBase: BoundingMineCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class PipeBombCore;
class PipeBombBase: PipeBombCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class DirectionalBombCore;
class DirectionalBombBase: DirectionalBombCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};
class MineCore;
class MineBase: MineCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
};

View File

@ -112,8 +112,7 @@ class ammo_Bomb_SDB: ammo_Bomb_SmallDiameterBase {
class BombCore;
class Bo_Mk82: BombCore {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
GVAR(classes)[] = {QGVAR(large), QGVAR(large), QGVAR(large_HD), QGVAR(large), QGVAR(huge), QGVAR(huge_HD), QGVAR(huge)};
GVAR(fragCount) = 17500;
GVAR(metal) = 140000;
@ -153,11 +152,10 @@ class Mo_cluster_Bomb_03_F: Mo_cluster_Bomb_01_F { // idk, @lambda.tiger on the
// ~~~~ Grenades:
class Grenade;
class ACE_FlashlightProxy_White: Grenade {
ACE_FRAG_RM_EH;
GVAR(skip) = 1;
};
class GrenadeHand: Grenade {
ACE_FRAG_ADD_EH;
ACE_FRAG_ADD_EH_BASE;
GVAR(skip) = 0;
GVAR(force) = 1;
/*
@ -201,7 +199,9 @@ class G_40mm_HEDP: G_40mm_HE {
};
class ACE_G_40mm_HEDP: G_40mm_HEDP {};
class ACE_G_40mm_HE: G_40mm_HE {};
class ACE_G_40mm_HE: G_40mm_HE {
class EventHandlers;
};
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
ACE_FRAG_RM_EH;
GVAR(skip) = 1;
@ -216,6 +216,7 @@ class ATMine_Range_Ammo: MineBase {
};
class APERSMine_Range_Ammo: MineBase { // VS-50
class EventHandlers: EventHandlers;
GVAR(skip) = 0;
GVAR(force) = 0;
GVAR(classes)[] = {QGVAR(tiny), QGVAR(tiny), QGVAR(small)};
@ -495,9 +496,11 @@ class ACE_Hellfire_AGM114K: M_Scalpel_AT {
};
class ammo_Missile_CruiseBase: MissileBase {
class EventHandlers: EventHandlers;
GVAR(skip) = 1;
};
class ammo_missile_cruise_01: ammo_Missile_CruiseBase {
class EventHandlers: EventHandlers;
GVAR(skip) = 0;
GVAR(classes)[] = {QGVAR(small), QGVAR(medium), QGVAR(large)};
GVAR(fragCount) = 20000;