Xlinka / Project-Obsidian

Project Obsidian: A Resonite plugin adding extended Protoflux nodes and features for enhanced functionality and user experience
GNU General Public License v3.0
16 stars 6 forks source link

Fix JSON nodes, improve binding generator, add external types to AssemblyInfo.cs and mark enums as data model types #44

Closed Nytra closed 3 months ago

Nytra commented 3 months ago

Marks necessary types as data model types

Improves binding generator to use constraint clauses and generic types attribute

Fixes JSON nodes, create value and object variants of the nodes

Closes #42

Frozenreflex commented 3 months ago

I'm already redoing the Json nodes

Nytra commented 3 months ago

@Frozenreflex How are you redoing them?

Frozenreflex commented 3 months ago

@Nytra Check my branch

Nytra commented 3 months ago

@Frozenreflex I think adding the generic types attribute to the binding generator would be a good idea because then you can populate the common generic types list in the UI

Nytra commented 3 months ago

@Frozenreflex Also, you can't connect ProtoFlux value inputs to ObjectInput<T> it needs to be a ValueInput<T> that's why in my PR I split the nodes into Object and Value variants.

Frozenreflex commented 3 months ago

why do i put up with this game's bad design choices

i'd already encountered that for the outputs, but i guess i didn't test the inputs, gonna do that in a sec

Frozenreflex commented 3 months ago
public struct ObjectInput<T> : IObjectInput<T>, IInput<T>, IInput
public class ObjectOutput<T> : Output<T>, IObjectOutput<T>, IOutput<T>, IOutput
public struct ValueInput<T> : IValueInput<T>, IInput<T>, IInput where T : unmanaged
public class ValueOutput<T> : Output<T>, IValueOutput<T>, IOutput<T>, IOutput where T : unmanaged

why

also i fixed it if you want to look at it

Nytra commented 3 months ago

@Frozenreflex

Should be ValueInput<T>

https://github.com/Xlinka/Project-Obsidian/blob/f2febf40fca842713c64d5f020d0eddd55696310/ProjectObsidian/ProtoFlux/JSON/JsonInsertValueToArrayNode.cs#L20

Nytra commented 3 months ago

@Xlinka I think Frozen's branch should be merged then I will make additional PRs later