Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trains and More for Zero Point Four #74

Open
wants to merge 121 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
27987bd
Add all 8 directions
LevFendi Oct 6, 2022
9270798
Added curved rail lookup tables
LevFendi Oct 6, 2022
be9d302
Revamp: creating standalone function to build a rail curve
LevFendi Oct 6, 2022
86dc055
see prev
LevFendi Oct 6, 2022
50cc9d9
see prev
LevFendi Oct 6, 2022
0d469eb
Can now place a curved rail turn by pressing G
LevFendi Oct 6, 2022
55dab56
Completed left and right 90 degree rail turns. Also added intersectio…
LevFendi Oct 7, 2022
aa2d503
Add work in progress rail direction check
LevFendi Oct 7, 2022
e0db067
add pseudocode for rail appending function
LevFendi Oct 8, 2022
c150e32
Merge branch 'Crimso777:main' into rail-stuff
LevFendi Oct 10, 2022
65b9e78
Rail append function now appends straight rails to straight rails.
LevFendi Oct 11, 2022
07234d1
working on adding straight rails to curved rails
LevFendi Oct 11, 2022
018e161
Finish rail append and new rail ent info including station spaces
LevFendi Oct 12, 2022
693150f
addtions to rail append
LevFendi Oct 12, 2022
350a237
append cleanup
LevFendi Oct 12, 2022
888d73b
finalized append, revamping structure builders
LevFendi Oct 12, 2022
2ec5f31
Finished and tested everything about rail appending, rail ent info, a…
LevFendi Oct 12, 2022
5a7c9b9
Merge branch 'Crimso777:main' into rail-stuff
LevFendi Oct 12, 2022
c6726e4
Move rail-only functions to new separate lua file
LevFendi Oct 12, 2022
779e1c2
move pt 2
LevFendi Oct 12, 2022
f9942ba
Apply intended control scheme:
LevFendi Oct 13, 2022
efef52f
train and train stop ent info
LevFendi Oct 13, 2022
0ffe7b6
Now supports entering and exiting vehicles.
LevFendi Oct 13, 2022
a521ed8
Driving improvemennts:
LevFendi Oct 13, 2022
cb0b271
Disable teleporting if in a vehicle.
LevFendi Oct 13, 2022
c460822
patched reverse heading description
LevFendi Oct 13, 2022
17218d0
Added support for building PLUS INTERSECTIONS and TRAIN STOPS on end …
LevFendi Oct 13, 2022
453432f
Fix vehicle coordinate reporting, add facing directions to ent info
LevFendi Oct 13, 2022
ab6827e
Work in progress: Adding vehicle info function, train naming feature,…
LevFendi Oct 14, 2022
efab1ee
Fixed and tested newest functions, one known bug left
LevFendi Oct 14, 2022
688c282
additions for J key function
LevFendi Oct 15, 2022
2d6a26b
Mostly fixed J and added SHIFT + J for the reverse direction.
LevFendi Oct 15, 2022
ca20027
Better identification of end rails and junctions including the direct…
LevFendi Oct 16, 2022
4433418
tweaks
LevFendi Oct 16, 2022
89fe6e2
Added rail builder menu, will test.
LevFendi Oct 21, 2022
9807d43
Build menu and end rail check fixes
LevFendi Oct 22, 2022
88f5f29
Bugfixes and streamlining for rail builder menu
LevFendi Oct 22, 2022
d99e9da
Prevent the inventory opening when a menu is closed, also add train a…
LevFendi Oct 22, 2022
479ef1c
Finished train and train stop menus with renaming features, exploring…
LevFendi Oct 23, 2022
8d99aac
Fixed keybinds for rolling stock connection. Trouble with V key persi…
LevFendi Oct 23, 2022
4e3e7a8
Added 45 degree right turns, work ongoing for 45 degree left turns
LevFendi Oct 24, 2022
1d9e912
Finished 45 degree turns, updated rail builder and curved rail info
LevFendi Oct 24, 2022
073fb03
Ent info now gives names of ghost entities.
LevFendi Oct 24, 2022
ec8bcad
Rail appender now supports appending straight rails to curved end rai…
LevFendi Oct 24, 2022
de09a35
Split rail builder menu by rail type, improved menu sounds.
LevFendi Oct 25, 2022
d22c9df
item selection left click patched by copying from menu_cursor_down
LevFendi Oct 26, 2022
e67094f
Working to revamp rail segment end analysis.
LevFendi Oct 26, 2022
ce95efc
Getting there with rail direction checks.
LevFendi Oct 26, 2022
883dbac
More segment analysis ongoing
LevFendi Oct 27, 2022
440f697
same as before
LevFendi Oct 27, 2022
40fdaa2
Getting close
LevFendi Oct 27, 2022
7ebd536
Rail analyzer V1 working. Nearly done.
LevFendi Oct 28, 2022
2a97a3c
Added SHIFT + J, cargo wagon contents, verified left and right clicki…
LevFendi Oct 28, 2022
0ad80db
Remove V key binding and set default graphics resolution to normal to…
LevFendi Oct 28, 2022
2bd871c
Updated controls: rail builder menu uses SHUFT + LEFT BRACKET. Rail a…
LevFendi Oct 28, 2022
b3f96a1
Merge branch 'main' into rail-stuff
LevFendi Sep 1, 2023
1929cb6
Small tweaks to build menus and ent info for single rails
LevFendi Sep 1, 2023
f97b2fd
More tweaks
LevFendi Sep 1, 2023
b8cfdbe
small bugfix
LevFendi Sep 4, 2023
40e442d
Merge branch 'Crimso777:main' into rail-stuff
LevFendi Sep 5, 2023
89d032d
bugfixes
LevFendi Sep 7, 2023
093d9c8
read locomotive fuel count
LevFendi Sep 7, 2023
a06c52b
New rail neighbor analysis tools
LevFendi Sep 8, 2023
5fef1f6
Improved rail analyzer
LevFendi Sep 10, 2023
f7d8d90
More RA fixes
LevFendi Sep 10, 2023
60d24b6
Rail analyzer more work
LevFendi Sep 11, 2023
f465453
Cleaned up or did todo notes.
LevFendi Sep 12, 2023
cf0dd9d
Improve vehicle info reporting and more
LevFendi Sep 12, 2023
3f7f42a
Tests and tweaks
LevFendi Sep 12, 2023
81577ab
Merge branch 'Crimso777:main' into rail-stuff
LevFendi Sep 12, 2023
f976542
Update CHANGES.md
LevFendi Sep 12, 2023
e81961b
Update README.md
LevFendi Sep 12, 2023
f119b5f
Added automatic tree and rock clearing for rail appender tool.
LevFendi Sep 13, 2023
94cd116
Merge branch 'rail-stuff' of https://github.com/LevFendi/Factorio-Acc…
LevFendi Sep 13, 2023
692b45a
Update CHANGES.md
LevFendi Sep 13, 2023
a8cfa66
Phase 1.5 Stuff
LevFendi Sep 13, 2023
e06d8cd
Rocket silo accessiblity done
LevFendi Sep 15, 2023
d04d603
Fix bug: Out of fuel reporting
LevFendi Sep 15, 2023
75155b1
Apply build-lock exception to medium electric poles.
LevFendi Sep 15, 2023
5b1f0ea
Added group mining with SHIFT + X
LevFendi Sep 15, 2023
a5b8551
Merge branch 'Crimso777:main' into rail-stuff
LevFendi Sep 15, 2023
1a6529c
Merge branch 'Crimso777:main' into other-changes-for-0-4
LevFendi Sep 15, 2023
cb1d080
Merge pull request #6 from LevFendi/other-changes-for-0-4
LevFendi Sep 15, 2023
a418307
Add support for placing tiles
LevFendi Sep 15, 2023
b22a701
Added support for capsules
LevFendi Sep 15, 2023
5327ed6
Support equipping armor + clarify stack transfer errors.
LevFendi Sep 15, 2023
c528d10
Signal state and fluid content reading.
LevFendi Sep 17, 2023
9f58fcd
Include new changes
LevFendi Sep 17, 2023
1be30e7
train stop setting tests - WIP
LevFendi Sep 17, 2023
34950b3
Silo and beacon Info and build lock updates
LevFendi Sep 19, 2023
4335869
Mine lock and fluid read fixes and signal clearing added.
LevFendi Sep 20, 2023
d41cd9e
Subautomatic travel added!
LevFendi Sep 20, 2023
3429700
Updates to Changelog
LevFendi Sep 20, 2023
a39bf35
Train arrival announcements + signal placement.
LevFendi Sep 23, 2023
c534d98
Subautomatic trains announce next station
LevFendi Sep 23, 2023
076bd45
Update changelog and rename ALL directions for rails and trains
LevFendi Sep 23, 2023
e538201
Power reporting improved.
LevFendi Sep 23, 2023
097fd35
Q.O.L. regarding time, electricity, undergrounds
LevFendi Sep 24, 2023
8ef65bf
patch latest
LevFendi Sep 24, 2023
a9c5ecc
Tuned underground helper
LevFendi Sep 24, 2023
c81d093
New entity part reporting
LevFendi Sep 24, 2023
3702ff5
Entity part reporting as function + better fluidbox info.
LevFendi Sep 24, 2023
1399a9f
Update to reflect latest changes.
LevFendi Sep 24, 2023
fa66222
Fixed instant train scheduling (beta)
LevFendi Sep 24, 2023
a20f79e
Train additions + changelog
LevFendi Sep 25, 2023
22d9b0d
Nuclear tech and ground item support
LevFendi Sep 26, 2023
d9764ad
Big Armor and Weapons and Walking Changes
LevFendi Sep 30, 2023
9ea2641
Fixed ability to walk through electric poles and pipes to ground.
LevFendi Sep 30, 2023
1278b6c
Tile cycle calls ent info
LevFendi Sep 30, 2023
246bd84
Created a new function to hold the building preview checks of the rea…
LevFendi Sep 30, 2023
a0fc354
Improved power previews
LevFendi Sep 30, 2023
a8679db
Splitter priorities and filters + cleanup
LevFendi Oct 1, 2023
ca9504f
Improved belt junction type identification
LevFendi Oct 1, 2023
030078d
Revised README and CHANGES
LevFendi Oct 2, 2023
106b03d
Build preview stuff & more
LevFendi Oct 5, 2023
0ba2725
Added pipe build preview
LevFendi Oct 5, 2023
509ef1e
added underground belt previews
LevFendi Oct 5, 2023
c40e5f2
pipe to ground ent info
LevFendi Oct 5, 2023
b5b002c
pipe to ground preview info
LevFendi Oct 5, 2023
a4624e7
Rail crossing alert upgrade
LevFendi Oct 5, 2023
08cad1c
Pindex bugfix
LevFendi Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,160 @@
# Version 0.4.0

Updated in October of 2023.

## New Features

- General vehicle support
* Entering and exiting a vehicle will notify you about the vehicle name.
* Press K inside a vehicle to learn the heading and coordinates.
* Pressing L while inside a vehicle will provide additional information about it. For cars, the fuel stocks are stated. For trains, basic info is given while the train menu has detailed info.
* You can refuel a vehicle by dropping a fuel item stack in hand into it via CONTROL + LEFT BRACKET.
* You can check the fuel inventory contents by pressing RIGHT BRACKET.

- Trains Implementation. Phases 0 through 3, out of 5, are complete. In general, we made it accessible to build rail lines, analyze rail segments, build train stations, build and examine trains, and drive trains manually or automatically between two stations.
* Added info support for rails. There is now distinction between end rails, station rails, etc. and the directions of rails are given.
* Added support for building and renaming train stops.
* Added train station rail information tool. When you look at a rail behind a train stop, you get information of which section of which rail vehicle would be positioned there when a train stops at the station.
* Rail appender tool: Adds a straight rail to extend any straight end rail near the cursor.
* Rail structure building menu: Allows building correctly oriented railway structures based on a selected end rail as the anchor point. Also can add signals to mid rails.
* Functions added to build 45 degree turns and 90 degree turns as structures at end rails.
* Added support for building and naming trains.
* Allowed reading the fuel amount in a locomotive: check its status via RIGHT BRACKET.
* The contents of cargo wagons and fluid wagons can be checked via RIGHT BRACKET.
* Information about a train can be read from its menu including name, length, vehicle counts, cargo item counts, etc.
* Rail analyzer tool: Press J inside a train to learn the nearest structure ahead on the rails and the distance to it. Press SHIFT + J to check the opposite direction.
* Rail analyzer tool works on foot as well.
* Subautomatic travel added: You can select an option from the train menu to make a train go by itself to a far away station and wait until all passengers get off.
* Automatic travel via instant train scheduler added. An instant automatic schedule rotates between every reachable train stop and waits at each for 5 minutes.
* Trains announce to passengers their next stations when departing or arriving.
* Trains announce to passengers when waiting at rail signals.
* Rail crossing alert tool added. Slow beep means a train moving somewhere within 200 tiles. Fast beep means an automatic train within 100 tiles is heading towards your general direction. Frantic fast alarm bells mean that you need to get off that rail ASAP!
* Rail chain signal placement designed to be same as in Vanilla. You need to craft any signals you place and they are refunded when mined.
* Other additions all across the code to support trains.
* Note 1: In terms of missing features, there is currently no support for rail forks, one-way rails, and fine control over train schedules.
* Note 2: Parallel rail lines should be at least a few tiles apart. This is partially enforced for the rail appender tool.
* Note 3: See Chapter 16 of the wiki for more info.

- Improved electric pole support with new features.
* Selecting an electric pole now lists all the wire connection distances, and counts the energy consumers and producers within its supply area.
* The pole's electric network's demand satisfaction percentages are now reported, as well as the network flow rate and capacity. Check with RIGHT BRACKET.
* If an electric pole has no power flowing (as in 0 satisfaction), the nearest supplied electric pole is reported.
* When placing an electric pole, all connectible electric poles around it are listed. If there are none, the nearest electric pole is listed. This context info allows better understanding of electric networks.

- Added building preview information for several structures. This information is based on the cursor location while an item to be built is held in hand.
* For small buildings, the preview can warn when building is not possible.
* For transport belt types, the belt junction type that would form by placing the belt there is stated.
* For underground belts and pipes to ground, whether and where the currently selected tile would connect is stated.
* For pipe units, the expected fluid pipe connections around are stated, and there is a warning about potentially mixing fluids.
* For electric powered machines, if power is connected, an electric pole that supplies it is listed. If not, the nearest electric pole is listed. Note that this feature is a little inaccurate around supply area boundaries except when in cursor mode.
* Other similar changes.

- Added support for splitter priority settings.
* Press SHIFT + LEFT ARROW to set the INPUT priority to the left side, meaning that the splitter will take from the right only when it cannot from the left.
* Similarly press SHIFT + RIGHT ARROW to set the INPUT priority to the right side.
* To clear the input priority, try to set the same side again.
* Press CONTROL + LEFT ARROW to set the OUTPUT priority to the left side, meaning that the splitter will output to the right only when it cannot to the left.
* Similarly press CONTROL + RIGHT ARROW to set the OUTPUT priority to the right side.
* To clear the output priority, try to set the same side again.

- Added support for splitter filter mode.
* With an item in hand, press CONTROL + LEFT BRACKET on a splitter to set its output filter to the item. When there is a filtered item, it goes out one side and every other item goes out the other side.
* By default the filter output goes left. To change the filter output side, press CONTROL + ARROW KEY accordingly. There is no equal distribution in filter mode.
* To clear the filter, with an empty hand press CONTROL + LEFT BRACKET on the splitter.

- Added support for armor and armor equipment modules.
* NOTE: All the following controls apply when the inventory (alone) is open, meaning that no buildings are open.
* Press LEFT BRACKET to pick up the item and then press SHIFT + LEFT BRACKET to equip it. Armor equipment requires wearing armor that can support it.
* Press G to read armor name and equipment statistics, if any. "G" is for "Gear".
* Press SHIFT + G to read the list of equipment.
* Press CONTROL + SHIFT + G to remove all equipment and armor.

- Added support for hand weapons / guns.
* Your weapons inventory can hold up to three weapons. You cycle between them by pressing TAB when not in a menu. You also have three corresponsing ammo slots.
* NOTE: All the following controls apply when the inventory (alone) is open, meaning that no buildings are open.
* Press LEFT BRACKET to pick up the weapon or ammo stack and then press SHIFT + LEFT BRACKET to equip it.
* Press R to read current weapons and ammunition counts. "R" is for "arms" or "reloading".
* Press SHIFT + R to reload all weapon ammunition slots from your inventory. Note that existing ammo stacks will be prefered over fuller ammo stacks of different types.
* Press CONTROL + SHIFT + R to remove all weapons and ammunition.

- Added entity part identification: When you press K with the cursor hovering over an entity, its selected part will be reported, such as the southeast corner or the center.

- Added build lock smart placement for medium electric poles. They are placed to allow maxiumum continuous area coverage rather than maximum wire reach.

- Group mining added: If you press SHIFT + X on a tree or a rail, it will mine all of them immediately around you instead of only one.

- Mine lock added: Press CONTROL + X to hold the cut-and-paste tool. Every building the cursor touches while holding this tool will be mined instantly if possible. To disable to tool, empty your hand with SHIFT + Q.

- Added support for placing stone bricks and concrete varients as tiles, for making pathways or decoration.

- Added support for placing landfill over water. Note: This is not reversible.

- Added support for throwing capsule items, including cliff explosives, defender drones, and grenades. Note: Grenades will damage everything including you while cliff explosives affect only cliffs.

- Added support for nuclear power buildings: Temperature readings and other relevant information is now provided.

- Added support for rocket silos. They can now report rocket part counts and launch rockets when ready.

## Changes

- You are now able to walk over pipes and under small or medium electric poles. This change reflects both what popular mods support already. Also tip: In smooth walking mode, you can already squeeze around inserters and chests or in between most side-by-side buildings.

- The intermediate walking mode has been removed so that you can easily switch between telestep and smooth walking. When in game mod settings are supported in the future, we plan to bring it back.

- Transport belt junction types are now better identified.
* Note that a "pouring end" could either be sideloading onto a different belt, or continuing into a belt corner which preserves the lanes.
* Safe merging junctions (also called T-junctions) are identified as a belt unit that is double sideloaded but empty at the back so that the lanes will be entirely predictable.

- Underground belts can now be identified as entrances or exits, explaining whether items are flowing into the ground or out from it.

- Teleporting is disabled while riding a vehicle.

- Reported local time has been shifted by twelve hours so that daytime is 6 to 18 and midnight is around 24.

- Minor changes
* Changed the keybind for disconnecting rail vehicles from "V" to "SHIFT + G".
* Entity ghosts are now better identified.
* Items on the ground are now better identified.
* Boilers and heat exchangers now report their fluid contents.
* For all entities reporting fluid contents, any extra fluids are also reported.
* Beacon contents are now read.
* Containers now report their top 2 items at first look, instead of 1.
* If the player inventory being full prevents an item transfer, this should be announced correctly.
* Added new sound effects for the cursor reaching the borders of inventories.


## Bugfixes

- Fixed a bug where the inventory is opened directly when a Factorio Access menu is closed.

- Fixed a bug where entities that have not started using their fuel are reported as out of fuel.

- Fixed various crashes related to reading invalid items.

- Corrected the information error where items cannot be transferred to another building. It is not necessarily because it is full.

## Code Changes

- New helper functions (Todo: copy over the precise names)**
* get_direction_of_that_from_this - reports the direction of that position according to this position. Reports 8 main directions, with perfect alignment not being necessary to declare the four cardinal directions.
* direction_lookup - convert direction defines integer to a text.
* rotate_90 and rotate_180, for changing direcitons
* mine_trees_and_rocks
* get_entity_part_at_cursor

- For several main functions, parts of them were taken out and made new functions that can be called from multiple places.

- Added new file "rails-and-trains.lua" that houses most vehicle and train related content, as well as some universal helper functions.

- Added several new controls to data.lua

- Modified some vanilla prototypes collision masks to allow walking through pipes and poles.

- Teleporting function can now also be called silently.

- Future proofing: Renamed all directions in "rails-and-trains.lua" to use the defines instead of hardcoded integers


# Version 0.3.1

Updated 10/26/2022
Expand Down
Loading