Commit Graph

104 Commits

Author SHA1 Message Date
izawartka
99bf1356cc Sign data retrieval and def matching improvements
+Added Sign.getPrintableSignData() which will return sign's data after the last '_' char (if exists)
+Added option to create aliases for sign definitions
*Improved sign recognition to i.e. avoid treating undefined signs like W1X as W1
2025-06-13 18:30:11 +02:00
izawartka
ab426ae9bc Signs tweaks and support improvement
+Added support for signs that do not follow the "sign_wX" naming convention, with prefab names simply being "wX"
*Fixed the offset of the W15 sign
*Changed the text of the w8_0 sign to "X"
2025-06-12 13:47:02 +02:00
izawartka
3e82d1627b New sign definitions
+Added definitions and icons for signs: W1, W13, W13a, W15, W17, W28
*Fixed text retrieval for older types of W27 and W8 signs, where the speed limit is specified in the prefab name instead of the data field
2025-06-12 13:16:53 +02:00
izawartka
871505568d SignRenderer improvements
+Added support for specifying multiple text sources for SignRenderer (in the sign definition)
+Added the ability to retrieve sign text using a function ("text": "fun" in the sign definition)
*Moved text retrieval logic to a separate function outside the SignRenderer component
2025-06-12 13:11:40 +02:00
izawartka
02ed110b4f New signal box def
+Added a definition for the signal box prefab "SignalBoxOzorkow"
2025-06-11 19:04:59 +02:00
izawartka
667190b404 A lot of new sign definitions
+Added definitions and icons for signs: W11, W11a, W11p, W27, W4, W6, W7, W8, W9, Z1
2025-06-11 19:04:04 +02:00
izawartka
ab53a57572 Added SignTextRenderer and sign data pasing
+Added SignTextRenderer, which can display additional text on signs, such as speed limit values
+The last value of a sign entry is stored as data and, depending on the entry in DefinedSigns, it can be used to determine the text shown by the SignTextRenderer
2025-06-11 19:02:53 +02:00
izawartka
4c5f3f3839 Switch invalid radius fix
*Fixed switch model "Rz 60E1-500-1_12 R" definition having inverted radius
2025-06-11 11:06:19 +02:00
izawartka
e023d6c9ff Added track max speed color mode
+Added an option to color the tracks based on their max speed
2025-06-11 11:05:39 +02:00
izawartka
2e38241fb3 Added W6 signs defs
+Added definitions and icons for signs: W6, W6a, W6b
+Added an option to use non-square sign icons
*Imrpoved W5 sign icon
2025-06-11 10:55:07 +02:00
izawartka
65601978e4 Minor code bugfixes and tweaks
+Added option to disable loging the scenery model after parsing is finished
*Fixed missing def field declarations in SignalBox and Switch classes
*Fixed found switch def not being saved in the Switch object
2025-06-10 22:37:49 +02:00
izawartka
95317798e5 Added signs layer
+Added SignRenderer and sign parsing. For now only the W5 sign is defined
2025-06-10 22:35:46 +02:00
izawartka
2408fda0c9 Added scenery info dialog
+Added "Scenery info" dialog
*Fixed parsed scenery info not being assigned to the scenery object
2025-06-10 19:07:46 +02:00
izawartka
b37937c658 New signal boxes defs
+Added definitions for signal boxes SignalBoxZdroje and SignalBoxRegalica
2025-06-09 22:39:43 +02:00
izawartka
c56f471d65 Added scenery loaded dialog
+Added a dialog shown after scenery parsing is complete, displaying whether any warnings/errors occurred and, if so, showing the parser logs
*Improved parser's error handling
*Fixed a typo in the switch parsing related warning
2025-06-09 22:38:49 +02:00
izawartka
9419f613be Made some more sc entry types ignored
*Made some more scenery entry types ignored so they dont throw useless warnings
2025-06-09 22:32:35 +02:00
izawartka
bf897ba49f Tweaked localization list style
*Tweaked localization list style
2025-06-09 22:28:44 +02:00
izawartka
cddc76bc1d Added dialogs support
+Added DialogManager and dialogService, which make it easy to display even complex message boxes and dialogs
2025-06-09 15:45:02 +02:00
izawartka
51693b7e0e Style improvements vol2
*Tweaked some more CSS to match the style with the Sceneriomat project
2025-06-09 15:41:18 +02:00
izawartka
a5c74a15cc Improved styling
+Added an icon for the side menu toggle
+Added side menu opening animation
*Refreshed some CSS
2025-06-09 14:53:51 +02:00
izawartka
6ba732b304 Added SceneryInfo parsing
+Added scv (SceneryInfo) block parser and scenery format version check. If the block is invalid, an error is thrown, if the version is not 29, a warning is logged
+Added errors to SceneryParserLog
2025-06-09 14:32:38 +02:00
izawartka
6a9cba7630 More switches and signal boxes defs
+Added new signal boxes definitions:
    SignalBoxJaworzno
    SignalBox01
    SignalBox01_e
    SignalBoxGdanskG
    SignalBoxSwKatarzyna
    SignalBoxPrzyworyOpolskie2
    SignalBox_lka_nastawnia_leczyca
+Added new switches definitions
    Rkp 60E1-190-1_9 ba
    Rld 60E1-2500_1200-1_22 R / L
    Rld 60E1-600_300-1_9 R R / L
    Rz 60E1-205-1_9 R / L
    Rld 60E1-1200_600-1_15 R / L
2025-06-09 01:06:58 +02:00
izawartka
18e3056c45 Signalboxes and signals recognition bugfix
*Fixed scp.py removing signal boxes with no name
*Fixed the parser skipping mechanical signals
*Improved loading speed of unoptimized .sc files by throwing less unknownObjectType warnings
2025-06-09 01:04:38 +02:00
izawartka
0aafbe6960 Added new auto switches logging
+Added an option in the Constants to log new automatically resolved switch definitions
2025-06-08 23:01:20 +02:00
izawartka
606f4a3a5f New switches and signal boxes defs
+Added definitions for switches:
    Rld 60E1-700_300-1_10 R / L
    Rlj 60E1-650_190-1_20 R / L
+Added definitions for signal boxes:
    SignalBox_lka_nastawnia_zgierz
    SignalBox_lka_nastawnia_zgierz_Zg1
2025-06-08 22:59:17 +02:00
izawartka
ea23a691bf Made tracks more visible at smaller scales
*Made all tracks at least 1px wide, even at small scales, which improves their visibility
2025-06-08 13:34:40 +02:00
izawartka
c6d4629a34 Fixed skp signal box icon priority
*Fixed skp signal box icon having higher priority over empty
*Moved signal box icon choice to other function
2025-06-08 13:00:24 +02:00
izawartka
7ec6af8c41 Needless rerenders fix
*Fixed needless rerenders of LayersMenu, SceneryLayer, SceneryRoot and TrackRenderer components when settings change
2025-06-08 12:51:40 +02:00
izawartka
c46500ded1 Signal names bugfix
*[size] tags no longer cause signal names to be cut off halfway
2025-06-07 00:39:08 +02:00
izawartka
553f78a7e1 Improved signal boxes
+Added separate icons for different types of signal boxes (standard, empty, skp, unknown)
*Signal boxes names no longer include [] and <> tags
*SignaBoxes are now a seperate class, not part of the Misc class
*Rotations of signal boxes are now more accurate
2025-06-07 00:36:56 +02:00
izawartka
f95a38f96c Invisible tracks indication
+Added prefab_name field in the Track class and track_prefab_name in the Switch class
*Invisible tracks are now drawn in gray instead of being completely skipped
2025-06-04 14:13:33 +02:00
izawartka
519ed7aa1d Fixed track connections
*Fixed most of the tracks being connected in reverse
2025-06-03 19:05:03 +02:00
izawartka
971003b1f2 Improved signal names
*Once again improved and bugfixed Signal.getPrintableSignalName()
2025-06-03 18:17:55 +02:00
izawartka
9b49f4dc73 Added defined switches, fixed bugs
+Added pre-defined switches so they dont have to be generated. Unrecognised switches models are still automatically resolved and their new definitions are saved for later use
+Added .multiply, .toPrecission and .rotate functions in the Vector3 class
*Improved switches to normal tracks connections
*Improved switches-related error handling
2025-06-03 18:17:09 +02:00
izawartka
6d4aef606a Duplicated isolation name bugfix
*Fixed duplicated isolation names being rendered on switches
2025-06-02 22:46:07 +02:00
izawartka
df19b92bb2 Increased switch names font size
*Increased switch names font size
2025-06-02 21:20:59 +02:00
izawartka
ad628207ab TrackObjectRenderer and Signal bugfixes
*Fixed track objects having too small hover area
*Fixed track objects names not being centered
*Removed unneccessary '\' from Signal.getPrintableSignalName causing a warning
2025-06-02 21:10:10 +02:00
izawartka
25a3b278d0 Added localizations list
+Added a list of spawn signals and signal boxes allowing to quickly center the view on them
+Added arrays of all signalBoxes and spawnSignals in the Scenery class
2025-06-02 21:01:46 +02:00
izawartka
1ee0c7b9f4 Fixed signal names
*Fixed Signal.getPrintableSignalName() sometimes outputing empty string
*Fixed signalWithoutSpawnInfo warning never showing
2025-06-02 20:59:33 +02:00
izawartka
fe7add450e Added ZoomPan hook, fixed overflow
+Added useZoomPanEmitter hook allowing to move the view to specified location
*Fixed ZoomPanWrapper overflowing in height
2025-06-02 20:57:32 +02:00
izawartka
7f279bf35d Added SignalBoxes, fixed bugs
+Added Misc objects parser
+Added SignalBoxRenderer
*Fixed Switch and TrackObject double apply protection
*Updated scp.py to not exclude Signalboxes
2025-06-01 17:45:18 +02:00
izawartka
0b77a5a782 Tracks color indication, slope calculations
+Added option to color the tracks by type or their slope
*Slightly refactored TrackRenderer component
*Fixed points calculations in StandardTrack to include track's slope
2025-06-01 14:36:42 +02:00
izawartka
5c631c071b Minor angles related tweaks & fixes
+Added AngleHelper
*Signals names are no longer always rendered horizontally
*Fixed a minor rendering bug accuring when routes were rotated at exactly 180 deg
*Fixed PointTrack rot field being in radians instead of degrees
2025-06-01 02:15:16 +02:00
izawartka
b76752e40d Added Vector3 class, code cleanup
+Added Vector3 class and replaced all position and angle values with it to clean up the code
*Minor bugfixes and code cleanup
2025-06-01 01:54:26 +02:00
izawartka
b952b9c26d Added SceneryParserLog
+Added SceneryParserLog class that filters warning messages
2025-06-01 00:47:23 +02:00
izawartka
24b05c95c8 Added XYZ rotation fields to SceneryObject
+Added rx, ry, rz fields to SceneryObject class
*Modified all classes inheriting from SceneryObject to use its rotation fields instead of own "rot" field
2025-06-01 00:30:02 +02:00
izawartka
0569b79339 Fixed route arrow position
*Fixed route arrow not always being centered
2025-05-30 19:23:38 +02:00
izawartka
32a1d95ba2 Bugfixes
*Fixed route names not being rendered correctly on single track routes
*Separated scenery layers rendering from SceneryRoot to SceneryLayer component
*Fixed TrackObjects not always being correctly recognised as Signals
*Fixed getPrintableSignalName not working with the old Signal syntax
2025-05-30 19:13:28 +02:00
izawartka
b7f9d80045 RouteRenderer, code tweaks
+Added Route class
+Added RouteRenderer
*Parts of the map rendered by different renderers are now separated into <g> groups
*Fixed signals not being parsed correctly
2025-05-30 18:58:20 +02:00
izawartka
06dd81eec6 SignalRenderer, minor tweaks
+Added Signal class
+Added SignalRenderer
*Isolations IDs are no longer shown by default
*Switches names are now light blue instead of white
2025-05-30 18:55:36 +02:00