Commit 4f144bd7 authored by Razer's avatar Razer
Browse files

Fixed crafting issue

parent 1b0b97bb
......@@ -58,23 +58,24 @@ switch _mode do {
// Parent class (class materials)
(_items select _i) params ["_name","_condition","_classes"];
if(_name == "") exitWith {};
if!(call compile _condition) exitWith {};
_tvRecipes tvAdd [[],_name];
_tvRecipes tvSetColor [[_i],[0.1,0.1,0.1,0.75]]; // (Disabled)
for "_m" from 0 to (count(_classes) - 1) do {
// Material class
(_classes select _m) params ["_name","_description","_preview","_condition"];
if(_name == "") exitWith {};
if!(call compile _condition) exitWith {};
_tvRecipes tvAdd [[_i],_name];
_tvRecipes tvSetColor [[_i,_m],[0.1,0.1,0.1,1]];
_tvRecipes tvSetPictureRight [[_i,_m],_preview];
_tvRecipes tvSetPictureRightColorSelected [[_i,_m],[1,1,1,0.95]];
};
if (_name != "" && (count _classes != 0)) then {
if((_condition isEqualType "") && {!(call compile _condition)}) exitWith {};
_tvRecipes tvAdd [[],_name];
_tvRecipes tvSetColor [[_i],[0.1,0.1,0.1,0.75]]; // (Disabled)
for "_m" from 0 to (count(_classes) - 1) do {
// Material class
(_classes select _m) params ["_name","_description","_preview","_condition"];
if(_name == "") exitWith {};
if!(call compile _condition) exitWith {};
_tvRecipes tvAdd [[_i],_name];
_tvRecipes tvSetColor [[_i,_m],[0.1,0.1,0.1,1]];
_tvRecipes tvSetPictureRight [[_i,_m],_preview];
_tvRecipes tvSetPictureRightColorSelected [[_i,_m],[1,1,1,0.95]];
};
};
};
_tvRecipes ctrlAddEventHandler ["TreeSelChanged",{
......
......@@ -52,8 +52,10 @@ for "_i" from 0 to count(_config)-1 do {
_subClasses pushBack _subClass;
};
};
_parentClass pushBack _subClasses;
DS_var_DataCrafting pushBack _parentClass;
if (_subClasses != []) then {
_parentClass pushBack _subClasses;
DS_var_DataCrafting pushBack _parentClass;
};
};
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment