-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
using Timberborn.ConstructionMode; | ||
using Timberborn.ForestryUI; | ||
using Timberborn.PlantingUI; | ||
using Timberborn.ToolSystem; | ||
|
||
namespace TimberApi.ToolGroupSystem | ||
{ | ||
/// <summary> | ||
/// Add all mode enablers in this class to deactivate them on exiting a group | ||
/// Requires IConstructionModeEnabler to disable construction mode even when it's in the other ToolGroups, reason is unknown. | ||
/// </summary> | ||
public class ExitingTool : TreeCuttingAreaToolGroup, IConstructionModeEnabler, IPlantingToolGroup | ||
public class ExitingToolGroup : ToolGroup, IConstructionModeEnabler | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Core/TimberApi/ToolGroupSystem/ToolGroups/BuilderPriority/BuilderPriorityToolGroup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using UnityEngine; | ||
|
||
namespace TimberApi.ToolGroupSystem.ToolGroups.BuilderPriority | ||
{ | ||
public sealed class BuilderPriorityToolGroup : Timberborn.BuilderPrioritySystemUI.BuilderPriorityToolGroup, IToolGroup | ||
{ | ||
public BuilderPriorityToolGroup(string id, string? groupId, int order, string section, string displayNameLocKey, bool devMode, Sprite icon) | ||
{ | ||
Id = id; | ||
DisplayNameLocKey = displayNameLocKey; | ||
Order = order; | ||
Icon = icon; | ||
DevMode = devMode; | ||
Section = section; | ||
GroupId = groupId; | ||
} | ||
|
||
public string Id { get; } | ||
|
||
public string? GroupId { get; } | ||
|
||
public int Order { get; } | ||
|
||
public string Section { get; } | ||
|
||
public bool DevMode { get; } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Core/TimberApi/ToolGroupSystem/ToolGroups/BuilderPriority/BuilderPriorityToolGroupFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace TimberApi.ToolGroupSystem.ToolGroups.BuilderPriority | ||
{ | ||
public class BuilderPriorityToolGroupFactory : IToolGroupFactory | ||
{ | ||
public string Id => "BuilderPriorityToolGroup"; | ||
|
||
public IToolGroup Create(ToolGroupSpecification toolGroupSpecification) | ||
{ | ||
return new BuilderPriorityToolGroup( | ||
toolGroupSpecification.Id, | ||
toolGroupSpecification.GroupId, | ||
toolGroupSpecification.Order, | ||
toolGroupSpecification.Section, | ||
toolGroupSpecification.NameLocKey, | ||
toolGroupSpecification.DevMode, | ||
toolGroupSpecification.Icon | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters