Ejemplo n.º 1
0
		private void				ImportState(Interface.Struct.TechniteState state)
		{

			taskParameter = 0;
			lastResources = resources;
			resources = state.resources;
			taskResult = (TaskResult)state.taskResult;
			this.state = new CompressedState(state.state).Decoded;
			transitionState = TransitionState.Preserved;

			if (taskResult == Technite.TaskResult.OperationWindowMissed)
			{
				if (++windowMissedThisRound < MaxLogPerRound)
					Out.Log(Significance.Unusual, "Operation Window Missed on " + nextTask + " of " + this);
			}


			if (taskResult != TaskResult.MoreWorkNeeded)
				nextTask = Task.None;

		}
Ejemplo n.º 2
0
			public bool		Decrease(Resources by)
			{
				if (Matter < by.Matter || Energy < by.Energy)
					return false;
				Matter -= by.Matter;
				Energy -= by.Energy;
				return true;
			}