private void _DistributeContractToAssignedDesks() { CContract contract = null; for (int i = 0; i < mWorld.mContracts.Count; ++i) { CContract c = mWorld.mContracts[i]; if (c.mOwner == mPlayerId && c.GetUndistributedStacks() > 0) { contract = c; break; } } if (contract == null) { return; } for (int i = 0; i < mWorld.mItemProxies[mPlayerId].Count; ++i) { CItemProxy proxy = mWorld.mItemProxies[mPlayerId][i]; if (proxy.mAsset.mItemType == EItemType.DESK && !proxy.mBlueprint && proxy.mAssignedUnitID != -1) { if (proxy.mAssignedPaperStacks.Count < proxy.mMaxPaperStackSlots) { mWorld.ControllerDistributeContract(mPlayerId, contract.mID, proxy.mID); return; } } } }
public void CopyState(CContract Contract) { mNewOwner = Contract.mOwner; mStackCount = Contract.mStackCount; mUndistributedStacks = Contract.GetUndistributedStacks(); mAcceptedTime = Contract.mAcceptedTime; mUncompletedStacks = Contract.GetUncompletedStacks(); }