- Modifications to `nether.is_player_in_nether()` and `nether.external_nether_teleport()`
- Renamed `players_in_nether[]` to `players_trapped_in_nether[]`
- Fixed punctuation in a comment. =D
- Added a new global function to the nether table that lets external mods tell us to update a player's Nether status based on the player's position. This function has been exposed to the console via a registered chat function.
- Switched from NETHER as the global table to nether as the global table after discovering that nether was already being used in init.lua.
- Switched from accessing function calls in the global table from table syntax to object syntax; as it looks cleaner.
Added new chat function `in_hell [<player_name>]` and used it to find the bug. The issue was that `local function obsidian_teleport(player, pname, target)` failed to test `nether.trap_players` before modifying `players_in_nether`.
The function which calculates positions of an empty square currently has a bug:
it returns the northeastern and southwestern corners twice
and omits the northwestern and southeastern ones.
This leads to a nether portal detection which is not rigorous enough, skipping eight nodes.
This commit fixes the problem.
Closes #13
* Remove code which uses the font size setting to position text and images. Instead use Minetest's hypertext formspec element
* Rewrite many parts of the guide contents, e.g. "you" -> "we", more detailed portal description
* Add a setting to permit viewing it in the overworld (enabled by default)
* Update the Readme
I have set the font size to 24, which works well for me on a 1920x1080 screen with somewhat high DPI. The text written in hypertext apparently ignores the Minetest font size setting, so it may look bad on different screens.
And use minetest.fix_light instead of a custom function (surprisingly it didn't cause a noticeable performance difference)
Also, a few code style changes
I've also made a few other changes:
Use minetest.pos_to_string instead of manually creating the string
Do not use table_contains to test if a node id belongs to a nether tree, instead use lua table hashmap behaviour