Skip to content

Commit

Permalink
337 put construction queues in a module (#338)
Browse files Browse the repository at this point in the history
* Move Construction namesspace to Processes

* Clean up ConstructionQueue

* Add IConstructionQueue interface

* Put ConstructionQueue in a module

* Move ComputeRate to ConstructionQueueFactory so it can be DI'd without having to replace the whole ConstructionQueue class
  • Loading branch information
ekolis authored Nov 29, 2024
1 parent e01b3f5 commit 564c4a6
Show file tree
Hide file tree
Showing 52 changed files with 961 additions and 783 deletions.
4 changes: 2 additions & 2 deletions FrEee.Core.Domain/Extensions/CommonExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static bool ExecuteMobileSpaceObjectOrders<T>(this T o)
{
bool didStuff = false;

if (o.AreOrdersOnHold)
if (o.IsOnHold)
return didStuff;

if (o is Fleet f && !f.Vehicles.ExceptSingle(null).Any())
Expand All @@ -356,7 +356,7 @@ public static bool ExecuteMobileSpaceObjectOrders<T>(this T o)
if (order.IsComplete && o.Orders.Contains(order))
{
o.RemoveOrder(o.Orders.First());
if (o.AreRepeatOrdersEnabled)
if (o.IsOnRepeat)
{
order.IsComplete = false;
o.AddOrder(order);
Expand Down
2 changes: 1 addition & 1 deletion FrEee.Core.Domain/Modding/Templates/FacilityTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
using System.Drawing;
using System.IO;
using System.Linq;
using FrEee.Objects.Civilization.Construction;
using FrEee.Objects.GameState;
using FrEee.Modding.Abilities;
using FrEee.Objects.Technology;
using FrEee.Processes.Construction;

namespace FrEee.Modding.Templates;

Expand Down
4 changes: 2 additions & 2 deletions FrEee.Core.Domain/Objects/Civilization/Colony.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using FrEee.Objects.Civilization.Construction;
using FrEee.Objects.GameState;
using FrEee.Modding.Abilities;
using FrEee.Modding.Templates;
using FrEee.Processes.Construction;

namespace FrEee.Objects.Civilization;

Expand Down Expand Up @@ -64,7 +64,7 @@ public IEnumerable<IAbilityObject> Children
/// <summary>
/// This colony's construction queue.
/// </summary>
public ConstructionQueue ConstructionQueue
public IConstructionQueue ConstructionQueue
{
get;
set;
Expand Down
Loading

0 comments on commit 564c4a6

Please sign in to comment.