mod.invisibility: Update to Git commit e3f04a2 & patch 0ef4c18...
Upstream: e3f04a25c2
Patch: https://github.com/AntumMT/mod-invisibility/tree/0ef4c18
This commit is contained in:
parent
7c83e7bdbf
commit
91168a286d
@ -87,7 +87,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
* player/action/
|
||||
* [hbsprint][] ([LGPL][lic.lgpl2.1]) -- version: [de3e77e Git][ver.hbsprint] *2018-04-11* ([patched][patch.hbsprint])
|
||||
* player/visuals/
|
||||
* [invisibility][] ([MIT][lic.invisibility]) -- version: [bf4156b Git][ver.invisibility] *2016-08-19* ([patched][patch.invisibility]) ***UPDATES***
|
||||
* [invisibility][] ([MIT][lic.invisibility]) -- version: [e3f04a2 Git][ver.invisibility] *2017-10-09* ([patched][patch.invisibility])
|
||||
* [playeranim][] ([BSD 2-Clause][lic.playeranim]) - version [560af7e Git][ver.playeranim] *2018-06-09* ([patched][patch.playeranim])
|
||||
* [wardrobe][] ([WTFPL][lic.wtfpl]) -- version: [1.1-2-c48b011 Git][ver.wardrobe] *2015-05-21*
|
||||
* protection/
|
||||
@ -438,7 +438,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[ver.hudmap]: https://github.com/stujones11/hudmap/tree/3b8bdc0
|
||||
[ver.ilights]: https://github.com/minetest-mods/ilights/tree/fa085fd
|
||||
[ver.intllib]: https://github.com/minetest-mods/intllib/tree/9192771
|
||||
[ver.invisibility]: https://github.com/tenplus1/invisibility/tree/bf4156b
|
||||
[ver.invisibility]: https://notabug.org/TenPlus1/invisibility/src/e3f04a25c22fa6f9ac044de0bf2f5978c0a95cdf
|
||||
[ver.jukebox]: https://github.com/minetest-mods/jukebox/tree/d1cd9e1
|
||||
[ver.lightning]: https://github.com/minetest-mods/lightning/tree/39bd36c
|
||||
[ver.mesecons]: https://github.com/minetest-mods/mesecons/tree/7013f2e
|
||||
@ -517,7 +517,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
||||
[patch.homedecor]: https://github.com/AntumMT/mp-homedecor/tree/b882d73
|
||||
[patch.hovercraft]: https://github.com/AntumMT/mod-hovercraft/tree/73a6223
|
||||
[patch.hud]: https://github.com/AntumMT/mod-hud/tree/6846e20
|
||||
[patch.invisibility]: https://github.com/AntumMT/mod-invisibility/tree/f045c7c
|
||||
[patch.invisibility]: https://github.com/AntumMT/mod-invisibility/tree/0ef4c18
|
||||
[patch.mesecons]: https://github.com/AntumMT/mp-mesecons/tree/96784e2
|
||||
[patch.minetest_game]: https://github.com/AntumMT/mtgame-minetest/tree/355a756
|
||||
[patch.mob-engine]: https://github.com/AntumMT/mp-mob-engine/tree/2aa511d
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
Invisibility Potion by TenPlus1
|
||||
|
||||
This mod lets you craft an invisibility potion using 1x Nyan Cat Rainbow and 1x Glass Bottle.
|
||||
This mod lets you craft an invisibility potion using one of each sapling (tree, jungle, pine, acacia, aspen, bush, acacia bush), a red mushroom and glass bottle.
|
||||
|
||||
Use potion to hide yourself AND nametag (0.4.14 dev only) for 5 minutes.
|
||||
Use potion to hide yourself AND nametag (0.4.15+ only) for 3 minutes.
|
||||
|
||||
Server admin can use the '/vanish <name>' command to hide/unhide players or themselves by leaving it blank.
|
||||
|
||||
@ -14,3 +14,5 @@ Changelog:
|
||||
- 0.1 - Initial Upload
|
||||
- 0.2 - Added error checking and a 10 second warning before becoming visible
|
||||
- 0.3 - Potions can now be stacked
|
||||
- 0.4 - Potion recipe changed now that Nyan Cat no longer in default game
|
||||
- 0.5 - Use newer functions, Minetest 0.4.16 and anove needed to run
|
||||
|
@ -1,2 +1,3 @@
|
||||
default
|
||||
vessels
|
||||
flowers
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
invisibility = {}
|
||||
|
||||
local effect_time = 300 -- 5 minutes
|
||||
local effect_time = 180 -- 3 minutes
|
||||
|
||||
|
||||
-- reset player invisibility if they go offline
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
|
||||
local name = player:get_player_name()
|
||||
@ -14,8 +14,15 @@ minetest.register_on_leaveplayer(function(player)
|
||||
end
|
||||
end)
|
||||
|
||||
-- invisibility potion
|
||||
|
||||
-- creative check
|
||||
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
||||
function is_creative(name)
|
||||
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
|
||||
end
|
||||
|
||||
|
||||
-- invisibility potion
|
||||
minetest.register_node("invisibility:potion", {
|
||||
description = "Invisibility Potion",
|
||||
drawtype = "plantlike",
|
||||
@ -87,7 +94,7 @@ minetest.register_node("invisibility:potion", {
|
||||
end)
|
||||
|
||||
-- take potion, return empty bottle (and rest of potion stack)
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
if not is_creative(user:get_player_name()) then
|
||||
|
||||
local item_count = user:get_wielded_item():get_count()
|
||||
local inv = user:get_inventory()
|
||||
@ -114,16 +121,23 @@ minetest.register_node("invisibility:potion", {
|
||||
end,
|
||||
})
|
||||
|
||||
-- craft recipe
|
||||
|
||||
-- craft recipe
|
||||
minetest.register_craft( {
|
||||
output = "invisibility:potion",
|
||||
type = "shapeless",
|
||||
recipe = {"default:nyancat_rainbow", "vessels:glass_bottle"},
|
||||
recipe = {
|
||||
"default:sapling", "default:junglesapling",
|
||||
"default:pine_sapling", "default:acacia_sapling",
|
||||
"default:aspen_sapling", "default:bush_sapling",
|
||||
"default:acacia_bush_sapling",
|
||||
"vessels:glass_bottle", "flowers:mushroom_red",
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
-- invisibility function
|
||||
|
||||
-- invisibility function
|
||||
local toggle_invisible = function(player, toggle)
|
||||
|
||||
if not player then return false end
|
||||
@ -139,7 +153,7 @@ local toggle_invisible = function(player, toggle)
|
||||
-- hide player and name tag
|
||||
prop = {
|
||||
visual_size = {x = 0, y = 0},
|
||||
collisionbox = {0, 0, 0, 0, 0, 0}
|
||||
-- collisionbox = {0, 0, 0, 0, 0, 0}
|
||||
}
|
||||
|
||||
player:set_nametag_attributes({
|
||||
@ -149,7 +163,7 @@ local toggle_invisible = function(player, toggle)
|
||||
-- show player and tag
|
||||
prop = {
|
||||
visual_size = {x = 1, y = 1},
|
||||
collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}
|
||||
-- collisionbox = {-0.35, -1, -0.35, 0.35, 1, 0.35}
|
||||
}
|
||||
|
||||
player:set_nametag_attributes({
|
||||
@ -161,8 +175,8 @@ local toggle_invisible = function(player, toggle)
|
||||
|
||||
end
|
||||
|
||||
-- vanish command (admin only)
|
||||
|
||||
-- vanish command (admin only)
|
||||
minetest.register_chatcommand("vanish", {
|
||||
params = "<name>",
|
||||
description = "Make player invisible",
|
||||
|
Loading…
x
Reference in New Issue
Block a user