Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Download the artifacts for this pull request: |
inshallah this will fix it
I MOVED THE THING BY ACCIDENT AND IT BROKE
There was a problem hiding this comment.
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
TryAddBrainmethod for better encapsulation - Added breaking change to
PlaceStructuremethod signature with new requiredtypeparameter - 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.
| public static CustomObjective PlaceStructure(StructureBrain.Categories category, | ||
| Objectives_PlaceStructure.DecorationType type, int target, float expireDuration) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
gork fix issue pls no bugs
There was a problem hiding this comment.
chatgpt fix issue pls no bugs
No description provided.