Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions addons/assets/CfgEventHandlers.hpp

This file was deleted.

1 change: 1 addition & 0 deletions addons/assets/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class CfgVehicles {
author = "Model credits: RBG_illustrations - Reworked by TenuredCLOUD";
displayName = CSTRING(Forge_DisplayName);
MACRO_THING_COMMON;
XEH_ENABLED;
mapSize = 3;
model = QPATHTOF(data\models\forge.p3d);
textSingular = "Forge";
Expand Down
8 changes: 0 additions & 8 deletions addons/assets/XEH_preInit.sqf

This file was deleted.

2 changes: 1 addition & 1 deletion addons/audio/CfgSFX.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CfgSFX {
class GVAR(sfx_furnace) {
name = "Forge Ambience";
sound0[] = {QPATHTOF(sounds\mining\furnaceFire.ogg), 3, 1, 40, 1, 0, 0.1, 0.2};
sound0[] = {QPATHTOF(sounds\mining\FurnaceFire.ogg), 3, 1, 40, 1, 0, 0, 0};
sounds[] = {"sound0"};
empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
};
Expand Down
1 change: 0 additions & 1 deletion addons/audio/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
PREP(ambientMusic);
PREP(ambientSoundScape);
PREP(forgeAudio);
PREP(playRandomMusic);
18 changes: 0 additions & 18 deletions addons/audio/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
#include "script_component.hpp"

// CBA Events
[QGVAR(say3D), {(_this select 0) say3D [(_this select 1), (_this select 2)]}] call CBA_fnc_addEventHandler;

// TODO.
/*
if (isServer) then {
if (count GVAR(ambientMusicExtras) > 0) then {
[] call FUNC(playRandomMusic);
[] call FUNC(ambientMusic);
};

if (GVAR(forgeAmbience)) then {
call FUNC(forgeAudio);
};
};
*/

if (hasInterface) then {
if (GVAR(ambientSoundScape)) then {
[] call FUNC(ambientSoundScape);
Expand All @@ -31,9 +16,6 @@ if (hasInterface) then {
call FUNC(ambientMusic);
};

// Forge Master List
GVAR(forgeAudioList) = [];

if (GVAR(enhancedInventorySounds)) then {
// Inventory Sounds
player addEventHandler ["InventoryClosed", {
Expand Down
28 changes: 0 additions & 28 deletions addons/audio/functions/fnc_forgeAudio.sqf

This file was deleted.

1 change: 1 addition & 0 deletions addons/forge/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PREP(burnFuel);
PREP(canSmeltCheck);
PREP(initAudio);
PREP(outputsListed);
PREP(parseData);
PREP(processSmelt);
Expand Down
11 changes: 9 additions & 2 deletions addons/forge/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ if (isClass (missionConfigFile >> "CfgMisery_ForgeData")) then {
{true},
{},
["_target", "_player"],
[0, 0, 0],
[0, 1, -1.3],
3
] call ACEFUNC(interact_menu,createAction);

[QCLASS(forge), 0, [QUOTE(ACE_MainActions)], _forgeAction] call ACEFUNC(interact_menu,addActionToClass);
[QCLASS(forge), 0, [], _forgeAction] call ACEFUNC(interact_menu,addActionToClass);

} else {
[QUOTE(COMPONENT_BEAUTIFIED), "CfgMisery_ForgeData class not found in description.ext, skipping data parser..."] call EFUNC(common,debugMessage);
};

[{CBA_missionTime > 5}, {

if (EGVAR(audio,forgeAmbience)) then {
call FUNC(initAudio);
};
}, []] call CBA_fnc_waitUntilAndExecute;
34 changes: 34 additions & 0 deletions addons/forge/functions/fnc_initAudio.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include "..\script_component.hpp"
/*
* Author: TenuredCLOUD
* Initializes Forge objects audio loops
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call misery_forge_fnc_initAudio;
*
* Public: No
*/

[QCLASS(forge), "Init", {
params ["_forge"];
[{
params ["_forge"];

private _soundSource = createSoundSource [QEGVAR(audio,sfx_v_furnace), getPosATL _forge, [], 0];
_forge setVariable [QGVAR(forgeSoundSource), _soundSource];

// Delete Sound Source if Forge disappears
_forge addEventHandler ["Deleted", {
params ["_forge"];
private _soundSource = _forge getVariable [QGVAR(forgeSoundSource), objNull];
deleteVehicle _soundSource;
}];
}, [_forge], 1] call CBA_fnc_waitAndExecute;
}, true, [], true] call CBA_fnc_addClassEventHandler;

Loading