TMPE icon indicating copy to clipboard operation
TMPE copied to clipboard

support TMPE in asset editor

Open kianzarrin opened this issue 4 years ago • 26 comments

I want to support TMPE in asset editor. task break down:

  • [ ] empty records should not be saved. So I need to add IsDefault() method.
  • [ ] record TTL (depends on #967)
  • [x] record Vehicle restrictions https://github.com/CitiesSkylinesMods/TMPE/pull/966
  • [X] Load TMPE in asset editor.
  • [X] Load/Store TMPE data. should I break this into 2 reviews: Sore and Load(Each of them is a semi-big change)?

kianzarrin avatar Jun 23 '20 11:06 kianzarrin

this issue depends on #956

kianzarrin avatar Jun 23 '20 11:06 kianzarrin

Tagging #898, #672, #600, #472, #288

originalfoo avatar Jun 23 '20 11:06 originalfoo

I need to patch LoadPaths as part of this issue. that would conflict with smart intersection builder. I and strdate moved smart intersection builder migrated smart intersection builder to harmony as preparation for this: https://github.com/Strdate/SmartIntersections/pull/3

kianzarrin avatar Jun 27 '20 17:06 kianzarrin

Hi, what is your general approach for saving the data? What do you think about #288?

Strdate avatar Jun 27 '20 18:06 Strdate

Move IT dlls to test this new code. https://github.com/Quboid/CS-MoveIt/files/4805542/MoveIt.zip

kianzarrin avatar Jun 27 '20 18:06 kianzarrin

@Strdate TMPE is already compatible with MoveIT. I introduced IRecordabe class to undo/redo stuff but now it is being used as an alternative way of serialization. It basically takes a snapshot of some or all nodes/lanes/segments. I'll have a look at #288. EDIT: by the way NodeController is already supported in asset editor so I can test your load path fix with it.

kianzarrin avatar Jun 27 '20 18:06 kianzarrin

I don't know how the situation changed with Move It, but how do you want to save the state of standard workshop assets? The ids of lanes/segments is not recorded there. Maybe it is already resolved - I didn't follow the news for a while

Strdate avatar Jun 27 '20 18:06 Strdate

I use similar approach to #288 I store the IDs. But with harmony patch. I already have done that in node controller so I should only copy paste the code to TMPE. MoveIT requires transfer of rules from old segments to new segments so it is a way to smoother the learning curve

kianzarrin avatar Jun 27 '20 22:06 kianzarrin

this depends on #967

kianzarrin avatar Jun 28 '20 11:06 kianzarrin

@kianzarrin When Asset Editor support will be released? It requires https://github.com/CitiesSkylinesMods/TMPE/issues/967 to be resolved.

Monniasza avatar Jul 18 '20 09:07 Monniasza

On the next release of TMPE Labs. 967 will be done separately

On Sat, Jul 18, 2020, 12:54 Monniasza [email protected] wrote:

@kianzarrin https://github.com/kianzarrin When Asses Editor support will be released? It requires #967 https://github.com/CitiesSkylinesMods/TMPE/issues/967 to be resolved.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CitiesSkylinesMods/TMPE/issues/959#issuecomment-660458729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI7Z43NUG6WILYUOJZXCUDR4FWNPANCNFSM4OFRSL5Q .

kianzarrin avatar Jul 19 '20 10:07 kianzarrin

https://github.com/CitiesSkylinesMods/TMPE/issues/967 can be done now, because https://github.com/CitiesSkylinesMods/TMPE/pull/972 is finished.

Monniasza avatar Aug 09 '20 13:08 Monniasza

On the next release of TMPE Labs. 967 will be done separately On Sat, Jul 18, 2020, 12:54 Monniasza @.***> wrote: @kianzarrin https://github.com/kianzarrin When Asses Editor support will be released? It requires #967 <#967> to be resolved. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#959 (comment)>, or unsubscribe .

The https://github.com/CitiesSkylinesMods/TMPE/pull/990 has added TM:PE GUI to Asset Editor , so work can continue on cleaning up code.

Monniasza avatar Sep 09 '20 12:09 Monniasza

just the TTL and vehicle restrictions is remaining. VR has an open and working PR. TTL will not be done in the next release.

kianzarrin avatar Sep 09 '20 15:09 kianzarrin

@kianzarrin Would it be worth creating new issue to track the remaining tasks, so we can close this #959 as part of the 11.6.0 milestone?

originalfoo avatar Jan 19 '22 01:01 originalfoo

It's an incomplete task. We missed the milestone. Not sure opening a new issue fixes anything

kianzarrin avatar Jan 19 '22 02:01 kianzarrin

Wait I take it back. This is not for the record

kianzarrin avatar Jan 19 '22 02:01 kianzarrin

Vehicle restrictions are done. Mark them.

Monniasza avatar Jan 21 '22 14:01 Monniasza

PR #1425 will allow TTL tools to be used normally in the map/scenario editor (which are essentially save games so no requirement for "records"). LMK if that will be a problem in relation to any future plans for TTL use in asset/intersection editors.

originalfoo avatar Mar 03 '22 03:03 originalfoo

@aubergine10 what about Intersection editor and MoveIT? I don't suppose TTL record is too important but its nice to have.

kianzarrin avatar Mar 03 '22 10:03 kianzarrin

Code is a mess, I'm not sure if worth time with current data model

krzychu124 avatar Mar 03 '22 10:03 krzychu124

yep that is the reason I decided to wait until the TTL hous-keeping that would end all HouseKeeping() calls😉

kianzarrin avatar Mar 03 '22 11:03 kianzarrin

Should I remove TTL from map/scenario editor until we get chance to overhaul TTL code/UI? (literally one line of code)

lmk via #1425 if possible

originalfoo avatar Mar 03 '22 12:03 originalfoo

map scenario editor is different because it is stored in save game. for intersection editor or MoveIt we need to write code for record to do it and I can't be bothered.

kianzarrin avatar Mar 03 '22 12:03 kianzarrin

Yup, so to confirm: It's ok to leave it active in map/scenario editor, disabled in all other editors, and until TTL is rewritten at some point no integration with intersection editor or Move it.

originalfoo avatar Mar 03 '22 12:03 originalfoo

Yup, exactly that.

krzychu124 avatar Mar 03 '22 16:03 krzychu124