Serana, on 02 January 2022 - 07:10 PM, said:
Until now, for the French TCS scripts, updating has not been a problem: since I started creating the French TCS script, I regularly made updates to the scripts (39 versions since the creation).
Each time, I updated a topic on the ActivitySimulatorWorld forum (the French MSTS/OR community forum) to indicate that a new version was published, with a change log and a link to the ZIP file on Github. I extremely rarely have people mentionning problems during an update.
What about content created using one of your scripts?
Do you honestly expect every single user of derivative content to keep it up to date?
I do not.
Serana, on 02 January 2022 - 07:10 PM, said:
For the future, I am thinking of creating an updater... but the best way would be to have a package manager in Open Rails based on a Github repository (containing only metadata in JSON format which will refer to the real download website).
But that would mean we would have to manage a content metadata repository... or to give write access to trusted maintainers (for example, the manager of a OR content website that we trust).
At that point it might as well be part of Open Rails itself.
roeter, on 03 January 2022 - 12:38 AM, said:
In the call to the TCS scripts, the variable 'locomotive' (type MSTSLocomotive) is passed as parameter. This provides direct access from within the script to all data in that class. But MSTSLocomotive is a child of MSTSWagon, and through MSTSWagon there is access to Train, and through train to Signals.
gpz, on 03 January 2022 - 01:53 AM, said:
This function is a huge mistake!!!
Yes, adding access to anything beyond the scripting interface data structures is a
monumentally bad idea for the reasons Rob listed. This should never have happened and I am very disappointed by it.
gpz, on 03 January 2022 - 01:53 AM, said:
EDIT: I created a
PR of it, I would like it to be merged ASAP. (It must have been done before v1.4 release actually.)
Thanks so much for doing this, but please can you rebase this onto "release/1.4" and target that branch in the PR, so that we can do 1.4.1 containing this?
cesarbl, on 03 January 2022 - 02:24 AM, said:
I've had a look to publicly available TCS scripts and almost all of them use the Locomotive() function, so removing it would cause ALL of them to stop working. Taking into account that those scripts only do simple calls (reading and writing controller values), maybe an empty hook with the used functions can be created so at least the scripts compile. I don't believe it is nice towards users that every TCS script stops working.
I think it would be valuable if there are a few common things scripts are doing with their Locomotive access. We cannot get everything, and should not even try, because there will be many unknown things broken when we fix this monumentally bad idea.
Csantucci, on 03 January 2022 - 03:33 AM, said:
I've just modified and uploaded all my scripts, in order not to use Locomotive() (I had already removed almost all references). But as I'm against removing that hook, I leave to someone other the responsibility to decide to remove it and to perform the action, and, as already stated, I will keep it in ORNYMG.
Thank you for updating your scripts!
I am very disappointed that you cannot see why this is such a monumentally bad idea in a scripting interface, though.