(getNumber(configFile >> 'cfgVehicles' >> typeOf _tool1 >> 'ragQuantity') > 0) and (itemParent _tool1 != _owner) and count (itemsInCargo _tool1) == 0
_condition = damage _tool1; [_owner,_result1] call event_craftMessage; _result1 setVariable ['quantity',getNumber(configFile >> 'cfgVehicles' >> typeOf _tool1 >> 'ragQuantity')]; _result1 setDamage _condition; deleteVehicle _tool1;
What is this?
The condition and action scripts are bits of code used by the game to handle more complicated mechanics than can be expressed by just providing components and results.
The condition script adds restrictions on when a recipe can be crafted. If the expression in the condition evaluates to false, the recipe isn't available.
The action script allows the recipe to handle more complex inputs and outputs. For example, it's used when combining stacks of items to allow stacks of any sizes to be merged together.