Skip to content

Commit

Permalink
fixes for game v0.5.4.0 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
hytonhan authored Dec 4, 2023
1 parent d848e65 commit 25d5e6c
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Core/TimberApi.Common/TimberApi.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Timberborn.GameLibs" Version="0.5.3-r.1" />
<PackageReference Update="Timberborn.GameLibs" Version="0.5.4-r.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Core/TimberApi.Core/TimberApi.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Timberborn.GameLibs" Version="0.5.3-r.1" />
<PackageReference Update="Timberborn.GameLibs" Version="0.5.4-r.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Core/TimberApi/TimberApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Timberborn.GameLibs" Version="0.5.3-r.1" />
<PackageReference Update="Timberborn.GameLibs" Version="0.5.4-r.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class PlaceableObjectToolFactory : BaseToolFactory<PlaceableObjectToolToo

private readonly UISoundController _uiSoundController;

private readonly BlockObjectUnlockerService _blockObjectUnlockerService;
private readonly ToolUnlockingService _toolUnlockingService;

public PlaceableObjectToolFactory(
ObjectCollectionService objectCollectionService,
Expand All @@ -41,7 +41,7 @@ public PlaceableObjectToolFactory(
UISoundController uiSoundController,
BlockObjectPlacerService blockObjectPlacerService,
MapEditorMode mapEditorMode,
BlockObjectUnlockerService blockObjectUnlockerService)
ToolUnlockingService toolUnlockingService)
{
_objectCollectionService = objectCollectionService;
_blockObjectToolDescriber = blockObjectToolDescriber;
Expand All @@ -51,7 +51,7 @@ public PlaceableObjectToolFactory(
_uiSoundController = uiSoundController;
_blockObjectPlacerService = blockObjectPlacerService;
_mapEditorMode = mapEditorMode;
_blockObjectUnlockerService = blockObjectUnlockerService;
_toolUnlockingService = toolUnlockingService;
}

public override string Id => "PlaceableObjectTool";
Expand All @@ -71,8 +71,8 @@ protected override Tool CreateTool(ToolSpecification toolSpecification, Placeabl
_previewPlacerFactory,
_uiSoundController,
_blockObjectPlacerService,
_blockObjectUnlockerService,
_mapEditorMode);
_mapEditorMode,
_toolUnlockingService);

if(toolGroup == null)
{
Expand Down
12 changes: 8 additions & 4 deletions Core/TimberApi/ToolSystem/Tools/Planting/PlantingToolFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ public class PlantingToolFactory : BaseToolFactory<PlantingToolToolInformation>

private readonly DialogBoxShower _dialogBoxShower;

private readonly ToolUnlockingService _toolUnlockingService;

public PlantingToolFactory(
PlantableDescriber plantableDescriber,
PlantingSelectionService plantingSelectionService,
DevModePlantableSpawner devModePlantableSpawner,
SelectionToolProcessorFactory selectionToolProcessorFactory,
ILoc loc,
ObjectCollectionService objectCollectionService,
DialogBoxShower dialogBoxShower)
DialogBoxShower dialogBoxShower,
ToolUnlockingService toolUnlockingService)
{
_plantableDescriber = plantableDescriber;
_plantingSelectionService = plantingSelectionService;
Expand All @@ -43,6 +46,7 @@ public PlantingToolFactory(
_loc = loc;
_objectCollectionService = objectCollectionService;
_dialogBoxShower = dialogBoxShower;
_toolUnlockingService = toolUnlockingService;
}

public override string Id => "PlantingTool";
Expand All @@ -56,11 +60,11 @@ protected override Tool CreateTool(ToolSpecification toolSpecification, Planting
_plantableDescriber,
_plantingSelectionService,
_devModePlantableSpawner,
_loc,
_dialogBoxShower,
_toolUnlockingService,
_selectionToolProcessorFactory,
plantable,
GetPlanterBuildingName(plantable), toolGroup);
GetPlanterBuildingName(plantable),
toolGroup);
}

protected override PlantingToolToolInformation DeserializeToolInformation(IObjectLoader objectLoader)
Expand Down
2 changes: 1 addition & 1 deletion Core/TimberApi/Versions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace TimberApi
{
public class Versions
{
public static readonly Version GameVersion = Version.Parse(Timberborn.Versioning.Versions.VersionNumber);
public static readonly Version GameVersion = Version.Parse(Timberborn.Versioning.Versions.CurrentGameVersion.Numeric);

public static Version TimberApiVersion { get; } =
Version.Parse("TIMBER_API_VERSION_PLACEHOLDER".ReplacePlaceholderWithFakeVersion("1.0.0.0"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Timberborn.GameLibs" Version="0.5.3-r.1" />
<PackageReference Update="Timberborn.GameLibs" Version="0.5.4-r.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="MonoMod.RuntimeDetour" Version="21.12.13.1" />
<PackageReference Include="UnityEngine" Version="5.6.1" />
<PackageReference Include="UnityEngine.Modules" Version="2022.1.6" />
<PackageReference Include="Timberborn.GameLibs" Version="0.5.3-r.1" Condition="$(UseLocalTimberbornSource) == false" />
<PackageReference Include="Timberborn.GameLibs" Version="0.5.4-r.0" Condition="$(UseLocalTimberbornSource) == false" />
</ItemGroup>

<!-- Import dll's from Timberborn's symlink in solution folder-->
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Unreleased
Necessary changes to make TimberAPI work with game v0.5.4.0

### Changes
- Necessary changes to make TimberAPI work with game v0.5.4.0

## TimberAPI v0.6.3.0
Updated gamelibs to v0.5.3.0 and fixes to make TimberAPI work with game version 0.5.3.0
Expand Down

0 comments on commit 25d5e6c

Please sign in to comment.