Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlock malaria-infected civs #1344

Merged
merged 14 commits into from
Jan 20, 2021
1 change: 1 addition & 0 deletions addons/characters/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\cba\addons\characters
5 changes: 5 additions & 0 deletions addons/characters/CfgEditorSubcategories.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class CfgEditorSubcategories {
class GVARMAIN(EdSubcat_Personnel_MalariaInfected) {
displayName = CSTRING(MenMalariaInfected);
};
};
5 changes: 5 additions & 0 deletions addons/characters/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
164 changes: 164 additions & 0 deletions addons/characters/CfgFaces.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
class CfgFaces {
class Default;
class Man_A3: Default {
class AfricanHead_01;
class AfricanHead_01_sick: AfricanHead_01 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_African_sick)};
};

class AfricanHead_02;
class AfricanHead_02_sick: AfricanHead_02 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_African_sick)};
};

class AfricanHead_03;
class AfricanHead_03_sick: AfricanHead_03 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_African_sick)};
};

class AsianHead_A3_01;
class AsianHead_A3_01_sick: AsianHead_A3_01 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_02;
class AsianHead_A3_02_sick: AsianHead_A3_02 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_03;
class AsianHead_A3_03_sick: AsianHead_A3_03 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_04;
class AsianHead_A3_04_sick: AsianHead_A3_04 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_05;
class AsianHead_A3_05_sick: AsianHead_A3_05 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_06;
class AsianHead_A3_06_sick: AsianHead_A3_06 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class AsianHead_A3_07;
class AsianHead_A3_07_sick: AsianHead_A3_07 {
identityTypes[] = {QGVAR(Head_Asian_sick)};
};

class GreekHead_A3_01;
class GreekHead_A3_01_sick: GreekHead_A3_01 {
identityTypes[] = {QGVAR(Head_Greek_sick)};
};

class GreekHead_A3_02;
class GreekHead_A3_02_sick: GreekHead_A3_02 {
identityTypes[] = {QGVAR(Head_Greek_sick)};
};

class GreekHead_A3_03;
class GreekHead_A3_03_sick: GreekHead_A3_03 {
identityTypes[] = {QGVAR(Head_Greek_sick)};
};

class GreekHead_A3_04;
class GreekHead_A3_04_sick: GreekHead_A3_04 {
identityTypes[] = {QGVAR(Head_Greek_sick)};
};

class PersianHead_A3_01;
class PersianHead_A3_01_sick: PersianHead_A3_01 {
identityTypes[] = {QGVAR(Head_TK_sick)};
};

class PersianHead_A3_02;
class PersianHead_A3_02_sick: PersianHead_A3_02 {
identityTypes[] = {QGVAR(Head_TK_sick)};
};

class PersianHead_A3_03;
class PersianHead_A3_03_sick: PersianHead_A3_03 {
identityTypes[] = {QGVAR(Head_TK_sick)};
};

class TanoanHead_A3_01;
class TanoanHead_A3_01_sick: TanoanHead_A3_01 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_02;
class TanoanHead_A3_02_sick: TanoanHead_A3_02 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_03;
class TanoanHead_A3_03_sick: TanoanHead_A3_03 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_04;
class TanoanHead_A3_04_sick: TanoanHead_A3_04 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_05;
class TanoanHead_A3_05_sick: TanoanHead_A3_05 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_06;
class TanoanHead_A3_06_sick: TanoanHead_A3_06 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_07;
class TanoanHead_A3_07_sick: TanoanHead_A3_07 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanHead_A3_08;
class TanoanHead_A3_08_sick: TanoanHead_A3_08 {
identityTypes[] = {QGVAR(Head_Tanoan_sick)};
};

class TanoanBossHead;
class TanoanBossHead_sick: TanoanBossHead {
identityTypes[] = {QGVAR(Head_Tanoan_sick)}; //Syndikat_Boss_F
};

class WhiteHead_16; //Kelly
class WhiteHead_16_sick: WhiteHead_16 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};

class WhiteHead_17; //O'Connor
class WhiteHead_17_sick: WhiteHead_17 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};

class WhiteHead_18; //Byrne
class WhiteHead_18_sick: WhiteHead_18 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};

class WhiteHead_19; //O'Brien
class WhiteHead_19_sick: WhiteHead_19 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};

class WhiteHead_20; //Walsh
class WhiteHead_20_sick: WhiteHead_20 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};

class WhiteHead_21; //O'Sullivan
class WhiteHead_21_sick: WhiteHead_21 {
identityTypes[] = {QGVAR(Head_NATO_sick), QGVAR(Head_Euro_sick)};
};
};
};
71 changes: 71 additions & 0 deletions addons/characters/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* identityTypes
QGVAR(Head_NATO_sick)
QGVAR(Head_African_sick)
QGVAR(Head_Asian_sick)
QGVAR(Head_Greek_sick)
QGVAR(Head_TK_sick)
QGVAR(Head_Tanoan_sick)
QGVAR(Head_Euro_sick)
*/

class CfgVehicles {
class C_Man_casual_1_F_afro;
class C_Man_casual_1_F_afro_sick: C_Man_casual_1_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_Man_casual_3_F_afro;
class C_Man_casual_3_F_afro_sick: C_Man_casual_3_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_Man_casual_4_F_afro;
class C_Man_casual_4_F_afro_sick: C_Man_casual_4_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_Man_casual_5_F_afro;
class C_Man_casual_5_F_afro_sick: C_Man_casual_5_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_Man_casual_6_F_afro;
class C_Man_casual_6_F_afro_sick: C_Man_casual_6_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_man_polo_1_F_afro;
class C_man_polo_1_F_afro_sick: C_man_polo_1_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_man_polo_2_F_afro;
class C_man_polo_2_F_afro_sick: C_man_polo_2_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_man_polo_3_F_afro;
class C_man_polo_3_F_afro_sick: C_man_polo_3_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_man_polo_6_F_afro;
class C_man_polo_6_F_afro_sick: C_man_polo_6_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};

class C_man_sport_2_F_afro;
class C_man_sport_2_F_afro_sick: C_man_sport_2_F_afro {
UNLOCK_MALARIA_INFECTED_CIVILIAN;
identityTypes[] = {QGVAR(Head_African_sick)};
};
};
26 changes: 26 additions & 0 deletions addons/characters/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "script_component.hpp"

ADDON = false;

{
[_x, "InitPost", {
params ["_unit"];

if (isServer) then {
_unit setDamage 0.46;
};
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
} forEach [
"C_Man_casual_1_F_afro_sick",
"C_Man_casual_3_F_afro_sick",
"C_Man_casual_4_F_afro_sick",
"C_Man_casual_5_F_afro_sick",
"C_Man_casual_6_F_afro_sick",
"C_man_polo_1_F_afro_sick",
"C_man_polo_2_F_afro_sick",
"C_man_polo_3_F_afro_sick",
"C_man_polo_6_F_afro_sick",
"C_man_sport_2_F_afro_sick"
];

ADDON = true;
20 changes: 20 additions & 0 deletions addons/characters/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = CSTRING(component);
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"cba_common"};
author = "$STR_CBA_Author";
authors[] = {"Kex"};
url = "$STR_CBA_URL";
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
#include "CfgEditorSubcategories.hpp"
#include "CfgFaces.hpp"
#include "CfgVehicles.hpp"
18 changes: 18 additions & 0 deletions addons/characters/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#define COMPONENT characters
#include "\x\cba\addons\main\script_mod.hpp"

#ifdef DEBUG_ENABLED_CHARACTERS
#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_CHARACTERS
#define DEBUG_SETTINGS DEBUG_SETTINGS_CHARACTERS
#endif

#include "\x\cba\addons\main\script_macros.hpp"

#define UNLOCK_MALARIA_INFECTED_CIVILIAN\
author = "$STR_A3_Bohemia_Interactive";\
scope = 2;\
scopeCurator = 2;\
editorSubcategory = QGVARMAIN(EdSubcat_Personnel_MalariaInfected)
15 changes: 15 additions & 0 deletions addons/characters/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="CBA_A3">
<Package name="Characters">
<Key ID="STR_CBA_Characters_Component">
<English>Community Base Addons - Characters</English>
<German>Community Base Addons - Charaktere</German>
<French>Community Base Addons - Caractères</French>
</Key>
<Key ID="STR_CBA_Characters_MenMalariaInfected">
<English>Men (Malaria-Infected)</English>
<German>Männer (Malaria infiziert)</German>
<French>Hommes (Infectés par la malaria)</French>
</Key>
</Package>
</Project>