You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/File Names and Paths.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ And these are all the vaguely relevant folders of Metrostroi!
27
27
``cl_init.lua`` and ``init.lua`` and ``shared.lua``
28
28
These are the main files of your entity.
29
29
30
-
``cl_init`` is executed only on the client and is responsible for client-side things, like sounds, drawing and animating props, drawing certain kinds of lights (TODO: is it flares or the other kind?), button arrays (called "panels") and corresponding buttons and anything to do with presenting the player the train, but not simulating its *inner* workings.
30
+
``cl_init`` is executed only on the client and is responsible for client-side things, like sounds, drawing and animating props, drawing lights , button arrays (called "panels") and corresponding buttons and anything to do with presenting the player the train, but not simulating its *inner* workings.
31
31
32
32
``init.lua`` is executed only on the server and represents part of the inner workings of the train. Not *all* of the inner workings as Metrostroi tries to be modular in its approach. Certain components are outsourced into system files, in order to speed up their processing with Turbostroi (citation needed), and to allow for different trains to share the same component and save on scripting said part redundantly.
33
33
Some of its functions include spawning the driver's seat, drawing lights, commanding the bogies according to whatever traction simulation setup there is (that's up to you to write), etc. If multiple system files are used, you could say it brings all the different systems together.
@@ -38,4 +38,4 @@ In our case, it contains definitions for the standing area for passengers, door
38
38
39
39
40
40
``sys_***.lua``
41
-
This is the file that simulates a certain system that you define. Whether that be a simulation of a battery, air horn, a group of circuits for whatever function you think needs to be accelerated by Turbostroi (but not necessary; you can define whether your system to be accelerated by Turbostroi or not by supplying 'DONTACCELERATESIMULATION == true' flag at the beginning of the file), etc. I recommend looking at the files that come with Metrostroi, to get a sense of what range of things have been implemented in this file.
41
+
This is the file that simulates a certain system that you define. Whether that be a simulation of a battery, air horn, a group of circuits for whatever function you think needs to be accelerated by Turbostroi (but not necessary; you can define whether your system to be accelerated by Turbostroi or not by supplying 'TRAIN_SYSTEM.DontAccelerateSimulation = true' flag at the beginning of the file), etc. I recommend looking at the files that come with Metrostroi, to get a sense of what range of things have been implemented in this file Project Light Rail has proceeded to put most core train logic into the systems file, while minor but still important things are kept in the init.lua file. The design considerations of this are up to you. A systems file is more easily swapped out than a full entity script, allowing for quicker overhauls.
0 commit comments