mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
use player_makeFire to start a fire
This commit is contained in:
@@ -59,9 +59,8 @@ class PartWoodPile : CA_Magazine
|
||||
class ItemActions {
|
||||
class Build {
|
||||
text = $STR_ACTIONS_MAKEFIRE;
|
||||
script = "spawn player_build;";
|
||||
require[] = {"ItemMatchbox"};
|
||||
create = "Land_Fire_DZ";
|
||||
script = "spawn player_makeFire;";
|
||||
use[] = {"PartWoodPile"};
|
||||
};
|
||||
class Crafting
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_item","_config","_text","_booleans","_worldspace","_dir","_location","_dis","_fire","_tool","_itemPile"];
|
||||
private ["_item","_config","_exit","_text","_booleans","_worldspace","_dir","_location","_dis","_fire","_tool","_itemPile"];
|
||||
|
||||
_tool = _this;
|
||||
call gear_ui_init;
|
||||
@@ -8,6 +8,20 @@ _item = "ItemLog";
|
||||
_itemPile = "PartWoodPile";
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
_exit = false;
|
||||
|
||||
if (_tool == "PartWoodPile") then {
|
||||
switch true do {
|
||||
case ("Item1Matchbox" in (weapons player)): {_tool = "Item1Matchbox";};
|
||||
case ("Item2Matchbox" in (weapons player)): {_tool = "Item2Matchbox";};
|
||||
case ("Item3Matchbox" in (weapons player)): {_tool = "Item3Matchbox";};
|
||||
case ("Item4Matchbox" in (weapons player)): {_tool = "Item4Matchbox";};
|
||||
case ("Item5Matchbox" in (weapons player)): {_tool = "Item5Matchbox";};
|
||||
case ("ItemMatchbox" in (weapons player)): {_tool = "ItemMatchbox";};
|
||||
default {_exit = true;};
|
||||
};
|
||||
};
|
||||
if (_exit) exitWith {(localize "str_fireplace_noMatches") call dayz_rollingMessages;};
|
||||
|
||||
// item is missing or tools are missing
|
||||
if (!(_item in magazines player) && !(_itemPile in magazines player)) exitWith {
|
||||
|
||||
@@ -6835,6 +6835,14 @@
|
||||
<French>Le feu de camp a été retiré.</French>
|
||||
<Czech>Ohniště bylo odstraněno.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_fireplace_noMatches">
|
||||
<English>You need a matchbox to build a fireplace</English>
|
||||
<German>You need a matchbox to build a fireplace</German>
|
||||
<Russian>You need a matchbox to build a fireplace</Russian>
|
||||
<Spanish>You need a matchbox to build a fireplace</Spanish>
|
||||
<French>You need a matchbox to build a fireplace</French>
|
||||
<Czech>You need a matchbox to build a fireplace</Czech>
|
||||
</Key>
|
||||
<Key ID="str_success_gutted_animal">
|
||||
<English>%1 has been gutted, %2 meat steaks now on the carcass</English>
|
||||
<German>Du hast das Tier (%1) ausgenommen. Vom verbleibenden Fleisch kannst du %2 Stücke abschneiden.</German>
|
||||
|
||||
Reference in New Issue
Block a user