Skip to content

Commit c9e12dc

Browse files
authored
Update File Names and Paths.md
1 parent ac153e4 commit c9e12dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wiki/File Names and Paths.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ And these are all the vaguely relevant folders of Metrostroi!
2727
``cl_init.lua`` and ``init.lua`` and ``shared.lua``
2828
These are the main files of your entity.
2929

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.
3131

3232
``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.
3333
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
3838

3939

4040
``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

Comments
 (0)