Jordan Irwin 2017-08-30 11:27:59 -07:00
parent c8de1cc677
commit 46c164c88f
3 changed files with 29 additions and 5 deletions

View File

@ -89,7 +89,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [playeranim][] ([BSD 2-Clause][lic.playeranim]) - version [59bcd38 Git][ver.playeranim] *2017-06-07* ([patched][patch.playeranim]) ***UPDATE***
* [wardrobe][] ([WTFPL][lic.wtfpl]) -- version: [1.1-2-c48b011 Git][ver.wardrobe] *2015-05-21*
* protection/
* [simple_protection][] ([WTFPL][lic.wtfpl]) -- version [574ecb8 Git][ver.simple_protection] *2017-07-15*
* [simple_protection][] ([WTFPL][lic.wtfpl]) -- version [91762c7 Git][ver.simple_protection] *2017-08-19* ([patched][patch.simple_protection])
* signs/
* [signs_lib][] ([BSD][lic.signs_lib] / [WTFPL][lic.wtfpl]) -- version: [f6b8c94 Git][ver.signs_lib] *2017-08-12*
* sound/
@ -459,7 +459,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.rainbow_ore]: https://github.com/FsxShader2012/rainbow_ore/tree/6e77693
[ver.sfinv_buttons]: http://repo.or.cz/minetest_sfinv_buttons.git/tree/4f3b075
[ver.signs_lib]: https://github.com/minetest-mods/signs_lib/tree/f6b8c94
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/574ecb8
[ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/91762c7
[ver.slingshot]: https://github.com/AntumMT/mod-slingshot/tree/bb77525
[ver.snowdrift]: https://github.com/paramat/snowdrift/tree/fcb0537
[ver.spawneggs]: https://github.com/thefamilygrog66/spawneggs/tree/4650370
@ -526,6 +526,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[patch.playeranim]: https://github.com/AntumMT/mod-playeranim/tree/8a289b9
[patch.quartz]: https://github.com/AntumMT/mod-quartz/tree/d23dabd
[patch.rainbow_ore]: https://github.com/AntumMT/mod-rainbow_ore/tree/0227a86
[patch.simple_protection]: https://github.com/AntumMT/mod-simple_protection/tree/2b5bf66
[patch.snowdrift]: https://github.com/AntumMT/mod-snowdrift/tree/1b9da4f
[patch.spawneggs]: https://github.com/AntumMT/mod-spawneggs/tree/f2cc4cc
[patch.technic]: https://github.com/AntumMT/mp-technic/tree/28eaaec

View File

@ -166,6 +166,8 @@ minetest.register_craftitem("simple_protection:claim", {
return itemstack
end,
})
minetest.register_alias("simple_protection:claim_stick", "simple_protection:claim")
minetest.register_alias("claim_stick", "simple_protection:claim")
minetest.register_craft({
output = "simple_protection:claim",

View File

@ -76,13 +76,34 @@ s_protect.command_radar = function(name)
local marker_str = string.format(":%i,%i=%s", pp_x, pp_z,
combine_escape("object_marker_red.png^[resize:8x8"))
-- Rotation calculation
local dir_label = "North (Z+)"
local dir_mod = ""
local look_angle = player.get_look_horizontal and player:get_look_horizontal()
if not look_angle then
look_angle = player:get_look_yaw() - math.pi / 2
end
look_angle = look_angle * 180 / math.pi
if look_angle >= 45 and look_angle < 135 then
dir_label = "West (X-)"
dir_mod = "^[transformR270"
elseif look_angle >= 135 and look_angle < 225 then
dir_label = "South (Z-)"
dir_mod = "^[transformR180"
elseif look_angle >= 225 and look_angle < 315 then
dir_label = "East (X+)"
dir_mod = "^[transformR90"
end
minetest.show_formspec(name, "covfefe",
"size[10.5,7]" ..
"button_exit[9.5,0;1,1;exit;X]" ..
"label[2,0;North (Z+)]" ..
"button_exit[9.5,0;1,2;exit;X]" ..
"label[2,0;"..dir_label.."]" ..
"image[0,0.5;7,7;" ..
minetest.formspec_escape("[combine:300x300"
.. parts .. marker_str) .. "]" ..
.. parts .. marker_str)
.. dir_mod .. "]" ..
"label[0,6.8;1 square = 1 area = "
.. s_protect.claim_size .. "x"
.. s_protect.claim_height .. "x"