RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 178 forks source link

Script func coding style fix #3019

Closed ohlidalp closed 1 year ago

ohlidalp commented 1 year ago

It just struck me that the freshly introduced GenericDocumentClass and GenericDocReaderClass script objects use PascalCaseFuncNames(), while all other script objects use camelCaseFuncNames(). I rushed to fix this flaw until the objects gain wider use. The 'demo_script.as' which showcases them was also updated.

It also turned out docs for VehicleAIClass are wrong - they showed PascalCaseFuncs() while the bindings actually had camelCaseFuncs(). I fixed a great number of quirks, mistakes, typos and omissions in both the source and docs - see the commit msg for the boring details. And while at it, I also upgraded VehicleAI to RefCountingObjects<> to fix the broken reference counting.

UPDATE: The last non-conforming object was LocalStorage - technically it was working (I think), but overly complicated. I upgraded it to RefCountingObjects<> for consistency and took the opportunity to rename it to LocalStorageClass - now all the objects are consistent. The 'races.as' script which uses it was updated.

Summary of changes: