Skip to content

Woolhaven#109

Merged
Khaomi merged 11 commits into
mainfrom
woolhaven
Jan 23, 2026
Merged

Woolhaven#109
Khaomi merged 11 commits into
mainfrom
woolhaven

Conversation

@Khaomi

@Khaomi Khaomi commented Jan 23, 2026

Copy link
Copy Markdown
Owner

No description provided.

zelzmiy and others added 4 commits January 22, 2026 20:41
at least im 90% sure they should be statuc
i really hope this doesn't break anything and also im really mad at myself for leaving this in for so long. how did i never get around to fixing it?
Fix HarmonyPatch issues related to game updating to Woolhaven
@vercel

vercel Bot commented Jan 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
cotl-api Ignored Ignored Preview Jan 23, 2026 4:05am

@github-actions github-actions Bot added the API The core of this package label Jan 23, 2026
@github-actions github-actions Bot added the CI Continuous integration label Jan 23, 2026
@github-actions

github-actions Bot commented Jan 23, 2026

Copy link
Copy Markdown

Download the artifacts for this pull request:

@Khaomi Khaomi marked this pull request as ready for review January 23, 2026 04:15
Copilot AI review requested due to automatic review settings January 23, 2026 04:15
@Khaomi Khaomi merged commit beeaeac into main Jan 23, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request appears to be a maintenance release titled "Woolhaven" that upgrades the API to version 0.3.0. The changes include code modernization, API improvements, bug fixes, and a breaking API change.

Changes:

  • Updated HarmonyPatch attributes to explicitly specify parameter types for better method disambiguation
  • Migrated collection initializers from new() syntax to modern collection expressions []
  • Changed from direct dictionary access to TryAddBrain method for better encapsulation
  • Added breaking change to PlaceStructure method signature with new required type parameter
  • Fixed bug where crop prefab could be unintentionally activated
  • Improved debug logging to include method names in patch status output
  • Version bumped from 0.2.13 to 0.3.0

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
COTL_API/Saves/SavePatches.cs Added empty parameter array to HarmonyPatch for Save method disambiguation
COTL_API/Debug/DebugManager.cs Migrated PatchedClass to collection expression syntax, changed ShowPatches/ShowPatchedClasses to static, improved logging to include method names
COTL_API/CustomStructures/CustomStructurePatches.cs Changed from direct dictionary access to TryAddBrain method call
COTL_API/CustomObjectives/CustomObjectiveManager.cs Added required type parameter to PlaceStructure method signature (breaking change)
COTL_API/CustomInventory/Patches/CustomItemRefineryPatches.cs Updated Configure patch to use RefineryItem parameter instead of ITEM_TYPE
COTL_API/CustomInventory/CustomFood/Patches/CustomMealPatches.cs Changed from direct dictionary access to TryAddBrain method call
COTL_API/CustomInventory/CustomCrops/CustomCropManager.cs Added SetActive(false) to prevent unwanted prefab activation
COTL_API/CustomFollowerCommand/CustomFollowerCommandPatches.cs Added typeof(Follower) parameter to HarmonyPatch for IsAvailable method disambiguation
COTL_API.Common.props Version bumped from 0.2.13 to 0.3.0
.github/workflows/build.yml Removed unnecessary quotes from YAML path patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +173 to +174
public static CustomObjective PlaceStructure(StructureBrain.Categories category,
Objectives_PlaceStructure.DecorationType type, int target, float expireDuration)

Copilot AI Jan 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking API change. The PlaceStructure method signature has been modified to add a required parameter type of type Objectives_PlaceStructure.DecorationType between the existing category and target parameters. This will break any existing code that calls this method with the old signature. Consider overloading the method instead by keeping the old signature and having it call the new one with a default value for the type parameter to maintain backward compatibility.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gork fix issue pls no bugs

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chatgpt fix issue pls no bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API The core of this package CI Continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants