diff --git a/addons/flashlights/$PBOPREFIX$ b/addons/flashlights/$PBOPREFIX$ new file mode 100644 index 0000000000..674d0d255c --- /dev/null +++ b/addons/flashlights/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\flashlights \ No newline at end of file diff --git a/addons/flashlights/CfgEventHandlers.hpp b/addons/flashlights/CfgEventHandlers.hpp new file mode 100644 index 0000000000..d5f49bd5c3 --- /dev/null +++ b/addons/flashlights/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) ); + }; +}; diff --git a/addons/flashlights/CfgSounds.hpp b/addons/flashlights/CfgSounds.hpp new file mode 100644 index 0000000000..f0fabe3a39 --- /dev/null +++ b/addons/flashlights/CfgSounds.hpp @@ -0,0 +1,7 @@ +class CfgSounds { + class ACE_flashlights_flashlightClick { + name = "ACE_flashlights_flashlightClick"; + sound[] = {"\a3\sounds_f\weapons\Other\dry4.wss", 0.2, 2}; + titles[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/CfgVehicles.hpp b/addons/flashlights/CfgVehicles.hpp new file mode 100644 index 0000000000..fa766ad87b --- /dev/null +++ b/addons/flashlights/CfgVehicles.hpp @@ -0,0 +1,89 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + //todo: add flashlight attach actions + }; + }; + + class Item_Base_F; + + class ACE_Flashlight_MX991Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MX991_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_MX991 { + name = "ACE_Flashlight_MX991"; + count = 1; + }; + }; + }; + + class ACE_Flashlight_KSF1Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(KSF1_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_KSF1 { + name = "ACE_Flashlight_KSF1"; + count = 1; + }; + }; + }; + + class ACE_Flashlight_XL50Item: Item_Base_F { + scope = 2; + scopeCurator = 2; + displayName = CSTRING(XL50_DisplayName); + author = ECSTRING(common,ACETeam); + vehicleClass = "WeaponAccessories"; + class TransportItems { + class ACE_Flashlight_XL50 { + name = "ACE_Flashlight_XL50"; + count = 1; + }; + }; + }; + + class NATO_Box_Base; + class EAST_Box_Base; + class IND_Box_Base; + class FIA_Box_Base_F; + + class Box_NATO_Support_F: NATO_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + }; + }; + + class Box_East_Support_F: EAST_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_KSF1,12); + }; + }; + + class Box_IND_Support_F: IND_Box_Base { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_XL50,12); + }; + }; + + class Box_FIA_Support_F: FIA_Box_Base_F { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + }; + }; + + class ACE_Box_Misc: Box_NATO_Support_F { + class TransportItems { + MACRO_ADDITEM(ACE_Flashlight_MX991,12); + MACRO_ADDITEM(ACE_Flashlight_KSF1,12); + MACRO_ADDITEM(ACE_Flashlight_XL50,12); + }; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp new file mode 100644 index 0000000000..09fe70d764 --- /dev/null +++ b/addons/flashlights/CfgWeapons.hpp @@ -0,0 +1,61 @@ +class CfgWeapons { + + class ItemCore; + class ACE_ItemCore; + class InventoryItem_Base_F; + class InventoryFlashlightItem_Base_F; + + class acc_flashlight: ItemCore { + class ItemInfo: InventoryFlashlightItem_Base_F { + class Flashlight { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Size = 2.75; + }; + }; + }; + + class ACE_Flashlight_MX991: ACE_ItemCore { + displayName = CSTRING(MX991_DisplayName); + descriptionShort = CSTRING(MX991_Description); + model = QUOTE(PATHTOF(data\MX_991.p3d)); + picture = PATHTOF(UI\mx991_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Size = 1.75; + }; + }; + }; + + class ACE_Flashlight_KSF1: ACE_ItemCore { + displayName = CSTRING(KSF1_DisplayName); + descriptionShort = CSTRING(KSF1_Description); + model = QUOTE(PATHTOF(data\KSF_1.p3d)); + picture = PATHTOF(UI\ksf1_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Size = 1.5; + }; + }; + }; + + class ACE_Flashlight_XL50: ACE_ItemCore { + displayName = CSTRING(XL50_DisplayName); + descriptionShort = CSTRING(XL50_Description); + model = QUOTE(PATHTOF(data\Maglight.p3d)); + picture = PATHTOF(UI\xl50_ca.paa); + scope = 2; + class ItemInfo: InventoryItem_Base_F { + mass = 1; + class FlashLight { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Size = 2.15; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/flashlights/README.md b/addons/flashlights/README.md new file mode 100644 index 0000000000..6a04b78091 --- /dev/null +++ b/addons/flashlights/README.md @@ -0,0 +1,11 @@ +ace_flashlights +======= + +Flashlights for use on map and to attach to player. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [voiper](https://github.com/voiperr) diff --git a/addons/flashlights/UI/Flashlight_Beam_blue_ca.paa b/addons/flashlights/UI/Flashlight_Beam_blue_ca.paa new file mode 100644 index 0000000000..737780d1c8 Binary files /dev/null and b/addons/flashlights/UI/Flashlight_Beam_blue_ca.paa differ diff --git a/addons/flashlights/UI/Flashlight_Beam_green_ca.paa b/addons/flashlights/UI/Flashlight_Beam_green_ca.paa new file mode 100644 index 0000000000..b075990ba6 Binary files /dev/null and b/addons/flashlights/UI/Flashlight_Beam_green_ca.paa differ diff --git a/addons/flashlights/UI/Flashlight_Beam_red_ca.paa b/addons/flashlights/UI/Flashlight_Beam_red_ca.paa new file mode 100644 index 0000000000..5afd4e66d5 Binary files /dev/null and b/addons/flashlights/UI/Flashlight_Beam_red_ca.paa differ diff --git a/addons/flashlights/UI/Flashlight_Beam_white_ca.paa b/addons/flashlights/UI/Flashlight_Beam_white_ca.paa new file mode 100644 index 0000000000..08460e9a9c Binary files /dev/null and b/addons/flashlights/UI/Flashlight_Beam_white_ca.paa differ diff --git a/addons/flashlights/UI/Flashlight_Beam_yellow_ca.paa b/addons/flashlights/UI/Flashlight_Beam_yellow_ca.paa new file mode 100644 index 0000000000..8593ac8706 Binary files /dev/null and b/addons/flashlights/UI/Flashlight_Beam_yellow_ca.paa differ diff --git a/addons/flashlights/UI/KSF1_ca.paa b/addons/flashlights/UI/KSF1_ca.paa new file mode 100644 index 0000000000..5a89051c05 Binary files /dev/null and b/addons/flashlights/UI/KSF1_ca.paa differ diff --git a/addons/flashlights/UI/mx991_ca.paa b/addons/flashlights/UI/mx991_ca.paa new file mode 100644 index 0000000000..9385ec675a Binary files /dev/null and b/addons/flashlights/UI/mx991_ca.paa differ diff --git a/addons/flashlights/UI/xl50_ca.paa b/addons/flashlights/UI/xl50_ca.paa new file mode 100644 index 0000000000..55aaa0cbcd Binary files /dev/null and b/addons/flashlights/UI/xl50_ca.paa differ diff --git a/addons/flashlights/XEH_postInitClient.sqf b/addons/flashlights/XEH_postInitClient.sqf new file mode 100644 index 0000000000..09cdcdd1f2 --- /dev/null +++ b/addons/flashlights/XEH_postInitClient.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" + +// Exit on Headless as well +if !(hasInterface) exitWith {}; + +LOG(MSG_INIT); + +//todo: make flashlights attachable to players \ No newline at end of file diff --git a/addons/flashlights/config.cpp b/addons/flashlights/config.cpp new file mode 100644 index 0000000000..b34c4b8000 --- /dev/null +++ b/addons/flashlights/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {"ACE_Flashlight_MX991", "ACE_Flashlight_KSF1", "ACE_Flashlight_XL50"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author[] = {"voiper"}; + authorUrl = "https://github.com/voiperr/"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "CfgSounds.hpp" diff --git a/addons/flashlights/data/KSF_1.p3d b/addons/flashlights/data/KSF_1.p3d new file mode 100644 index 0000000000..0ec2fd23c6 Binary files /dev/null and b/addons/flashlights/data/KSF_1.p3d differ diff --git a/addons/flashlights/data/KSF_1.rvmat b/addons/flashlights/data/KSF_1.rvmat new file mode 100644 index 0000000000..113fe0cc14 --- /dev/null +++ b/addons/flashlights/data/KSF_1.rvmat @@ -0,0 +1,79 @@ +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.6,0.6,0.6,1}; //amount of glossiness - the higher the number, the higher the glossiness +specularPower=700; //area of glossiness - the higher the number, the smaller the area +PixelShaderID="Super"; +VertexShaderID="Super"; + +class Stage1 { + texture="z\ace\addons\flashlights\data\KSF_1_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,mc)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 { + texture="#(argb,8,8,3)color(1,1,1,1,as)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,1}; + }; +}; +class Stage5 { + texture="z\ace\addons\flashlights\data\KSF_1_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture="#(ai,64,64,1)fresnel(4.7,1.2)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage7 { + texture="a3\data_f\env_land_ca.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/flashlights/data/KSF_1_co.paa b/addons/flashlights/data/KSF_1_co.paa new file mode 100644 index 0000000000..bb31888863 Binary files /dev/null and b/addons/flashlights/data/KSF_1_co.paa differ diff --git a/addons/flashlights/data/KSF_1_nohq.paa b/addons/flashlights/data/KSF_1_nohq.paa new file mode 100644 index 0000000000..8c5ada23c8 Binary files /dev/null and b/addons/flashlights/data/KSF_1_nohq.paa differ diff --git a/addons/flashlights/data/KSF_1_smdi.paa b/addons/flashlights/data/KSF_1_smdi.paa new file mode 100644 index 0000000000..b12f26e5f4 Binary files /dev/null and b/addons/flashlights/data/KSF_1_smdi.paa differ diff --git a/addons/flashlights/data/MX_991.p3d b/addons/flashlights/data/MX_991.p3d new file mode 100644 index 0000000000..c79c330ea3 Binary files /dev/null and b/addons/flashlights/data/MX_991.p3d differ diff --git a/addons/flashlights/data/MX_991.rvmat b/addons/flashlights/data/MX_991.rvmat new file mode 100644 index 0000000000..0268d4903c --- /dev/null +++ b/addons/flashlights/data/MX_991.rvmat @@ -0,0 +1,79 @@ +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.6,0.6,0.6,1}; //amount of glossiness - the higher the number, the higher the glossiness +specularPower=700; //area of glossiness - the higher the number, the smaller the area +PixelShaderID="Super"; +VertexShaderID="Super"; + +class Stage1 { + texture="z\ace\addons\flashlights\data\MX_991_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,mc)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 { + texture="#(argb,8,8,3)color(1,1,1,1,as)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,1}; + }; +}; +class Stage5 { + texture="#(rgb,1,1,1)color(0.2,0.2,1,1)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture="#(ai,64,64,1)fresnel(4.7,1.2)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage7 { + texture="a3\data_f\env_land_ca.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/flashlights/data/MX_991_co.paa b/addons/flashlights/data/MX_991_co.paa new file mode 100644 index 0000000000..598dda174b Binary files /dev/null and b/addons/flashlights/data/MX_991_co.paa differ diff --git a/addons/flashlights/data/MX_991_nohq.paa b/addons/flashlights/data/MX_991_nohq.paa new file mode 100644 index 0000000000..565df542e1 Binary files /dev/null and b/addons/flashlights/data/MX_991_nohq.paa differ diff --git a/addons/flashlights/data/Maglight.p3d b/addons/flashlights/data/Maglight.p3d new file mode 100644 index 0000000000..6ce3b9fcd4 Binary files /dev/null and b/addons/flashlights/data/Maglight.p3d differ diff --git a/addons/flashlights/data/Maglite.rvmat b/addons/flashlights/data/Maglite.rvmat new file mode 100644 index 0000000000..960599813b --- /dev/null +++ b/addons/flashlights/data/Maglite.rvmat @@ -0,0 +1,79 @@ +ambient[]={1,1,1,1}; +diffuse[]={1,1,1,1}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.6,0.6,0.6,1}; //amount of glossiness - the higher the number, the higher the glossiness +specularPower=700; //area of glossiness - the higher the number, the smaller the area +PixelShaderID="Super"; +VertexShaderID="Super"; + +class Stage1 { + texture="z\ace\addons\flashlights\data\Maglite_nohq.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 { + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 { + texture="#(argb,8,8,3)color(0,0,0,0,mc)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 { + texture="#(argb,8,8,3)color(1,1,1,1,as)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,1}; + }; +}; +class Stage5 { + texture="z\ace\addons\flashlights\data\Maglite_smdi.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 { + texture="#(ai,64,64,1)fresnel(4.7,1.2)"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; +class Stage7 { + texture="a3\data_f\env_land_ca.paa"; + uvSource="tex"; + class uvTransform { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,1}; + pos[]={0,0,0}; + }; +}; diff --git a/addons/flashlights/data/Maglite_co.paa b/addons/flashlights/data/Maglite_co.paa new file mode 100644 index 0000000000..8a399b25cc Binary files /dev/null and b/addons/flashlights/data/Maglite_co.paa differ diff --git a/addons/flashlights/data/Maglite_nohq.paa b/addons/flashlights/data/Maglite_nohq.paa new file mode 100644 index 0000000000..43282a963b Binary files /dev/null and b/addons/flashlights/data/Maglite_nohq.paa differ diff --git a/addons/flashlights/data/Maglite_smdi.paa b/addons/flashlights/data/Maglite_smdi.paa new file mode 100644 index 0000000000..093d83e145 Binary files /dev/null and b/addons/flashlights/data/Maglite_smdi.paa differ diff --git a/addons/flashlights/script_component.hpp b/addons/flashlights/script_component.hpp new file mode 100644 index 0000000000..ba740c22fc --- /dev/null +++ b/addons/flashlights/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT flashlights +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_FLASHLIGHTS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FLASHLIGHTS + #define DEBUG_SETTINGS DEBUG_SETTINGS_FLASHLIGHTS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml new file mode 100644 index 0000000000..e871360bf3 --- /dev/null +++ b/addons/flashlights/stringtable.xml @@ -0,0 +1,29 @@ + + + + + Fulton MX-991 + Fulton MX-991 + + + Flashlight with red filter. For use on map. + Latarka z czerwonym filtrem. Używana do podświetlania mapy. + + + Maglite XL50 + Maglite XL50 + + + White mini flashlight. For use on map. + Mini latarka. Światło białe. Używana do podświetlania mapy. + + + KSF-1 + KSF-1 + + + Flashlight with red filter. For use on map. + Latarka z czerwonym filtrem. Używana do podświetlania mapy. + + + \ No newline at end of file