25 Commits

Author SHA1 Message Date
Lone_Wolf
e428ced261 Fix crash in spawnpoint.save (triggered by /setspawn) (#3) 2019-03-22 12:58:43 -07:00
octacian
f7a102396f Improve log callbacks
* Remove load logging
* Remove save logging
* Log on set spawnpoint
* Log on configure variable
* Fix get configuration for `do_not_move`
2017-07-08 17:13:32 -07:00
octacian
7a6d676b36 Use better save formats
* Save using Settings API
* Support for Minetest modstorage API
* Auto import from old format
2017-07-02 12:15:11 -07:00
octacian
2943f1be9a Use vector.round on positions 2017-06-30 16:48:38 -07:00
octacian
d20d5bf921 Fix formatting 2017-06-30 10:27:17 -07:00
octacian
047eaf8871 Improve README 2017-03-23 17:31:20 -07:00
octacian
447be07cdc Improve do_not_move globalstep
Would ignore the fact that do not move was disabled and would also send extra messages to the player as `moved[name]` was not set to `false` after the teleportation was complete.
2017-03-23 17:20:28 -07:00
octacian
b80cfda6df Allow configuring variables in-game
Variables can be configured in-game per-world with the `/spawnpoint` command.
2017-03-23 17:17:04 -07:00
octacian
c5adcc3417 Improve movement checking
Stop teleportation immediately when moved using on_globalstep.
2017-03-23 07:42:27 -07:00
octacian
f4b3158521 Fix do_not_move
Would send message stating that the teleportation was interrupted but the player would still be teleported. This adds a check just before teleportation to make sure that the player hasn't moved.
2017-03-22 22:35:52 -07:00
octacian
f343dcae3d Add /spawnpoint command
Displays spawnpoint if set.
2017-03-22 22:30:12 -07:00
octacian
e400c183d6 Throw error if no spawnpoint set
Prevents attempting to teleport the player if no spawnpoint is set. Instead returns a message saying "No spawnpoint set!"
2017-03-22 22:27:12 -07:00
octacian
5051305c51 Fix description on /setspawn chatcommand 2017-03-22 22:26:05 -07:00
octacian
10e61f6da4 Fix crash on game exit
Game would crash entirely on exit if `spawnpoint.pos` was `nil` because `minetest.pos_to_string` would fail.
2017-03-22 22:25:45 -07:00
octacian
018d1050d7 Fix crash on new worlds
Because spawnpoint.conf did not exist, the game would not load. This was previously attempted to be fixed in 4de1fd23bcc15253fee1bfac440ee884eb515549 but the fix was not successful.
2017-03-22 22:21:04 -07:00
octacian
4de1fd23bc Fix crash if spawnpoint.conf does not exist 2017-03-14 20:46:02 -07:00
octacian
5844868589 Add teleportation countdown 2017-03-08 20:51:37 -08:00
octacian
faf9e2824f Remove after decimal before saving positions
Adds helper function, spawnpoint.pos_clean, to strip off everything past the decimal point when saving a new spawnpoint position.
2017-03-08 17:47:26 -08:00
octacian
fb42e1c504 Add screenshot 2017-03-08 14:40:54 -08:00
octacian
6a9b006558 Update README 2017-03-08 14:20:56 -08:00
octacian
d1a9c7ffa8 Add chatcommands 2017-03-08 14:01:17 -08:00
octacian
2761dd5128 Fixes 2017-03-08 14:00:58 -08:00
octacian
6a62b2bd56 Add basic helpers
Allows loading, saving, setting, and bringing player to spawnpoint.
Includes save and bring code on respawnplayer.
2017-03-08 12:48:08 -08:00
octacian
8bff3bf0b1 Add logger 2017-03-08 12:47:19 -08:00
octacian
a87c06ae0d Initial Commit 2017-03-08 12:33:22 -08:00