Commit Graph

723 Commits

Author SHA1 Message Date
thetaepsilon-gamedev 91bd0c7e98 teleport_tube.lua: add checks for hash collisions in positions table 2017-12-22 17:57:00 +00:00
thetaepsilon-gamedev 57fc8c67f8 teleport_tube.lua: fix 32-bit clamping issues on some systems for %d in string.format
Some servers running ubuntu in particular were reporting issues with teleport tubes not working.
On investigation, all tube entries were colliding as string.format("%d", ...)
was returning either -2^31 or 2^31-1 depending on system bit width,
causing hash entries to be overwritten.
This is possibly related to the use of C sprintf within lua.
Fix this by using %g instead to interpret as double without int conversion,
with a large enough number of digits such that all possible 2^48 values from
minetest.hash_node_position() can be correctly serialised.
2017-12-22 17:18:31 +00:00
thetaepsilon-gamedev a2e183c6f3 item_transport.lua: split out determination of next position in go_next() into separate function 2017-12-19 23:15:44 +00:00
thetaepsilon-gamedev fb91ba53f1 item_transport.lua: read cycle direction at start of go_next() in preparation for refactoring 2017-12-19 22:53:18 +00:00
thetaepsilon-gamedev 97522b6a24 item_transport.lua: update return statements in go_next() to include multimode parameter 2017-12-19 18:38:02 +00:00
thetaepsilon-gamedev 755dd26208 item_transport.lua: move tube limit checking before can_go() callback in go_next() 2017-12-19 18:17:22 +00:00
thetaepsilon-gamedev 56362cdd2a item_transport.lua: factor out tube overload code into separate function 2017-12-18 23:07:40 +00:00
thetaepsilon-gamedev 28a3ba44d1 item_transport.lua: initial support in item luaentity for multiple outputs and trajectories from go_next() 2017-12-18 22:38:24 +00:00
thetaepsilon-gamedev d659cb38b3 item_transport.lua: read extra multimode parameter from go_next callback 2017-12-18 22:07:53 +00:00
Vanessa Ezekowitz 8fa259c93f remove regular pipe inventory image 2017-11-11 00:22:52 -05:00
Vanessa Ezekowitz 8db1f02bca add craft recipe for straight-only pipe 2017-11-11 00:22:52 -05:00
thetaepsilon-gamedev 59d9e0b97d pressure logic: detect vertical orientation for horizontal rotating flowables 2017-11-04 22:27:47 +00:00
Vanessa Ezekowitz ee0c276900 added straight-only pipe
(for situations where one might want to run
several closely-spaced parallel pipelines)

Also fixed a bug where a pipe "entry panel" would
report full of water if a pipe next to it (but not
connecting) was also full of water

Only tested under "classic" flowing logic mode.
2017-11-03 23:02:36 -04:00
Vanessa Ezekowitz e46e2f8c45 clean-up "loaded"/"empty" images
re-UV-map the pipes that use them
2017-11-03 22:46:53 -04:00
Vanessa Ezekowitz 67b777885b Fix bad rotation of highpoly "pipe 5"
(X/Z corner with -Y junction)
2017-11-03 22:14:07 -04:00
Vanessa Ezekowitz a2f9be258e fix bad UV mapping on high poly entry panel 2017-10-28 11:26:17 -04:00
Vanessa Ezekowitz d71e371d17 flip pump models around (light faced the wrong way) 2017-10-28 11:05:36 -04:00
Vanessa Ezekowitz c2bd682388 add models and textures for pressure gauge
to be implemented later
2017-10-27 20:35:37 -04:00
Vanessa Ezekowitz 82524cb448 fix bad n-gon splitting in valve handle
(high-poly model only)
2017-10-27 19:39:47 -04:00
Vanessa Ezekowitz 8ffef8e43c treat unknown node obstructing chest lid as solid
fixes #207
2017-10-27 14:49:25 -04:00
Vanessa Ezekowitz 7b167224f4 Redrew all of the not-low-poly pipe-related models
to higher quality.  Way more polys than before, but
without a measurable drop in FPS.

Also tweaked the textures for the pump and flow
sensor, and tweaked the low-poly models for them,
so that low-poly models use a different part of
the texture for the "light" on the side (allows
the higher-poly models to just put a glow there
and use a raised dome for the actual light).

Also fixed a Z-fighting issue with the grating on
the bottom of the pump (both versions)
2017-10-27 00:30:26 -04:00
Vanessa Ezekowitz 8817918a53 add low-poly mode
to enable, set pipeworks_enable_lowpoly = true in minetest.conf
2017-10-26 04:11:30 -04:00
Vanessa Ezekowitz dfc09f3acc fix smooth shading on valve and flow sensor 2017-10-25 20:47:12 -04:00
thetaepsilon-gamedev 75978a0207 refactor pressure logic toggle to act as option enum 2017-10-20 22:46:51 +01:00
thetaepsilon-gamedev 538e33c537 init.lua: update pressure logic mode warning 2017-10-20 21:34:08 +01:00
thetaepsilon-gamedev 86fa342d85 default_settings.lua: line wrap length fixes for pressure logic toggle documentation 2017-10-19 21:51:55 +01:00
thetaepsilon-gamedev d4b32d5fa3 default_settings.lua: document pressure logic settings 2017-10-19 21:41:04 +01:00
thetaepsilon-gamedev 4d1c8d5529 changelog: add entry for pressure logic directionality work 2017-10-19 13:46:30 +01:00
thetaepsilon-gamedev bd172a3ca1 todo: remove item for directionality code 2017-10-19 13:43:11 +01:00
thetaepsilon-gamedev b7714df954 devices.lua: convert spigot to single-ended horizontally rotating flowable 2017-10-19 13:41:37 +01:00
thetaepsilon-gamedev b2b29a1737 pressure logic: rewrite callbacks for horizontal rotation flowables to support singular and double-ended devices 2017-10-19 13:35:31 +01:00
thetaepsilon-gamedev 9df0ec7edb devices.lua: convert entry panel and valve to horizontal rotation flowable class 2017-10-19 13:05:16 +01:00
thetaepsilon-gamedev fd4bd8eadc devices.lua: make flow sensor use the horizontally rotating flowable class 2017-10-19 12:30:28 +01:00
thetaepsilon-gamedev 0913098a9d pressure logic: add horizontally-rotating directional flowable helper 2017-10-19 12:28:33 +01:00
thetaepsilon-gamedev efcec7bdce pressure logic: abms.lua: fix invocation bug for directionality callback accidentally passing origin data to neighbour's directionfn 2017-10-19 12:13:44 +01:00
thetaepsilon-gamedev 3a85152e4d devices.lua: make fountainheads directional using fixed vertical helper 2017-10-18 21:44:36 +01:00
thetaepsilon-gamedev 7f7dfb79d5 pressure logic/flowable node registry: move pump directionality code to dedicated fixed vertical helper 2017-10-18 21:20:19 +01:00
thetaepsilon-gamedev 7b141fb0ea todo: rename file for new flow logic in line with aacd5ec 2017-10-18 12:07:16 +01:00
thetaepsilon-gamedev 38a893ec82 todo: update item for pressure logic directionality code 2017-10-18 12:06:00 +01:00
thetaepsilon-gamedev 0a97abcaf6 pressure logic/abms.lua: implement testing of flow direction testing in get_neighbour_positions() 2017-10-18 11:57:31 +01:00
thetaepsilon-gamedev 653aaffa3e pressure logic/abms.lua: rename local variables and retain node data in connection check for-loop 2017-10-18 11:32:16 +01:00
thetaepsilon-gamedev 084bbc6c0b pressure logic: abms.lua: get_neighbour_positions: move calculation of absolute world position to neighbour probing for-loop
This allows the raw offset to be visible inside that for-loop, which will be needed for calling the directionfn for directional neighbours to determine if they can flow in the given direction.
2017-10-18 09:32:33 +01:00
thetaepsilon-gamedev a69c5e24a9 devices.lua: implement directionfn for pump registration 2017-10-17 23:42:05 +01:00
thetaepsilon-gamedev 0a4d15d26e pressure logic: flowable node registry: add directionfn to directional flowable entries 2017-10-17 23:14:26 +01:00
thetaepsilon-gamedev 909b321f3c pressure logic: abms.lua: refactor balance_pressure() to move responsiblity for checking neighbour flow classes to get_neighbour_positions 2017-10-17 22:20:13 +01:00
thetaepsilon-gamedev d68d3d5852 pressure logic: abms.lua: move neighbour candidates calculation to separate function 2017-10-17 22:01:29 +01:00
thetaepsilon-gamedev a7c171940e todo: add item for supporting other fluid types 2017-10-17 14:53:32 +01:00
thetaepsilon-gamedev aacd5ec829 rename new_flow_logic subdirectory to a less ambiguous name
The "new flow logic" name was supposed to indicate that it was a continuation of the old branch by the same name, but it is beginning to become clear that it's not "new" any more and it might lead to confusion with "classic mode" flow logic while that still co-exists.
Explicitly name the subdirectory "pressure logic" to give a better idea of what goes in it, init.lua edited accordingly.
2017-10-17 14:20:55 +01:00
thetaepsilon-gamedev 7bacbdf015 todo: new flow logic: mark directionality code WIP 2017-10-16 23:44:17 +01:00
thetaepsilon-gamedev 0dd1dbc901 new flow logic: abms.lua: directional flow logic trace log points for local debugging 2017-10-16 23:41:03 +01:00