mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
minor cleanup
This commit is contained in:
parent
a08d50cf74
commit
3cb74266dd
@ -17,7 +17,6 @@
|
|||||||
_loot = selectRandomWeighted _lootTable;
|
_loot = selectRandomWeighted _lootTable;
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_allow","_itemType","_lootTableArray","_lootTableName","_newChances","_return","_selectedloot","_totalChances","_value","_weightedArray"];
|
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params ["_configName","_keyName","_arrayName"];
|
params ["_configName","_keyName","_arrayName"];
|
||||||
|
|
||||||
@ -89,8 +88,7 @@ if(_return isEqualTo[]) then {
|
|||||||
{_totalChances = _totalChances + _x} count _weightedArray;
|
{_totalChances = _totalChances + _x} count _weightedArray;
|
||||||
_return = [];
|
_return = [];
|
||||||
{
|
{
|
||||||
_selectedloot = _lootTableArray select _forEachIndex;
|
_return append [_lootTableArray select _forEachIndex,linearConversion [0,_totalChances,_x,0,1]];
|
||||||
_return append [_selectedloot,linearConversion [0,_totalChances,_x,0,1]];
|
|
||||||
} forEach _weightedArray;
|
} forEach _weightedArray;
|
||||||
|
|
||||||
// cache loot final loot table
|
// cache loot final loot table
|
||||||
|
Loading…
Reference in New Issue
Block a user