Files @ fda22c203ad5
Branch filter:

Location: games/Awakening/utils.lua

Silverwing
Utils.lua added. Text fixes. Allow joining Phaetlarr to party
--[[
	Общие утилиты для игр на Instead. Скорее всего будут повторно использоваться в следующих играх, если таковые будут.
]]

--[[
]]
ArrayUtils = {
	indexOf = function(array, item)
		for i = 1, #array do
			if (array[i] == item) then
				return i;
			end;
		end;
		return 0;
	end;
};

--[[
	
]]
PartyUtils = {
	addToParty = function(object)
		if (object.home) then 
			if (ArrayUtils.indexOf(pl.party, object.nam) == 0) then
				move(object, object.home);
				table.insert(pl.party, object.nam);
			end;
		end;
	end;
};