mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
System is done (i think)
This commit is contained in:
@@ -1,23 +1,37 @@
|
||||
private["_firePlace","_ok","_mags","_serial","_qty","_countr"];
|
||||
_firePlace = _this;
|
||||
|
||||
while {alive _firePlace} do {
|
||||
while {inflamed _firePlace && alive _fireplace} do {
|
||||
while {inflamed _firePlace and alive _fireplace} do {
|
||||
//Use Wood
|
||||
_ok = false;
|
||||
_mags = getMagazineCargo _firePlace;
|
||||
clearMagazineCargoGlobal _firePlace;
|
||||
clearWeaponCargoGlobal _firePlace;
|
||||
_serial = (_mags select 0) find "PartWoodPile";
|
||||
|
||||
_fuel = ["PartWoodPile","ItemLog","ItemPlank"];
|
||||
_serial = -1;
|
||||
{
|
||||
private ["_find"];
|
||||
|
||||
_find = ((_mags select 0) find _x);
|
||||
|
||||
if (_find >= 0) exitwith { _serial = _find; };
|
||||
|
||||
} count _fuel;
|
||||
|
||||
_qty = 0;
|
||||
_classname = "";
|
||||
if (_serial >= 0) then {
|
||||
_classname = (_mags select 0) select _serial;
|
||||
_qty = (_mags select 1) select _serial;
|
||||
};
|
||||
|
||||
_ok = false;
|
||||
if (_qty > 0) then {
|
||||
_qty = _qty - 1;
|
||||
_ok = true;
|
||||
if (_qty > 0) then {
|
||||
_firePlace addMagazineCargoGlobal ["PartWoodPile",_qty];
|
||||
_firePlace addMagazineCargoGlobal [_classname,_qty];
|
||||
};
|
||||
};
|
||||
if (_ok) then {
|
||||
@@ -33,7 +47,7 @@ while {alive _firePlace} do {
|
||||
_firePlace inflame false;
|
||||
};
|
||||
};
|
||||
while {!inflamed _firePlace && alive _fireplace} do {
|
||||
while {!inflamed _firePlace and alive _fireplace} do {
|
||||
//Wait
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user