Skip to content

Prefab patching - #52

Open
jan-bures wants to merge 17 commits into
devfrom
modding/prefab-patching
Open

Prefab patching#52
jan-bures wants to merge 17 commits into
devfrom
modding/prefab-patching

Conversation

@jan-bures

Copy link
Copy Markdown
Collaborator

Adds support for declarative prefab patching, enabling mods to modify addressable prefabs using visual authoring, C#, and Lua. It adds new authoring APIs, integrates prefab patch plan resolution into the loading flow, and improves runtime diagnostics and cache handling. The documentation is expanded with a new guide on prefab patching.

@cheese3660 cheese3660 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm noticing a lot of missing documentation and stuff that is a bit unwieldly in general - plus I flagged some duplicate logic

I will likely go over all this in more depth again but this is the surface level stuff I've found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmmm - we now have 2 different things that hold the Needs/Conflicts/Etc.. set and we are duplicating the logic here for some reason, I think that it should be deduplicated or extracted to a common interface

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Alright - this is a really large model and would benefit with describing how it works and documentation comments on the methods and fields and what not

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same as before - I think it needs more documentation, only class level documentation is not our style, I'd prefer for the entirety of this prefab patching surface to fit our documentation requirements, if not such that I can more easily understand the model

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same documentation concerns as previously mentioned

} while (changed);
}

private static List<PrefabPatchManifest> Order(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A lot of the dependency ordering here should be extracted out, I don't particularly like reading a triple nested for loop

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Repeating doc comments concerns again here

reject
);

public static void DiscoverAndResolve(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This method seems to be getting a bit unwieldly

return _locator;
}

internal static bool TryProvide(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same with this one

Comment thread PREFAB_PATCHING.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we don't need this here - nobody will read the documentation here

This needs to go on the modding docs page - and be elaborated upon more like how the other patch manager docs are

Comment thread README.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again - why split the docs here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants