Multiplayer icon indicating copy to clipboard operation
Multiplayer copied to clipboard

Sync Dialog_BillConfig target item style change

Open SokyranTheDragon opened this issue 2 years ago • 4 comments

The feature is only available with Ideology DLC active while the ideo system is disabled.

All of the prefixed methods could be turned into sync methods/delegates, but it would require making a sync worker for Dialog_BillConfig or making an instance/field transformer for it, so it seemed using sync fields would end up simpler.

SokyranTheDragon avatar Nov 20 '23 15:11 SokyranTheDragon

Neither this nor SyncMethods work well here I think. I don't like that this solution uses compiler-generated names.

The best solution would be to have some sort of a general system where you can make lambdas created in a given method (or just FloatMenu lambdas?) inherit/remember the SyncField context.

Zetrith avatar Nov 20 '23 16:11 Zetrith

Yeah, I agree. I was rather unhappy that I had to end up using compiler-generated names, but couldn't really come up with an alternative that felt as good.

If we want to avoid using compiler-generated names while also not having to create any new systems, then I believe using SyncMethods/Delegates could work here if we made a SyncWorker for Dialog_BillConfig. The only reason I used those fields by name was to access Dialog_BillConfig.bill which, if we made a SyncWorker, would not longer be needed.

And as for creating some system to handle situations like those... Well, I tend to over-complicate stuff like that, so I'm not sure if I should attempt to take care of it.

SokyranTheDragon avatar Nov 21 '23 00:11 SokyranTheDragon

Actually, I have an idea on how to (potentially) handle this... @Zetrith what do you think about making an overload for SyncDelegate.TransformField, but instead of working on specific fields by name - they'd apply to fields of specific type?

SokyranTheDragon avatar Nov 26 '23 01:11 SokyranTheDragon

I'll try implementing the general solution I mentioned.

Zetrith avatar Apr 16 '24 19:04 Zetrith