Elvas Tower: Suggestion: new "include" parameter - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Suggestion: new "include" parameter Rate Topic: -----

#21 User is offline   lucstef 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 05 November 2022 - 02:50 PM

Some more testing done, nothing to report.
Or better yes, one more thing: it works in .trk files too, but I guess you were expecting that :)


Luca

#22 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 06 November 2022 - 02:30 AM

That's good.
I have now created a PR for the official OR, and the modification should be available in about half an hour in the Unstable release. It will available in next ORNYMG release too.

#23 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 10 November 2022 - 10:45 AM

View PostCsantucci, on 05 November 2022 - 03:28 AM, said:

I also felt the inconvenience that you describe in the first post. So, I checked the OR code and noticed that, merely adding two lines of code, your desire can be fulfilled. i attach here a patch for ORNYMG 133: inserting the 2 patch files in ORNYMG, following feature is present: if the include line is as follows:
include ( ../##SameName## )


Thanks for implementing this feature, Carlo!

However, I am concerned with the character "#" chosen to delimit it, since that is also the start of a comment in Simis text files, and the example given may get parsed wrong in the future (e.g. fixing a MSTS comment parsing bug might break this feature)

Some alternatives that are less likely to have issues:

>>SameName<<
[[SameName]]

Otherwise, looks good :)

#24 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 03:25 AM

Thanks, James.
I replaced the characters in the PR. Now
include ( ../>>SameName<< )

is used.

#25 User is offline   lucstef 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 12 November 2022 - 03:55 AM

Just to clear any misunderstanding:
the old ##SameName## is now >>SameName<< (capitalizations included)??

(Ok not in the patch you attached before, we will see it in the new ORNYMG version and hopefully in the incoming OR 1.5, right?)


P.S. - I hate, HATE when a big name as Logitech makes an almost perfect gaming mech keyboard like the G915 and there's no italian layout, so I have to change the system language and hunt for the right keys to type < and >..........


Luca

#26 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 07:00 AM

Answer to your first question is yes.
You will see this in next ORNYMG version, you see it already in Unstable Release U2022.11.12-1121, it's unlikely that you will see it in incoming stable OR1.5, although I have nothing against it.

#27 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,000
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 12 November 2022 - 10:23 AM

Unfortunately
include ( ../>>SameName<< )

crashes OR in Path.GetFileName().
I have tested
include ( ../[[SameName]] )

and it works.
So I'll change again the code.

#28 User is offline   lucstef 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 29
  • Joined: 22-August 14
  • Simulator:OR-MSTS
  • Country:

Posted 20 November 2022 - 04:11 AM

EDIT:

Nevermind, sleepy brain mixing up, I was using the wrong install path..... :sorry:



Hi Carlo.

What's the syntax now on ver.134?
##SameName## doesn't work, neither does >>SameName<< nor [[SameName]], what am I missing?

Thanks.


Luca

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users