-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new UIExtender replcaed with UIExtender.Create
Added the ability to disable specific Prefabs and Mixins Added the ability to deregister UIExtender Added the ability to get another mods UIExtender Updated PUML diagrams
- Loading branch information
Showing
109 changed files
with
3,877 additions
and
3,667 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,18 +1,18 @@ | ||
@startuml | ||
|
||
SubModule --* UIExtender | ||
SubModule --* ViewModelMixinClasses | ||
SubModule --* PrefabExtensionClasses | ||
!include ViewModelMixin.puml | ||
!include Prefab.puml | ||
|
||
class ViewModelMixinClasses { | ||
[ViewModelMixin] | ||
} | ||
SubModule --* UIExtenderEx | ||
UIExtenderEx --* UIExtenderExRuntime | ||
UIExtenderExRuntime --* ViewModelComponent | ||
UIExtenderExRuntime --* PrefabComponent | ||
|
||
class PrefabExtensionClasses { | ||
[PrefabExtension("Movie", "XPath")] | ||
} | ||
ViewModelComponent ..|> MyVMMixin : Uses | ||
PrefabComponent ..|> MyPrefabComponent : Uses | ||
|
||
ViewModelMixinClasses --|> BaseViewModelMixin | ||
PrefabExtensionClasses --|> IPrefabExtension | ||
class SubModule { | ||
UIExtenderEx _uiExtenderEx = UIExtenderEx.Create("MyMod"); | ||
} | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,53 @@ | ||
@startuml | ||
|
||
MyPrefabComponent --* v2.PrefabExtensionInsertPatch | ||
MyPrefabComponent --* v2.PrefabExtensionSetAttributePatch | ||
MyPrefabComponent --* v1.CustomPatch | ||
MyPrefabComponent --* v1.InsertPatch | ||
MyPrefabComponent --* v1.PrefabExtensionInsertAsSiblingPatch | ||
MyPrefabComponent --* v1.PrefabExtensionReplacePatch | ||
MyPrefabComponent --* v1.PrefabExtensionSetAttributePatch | ||
v1.CustomPatch --* v1.IPrefabPatch | ||
v1.InsertPatch --* v1.IPrefabPatch | ||
v1.PrefabExtensionInsertAsSiblingPatch --* v1.IPrefabPatch | ||
v1.PrefabExtensionReplacePatch --* v1.IPrefabPatch | ||
v1.PrefabExtensionSetAttributePatch --* v1.IPrefabPatch | ||
|
||
class MyPrefabComponent { | ||
[PrefabExtension("Movie", "XPath")] | ||
} | ||
abstract class v2.PrefabExtensionInsertPatch { | ||
+ {abstract} InsertType Type | ||
+ {abstract} int Index | ||
} | ||
abstract class v2.PrefabExtensionSetAttributePatch { | ||
+ {abstract} List<Attribute> Attributes | ||
} | ||
abstract class v1.CustomPatch<T> { | ||
+ {abstract} string Id | ||
+ {abstract} void Apply(T obj) | ||
} | ||
abstract class v1.InsertPatch { | ||
+ {abstract} string Id | ||
+ {abstract} int Position | ||
+ {abstract} XmlDocument GetPrefabExtension() | ||
} | ||
abstract class v1.PrefabExtensionInsertAsSiblingPatch { | ||
+ {abstract} string Id | ||
+ {abstract} InsertType Type | ||
+ {abstract} XmlDocument GetPrefabExtension() | ||
} | ||
abstract class v1.PrefabExtensionReplacePatch { | ||
+ {abstract} string Id | ||
+ {abstract} XmlDocument GetPrefabExtension() | ||
} | ||
abstract class v1.PrefabExtensionSetAttributePatch { | ||
+ {abstract} string Id | ||
+ {abstract} string Attribute | ||
+ {abstract} string Value | ||
} | ||
interface v1.IPrefabPatch { | ||
+ string Id | ||
} | ||
|
||
@enduml |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 +1,25 @@ | ||
@startuml | ||
class BaseViewModelMixin<T: ViewModel> { | ||
|
||
} | ||
|
||
interface IViewModelMixin { | ||
MyVMMixin --* BaseViewModelMixin | ||
BaseViewModelMixin --* IViewModel | ||
|
||
class MyVMMixin { | ||
[ViewModelMixin] | ||
} | ||
abstract class BaseViewModelMixin<TViewModel> { | ||
# TViewModel? ViewModel | ||
+ BaseViewModelMixin(TViewModel vm) | ||
+ void OnRefresh() | ||
+ void OnFinalize() | ||
# void OnPropertyChanged(string? propertyName = null) | ||
# void OnPropertyChangedWithValue(object value, string? propertyName = null) | ||
# TValue? GetPrivate<TValue>(string name) | ||
# void SetPrivate<TValue>(string name, TValue? value) | ||
# bool SetField<T>(ref T field, T value, string propertyName) | ||
} | ||
interface IViewModel { | ||
+ void OnRefresh() | ||
+ void OnFinalize() | ||
} | ||
|
||
BaseViewModelMixin --|> IViewModelMixin | ||
|
||
@enduml |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 +1,25 @@ | ||
@startuml | ||
loop for each Patch | ||
CodePatcher -> Patch: apply with Harmony | ||
alt widget load patch transpiler | ||
Patch -> Patch: find marks of existing patch | ||
alt existing patch found | ||
Patch -> Patch: replace existing call with new DynamicMethod\nwhich calls both both previous and current `ProcessMovieDocumentIfNeeded` | ||
else otherwise | ||
Patch -> Patch: replace beginning of method with mark,\ncall to `LoadXmlDocument` and `ProcessMovieDocumentIfNeeded` | ||
end | ||
else otherwise | ||
note over Patch | ||
See `VMPatching` diagram. | ||
endnote | ||
end | ||
|
||
actor Game | ||
|
||
Game -> SubModule: OnBeforeInitialModuleScreenSetAsRoot() | ||
SubModule -> UIExtender: Register() | ||
UIExtender -> PrefabComponent: Register(Type[] prefabTypes) | ||
PrefabComponent --> UIExtender | ||
UIExtender --> SubModule | ||
SubModule --> Game | ||
|
||
... | ||
|
||
Game -> WidgetPrefab: LoadFrom() | ||
WidgetPrefab -> WidgetPrefabPatch: Harmony intercepts LoadFrom() | ||
WidgetPrefabPatch -> PrefabComponent: ProcessMovieIfNeeded() | ||
loop All registered Prefab | ||
PrefabComponent -> Prefab: Apply XML transformation | ||
Prefab --> PrefabComponent | ||
end | ||
PrefabComponent --> WidgetPrefabPatch | ||
WidgetPrefabPatch --> WidgetPrefab | ||
WidgetPrefab --> Game | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file not shown.
Oops, something went wrong.