Graph hopping, Part I

- Cannot send train off while still in assembly mode
- Missing shafts in bogey render
- Moving to Lang keys
- Fix diagonal bends using weird constraints
- Cannot assemble tracks and stations on contraptions
- Track placement now helpful with 45° slope tracks
- Stations on Diagonal tracks can now be navigated to
- Stations no longer crash when target track missing
- Reduced Trackpropagator network traffic
- Stations now migrate to newly created trackgraphs/edges when network changes
- Stations now distribute properly to trackgraph segments that got split apart
- Client thread no longer creates stations
This commit is contained in:
simibubi 2022-02-02 01:21:28 +01:00
parent 576d00d3a0
commit c6278dbd24
42 changed files with 824 additions and 189 deletions

View file

@ -535,22 +535,22 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
6801fa1f466f172700e573e5b8ee8ee5f9ca4583 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
edf2d5f68bb6fc51fb2a1614c42b2b788fd857e2 assets/create/lang/en_ud.json
1b63bdac0063bbc60ef3c93d8b3f97f40d648ee6 assets/create/lang/en_us.json
9f10830c508416004fe2a745eda7e3b4adf10cf8 assets/create/lang/unfinished/de_de.json
9f83f6ce12ee18acfb3c29591ff79adb4986d1d6 assets/create/lang/unfinished/es_cl.json
58885e0c74b14a186d70b2f5167dfee36a7fbb51 assets/create/lang/unfinished/es_es.json
a0f9aec0a4072fda5fd3768003b8b1038be90bb6 assets/create/lang/unfinished/fr_fr.json
6eae75c25b1c10433d8a14d68a90454a2f2f3f6a assets/create/lang/unfinished/it_it.json
66f7cc9e7976f4c917f4b489878c5ee658ab64a0 assets/create/lang/unfinished/ja_jp.json
775a183ea22a2e209d6c7e752c5b0ae438c1d893 assets/create/lang/unfinished/ko_kr.json
40dbedf8545dd976f6f84eb62ef621d399e7bdea assets/create/lang/unfinished/nl_nl.json
3e7f5a1530cc7fd429229150fb956a2357647542 assets/create/lang/unfinished/pl_pl.json
4aa73bd608ae220216abd601b6875ad5bf16974d assets/create/lang/unfinished/pt_br.json
81e4b0e807cd1754c4c3a05c2797f9a1e78ab757 assets/create/lang/unfinished/pt_pt.json
434eea7907c9b816c293f24172d7424747b4c7b8 assets/create/lang/unfinished/ru_ru.json
82d92da2a6e4cab32086f8872387f8a723294d13 assets/create/lang/unfinished/zh_cn.json
3813edf0e800083810ea4d51af2faa5d81ac7a98 assets/create/lang/unfinished/zh_tw.json
9ffe5b3f8a39fa3c3a97a3c534bd82402177e82e assets/create/lang/en_ud.json
598112fe2d8be421bcf59e6a8556bef9d3f4e4a8 assets/create/lang/en_us.json
87bb8a47a6c898a99edd844bd3979e4100ca0a1e assets/create/lang/unfinished/de_de.json
daafd483d3956a6aacbc2be0048f26b6e3a52a70 assets/create/lang/unfinished/es_cl.json
4fe5d252e956a8ff0a76894137ee01e0303b7d6c assets/create/lang/unfinished/es_es.json
04e435c040a92e4929814517aebfcc8c92894afa assets/create/lang/unfinished/fr_fr.json
6729147b1f5400e514074ad49aad7c4b455925df assets/create/lang/unfinished/it_it.json
bab9ab05b5471ec5bdd156fd5f52c8201cbba177 assets/create/lang/unfinished/ja_jp.json
1807ffcdb033abb2fdab909bcfce3eff809028ee assets/create/lang/unfinished/ko_kr.json
b1f7fbadbc6bc9fda89e15d5ddd66e64af6b24bb assets/create/lang/unfinished/nl_nl.json
63f1c7fefca142c0635573460db1a151c04a38f4 assets/create/lang/unfinished/pl_pl.json
b24b3f5727d648589fede0773797829bbddef6c6 assets/create/lang/unfinished/pt_br.json
b0d0e10dee566e3ccb9323f2c3643ce3f731b8fb assets/create/lang/unfinished/pt_pt.json
1f86af12c35ed0396e213e51febc32b796a74830 assets/create/lang/unfinished/ru_ru.json
7e8a2165ad27a033ec2d85ec5e4818a3b97ec98e assets/create/lang/unfinished/zh_cn.json
1876f4adf2c478ad28fcb10b9ff0c9a56291f5b5 assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -480,8 +480,8 @@
"block.create.stressometer": "\u0279\u01DD\u0287\u01DD\u026Foss\u01DD\u0279\u0287S",
"block.create.tiled_glass": "ss\u0250\u05DF\u2141 p\u01DD\u05DF\u0131\u27D8",
"block.create.tiled_glass_pane": "\u01DDu\u0250\u0500 ss\u0250\u05DF\u2141 p\u01DD\u05DF\u0131\u27D8",
"block.create.track": "\u029E\u0254\u0250\u0279\u27D8",
"block.create.track_station": "uo\u0131\u0287\u0250\u0287S \u029E\u0254\u0250\u0279\u27D8",
"block.create.track": "\u029E\u0254\u0250\u0279\u27D8 u\u0131\u0250\u0279\u27D8",
"block.create.track_station": "uo\u0131\u0287\u0250\u0287S u\u0131\u0250\u0279\u27D8",
"block.create.tuff_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u025F\u025Fn\u27D8",
"block.create.turntable": "\u01DD\u05DFq\u0250\u0287u\u0279n\u27D8",
"block.create.veridium": "\u026Fn\u0131p\u0131\u0279\u01DD\u039B",
@ -615,7 +615,7 @@
"item.create.refined_radiance": "\u01DD\u0254u\u0250\u0131p\u0250\u1D1A p\u01DDu\u0131\u025F\u01DD\u1D1A",
"item.create.rose_quartz": "z\u0287\u0279\u0250n\u1F49 \u01DDso\u1D1A",
"item.create.sand_paper": "\u0279\u01DDd\u0250\u0500 pu\u0250S",
"item.create.schedule": "\u01DD\u05DFnp\u01DD\u0265\u0254S",
"item.create.schedule": "\u01DD\u05DFnp\u01DD\u0265\u0254S u\u0131\u0250\u0279\u27D8",
"item.create.schematic": "\u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S",
"item.create.schematic_and_quill": "\u05DF\u05DF\u0131n\u1F49 pu\u2C6F \u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S",
"item.create.shadow_steel": "\u05DF\u01DD\u01DD\u0287S \u028Dop\u0250\u0265S",

View file

@ -483,8 +483,8 @@
"block.create.stressometer": "Stressometer",
"block.create.tiled_glass": "Tiled Glass",
"block.create.tiled_glass_pane": "Tiled Glass Pane",
"block.create.track": "Track",
"block.create.track_station": "Track Station",
"block.create.track": "Train Track",
"block.create.track_station": "Train Station",
"block.create.tuff_pillar": "Tuff Pillar",
"block.create.turntable": "Turntable",
"block.create.veridium": "Veridium",
@ -622,7 +622,7 @@
"item.create.refined_radiance": "Refined Radiance",
"item.create.rose_quartz": "Rose Quartz",
"item.create.sand_paper": "Sand Paper",
"item.create.schedule": "Schedule",
"item.create.schedule": "Train Schedule",
"item.create.schematic": "Schematic",
"item.create.schematic_and_quill": "Schematic And Quill",
"item.create.shadow_steel": "Shadow Steel",
@ -1373,6 +1373,35 @@
"create.schedule.loop": "Loop Forever",
"create.schedule.loop1": "Schedule starts over",
"create.schedule.loop2": "when completed",
"create.schedule.train_still_assembling": "Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "Selection Cleared",
"create.track.valid_connection": "Can Connect ✔",
"create.track.second_point": "Place track or select a second point",
"create.track.too_far": "Too far away",
"create.track.original_missing": "Original block removed, Sneak-click to reset",
"create.track.perpendicular": "Cannot connect perpendicularly",
"create.track.ascending_s_curve": "Cannot create sloped S-Bends",
"create.track.too_sharp": "Turn too sharp",
"create.track.too_steep": "Slope too steep",
"create.track.slope_turn": "Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "Cannot leave this slope while descending",
"create.track.turn_90": "Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "No Bogeys Found",
"create.train_assembly.not_connected_in_order": "Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "No structure attached to Bogey %1$s",
"create.track_target.set": "Targeted track selected",
"create.track_target.success": "Successfully bound to targeted track",
"create.track_target.clear": "Cleared track selection",
"create.track_target.missing": "Right-click the targeted train track first",
"create.track_target.too_far": "Targeted track is too far from here",
"create.train.unnamed": "Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1387",
"_": "Missing Localizations: 1413",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Stressometer",
"block.create.tiled_glass": "Glasfliesen",
"block.create.tiled_glass_pane": "Glasfliesenscheibe",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Drehtisch",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Raffinierter Glanz",
"item.create.rose_quartz": "Rosenquarz",
"item.create.sand_paper": "Schmirgelpapier",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Bauplan",
"item.create.schematic_and_quill": "Bauplan und Feder",
"item.create.shadow_steel": "Schattenstahl",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 398",
"_": "Missing Localizations: 424",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Estresómetro",
"block.create.tiled_glass": "Vidrio Baldosa",
"block.create.tiled_glass_pane": "Panel de Vidrio Baldosa",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Plato Giratorio",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Radiancia Refinada",
"item.create.rose_quartz": "Cuarzo Rosa",
"item.create.sand_paper": "Papel de Arena",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Esquema",
"item.create.schematic_and_quill": "Esquema con Pluma",
"item.create.shadow_steel": "Acero Sombrío",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 398",
"_": "Missing Localizations: 424",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Estresómetro",
"block.create.tiled_glass": "Vidrio esmaltado",
"block.create.tiled_glass_pane": "Panel de vidrio esmaltado",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Plataforma giratoria mecánica",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Resplandor refinado",
"item.create.rose_quartz": "Cuarzo rosado",
"item.create.sand_paper": "Papel de lija",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Esquema",
"item.create.schematic_and_quill": "Esquema y pluma",
"item.create.shadow_steel": "Acero sombrío",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1649",
"_": "Missing Localizations: 1675",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Stressomètre",
"block.create.tiled_glass": "Verre carrelé",
"block.create.tiled_glass_pane": "Vitre carrelé",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Plaque tournante",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Éclat raffiné",
"item.create.rose_quartz": "Quartz rose",
"item.create.sand_paper": "Papier de verre",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Schéma",
"item.create.schematic_and_quill": "Schéma et plume",
"item.create.shadow_steel": "Acier sombre",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1338",
"_": "Missing Localizations: 1364",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Stressometro",
"block.create.tiled_glass": "Vetro piastrellato",
"block.create.tiled_glass_pane": "Pannello di vetro piastrellato",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Piatto",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Radiance raffinata",
"item.create.rose_quartz": "Quarzo rosa",
"item.create.sand_paper": "Carta vetrata",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Schematica",
"item.create.schematic_and_quill": "Schematica e penna d'oca",
"item.create.shadow_steel": "Acciaio oscuro",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 68",
"_": "Missing Localizations: 94",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "応力メーター",
"block.create.tiled_glass": "タイルガラス",
"block.create.tiled_glass_pane": "タイル板ガラス",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "凝灰岩の柱",
"block.create.turntable": "ターンテーブル",
"block.create.veridium": "翡翠岩",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "高貴な光輝",
"item.create.rose_quartz": "ローズクォーツ",
"item.create.sand_paper": "紙やすり",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "概略図",
"item.create.schematic_and_quill": "概略図と羽根ペン",
"item.create.shadow_steel": "シャドウスチール",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 70",
"_": "Missing Localizations: 96",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "피로도 계측기",
"block.create.tiled_glass": "타일 유리",
"block.create.tiled_glass_pane": "타일 유리판",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "응회암 기둥",
"block.create.turntable": "돌림판",
"block.create.veridium": "심록암",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "정제된 광채",
"item.create.rose_quartz": "장밋빛 석영",
"item.create.sand_paper": "사포",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "청사진",
"item.create.schematic_and_quill": "청사진과 깃펜",
"item.create.shadow_steel": "그림자 강철",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 2002",
"_": "Missing Localizations: 2028",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Stressmeter",
"block.create.tiled_glass": "Getegeld Glas",
"block.create.tiled_glass_pane": "Getegeld Glazen Paneel",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Draaischijf",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "UNLOCALIZED: Refined Radiance",
"item.create.rose_quartz": "Roze Kwarts",
"item.create.sand_paper": "UNLOCALIZED: Sand Paper",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Bouwtekening",
"item.create.schematic_and_quill": "Bouwtekening en Veer",
"item.create.shadow_steel": "UNLOCALIZED: Shadow Steel",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 437",
"_": "Missing Localizations: 463",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Miernik obciążenia",
"block.create.tiled_glass": "Kafelkowane szkło",
"block.create.tiled_glass_pane": "Kafelkowana szyba",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Talerz obrotowy",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Świetlisty materiał",
"item.create.rose_quartz": "Różowy kwarc",
"item.create.sand_paper": "Papier ścierny",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Schemat",
"item.create.schematic_and_quill": "Schemat z piórem",
"item.create.shadow_steel": "Mroczna stal",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1621",
"_": "Missing Localizations: 1647",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Estressómetro",
"block.create.tiled_glass": "Vidro Entalhado",
"block.create.tiled_glass_pane": "Vidraça Entalhada",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Mesa giratória",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Luz Refinada",
"item.create.rose_quartz": "Quartzo Rosa",
"item.create.sand_paper": "Lixa",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Esquema",
"item.create.schematic_and_quill": "Esquema e pena",
"item.create.shadow_steel": "Aço sombrio",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1621",
"_": "Missing Localizations: 1647",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Estressómetro",
"block.create.tiled_glass": "Vidro Entalhado",
"block.create.tiled_glass_pane": "Vidraça Entalhada",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Mesa giratória",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Luz Refinada",
"item.create.rose_quartz": "Quartzo Rosa",
"item.create.sand_paper": "Lixa",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Esquema",
"item.create.schematic_and_quill": "Esquema e pena",
"item.create.shadow_steel": "Aço sombrio",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 442",
"_": "Missing Localizations: 468",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "Стрессометр",
"block.create.tiled_glass": "Плиточное стекло",
"block.create.tiled_glass_pane": "Плиточная стеклянная панель",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "Поворотный стол",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "Изысканное сияние",
"item.create.rose_quartz": "Розовый кварц",
"item.create.sand_paper": "Наждачная бумага",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "Схематика",
"item.create.schematic_and_quill": "Схематика и перо",
"item.create.shadow_steel": "Призрачная сталь",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 68",
"_": "Missing Localizations: 94",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "应力表",
"block.create.tiled_glass": "十字玻璃窗",
"block.create.tiled_glass_pane": "十字玻璃窗户板",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "凝灰岩柱",
"block.create.turntable": "转盘",
"block.create.veridium": "辉绿矿",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "光辉石",
"item.create.rose_quartz": "玫瑰石英",
"item.create.sand_paper": "砂纸",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "蓝图",
"item.create.schematic_and_quill": "蓝图与笔",
"item.create.shadow_steel": "暗影钢",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 456",
"_": "Missing Localizations: 482",
"_": "->------------------------] Game Elements [------------------------<-",
@ -484,8 +484,8 @@
"block.create.stressometer": "動能錶",
"block.create.tiled_glass": "十字玻璃窗",
"block.create.tiled_glass_pane": "十字玻璃窗戶片",
"block.create.track": "UNLOCALIZED: Track",
"block.create.track_station": "UNLOCALIZED: Track Station",
"block.create.track": "UNLOCALIZED: Train Track",
"block.create.track_station": "UNLOCALIZED: Train Station",
"block.create.tuff_pillar": "UNLOCALIZED: Tuff Pillar",
"block.create.turntable": "轉盤",
"block.create.veridium": "UNLOCALIZED: Veridium",
@ -623,7 +623,7 @@
"item.create.refined_radiance": "光輝石",
"item.create.rose_quartz": "玫瑰石英",
"item.create.sand_paper": "砂紙",
"item.create.schedule": "UNLOCALIZED: Schedule",
"item.create.schedule": "UNLOCALIZED: Train Schedule",
"item.create.schematic": "藍圖",
"item.create.schematic_and_quill": "藍圖與筆",
"item.create.shadow_steel": "暗影鋼",
@ -1374,6 +1374,35 @@
"create.schedule.loop": "UNLOCALIZED: Loop Forever",
"create.schedule.loop1": "UNLOCALIZED: Schedule starts over",
"create.schedule.loop2": "UNLOCALIZED: when completed",
"create.schedule.train_still_assembling": "UNLOCALIZED: Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "UNLOCALIZED: Selection Cleared",
"create.track.valid_connection": "UNLOCALIZED: Can Connect ✔",
"create.track.second_point": "UNLOCALIZED: Place track or select a second point",
"create.track.too_far": "UNLOCALIZED: Too far away",
"create.track.original_missing": "UNLOCALIZED: Original block removed, Sneak-click to reset",
"create.track.perpendicular": "UNLOCALIZED: Cannot connect perpendicularly",
"create.track.ascending_s_curve": "UNLOCALIZED: Cannot create sloped S-Bends",
"create.track.too_sharp": "UNLOCALIZED: Turn too sharp",
"create.track.too_steep": "UNLOCALIZED: Slope too steep",
"create.track.slope_turn": "UNLOCALIZED: Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "UNLOCALIZED: Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "UNLOCALIZED: Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "UNLOCALIZED: Cannot leave this slope while descending",
"create.track.turn_90": "UNLOCALIZED: Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "UNLOCALIZED: Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "UNLOCALIZED: Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "UNLOCALIZED: No Bogeys Found",
"create.train_assembly.not_connected_in_order": "UNLOCALIZED: Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "UNLOCALIZED: This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "UNLOCALIZED: No structure attached to Bogey %1$s",
"create.track_target.set": "UNLOCALIZED: Targeted track selected",
"create.track_target.success": "UNLOCALIZED: Successfully bound to targeted track",
"create.track_target.clear": "UNLOCALIZED: Cleared track selection",
"create.track_target.missing": "UNLOCALIZED: Right-click the targeted train track first",
"create.track_target.too_far": "UNLOCALIZED: Targeted track is too far from here",
"create.train.unnamed": "UNLOCALIZED: Unnamed Train",

View file

@ -163,7 +163,6 @@ import com.simibubi.create.content.logistics.block.vault.ItemVaultBlock;
import com.simibubi.create.content.logistics.block.vault.ItemVaultCTBehaviour;
import com.simibubi.create.content.logistics.block.vault.ItemVaultItem;
import com.simibubi.create.content.logistics.item.LecternControllerBlock;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.content.logistics.trains.management.StationBlock;
import com.simibubi.create.content.logistics.trains.management.TrackTargetingBlockItem;
import com.simibubi.create.content.logistics.trains.track.StandardBogeyBlock;
@ -1261,6 +1260,7 @@ public class AllBlocks {
.addLayer(() -> RenderType::cutoutMipped)
.transform(pickaxeOnly())
.blockstate(new TrackBlockStateGenerator()::generate)
.lang("Train Track")
.item(TrackBlockItem::new)
.model((c, p) -> p.generated(c, Create.asResource("item/" + c.getName())))
.build()
@ -1272,26 +1272,19 @@ public class AllBlocks {
.blockstate((c, p) -> p.horizontalBlock(c.get(),
s -> s.getValue(StationBlock.ASSEMBLING) ? AssetLookup.partialBaseModel(c, p, "assembling")
: AssetLookup.partialBaseModel(c, p)))
.lang("Train Station")
.item(TrackTargetingBlockItem::new)
.transform(customItemModel("_", "block"))
.register();
public static final BlockEntry<StandardBogeyBlock> SMALL_BOGEY =
REGISTRATE.block("small_bogey", p -> new StandardBogeyBlock(p, false))
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.noOcclusion())
.blockstate((c, p) -> BlockStateGen.horizontalAxisBlock(c, p, s -> p.models()
.getExistingFile(p.modLoc("block/track/bogey/top"))))
.onRegister(b -> IBogeyBlock.register(b.getRegistryName()))
.transform(BuilderTransformers.bogey())
.register();
public static final BlockEntry<StandardBogeyBlock> LARGE_BOGEY =
REGISTRATE.block("large_bogey", p -> new StandardBogeyBlock(p, true))
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.noOcclusion())
.blockstate((c, p) -> BlockStateGen.horizontalAxisBlock(c, p, s -> p.models()
.getExistingFile(p.modLoc("block/track/bogey/top"))))
.onRegister(b -> IBogeyBlock.register(b.getRegistryName()))
.transform(BuilderTransformers.bogey())
.register();
public static final BlockEntry<ControlsBlock> CONTROLS = REGISTRATE.block("controls", ControlsBlock::new)

View file

@ -329,6 +329,7 @@ public class AllItems {
.register();
public static final ItemEntry<ScheduleItem> SCHEDULE = REGISTRATE.item("schedule", ScheduleItem::new)
.lang("Train Schedule")
.register();
// Schematics

View file

@ -74,10 +74,6 @@ public class AssemblyException extends Exception {
return new AssemblyException("noPistonPoles");
}
public static AssemblyException invalidBogeyCount() {
return new AssemblyException("invalidBogeyCount");
}
public static AssemblyException notEnoughSails(int sails) {
return new AssemblyException("not_enough_sails", sails, AllConfigs.SERVER.kinetics.minimumWindmillSails.get());
}

View file

@ -33,6 +33,8 @@ import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkBlock;
import com.simibubi.create.content.logistics.block.vault.ItemVaultBlock;
import com.simibubi.create.content.logistics.block.vault.ItemVaultConnectivityHandler;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.content.logistics.trains.ITrackBlock;
import com.simibubi.create.content.logistics.trains.management.StationBlock;
import com.simibubi.create.foundation.config.ContraptionMovementSetting;
import net.minecraft.core.BlockPos;
@ -228,6 +230,10 @@ public class BlockMovementChecks {
return true;
if (state.getBlock() instanceof GrindstoneBlock)
return true;
if (state.getBlock() instanceof ITrackBlock)
return false;
if (state.getBlock() instanceof StationBlock)
return false;
return state.getPistonPushReaction() != PushReaction.BLOCK;
}

View file

@ -122,6 +122,8 @@ public class GlobalRailwayManager {
for (Train train : trains.values())
train.tick(level);
}
public void clientTick() {

View file

@ -5,6 +5,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -20,6 +21,8 @@ import com.simibubi.create.CreateClient;
import com.simibubi.create.content.logistics.trains.TrackNodeLocation.DiscoveredLocation;
import com.simibubi.create.content.logistics.trains.management.GlobalStation;
import com.simibubi.create.foundation.utility.Color;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Debug;
import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper;
@ -30,6 +33,7 @@ import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.nbt.Tag;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.phys.Vec3;
public class TrackGraph {
@ -112,10 +116,22 @@ public class TrackGraph {
return true;
}
public boolean removeNode(TrackNodeLocation location) {
public boolean removeNode(@Nullable LevelAccessor level, TrackNodeLocation location) {
TrackNode removed = nodes.remove(location);
if (removed == null)
return false;
if (level != null) {
for (Iterator<UUID> iterator = stations.keySet().iterator(); iterator.hasNext();) {
UUID uuid = iterator.next();
GlobalStation globalStation = stations.get(uuid);
Couple<TrackNodeLocation> loc = globalStation.edgeLocation;
if (loc.getFirst().equals(location) || loc.getSecond().equals(location)) {
globalStation.migrate(level);
iterator.remove();
}
}
}
nodesById.remove(removed.netId);
if (!connectionsByNode.containsKey(removed))
@ -137,12 +153,15 @@ public class TrackGraph {
toOther.nodes.putAll(nodes);
toOther.nodesById.putAll(nodesById);
toOther.connectionsByNode.putAll(connectionsByNode);
for (GlobalStation globalStation : stations.values())
toOther.addStation(globalStation);
nodesById.forEach((id, node) -> Create.RAILWAYS.sync.nodeAdded(toOther, node));
connectionsByNode.forEach(
(node1, map) -> map.forEach((node2, edge) -> Create.RAILWAYS.sync.edgeAdded(toOther, node1, node2, edge)));
markDirty();
stations.clear();
nodes.clear();
nodesById.clear();
connectionsByNode.clear();
@ -189,12 +208,26 @@ public class TrackGraph {
public void transfer(TrackNode node, TrackGraph target) {
target.addNode(node);
TrackNodeLocation location1 = node.getLocation();
Map<TrackNode, TrackEdge> connections = getConnectionsFrom(node);
if (!connections.isEmpty())
if (!connections.isEmpty()) {
target.connectionsByNode.put(node, connections);
for (TrackNode entry : connections.keySet()) {
for (Iterator<UUID> iterator = stations.keySet().iterator(); iterator.hasNext();) {
UUID uuid = iterator.next();
GlobalStation globalStation = stations.get(uuid);
Couple<TrackNodeLocation> loc = globalStation.edgeLocation;
if (loc.getFirst().equals(location1) && loc.getSecond().equals(entry.getLocation())) {
Debug.debugChat("Station " + globalStation.name + " migrated directly due to graph split");
target.addStation(globalStation);
iterator.remove();
}
}
}
}
nodes.remove(node.getLocation());
nodes.remove(location1);
nodesById.remove(node.getNetId());
connectionsByNode.remove(node);
}
@ -335,7 +368,7 @@ public class TrackGraph {
Vec3 v1 = location.add(0, 3 / 16f, 0);
Vec3 v2 = v1.add(node.normal.scale(0.75f));
CreateClient.OUTLINER.showLine(Integer.valueOf(node.netId), v1, v2)
.colored(Color.mixColors(Color.WHITE, color, .5f))
.colored(Color.mixColors(Color.WHITE, color, 1))
.lineWidth(1 / 8f);
Map<TrackNode, TrackEdge> map = connectionsByNode.get(node);

View file

@ -11,6 +11,7 @@ import java.util.function.Supplier;
import javax.annotation.Nullable;
import com.simibubi.create.Create;
import com.simibubi.create.CreateClient;
import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.networking.SimplePacketBase;
@ -27,6 +28,20 @@ import net.minecraftforge.network.PacketDistributor;
public class TrackGraphSync {
List<RailGraphSyncPacket> queuedPackets = new ArrayList<>();
public void serverTick() {
finish();
if (queuedPackets.isEmpty())
return;
for (RailGraphSyncPacket packet : queuedPackets) {
if (packet.delete || Create.RAILWAYS.trackNetworks.containsKey(packet.graphId)) {
AllPackets.channel.send(PacketDistributor.ALL.noArg(), packet);
}
}
queuedPackets.clear();
}
//
public void nodeAdded(TrackGraph graph, TrackNode node) {
@ -64,8 +79,6 @@ public class TrackGraphSync {
//
private RailGraphSyncPacket currentPacket;
public void sendFullGraphTo(TrackGraph graph, ServerPlayer player) {
// TODO ensure packet size limit
@ -82,11 +95,13 @@ public class TrackGraphSync {
AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> player), packet);
}
private RailGraphSyncPacket currentPacket;
private void flushPacket(@Nullable UUID graphId) {
if (currentPacket != null) {
if (currentPacket.graphId.equals(graphId))
return;
AllPackets.channel.send(PacketDistributor.ALL.noArg(), currentPacket);
queuedPackets.add(currentPacket);
currentPacket = null;
}
@ -191,7 +206,7 @@ public class TrackGraphSync {
for (int nodeId : removedNodes) {
TrackNode node = railGraph.getNode(nodeId);
if (node != null)
railGraph.removeNode(node.getLocation());
railGraph.removeNode(null, node.getLocation());
}
for (Entry<Integer, Pair<TrackNodeLocation, Vec3>> entry : addedNodes.entrySet())

View file

@ -63,7 +63,7 @@ public class TrackPropagator {
if (foundGraph != null) {
TrackNode removedNode = foundGraph.locateNode(removedLocation);
if (removedNode != null) {
foundGraph.removeNode(removedLocation);
foundGraph.removeNode(reader, removedLocation);
sync.nodeRemoved(foundGraph, removedNode);
}
}
@ -86,7 +86,6 @@ public class TrackPropagator {
for (TrackGraph railGraph : toUpdate)
manager.updateSplitGraph(railGraph);
sync.finish();
manager.markTracksDirty();
}
@ -110,7 +109,7 @@ public class TrackPropagator {
TrackGraph graph = manager.getGraph(reader, entry.currentNode);
if (graph != null) {
TrackNode node = graph.locateNode(entry.currentNode);
graph.removeNode(entry.currentNode);
graph.removeNode(reader, entry.currentNode);
sync.nodeRemoved(graph, node);
connectedGraphs.add(graph);
continue;
@ -225,7 +224,6 @@ public class TrackPropagator {
continueSearchWithParent(frontier, entry, parentNode, ends);
}
sync.finish();
manager.markTracksDirty();
return graph;
}

View file

@ -9,6 +9,7 @@ import com.simibubi.create.content.contraptions.components.structureMovement.Con
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionType;
import com.simibubi.create.content.contraptions.components.structureMovement.NonStationaryLighter;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.NBTHelper;
import net.minecraft.core.BlockPos;
@ -41,10 +42,12 @@ public class CarriageContraption extends Contraption {
public boolean assemble(Level world, BlockPos pos) throws AssemblyException {
if (!searchMovedStructure(world, pos, null))
return false;
if (blocks.size() == 0)
if (blocks.size() <= 1)
return false;
if (bogeys > 2 || bogeys == 0)
throw AssemblyException.invalidBogeyCount();
if (bogeys == 0)
return false;
if (bogeys > 2)
throw new AssemblyException(Lang.translate("train_assembly.too_many_bogeys", bogeys));
return true;
}

View file

@ -108,7 +108,9 @@ public class Navigation {
public void setDestination(GlobalStation destination) {
findPathTo(destination);
if (path.isEmpty())
if (distanceToDestination == 0)
return;
if (this.destination == destination)
return;
train.leave();
this.destination = destination;

View file

@ -35,6 +35,7 @@ public class Train {
public TrainIconType icon;
public Component name;
public boolean heldForAssembly;
public boolean doubleEnded;
public List<Carriage> carriages;
public List<Integer> carriageSpacing;
@ -58,6 +59,7 @@ public class Train {
doubleEnded = carriages.size() > 1 && carriages.get(carriages.size() - 1).contraption.hasControls();
navigation = new Navigation(this, graph);
runtime = new ScheduleRuntime(this);
heldForAssembly = true;
}
public void tick(Level level) {
@ -103,7 +105,10 @@ public class Train {
}
if (navigation.destination != null) {
boolean recalculate = navigation.distanceToDestination > 20;
navigation.distanceToDestination -= distance;
if (recalculate && navigation.distanceToDestination <= 20)
navigation.setDestination(navigation.destination);
}
}

View file

@ -28,10 +28,12 @@ public class AssemblyScreen extends AbstractStationScreen {
private List<ResourceLocation> iconTypes;
private ScrollInput iconTypeScroll;
private boolean assemblyCompleted;
public AssemblyScreen(StationTileEntity te, GlobalStation station) {
super(te, station);
background = AllGuiTextures.STATION_ASSEMBLING;
assemblyCompleted = false;
}
@Override
@ -81,6 +83,7 @@ public class AssemblyScreen extends AbstractStationScreen {
completeAssembly.active = false;
completeAssembly.setToolTip(new TextComponent("Complete Assembly"));
completeAssembly.withCallback(() -> {
assemblyCompleted = true;
AllPackets.channel.sendToServer(StationEditPacket.configure(te.getBlockPos(), false, station.name));
minecraft.setScreen(new StationScreen(te, station));
});
@ -178,7 +181,7 @@ public class AssemblyScreen extends AbstractStationScreen {
return;
}
AssemblyException lastAssemblyException = te.getLastAssemblyException();
AssemblyException lastAssemblyException = te.lastException;
if (lastAssemblyException != null) {
TextComponent text = new TextComponent("Assembly Failed");
font.draw(ms, text, x + 97 - font.width(text) / 2, y + 47, 0x775B5B);
@ -213,7 +216,7 @@ public class AssemblyScreen extends AbstractStationScreen {
if (train != null) {
ResourceLocation iconId = iconTypes.get(iconTypeScroll.getState());
train.icon = TrainIconType.byId(iconId);
AllPackets.channel.sendToServer(new TrainEditPacket(train.id, "", iconId));
AllPackets.channel.sendToServer(new TrainEditPacket(train.id, "", !assemblyCompleted, iconId));
}
}

View file

@ -5,15 +5,19 @@ import java.util.UUID;
import javax.annotation.Nullable;
import com.simibubi.create.Create;
import com.simibubi.create.content.logistics.trains.TrackNode;
import com.simibubi.create.content.logistics.trains.TrackNodeLocation;
import com.simibubi.create.content.logistics.trains.entity.Train;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Debug;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.nbt.Tag;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.entity.BlockEntity;
public class GlobalStation {
@ -25,12 +29,10 @@ public class GlobalStation {
public WeakReference<Train> nearestTrain;
public GlobalStation(UUID id, Couple<TrackNode> nodes, double position, BlockPos stationPos) {
public GlobalStation(UUID id, BlockPos stationPos) {
this.id = id;
this.stationPos = stationPos;
this.position = position;
name = "Track Station";
edgeLocation = nodes.map(TrackNode::getLocation);
nearestTrain = new WeakReference<Train>(null);
}
@ -44,6 +46,22 @@ public class GlobalStation {
tag -> TrackNodeLocation.fromPackedPos(NbtUtils.readBlockPos(tag)));
}
public void migrate(LevelAccessor level) {
BlockEntity blockEntity = level.getBlockEntity(stationPos);
if (blockEntity instanceof StationTileEntity station) {
Debug.debugChat("Migrating Station " + name);
station.migrate(this);
return;
}
Create.LOGGER
.warn("Couldn't migrate Station: " + name + " to changed Graph because associated Tile wasn't loaded.");
}
public void setLocation(Couple<TrackNode> nodes, double position) {
this.edgeLocation = nodes.map(TrackNode::getLocation);
this.position = position;
}
public void reserveFor(Train train) {
Train nearestTrain = this.nearestTrain.get();
if (nearestTrain == null
@ -59,7 +77,7 @@ public class GlobalStation {
public void trainDeparted(Train train) {
cancelReservation(train);
}
@Nullable
public Train getPresentTrain() {
Train nearestTrain = this.nearestTrain.get();

View file

@ -4,7 +4,9 @@ import com.simibubi.create.AllContainerTypes;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.logistics.trains.entity.CarriageContraption;
import com.simibubi.create.content.logistics.trains.entity.CarriageContraptionEntity;
import com.simibubi.create.content.logistics.trains.entity.Train;
import com.simibubi.create.content.logistics.trains.management.schedule.Schedule;
import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.core.NonNullList;
import net.minecraft.network.chat.Component;
@ -75,8 +77,16 @@ public class ScheduleItem extends Item implements MenuProvider {
return InteractionResult.SUCCESS;
CarriageContraptionEntity entity = (CarriageContraptionEntity) rootVehicle;
Contraption contraption = entity.getContraption();
if (contraption instanceof CarriageContraption cc)
cc.getCarriage().train.runtime.setSchedule(schedule, false);
if (contraption instanceof CarriageContraption cc) {
Train train = cc.getCarriage().train;
if (train == null)
return InteractionResult.SUCCESS;
if (train.heldForAssembly) {
pPlayer.displayClientMessage(Lang.translate("schedule.train_still_assembling"), true);
return InteractionResult.SUCCESS;
}
train.runtime.setSchedule(schedule, false);
}
return InteractionResult.SUCCESS;
}

View file

@ -287,7 +287,8 @@ public class StationScreen extends AbstractStationScreen {
Train train = displayedTrain.get();
if (train != null && !trainNameBox.getValue()
.equals(train.name.getString()))
AllPackets.channel.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId()));
AllPackets.channel
.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), false, train.icon.getId()));
}
private void syncStationName() {
@ -303,7 +304,8 @@ public class StationScreen extends AbstractStationScreen {
.sendToServer(StationEditPacket.configure(te.getBlockPos(), switchingToAssemblyMode, nameBox.getValue()));
Train train = displayedTrain.get();
if (!switchingToAssemblyMode && train != null)
AllPackets.channel.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), train.icon.getId()));
AllPackets.channel
.sendToServer(new TrainEditPacket(train.id, trainNameBox.getValue(), false, train.icon.getId()));
}
}

View file

@ -10,7 +10,6 @@ import java.util.UUID;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
import com.simibubi.create.content.contraptions.components.structureMovement.IDisplayAssemblyExceptions;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.content.logistics.trains.ITrackBlock;
import com.simibubi.create.content.logistics.trains.TrackEdge;
@ -26,7 +25,9 @@ import com.simibubi.create.content.logistics.trains.entity.Train;
import com.simibubi.create.content.logistics.trains.management.TrackTargetingBehaviour.GraphLocation;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Debug;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.Pair;
import com.simibubi.create.foundation.utility.WorldAttached;
@ -36,7 +37,6 @@ import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Axis;
import net.minecraft.core.Direction.AxisDirection;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.entity.BlockEntityType;
@ -45,20 +45,29 @@ import net.minecraft.world.level.levelgen.structure.BoundingBox;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
public class StationTileEntity extends SmartTileEntity implements IDisplayAssemblyExceptions {
public class StationTileEntity extends SmartTileEntity {
UUID id;
protected int failedCarriageIndex;
protected AssemblyException lastException;
protected CompoundTag toMigrate;
public StationTileEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
setLazyTickRate(20);
id = UUID.randomUUID();
lastException = null;
toMigrate = null;
failedCarriageIndex = -1;
}
public void migrate(GlobalStation globalStation) {
if (toMigrate != null)
return;
toMigrate = globalStation.write();
setChanged();
}
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
@ -77,19 +86,33 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
}
public GlobalStation getOrCreateGlobalStation() {
for (TrackGraph trackGraph : Create.RAILWAYS.trackNetworks.values()) {
for (TrackGraph trackGraph : Create.RAILWAYS.trackNetworks.values()) { // TODO thread breach
GlobalStation station = trackGraph.getStation(id);
if (station == null)
continue;
return station;
}
if (level.isClientSide)
return null;
GraphLocation loc = getTarget().determineGraphLocation();
TrackTargetingBehaviour target = getTarget();
if (!target.hasValidTrack())
return null;
GraphLocation loc = target.determineGraphLocation();
if (loc == null)
return null;
GlobalStation globalStation = new GlobalStation(id, loc.edge, loc.position, worldPosition);
GlobalStation globalStation =
toMigrate != null ? new GlobalStation(toMigrate) : new GlobalStation(id, worldPosition);
globalStation.setLocation(loc.edge, loc.position);
loc.graph.addStation(globalStation);
if (toMigrate != null)
Debug.debugChat("Migrated Station " + globalStation.name);
toMigrate = null;
setChanged();
return globalStation;
}
@ -99,6 +122,8 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
lastException = AssemblyException.read(tag);
failedCarriageIndex = tag.getInt("FailedCarriageIndex");
super.read(tag, clientPacket);
if (tag.contains("ToMigrate"))
toMigrate = tag.getCompound("ToMigrate");
}
@Override
@ -107,6 +132,8 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
AssemblyException.write(tag, lastException);
tag.putInt("FailedCarriageIndex", failedCarriageIndex);
super.write(tag, clientPacket);
if (!clientPacket && toMigrate != null)
tag.put("ToMigrate", toMigrate);
}
// Train Assembly
@ -123,6 +150,8 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
public void lazyTick() {
if (isAssembling() && !level.isClientSide)
refreshAssemblyInfo();
if (!level.isClientSide)
getOrCreateGlobalStation();
super.lazyTick();
}
@ -131,6 +160,12 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
if (isAssembling() && level.isClientSide)
refreshAssemblyInfo();
super.tick();
if (level.isClientSide)
return;
if (toMigrate == null)
return;
getOrCreateGlobalStation();
}
public void trackClicked(Player player, ITrackBlock track, BlockState state, BlockPos pos) {
@ -281,7 +316,7 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
refreshAssemblyInfo();
if (bogeyLocations[0] != 0) {
exception(new AssemblyException(new TextComponent("Frontmost Bogey must be at Station Marker")), -1);
exception(new AssemblyException(Lang.translate("train_assembly.frontmost_bogey_at_station")), -1);
return;
}
@ -379,7 +414,7 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
}
if (points.size() == 0) {
exception(new AssemblyException(new TextComponent("No Bogeys Found")), -1);
exception(new AssemblyException(Lang.translate("train_assembly.no_bogeys")), -1);
return;
}
@ -398,7 +433,8 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
boolean success = contraption.assemble(level,
bogeyPosOffset.relative(assemblyDirection, bogeyLocations[bogeyIndex] + 1));
if (!success) {
exception(new AssemblyException(new TextComponent("Nothing attached to Bogey " + bogeyIndex)), -1);
exception(new AssemblyException(Lang.translate("train_assembly.nothing_attached", bogeyIndex + 1)),
-1);
return;
}
} catch (AssemblyException e) {
@ -416,7 +452,7 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
if (secondBogeyPos != null) {
if (bogeyIndex == bogeyCount - 1 || !secondBogeyPos
.equals(bogeyPosOffset.relative(assemblyDirection, bogeyLocations[bogeyIndex + 1] + 1))) {
exception(new AssemblyException(new TextComponent("Bogeys are not connected in order")),
exception(new AssemblyException(Lang.translate("train_assembly.not_connected_in_order")),
contraptions.size() + 1);
return;
}
@ -427,8 +463,7 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
bogeyIndex++;
} else if (!typeOfFirstBogey.allowsSingleBogeyCarriage()) {
exception(
new AssemblyException(new TextComponent("This bogey type cannot support a carriage on its own")),
exception(new AssemblyException(Lang.translate("train_assembly.single_bogey_carriage")),
contraptions.size() + 1);
return;
}
@ -487,9 +522,4 @@ public class StationTileEntity extends SmartTileEntity implements IDisplayAssemb
return renderBounds;
}
@Override
public AssemblyException getLastAssemblyException() {
return lastException;
}
}

View file

@ -38,7 +38,7 @@ public class TrackTargetingBehaviour extends TileEntityBehaviour {
private BlockPos targetTrack;
private AxisDirection targetDirection;
public TrackTargetingBehaviour(SmartTileEntity te) {
super(te);
targetDirection = AxisDirection.POSITIVE;
@ -99,8 +99,8 @@ public class TrackTargetingBehaviour extends TileEntityBehaviour {
return null;
Vec3 axis = track.getTrackAxis(level, pos, trackBlockState)
.normalize()
.scale(getTargetDirection().getStep());
double length = axis.length();
List<Pair<BlockPos, DiscoveredLocation>> ends =
TrackPropagator.getEnds(level, pos, trackBlockState, null, true);
@ -142,7 +142,7 @@ public class TrackTargetingBehaviour extends TileEntityBehaviour {
frontNode = node;
if (backwards) {
backNode = node;
position = i + .5;
position = (i + .5) * length;
}
break;
}

View file

@ -18,10 +18,12 @@ public class TrainEditPacket extends SimplePacketBase {
private String name;
private UUID id;
private ResourceLocation iconType;
private boolean heldForAssembly;
public TrainEditPacket(UUID id, String name, ResourceLocation iconType) {
public TrainEditPacket(UUID id, String name, boolean heldForAssembly, ResourceLocation iconType) {
this.name = name;
this.id = id;
this.heldForAssembly = heldForAssembly;
this.iconType = iconType;
}
@ -29,6 +31,7 @@ public class TrainEditPacket extends SimplePacketBase {
id = buffer.readUUID();
name = buffer.readUtf(256);
iconType = buffer.readResourceLocation();
heldForAssembly = buffer.readBoolean();
}
@Override
@ -36,6 +39,7 @@ public class TrainEditPacket extends SimplePacketBase {
buffer.writeUUID(id);
buffer.writeUtf(name);
buffer.writeResourceLocation(iconType);
buffer.writeBoolean(heldForAssembly);
}
@Override
@ -45,9 +49,10 @@ public class TrainEditPacket extends SimplePacketBase {
Train train = Create.RAILWAYS.trains.get(id);
if (train == null)
return;
if (!name.isBlank())
if (!name.isBlank())
train.name = new TextComponent(name);
train.icon = TrainIconType.byId(iconType);
train.heldForAssembly = heldForAssembly;
});
context.get()
.setPacketHandled(true);

View file

@ -6,7 +6,9 @@ import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.render.CachedBufferer;
@ -102,6 +104,16 @@ public class StandardBogeyBlock extends Block implements IBogeyBlock, ITE<Standa
VertexConsumer vb = buffers.getBuffer(RenderType.solid());
BlockState air = Blocks.AIR.defaultBlockState();
for (int i : Iterate.zeroAndOne)
CachedBufferer.block(AllBlocks.SHAFT.getDefaultState()
.setValue(ShaftBlock.AXIS, Axis.Z))
.translate(-.5f, .25f, i * -1)
.centre()
.rotateZ(wheelAngle)
.unCentre()
.light(light)
.renderInto(ms, vb);
if (!large) {
CachedBufferer.partial(AllBlockPartials.BOGEY_FRAME, air)
.light(light)
@ -119,6 +131,16 @@ public class StandardBogeyBlock extends Block implements IBogeyBlock, ITE<Standa
return;
}
for (int i : Iterate.zeroAndOne)
CachedBufferer.block(AllBlocks.SHAFT.getDefaultState()
.setValue(ShaftBlock.AXIS, Axis.X))
.translate(-.5f, .25f, .5f + i * -2)
.centre()
.rotateX(wheelAngle)
.unCentre()
.light(light)
.renderInto(ms, vb);
CachedBufferer.partial(AllBlockPartials.BOGEY_DRIVE, air)
.light(light)
.renderInto(ms, vb);

View file

@ -46,6 +46,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.level.levelgen.structure.BoundingBox;
import net.minecraft.world.level.material.PushReaction;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext;
@ -170,12 +171,17 @@ public class TrackBlock extends Block implements EntityBlock, IWrenchable, ITrac
return stateForPlacement.setValue(SHAPE, best);
}
@Override
public PushReaction getPistonPushReaction(BlockState pState) {
return PushReaction.BLOCK;
}
@Override
public void onPlace(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) {
if (pOldState.getBlock() == this && pState.setValue(HAS_TURN, true) == pOldState.setValue(HAS_TURN, true))
return;
LevelTickAccess<Block> blockTicks = pLevel.getBlockTicks();
if (!blockTicks.hasScheduledTick(pPos, this))
if (!blockTicks.hasScheduledTick(pPos, this))
pLevel.scheduleTick(pPos, this, 1);
}

View file

@ -9,7 +9,6 @@ import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BlockItem;
@ -67,7 +66,7 @@ public class TrackBlockItem extends BlockItem {
PlacementInfo info = TrackPlacement.tryConnect(level, pos, state, lookAngle, stack);
if (info.message != null && !level.isClientSide)
player.displayClientMessage(new TextComponent(info.message), true);
player.displayClientMessage(Lang.translate(info.message), true);
if (!info.valid)
return InteractionResult.FAIL;

View file

@ -10,6 +10,7 @@ import com.simibubi.create.content.logistics.trains.ITrackBlock;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.VecHelper;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
@ -22,7 +23,6 @@ import net.minecraft.core.Direction.Axis;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.ItemStack;
@ -57,7 +57,7 @@ public class TrackPlacement {
BlockPos pos2;
public PlacementInfo withMessage(String message) {
this.message = message;
this.message = "track." + message;
return this;
}
@ -112,12 +112,12 @@ public class TrackPlacement {
}
if (pos1.equals(pos2))
return info.withMessage("Place track or select a second point");
return info.withMessage("second_point");
if (pos1.distSqr(pos2) > 32 * 32)
return info.withMessage("Too far away")
return info.withMessage("too_far")
.tooJumbly();
if (!state1.hasProperty(TrackBlock.HAS_TURN))
return info.withMessage("Original block removed");
return info.withMessage("original_missing");
if (axis1.dot(end2.subtract(end1)) < 0) {
axis1 = axis1.scale(-1);
@ -166,6 +166,8 @@ public class TrackPlacement {
// S curve or Straight
double dist = 0;
if (parallel) {
double[] sTest = VecHelper.intersect(end1, end2, normedAxis1, cross2, Axis.Y);
double t = Math.abs(sTest[0]);
@ -174,22 +176,22 @@ public class TrackPlacement {
skipCurve = Mth.equal(u, 0);
if (!skipCurve && sTest[0] < 0)
return info.withMessage("cannot connect perpendicularly")
return info.withMessage("perpendicular")
.tooJumbly();
if (skipCurve) {
double dist = VecHelper.getCenterOf(pos1)
dist = VecHelper.getCenterOf(pos1)
.distanceTo(VecHelper.getCenterOf(pos2));
info.end1Extent = (int) Math.round((dist + 1) / axis1.length());
} else {
if (!Mth.equal(ascend, 0))
return info.withMessage("Cannot ascend and s-curve");
return info.withMessage("ascending_s_curve");
double targetT = u <= 1 ? 3 : u * 2;
if (t < targetT)
return info.withMessage("Turn too sharp");
return info.withMessage("too_sharp");
// This is for standardising s curve sizes
if (t > targetT) {
@ -204,13 +206,13 @@ public class TrackPlacement {
if (slope) {
if (!skipCurve)
return info.withMessage("Cannot enter or leave slope on a turn");
return info.withMessage("slope_turn");
if (Mth.equal(normal1.dot(normal2), 0))
return info.withMessage("Cannot connect opposing slopes");
return info.withMessage("opposing_slopes");
if ((axis1.y < 0 || axis2.y > 0) && ascend > 0)
return info.withMessage("Cannot leave this slope while ascending");
return info.withMessage("leave_slope_ascending");
if ((axis1.y > 0 || axis2.y < 0) && ascend < 0)
return info.withMessage("Cannot leave this slope while descending");
return info.withMessage("leave_slope_descending");
skipCurve = false;
info.end1Extent = 0;
@ -228,10 +230,10 @@ public class TrackPlacement {
double turnSize = Math.min(dist1, dist2);
if (intersect[0] < 0)
return info.withMessage("Turn too sharp")
return info.withMessage("too_sharp")
.tooJumbly();
if (turnSize < 2)
return info.withMessage("Turn too sharp");
return info.withMessage("too_sharp");
// This is for standardising curve sizes
if (turnSize > 2) {
@ -245,16 +247,18 @@ public class TrackPlacement {
if (skipCurve && !Mth.equal(ascend, 0)) {
int hDistance = info.end1Extent;
info.end1Extent = 0;
if (hDistance < absAscend * 3)
return info.withMessage("Too steep");
if (hDistance > absAscend * 4) {
int correction = (int) (hDistance - absAscend * 4);
info.end1Extent = correction / 2 + (correction % 2);
info.end2Extent = correction / 2;
}
if (axis1.y == 0 || !Mth.equal(absAscend + 1, dist / axis1.length())) {
info.end1Extent = 0;
if (hDistance < absAscend * 3)
return info.withMessage("too_steep");
if (hDistance > absAscend * 4) {
int correction = (int) (hDistance - absAscend * 4);
info.end1Extent = correction / 2 + (correction % 2);
info.end2Extent = correction / 2;
}
skipCurve = false;
skipCurve = false;
}
}
// Turn
@ -262,36 +266,41 @@ public class TrackPlacement {
if (!parallel) {
float absAngle = Math.abs(AngleHelper.deg(angle));
if (absAngle < 60 || absAngle > 300)
return info.withMessage("90 degrees max")
return info.withMessage("turn_90")
.tooJumbly();
intersect = VecHelper.intersect(end1, end2, normedAxis1, normedAxis2, Axis.Y);
double dist1 = Math.abs(intersect[0] / axis1.length());
double dist2 = Math.abs(intersect[1] / axis2.length());
double dist1 = Math.abs(intersect[0]);
double dist2 = Math.abs(intersect[1]);
float ex1 = 0;
float ex2 = 0;
if (dist1 > dist2)
info.end1Extent = (int) Math.round(dist1 - dist2);
ex1 = (float) ((dist1 - dist2) / axis1.length());
if (dist2 > dist1)
info.end2Extent = (int) Math.round(dist2 - dist1);
ex2 = (float) ((dist2 - dist1) / axis2.length());
double turnSize = Math.min(dist1, dist2);
boolean ninety = absAngle % 90 < 1;
boolean ninety = (absAngle + .25f) % 90 < 1;
if (intersect[0] < 0 || intersect[1] < 0)
return info.withMessage("Turn too sharp")
return info.withMessage("too_sharp")
.tooJumbly();
if (turnSize < (ninety ? 7 : 2))
return info.withMessage("Turn too sharp");
if (absAscend > (ninety ? 3 : 2))
return info.withMessage("Too steep");
int minTurnSize = ninety ? 7 : 3;
int maxAscend = ninety ? 3 : 2;
if (turnSize < minTurnSize)
return info.withMessage("too_sharp");
if (absAscend > maxAscend)
return info.withMessage("too_steep");
// This is for standardising curve sizes
if (turnSize > (ninety ? 5 : 2)) {
info.end1Extent += turnSize - (ninety ? 7 : 2);
info.end2Extent += turnSize - (ninety ? 7 : 2);
turnSize = (ninety ? 7 : 2);
}
ex1 += (turnSize - minTurnSize) / axis1.length();
ex2 += (turnSize - minTurnSize) / axis2.length();
info.end1Extent = Math.round(ex1);
info.end2Extent = Math.round(ex2);
turnSize = minTurnSize;
}
Vec3 offset1 = axis1.scale(info.end1Extent);
@ -324,9 +333,9 @@ public class TrackPlacement {
level.setBlock(offsetPos, state, 3);
}
}
info.pos1 = pos1;
info.pos2 = pos2;
info.pos1 = pos1;
info.pos2 = pos2;
info.axis1 = axis1;
info.axis2 = axis2;
@ -390,9 +399,11 @@ public class TrackPlacement {
PlacementInfo info = tryConnect(level, pos, hitState, player.getLookAngle(), stack);
if (info.valid)
player.displayClientMessage(new TextComponent("Valid Connection").withStyle(ChatFormatting.GREEN), true);
player.displayClientMessage(Lang.translate("track.valid_connection")
.withStyle(ChatFormatting.GREEN), true);
else if (info.message != null)
player.displayClientMessage(new TextComponent(info.message).withStyle(ChatFormatting.RED), true);
player.displayClientMessage(Lang.translate(info.message)
.withStyle(ChatFormatting.RED), true);
animation.chase(info.valid ? 1 : 0, 0.25, Chaser.EXP);
animation.tickChaser();

View file

@ -67,6 +67,7 @@ public class CommonEvents {
Create.SCHEMATIC_RECEIVER.tick();
Create.LAGGER.tick();
ServerSpeedProvider.serverTick();
Create.RAILWAYS.sync.serverTick();
}
@SubscribeEvent

View file

@ -27,6 +27,8 @@ import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock;
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock.Shape;
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelItem;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.content.logistics.trains.track.StandardBogeyBlock;
import com.simibubi.create.foundation.block.BlockStressDefaults;
import com.simibubi.create.foundation.block.ItemUseOverrides;
import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry;
@ -63,6 +65,14 @@ public class BuilderTransformers {
.build();
}
public static <B extends StandardBogeyBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> bogey() {
return b -> b.initialProperties(SharedProperties::softMetal)
.properties(p -> p.noOcclusion())
.blockstate((c, p) -> BlockStateGen.horizontalAxisBlock(c, p, s -> p.models()
.getExistingFile(p.modLoc("block/track/bogey/top"))))
.onRegister(block -> IBogeyBlock.register(block.getRegistryName()));
}
public static <B extends EncasedCogwheelBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> encasedCogwheel(
String casing, Supplier<CTSpriteShiftEntry> casingShift) {
return b -> encasedCogwheelBase(b, casing, casingShift, () -> AllBlocks.COGWHEEL.get(), false);

View file

@ -601,6 +601,35 @@
"create.schedule.loop": "Loop Forever",
"create.schedule.loop1": "Schedule starts over",
"create.schedule.loop2": "when completed",
"create.schedule.train_still_assembling": "Confirm Train Assembly in the Station UI first",
"create.track.selection_cleared": "Selection Cleared",
"create.track.valid_connection": "Can Connect \u2714",
"create.track.second_point": "Place track or select a second point",
"create.track.too_far": "Too far away",
"create.track.original_missing": "Original block removed, Sneak-click to reset",
"create.track.perpendicular": "Cannot connect perpendicularly",
"create.track.ascending_s_curve": "Cannot create sloped S-Bends",
"create.track.too_sharp": "Turn too sharp",
"create.track.too_steep": "Slope too steep",
"create.track.slope_turn": "Cannot enter or leave slope on a turn",
"create.track.opposing_slopes": "Cannot connect opposing slopes",
"create.track.leave_slope_ascending": "Cannot leave this slope while ascending",
"create.track.leave_slope_descending": "Cannot leave this slope while descending",
"create.track.turn_90": "Can only turn up to 90 Degrees",
"create.train_assembly.too_many_bogeys": "Too many Bogeys attached: %1$s",
"create.train_assembly.frontmost_bogey_at_station": "Frontmost Bogey must be at Station Marker",
"create.train_assembly.no_bogeys": "No Bogeys Found",
"create.train_assembly.not_connected_in_order": "Bogeys are not connected in order",
"create.train_assembly.single_bogey_carriage": "This Bogey type cannot support a carriage on its own",
"create.train_assembly.nothing_attached": "No structure attached to Bogey %1$s",
"create.track_target.set": "Targeted track selected",
"create.track_target.success": "Successfully bound to targeted track",
"create.track_target.clear": "Cleared track selection",
"create.track_target.missing": "Right-click the targeted train track first",
"create.track_target.too_far": "Targeted track is too far from here",
"create.train.unnamed": "Unnamed Train",