-
Notifications
You must be signed in to change notification settings - Fork 25
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
Portal abstraction #8
Portal abstraction #8
Commits on Feb 15, 2020
-
Separate portal shape code from portal behavior code, and refactor
Allows dev and testing/debugging to focus on one (shape or behavior) without getting mixed up in the other, will also enable different portal shapes later on. Other adjustments: * Reuse/reignite an existing portal or portal frame if there is one at the remote destination, rather than the area being overwritten by a slightly offset portal schematic. * Create remote portals in a matching orientation to the local portal. * Preserve player position & facing relative to portal when traveling through wormhole (even if portals are at 90°) * Players no longer bounce several times after teleporting * Player is not teleported until after the portal at the other end is confirmed/built
Configuration menu - View commit details
-
Copy full SHA for d9911e6 - Browse repository at this point
Copy the full SHA d9911e6View commit details -
Portals can be switched on and off with mesecons (from a tech-tree perspective, mese is still required for portal ignition)
Configuration menu - View commit details
-
Copy full SHA for a9cdc36 - Browse repository at this point
Copy the full SHA a9cdc36View commit details -
Configuration menu - View commit details
-
Copy full SHA for df4b40f - Browse repository at this point
Copy the full SHA df4b40fView commit details -
Allow reignition of portals in player-built areas
e.g. allow remote ignition to a portal in a "portal room"
Configuration menu - View commit details
-
Copy full SHA for dd761b4 - Browse repository at this point
Copy the full SHA dd761b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a222d4 - Browse repository at this point
Copy the full SHA 1a222d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74b25ac - Browse repository at this point
Copy the full SHA 74b25acView commit details -
Part of e5a5db9, fixes an issue where node timers weren't stopped by extinguish_portal(). And tweaks some comments
Configuration menu - View commit details
-
Copy full SHA for 71244a7 - Browse repository at this point
Copy the full SHA 71244a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e221cf1 - Browse repository at this point
Copy the full SHA e221cf1View commit details -
Prevent portals from sharing frame nodes with other portals
While it's rather cute having portals that share parts of their frame with other portals, the way the nether mod implemented portals means a node being part of more than one portal enables a family of bugs. Igniting a portal now extinguishes any portal that was using nodes now taken by the newly ignited portal.
Configuration menu - View commit details
-
Copy full SHA for d45908e - Browse repository at this point
Copy the full SHA d45908eView commit details -
Allow two or more portal types to be made with the same frame material
(provided they are different sized portals) Removes direct references to the registered_portals table
Configuration menu - View commit details
-
Copy full SHA for b3d1339 - Browse repository at this point
Copy the full SHA b3d1339View commit details -
Dynamic/hardware portal colouring
Currently proof of concept: Removes wormhole colour from .png texture and specifies it through MT API instead. The post_effect_color may call for registering a separate node per portal colour. Palette 0 will have to be the traditional portal magenta (instead of 0 being black) for map compatibility with mod when colour was in the texture and not param2.
Configuration menu - View commit details
-
Copy full SHA for 67bf24e - Browse repository at this point
Copy the full SHA 67bf24eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fe2c86 - Browse repository at this point
Copy the full SHA 5fe2c86View commit details -
Squashed commit of the following: commit e80030750df91f75745c7d52729a0d4942eb32f8 Author: Treer <treer.git+github@the-bordello.com> Date: Sat Jul 13 13:52:02 2019 +1000 Finish book of portals commit 82ad3d6af683b6bb4cc107e8c76f44c0b791a28d Author: Treer <treer.git@gmail.com> Date: Thu Jul 11 22:43:02 2019 +1000 Book of Portals art commit fac6ff1da89a1b06b78deb0b5b4e3bebe4166860 Author: Treer <treer.git@gmail.com> Date: Thu Jul 11 00:39:50 2019 +1000 starting book of portals
Configuration menu - View commit details
-
Copy full SHA for b04b4cb - Browse repository at this point
Copy the full SHA b04b4cbView commit details -
Portals connect to nearby targets
Records portal positions. More testing required
Configuration menu - View commit details
-
Copy full SHA for 44f4f5e - Browse repository at this point
Copy the full SHA 44f4f5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f5cc9c - Browse repository at this point
Copy the full SHA 1f5cc9cView commit details -
fixes nullreference in find_surface_target_y, and ensure_remote_portal_then_teleport assuming a traditional portal shape. minor documentation work.
Configuration menu - View commit details
-
Copy full SHA for 711c930 - Browse repository at this point
Copy the full SHA 711c930View commit details -
Unlinks target portal if it's linked to a different portal
This is effectively a missing part to the change that made locate_or_build_portal() enforce that portals only link together in mutual pairs. As target portals that didn't need to be located or built we not being updated to link back to where the player travelled from. Also * implements events: on_run_wormhole, on_extinguish * adds a lot of debug info
Configuration menu - View commit details
-
Copy full SHA for d4d3af2 - Browse repository at this point
Copy the full SHA d4d3af2View commit details -
Fix bug where ensure_remote_portal_then_teleport() converted its destination_wormholePos to an anchorPos to pass to locate_or_build_portal() which converted it back to an wormholePos. Bug occurred when local_orientation was assumed for the target orientation, which could lead to locate_or_build_portal() ending up with a reconstituted wormholePos rotated outside the portal frame, not find a portal frame, so build a new portal there, griefing the old one. locate_or_build_portal() has been refactored to take a wormholePos instead of an anchorPos, removing the need to know the orientation of the target portal (which can't be obtained from the param2 when the target portal is unlit)
Configuration menu - View commit details
-
Copy full SHA for a4f78c6 - Browse repository at this point
Copy the full SHA a4f78c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc90d79 - Browse repository at this point
Copy the full SHA fc90d79View commit details -
eliminate need to assign extinguish_portal() to a local var, and group the helper functions together in the API section
Configuration menu - View commit details
-
Copy full SHA for d2a18ad - Browse repository at this point
Copy the full SHA d2a18adView commit details -
Keep portal type in metadata for non-traditional portals
Makes the portal system more flexible - new portal shapes don't have to ensure there's a frame node at the timerPos
Configuration menu - View commit details
-
Copy full SHA for 84def17 - Browse repository at this point
Copy the full SHA 84def17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21e312f - Browse repository at this point
Copy the full SHA 21e312fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e82d9e3 - Browse repository at this point
Copy the full SHA e82d9e3View commit details -
Place_Schematic uses correct frame and wormhole nodes
This requires a cache-invalidation hack borrowed from cloudlands mod. Also, null reference fixes in ensure_remote_portal_then_teleport and locate_or_build_portal, and minor improvements
Configuration menu - View commit details
-
Copy full SHA for 97aa8da - Browse repository at this point
Copy the full SHA 97aa8daView commit details -
Add example alternative shape PortalShape_Circular
Also fixes up a few bugs that only became apparent when not using the traditional portal shape
Configuration menu - View commit details
-
Copy full SHA for a679d2c - Browse repository at this point
Copy the full SHA a679d2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98ca59b - Browse repository at this point
Copy the full SHA 98ca59bView commit details -
Also implements an ignition failure sound.
Configuration menu - View commit details
-
Copy full SHA for c934cfa - Browse repository at this point
Copy the full SHA c934cfaView commit details -
Currently the example portals just take you to the nether, like nether portals. In theory they could take players anywhere.
Configuration menu - View commit details
-
Copy full SHA for d5bfb14 - Browse repository at this point
Copy the full SHA d5bfb14View commit details -
Configuration menu - View commit details
-
Copy full SHA for ceb7148 - Browse repository at this point
Copy the full SHA ceb7148View commit details -
Configuration menu - View commit details
-
Copy full SHA for f11669f - Browse repository at this point
Copy the full SHA f11669fView commit details -
Standardize files as LF without CR, and UTF-8 without BOM
UTF-8 with BOM crashes some systems according to 6551f5c comment, and there are several cases where Minetest is buggy with files that use CRLF line endings (though none I'm aware that affect these files), so strip CRs and BOM
Configuration menu - View commit details
-
Copy full SHA for f9692fa - Browse repository at this point
Copy the full SHA f9692faView commit details -
Configuration menu - View commit details
-
Copy full SHA for c15fd36 - Browse repository at this point
Copy the full SHA c15fd36View commit details -
and other work on the portal examples also documentation and fixing issue where apples prevented volume_is_natural() from returning true
Configuration menu - View commit details
-
Copy full SHA for 672069d - Browse repository at this point
Copy the full SHA 672069dView commit details -
give nether_portal_circular.mts a flat floor - the new nether_portal_circular.mts allows its bottom nodes to be sunk into the ground. Example portal basic behavior and book_of_portals_pagetext implemented. Other changes are allowing portals corrupted by ABMs to be repaired, finding better ground level of surface portals.
Configuration menu - View commit details
-
Copy full SHA for 7c11ee9 - Browse repository at this point
Copy the full SHA 7c11ee9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddf1be - Browse repository at this point
Copy the full SHA 1ddf1beView commit details -
Move wormhole_node_is_horizontal into the shape definition
out of the portal defintion
Configuration menu - View commit details
-
Copy full SHA for 10d8925 - Browse repository at this point
Copy the full SHA 10d8925View commit details -
check for portal frames on the surface
When a surface level was known, only the volume_is_natural check was being performed, this fixes that. Also fixes bug where LBM didn't start the timer of example portals that had been disabled. Allows portal ignite to repair a stopped timer. Other misc cleanup - paramat's new Floatlands won't have lakes so I removed that from the flavortext.
Configuration menu - View commit details
-
Copy full SHA for 2bddf34 - Browse repository at this point
Copy the full SHA 2bddf34View commit details -
Handle edge-case when player quits the game while teleporting
Issue was raised as a pull request against the original code - minetest-mods#12 Also replaces deprecated getpos/setpos with get_pos/set_pos - minetest-mods#11
Configuration menu - View commit details
-
Copy full SHA for 55e4e9d - Browse repository at this point
Copy the full SHA 55e4e9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b74b92b - Browse repository at this point
Copy the full SHA b74b92bView commit details -
wormholes now emit mesecon energy, allowing mesecons to know the state of the portal. (mesecons could previously only set the state of the portal)
Configuration menu - View commit details
-
Copy full SHA for 79ed3f1 - Browse repository at this point
Copy the full SHA 79ed3f1View commit details -
Update copyrights & require Minetest v0.4.16 or greater
Also adds nether.register_wormhole_node(), moving the wormhole node template into portal_api.lua, and allowing wormhole nodes with custom post_effect_color to be more easily created.
Configuration menu - View commit details
-
Copy full SHA for 7b72364 - Browse repository at this point
Copy the full SHA 7b72364View commit details -
Update .luacheckrc and fix warnings
Changes to reduce formatting warnings will be committed separately
Configuration menu - View commit details
-
Copy full SHA for 44e68d8 - Browse repository at this point
Copy the full SHA 44e68d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1312bf6 - Browse repository at this point
Copy the full SHA 1312bf6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f7614b - Browse repository at this point
Copy the full SHA 2f7614bView commit details -
Also a minor change to prevent surface portals from appearing in a grid pattern in MT 0.4
Configuration menu - View commit details
-
Copy full SHA for 1ffd88f - Browse repository at this point
Copy the full SHA 1ffd88fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4297b31 - Browse repository at this point
Copy the full SHA 4297b31View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe17efe - Browse repository at this point
Copy the full SHA fe17efeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b5b09b - Browse repository at this point
Copy the full SHA 6b5b09bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f02ab3 - Browse repository at this point
Copy the full SHA 2f02ab3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d4a343 - Browse repository at this point
Copy the full SHA 4d4a343View commit details -
https://forum.minetest.net/viewtopic.php?t=15912 Don't place Book of Portals in dungeon chests if its contents can be written in the help modpack Encyclopedia instead, and don't add Book of Portals to dungeon chests if Nether portals are the only type of portal - A Nether mod doesn't need a Book of Portals if it's only being used to provide a Nether portal.
Configuration menu - View commit details
-
Copy full SHA for 0d9bf52 - Browse repository at this point
Copy the full SHA 0d9bf52View commit details -
drop portal shape images to 2bit
Save some bits. Unfortunately PNG can't do 3bit-indexed images :(
Configuration menu - View commit details
-
Copy full SHA for e2960e9 - Browse repository at this point
Copy the full SHA e2960e9View commit details -
prevent obscure portal behaviour bug
If a portal is being ignited and portal frame near-but-not-at its destination was found that was active and already linked back to the local portal, it would cause the local portal to be extinguished. (Required the remote portal to somehow be in a different state from the portal it was linking to)
Configuration menu - View commit details
-
Copy full SHA for b0f7130 - Browse repository at this point
Copy the full SHA b0f7130View commit details -
Use lua schematics instead of .mts files when building portals
Removes the need for the get_malleated_schematic_filename hack
Configuration menu - View commit details
-
Copy full SHA for 43983d3 - Browse repository at this point
Copy the full SHA 43983d3View commit details -
Improvements found while using the portals API in another mod (cloudlands): * remote_portal_checkup() will check the whole portal and frame for mapgen overwrites. * Allow find_realm_anchorPos() to return nil if no realm location could be found (portal will fail to ignite). * Allow create_book_of_portals() to be invoked [indirectly] by other mods. Also lowers nether_book_close.png to be 4bpp
Configuration menu - View commit details
-
Copy full SHA for b31df12 - Browse repository at this point
Copy the full SHA b31df12View commit details