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
30 changes: 15 additions & 15 deletions addons/assets/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,6 @@ class CfgMagazines {
scope = 2;
};

class CLASS(cenestinBottle): CLASS(FakeMagazine) {
CLASSACE(isMedicalItem) = 1;
count = 15;
descriptionShort = CSTRING(CenestinBottle_Description);
displayName = CSTRING(CenestinBottle_DisplayName);
mass = 2;
model = "\a3\structures_f_epa\Items\Medical\VitaminBottle_F.p3d";
picture = QPATHTOF(data\icons\cenestinbottle.paa);
scope = 2;
};

class CLASS(lighter): CLASS(FakeMagazine) {
CLASSACE(disableRepacking) = 1;
count = 100;
Expand Down Expand Up @@ -430,18 +419,29 @@ class CfgMagazines {
scope = 2;
};

class CLASS(waterJerryCan_Full): CLASS(FakeMagazine) {
class CLASS(waterJerryCan_Purified): CLASS(FakeMagazine) {
CLASSACE(disableRepacking) = 1;
count = 20;
descriptionShort = CSTRING(JerryCanWaterFullPure_Description);
displayName = CSTRING(JerryCanWaterFullPure_DisplayName);
mass = 150;
model = "\a3\structures_f\Items\Vessels\CanisterFuel_F.p3d";
picture = QPATHTOF(data\icons\canisterwater.paa);
scope = 2;
};

class CLASS(waterJerryCan_Clean): CLASS(FakeMagazine) {
CLASSACE(disableRepacking) = 1;
count = 20;
descriptionShort = CSTRING(JerryCanWaterFull_Description);
displayName = CSTRING(JerryCanWaterFull_DisplayName);
descriptionShort = CSTRING(JerryCanWaterFullClean_Description);
displayName = CSTRING(JerryCanWaterFullClean_DisplayName);
mass = 150;
model = "\a3\structures_f\Items\Vessels\CanisterFuel_F.p3d";
picture = QPATHTOF(data\icons\canisterwater.paa);
scope = 2;
};

class CLASS(waterJerryCan_FullDirty): CLASS(FakeMagazine) {
class CLASS(waterJerryCan_Dirty): CLASS(FakeMagazine) {
CLASSACE(disableRepacking) = 1;
count = 20;
descriptionShort = CSTRING(JerryCanWaterFullDirty_Description);
Expand Down
12 changes: 0 additions & 12 deletions addons/assets/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,18 +746,6 @@ class CfgWeapons {
};
};

class CLASS(rope): CLASS(ItemCore) {
displayName = CSTRING(Rope_DisplayName);
descriptionShort = CSTRING(Rope_Description);
picture = QPATHTOF(data\icons\rope.paa);
scope = 2;
scopeCurator = 2;

class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 15;
};
};

class CLASS(needleThread): CLASS(ItemCore) {
displayName = CSTRING(NeedleThread_DisplayName);
descriptionShort = CSTRING(NeedleThread_Description);
Expand Down
1 change: 0 additions & 1 deletion addons/assets/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
QCLASS(randomMedication), \
QCLASS(rawFish), \
QCLASS(rawMeat), \
QCLASS(rope), \
QCLASS(ruby), \
QCLASS(sapphire), \
QCLASS(sledgehammer), \
Expand Down
272 changes: 120 additions & 152 deletions addons/assets/stringtable.xml

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions addons/audio/CfgSounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,6 @@ class CfgSounds {
MACRO_SOUNDS(geiger09,geiger);
MACRO_SOUNDS(geiger10,geiger);

// Generator
MACRO_SOUNDS(dieselRunning,generator);
MACRO_SOUNDS(dieselStart,generator);
MACRO_SOUNDS(dieselStop,generator);
MACRO_SOUNDS(kvaRunning,generator);
MACRO_SOUNDS(kvaStart,generator);
MACRO_SOUNDS(kvaStop,generator);
MACRO_SOUNDS(petrolRunning,generator);
MACRO_SOUNDS(petrolStart,generator);
MACRO_SOUNDS(petrolStop,generator);

// Green Mountain
MACRO_SOUNDS(gmBeep,greenmountain);
MACRO_SOUNDS(gmChatter,greenmountain);
Expand Down
Binary file removed addons/audio/sounds/generator/dieselRunning.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/dieselStart.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/dieselStop.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/kvaRunning.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/kvaStart.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/kvaStop.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/petrolRunning.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/petrolStart.ogg
Binary file not shown.
Binary file removed addons/audio/sounds/generator/petrolStop.ogg
Binary file not shown.
4 changes: 2 additions & 2 deletions addons/cooking/functions/fnc_parseData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GVAR(cookingRecipes) = [];
} forEach _requiredItems;
private _cookingTime = getNumber (_x >> "cookingTime");
private _outputCount = getNumber (_x >> "outputCount");
private _toBeReplaced = getArray (_x >> "toBeReplaced");
private _code = getText (_x >> "code");
private _audio = getText (_x >> "audio");
private _outputXP = getNumber (_x >> "outputXP");
private _requiredXP = getNumber (_x >> "requiredXP");
Expand All @@ -35,7 +35,7 @@ GVAR(cookingRecipes) = [];
_requiredItems, // Index 1: Required items
_cookingTime, // Index 2: Cooking time
_outputCount, // Index 3: Output quantity
_toBeReplaced, // Index 4: Items to replace
_code, // Index 4: Code to run on completion
_audio, // Index 5: Cooking sound
_outputXP, // Index 6: XP awarded
_requiredXP, // Index 7: Minimum XP required
Expand Down
16 changes: 4 additions & 12 deletions addons/cooking/functions/fnc_processRecipe.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private _outputItem = _recipe select 0;
private _requiredItems = _recipe select 1;
private _cookingTime = _recipe select 2;
private _outputCount = _recipe select 3;
private _toBeReplaced = _recipe select 4;
private _code = _recipe select 4;
private _audio = _recipe select 5;
private _outputXP = _recipe select 6;
private _requiredXP = _recipe select 7;
Expand Down Expand Up @@ -75,7 +75,7 @@ private _currentStep = 0;

[{
params ["_args", "_handle"];
_args params ["_requiredItems", "_outputItem", "_outputCount", "_toBeReplaced", "_outputXP", "_cookingMethod", "_dialog", "_cookInterrupt", "_totalSteps", "_currentStep", "_displayName", "_progressBar", "_soundSource"];
_args params ["_requiredItems", "_outputItem", "_outputCount", "_code", "_outputXP", "_cookingMethod", "_dialog", "_cookInterrupt", "_totalSteps", "_currentStep", "_displayName", "_progressBar", "_soundSource"];

if (!(player getVariable [QGVAR(isCooking), false]) || !alive player) exitWith {
player setVariable [QGVAR(isCooking), nil];
Expand Down Expand Up @@ -111,15 +111,7 @@ private _currentStep = 0;
[player, _outputItem, true] call CBA_fnc_addItem;
};

if (count _toBeReplaced > 0) then {
private _itemToReplace = _toBeReplaced select 0;
private _chance = _toBeReplaced select 1;
private _replacementItem = _toBeReplaced select 2;
if ([_chance] call EFUNC(common,rollChance)) then {
[player, _itemToReplace] call CBA_fnc_removeItem;
[player, _replacementItem, true] call CBA_fnc_addItem;
};
};
if (_code isNotEqualTo "") then {call compile _code};

private _currentXP = player getVariable [QGVAR(xp), MACRO_PLAYER_DEFAULTS_LOW];
player setVariable [QGVAR(xp), _currentXP + _outputXP, true];
Expand All @@ -140,7 +132,7 @@ private _currentStep = 0;
[_handle] call CBA_fnc_removePerFrameHandler;
};
}, 0.5, [
_requiredItems, _outputItem, _outputCount, _toBeReplaced, _outputXP, _cookingMethod,
_requiredItems, _outputItem, _outputCount, _code, _outputXP, _cookingMethod,
_dialog, _cookInterrupt,
_totalSteps, _currentStep, _displayName, _progressBar, _soundSource
]] call CBA_fnc_addPerFrameHandler;
4 changes: 2 additions & 2 deletions addons/crafting/functions/fnc_parseData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ GVAR(craftingRecipes) = [];
} forEach _requiredItems;
private _craftingTime = getNumber (_x >> "craftingTime");
private _outputCount = getNumber (_x >> "outputCount");
private _toBeReplaced = getArray (_x >> "toBeReplaced");
private _code = getText (_x >> "code");
private _audio = getText (_x >> "audio");
private _outputXP = getNumber (_x >> "outputXP"); // XP awarded upon completion
private _requiredXP = getNumber (_x >> "requiredXP"); // Minimum XP required
Expand All @@ -34,7 +34,7 @@ GVAR(craftingRecipes) = [];
_requiredItems, // Index 1: Required items
_craftingTime, // Index 2: Crafting time
_outputCount, // Index 3: Output quantity
_toBeReplaced, // Index 4: Items to replace
_code, // Index 4: Code to run on completion
_audio, // Index 5: Crafting sound
_outputXP, // Index 6: XP awarded upon completion
_requiredXP // Index 7: Minimum XP required
Expand Down
16 changes: 4 additions & 12 deletions addons/crafting/functions/fnc_processItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private _outputItem = _recipe select 0;
private _requiredItems = _recipe select 1;
private _craftingTime = _recipe select 2;
private _outputCount = _recipe select 3;
private _toBeReplaced = _recipe select 4;
private _code = _recipe select 4;
private _audio = _recipe select 5;
private _outputXP = _recipe select 6;

Expand Down Expand Up @@ -68,7 +68,7 @@ private _currentStep = 0;

[{
params ["_args", "_handle"];
_args params ["_requiredItems", "_outputItem", "_outputCount", "_toBeReplaced", "_outputXP", "_dialog", "_craftInterrupt", "_totalSteps", "_currentStep", "_displayName", "_progressBar", "_soundSource"];
_args params ["_requiredItems", "_outputItem", "_outputCount", "_code", "_outputXP", "_dialog", "_craftInterrupt", "_totalSteps", "_currentStep", "_displayName", "_progressBar", "_soundSource"];

if (!(player getVariable [QGVAR(isCrafting), false]) || !alive player) exitWith {
player setVariable [QGVAR(isCrafting), nil];
Expand Down Expand Up @@ -104,15 +104,7 @@ private _currentStep = 0;
[player, _outputItem, true] call CBA_fnc_addItem;
};

if (count _toBeReplaced > 0) then {
private _itemToReplace = _toBeReplaced select 0;
private _chance = _toBeReplaced select 1;
private _replacementItem = _toBeReplaced select 2;
if ([_chance] call EFUNC(common,rollChance)) then {
[player, _itemToReplace] call CBA_fnc_removeItem;
[player, _replacementItem, true] call CBA_fnc_addItem;
};
};
if (_code isNotEqualTo "") then {call compile _code};

private _currentXP = player getVariable [QGVAR(xp), MACRO_PLAYER_DEFAULTS_LOW];
player setVariable [QGVAR(xp), _currentXP + _outputXP, true];
Expand All @@ -134,6 +126,6 @@ private _currentStep = 0;
[_handle] call CBA_fnc_removePerFrameHandler;
};
}, 0.5, [
_requiredItems, _outputItem, _outputCount, _toBeReplaced, _outputXP,
_requiredItems, _outputItem, _outputCount, _code, _outputXP,
_dialog, _craftInterrupt, _totalSteps, _currentStep, _displayName, _progressBar, _soundSource
]] call CBA_fnc_addPerFrameHandler;
1 change: 1 addition & 0 deletions addons/hydrology/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ PREP(drinkFromSource);
PREP(icon);
PREP(parseData);
PREP(processFill);
PREP(purifyWater);
67 changes: 67 additions & 0 deletions addons/hydrology/functions/fnc_purifyWater.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#include "..\script_component.hpp"
/*
* Author: TenuredCLOUD
* Water purification tablet usage
* Decrements water tablets based on water sources in inventory
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call misery_hydrology_fnc_purifyWater;
*
* Public: No
*/

if (!([[QCLASS(pureTablets)]] call EFUNC(common,hasItem))) exitWith {
[QEGVAR(common,tileText), localize LSTRING(NoPurificationTablets)] call CBA_fnc_localEvent;
};

private _containerData = [
[QCLASS(waterJerryCan_Dirty), QCLASS(waterJerryCan_Purified), 10],
[QCLASS(waterJerryCan_Clean), QCLASS(waterJerryCan_Purified), 10],
[QCLASS(canteen_Dirty), QCLASS(canteen_Purified), 2],
[QCLASS(canteen_Clean), QCLASS(canteen_Purified), 2],
[QCLASS(waterBottle_Dirty), QCLASS(waterBottle_Purified), 1],
[QCLASS(waterBottle_Clean), QCLASS(waterBottle_Purified), 1]
];

private _targetContainer = [];

{
_x params ["_inputClass", "_purifiedClass", "_reqTablets"];
if ([[_inputClass]] call EFUNC(common,hasItem)) exitWith {
_targetContainer = _x;
};
} forEach _containerData;

if (_targetContainer isEqualTo []) exitWith {
[QEGVAR(common,tileText), localize LSTRING(NoContainersNeedPurification)] call CBA_fnc_localEvent;
};

_targetContainer params ["_inputClass", "_purifiedClass", "_reqTablets"];

[QCLASS(pureTablets)] call EFUNC(common,countMagazinesAmmo) params ["_count", "_capacity"];

if (_count < _reqTablets) exitWith {
[QEGVAR(common,tileText), format [localize LSTRING(NotEnoughTablets), _reqTablets, [(_targetContainer select 0)] call EFUNC(common,getItemData) select 0, _count]] call CBA_fnc_localEvent;
};

[_inputClass] call EFUNC(common,countMagazinesAmmo) params ["_lastVolume"];

[player, _inputClass] call CBA_fnc_removeItem;

[player, _purifiedClass, _lastVolume, true] call CBA_fnc_addMagazine;

if (_reqTablets >= 10) then {
[player, QCLASS(pureTablets)] call CBA_fnc_removeItem;
[QEGVAR(common,tileText), format [localize LSTRING(UsedAllTablets), [(_targetContainer select 0)] call EFUNC(common,getItemData) select 0]] call CBA_fnc_localEvent;
} else {
for "_i" from 1 to _reqTablets do {
[QCLASS(pureTablets)] call EFUNC(common,itemDecrement);
};
[QEGVAR(common,tileText), format [localize LSTRING(TabletsUsedCount), [(_targetContainer select 0)] call EFUNC(common,getItemData) select 0, _reqTablets]] call CBA_fnc_localEvent;
};
80 changes: 80 additions & 0 deletions addons/hydrology/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,22 @@
<Chinesesimp>您没有那个容器...</Chinesesimp>
<Turkish>Bu kaba sahip değilsiniz...</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_NoContainersNeedPurification">
<English>You don't have any containers that need chemical purification...</English>
<Czech>Nemáte žádné nádoby, které by vyžadovaly chemické čištění...</Czech>
<French>Vous n'avez aucun récipient nécessitant une purification chimique...</French>
<Spanish>No tienes ningún recipiente que requiera purificación química...</Spanish>
<Italian>Non hai contenitori que richiedano una purificazione chimica...</Italian>
<Polish>Nie masz żadnych pojemników, které wymagają chemicznego oczyszczania...</Polish>
<Portuguese>Você não tem nenhum recipiente que precise de purificação química...</Portuguese>
<Russian>У вас нет контейнеров, требующих химической очистки...</Russian>
<German>Du hast keine Behälter, die eine chemische Reinigung erfordern...</German>
<Korean>화학적 정수가 필요한 용기가 없습니다...</Korean>
<Japanese>化学的浄化が必要な容器がありません...</Japanese>
<Chinese>你沒有任何需要化學過濾的容器...</Chinese>
<Chinesesimp>你没有任何需要化学过滤的容器...</Chinesesimp>
<Turkish>Kimyasal arındırma gerektiren herhangi bir kabınız yok...</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_NoMatchingContainer">
<English>No matching container found.</English>
<Czech>Nenalezen žádný odpovídající kontejner.</Czech>
Expand All @@ -145,6 +161,38 @@
<Chinesesimp>找不到匹配的容器。</Chinesesimp>
<Turkish>Eşleşen kap bulunamadı.</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_NoPurificationTablets">
<English>You don't have any purification tablets...</English>
<Czech>Nemáte žádné tablety na čištění vody...</Czech>
<French>Vous n'avez pas de pastilles de purification...</French>
<Spanish>No tienes pastillas de purificación...</Spanish>
<Italian>Non hai pastiglie purificanti...</Italian>
<Polish>Nie masz żadnych tabletek oczyszczających...</Polish>
<Portuguese>Você não tem nenhuma pastilha de purificação...</Portuguese>
<Russian>У вас нет таблеток для очистки воды...</Russian>
<German>Du hast keine Reinigungstabletten...</German>
<Korean>정수 알약이 없습니다...</Korean>
<Japanese>浄水タブレットを持っていません...</Japanese>
<Chinese>你沒有任何淨水片...</Chinese>
<Chinesesimp>你没有任何净水片...</Chinesesimp>
<Turkish>Hiç arındırma tabletiniz yok...</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_NotEnoughTablets">
<English>You need %1 tablets to purify %2, but you only have %3...</English>
<Czech>K vyčištění %2 potřebujete %1 tablet, ale máte pouze %3...</Czech>
<French>Vous avez besoin de %1 pastilles pour purifier %2, mais vous n'en avez que %3...</French>
<Spanish>Necesitas %1 pastillas para purificar %2, pero solo tienes %3...</Spanish>
<Italian>Hai bisogno di %1 pastiglie per purificare %2, ma ne hai solo %3...</Italian>
<Polish>Potrzebujesz %1 tabletek, aby oczyścić %2, ale masz tylko %3...</Polish>
<Portuguese>Você precisa de %1 pastilhas para purificar %2, mas só tem %3...</Portuguese>
<Russian>Вам нужно %1 табл. для очистки %2, но у вас есть только %3...</Russian>
<German>Du benötigst %1 Tabletten, um %2 zu reinigen, aber du hast nur %3...</German>
<Korean>%2을(를) 정수하려면 알약 %1개가 필요하지만, %3개만 가지고 있습니다...</Korean>
<Japanese>%2の浄化にはタブレットが%1個必要ですが、%3個しか持っていません...</Japanese>
<Chinese>你需要 %1 片淨水片來過濾 %2,但你只有 %3 片...</Chinese>
<Chinesesimp>你需要 %1 片净水片来过滤 %2,但你只有 %3 片...</Chinesesimp>
<Turkish>%2 nesnesini arındırmak için %1 tablete ihtiyacınız var, ancak sizde sadece %3 tane var...</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_Prompt">
<English>What container would you like to fill?</English>
<Czech>Který kontejner chcete naplnit?</Czech>
Expand All @@ -161,5 +209,37 @@
<Chinesesimp>您想填充哪个容器?</Chinesesimp>
<Turkish>Hangi kabı doldurmak istersiniz?</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_TabletsUsedCount">
<English>%1 purified, used %2 tablet(s)...</English>
<Czech>%1 vyčištěno, použito %2 tablet...</Czech>
<French>%1 purifié, %2 pastille(s) utilisée(s)...</French>
<Spanish>%1 purificado, se usó %2 pastilla(s)...</Spanish>
<Italian>%1 purificato, usato %2 pastiglia/e...</Italian>
<Polish>Oczyszczono %1, zużyto %2 tabletek...</Polish>
<Portuguese>%1 purificado, usado(s) %2 pastilha(s)...</Portuguese>
<Russian>%1 очищено, использовано табл.: %2...</Russian>
<German>%1 gereinigt, %2 Tablette(n) verwendet...</German>
<Korean>%1 정수 완료, 알약 %2개 사용됨...</Korean>
<Japanese>%1を浄化しました、タブレットを%2個使用...</Japanese>
<Chinese>%1 已過濾,使用了 %2 片淨水片...</Chinese>
<Chinesesimp>%1 已过滤,使用了 %2 片净水片...</Chinesesimp>
<Turkish>%1 arındırıldı, %2 tablet kullanıldı...</Turkish>
</Key>
<Key ID="STR_MISERY_Hydrology_UsedAllTablets">
<English>You used a whole pack of tablets to purify %1...</English>
<Czech>K vyčištění %1 jste použili celé balení tablet...</Czech>
<French>Vous avez utilisé une boîte entière de pastilles pour purifier %1...</French>
<Spanish>Usaste un paquete entero de pastillas para purificar %1...</Spanish>
<Italian>Hai usato un intero pacchetto di pastiglie per purificare %1...</Italian>
<Polish>Zużyłeś całe opakowanie tabletek, aby oczyścić %1...</Polish>
<Portuguese>Você usou um pacote inteiro de pastilhas para purificar %1...</Portuguese>
<Russian>Вы использовали целую упаковку таблеток для очистки %1...</Russian>
<German>Du hast eine ganze Packung Tabletten verwendet, um %1 zu reinigen...</German>
<Korean>%1을(를) 정수하기 위해 알약 한 팩을 모두 사용했습니다...</Korean>
<Japanese>%1の浄化にタブレットを1パック丸ごと使用しました...</Japanese>
<Chinese>你使用了整包淨水片來過濾 %1...</Chinese>
<Chinesesimp>你使用了整包净水片来过滤 %1...</Chinesesimp>
<Turkish>%1 nesnesini arındırmak için bütün bir paket tablet kullandınız...</Turkish>
</Key>
</Package>
</Project>
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 2
#define MINOR 0
#define PATCH 0
#define BUILD 0
#define BUILD 1
Loading