* The obsidian portal is the first way for a player to reach the nether,
so if damage is enabled and `nether.trap_players` is disabled,
the obsidian portal should teleport the player instead of killing him/her
since after death he/she respawns in the overworld and not in the nether.
A small change in `obsi_teleport_player` fixes this problem.
Fixes #16.
* There exist other mods which need to check if players are in the nether and
teleport them to/from the nether, so we add four helper functions:
`nether.is_player_in_nether`, `nether.is_player_trapped_in_nether`.
`nether.external_nether_teleport` and `nether.registry_update`.
Fixes #14.
* Add the `in_hell`, `trapped_in_hell` and `update_hells_registry` chat
commands, which can be used for debugging
* `players_in_nether` has no meaningful effect if `nether.trap_players` is
disabled, so we rename it to `players_trapped_in_nether`.
* Add `nether.bottom`, which approximately corresponds to the lower end of the
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