forked from minetest-mods/player_monoids
Merge pull request #6 from Panquesito7/master
Use mod.conf for description / remove extra whitespace / give monoid_master privilege to admin
This commit is contained in:
commit
ed11a7395b
@ -1,2 +0,0 @@
|
|||||||
player_monoids is a library for managing global player state, such as physics
|
|
||||||
overrides or player visual size.
|
|
6
mod.conf
6
mod.conf
@ -1 +1,5 @@
|
|||||||
name=player_monoids
|
name = player_monoids
|
||||||
|
description = """
|
||||||
|
A library for managing global player state,
|
||||||
|
such as physics overrides or player visual size.
|
||||||
|
"""
|
@ -63,7 +63,6 @@ player_monoids.jump = monoid({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Gravity monoid. Effect values are gravity multipliers.
|
-- Gravity monoid. Effect values are gravity multipliers.
|
||||||
player_monoids.gravity = monoid({
|
player_monoids.gravity = monoid({
|
||||||
combine = mult,
|
combine = mult,
|
||||||
@ -76,7 +75,6 @@ player_monoids.gravity = monoid({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Fly ability monoid. The values are booleans, which are combined by or. A true
|
-- Fly ability monoid. The values are booleans, which are combined by or. A true
|
||||||
-- value indicates having the ability to fly.
|
-- value indicates having the ability to fly.
|
||||||
player_monoids.fly = monoid({
|
player_monoids.fly = monoid({
|
||||||
@ -104,7 +102,6 @@ player_monoids.fly = monoid({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- Noclip ability monoid. Works the same as fly monoid.
|
-- Noclip ability monoid. Works the same as fly monoid.
|
||||||
player_monoids.noclip = monoid({
|
player_monoids.noclip = monoid({
|
||||||
combine = function(p, q) return p or q end,
|
combine = function(p, q) return p or q end,
|
||||||
|
1
test.lua
1
test.lua
@ -4,6 +4,7 @@ local speed = player_monoids.speed
|
|||||||
minetest.register_privilege("monoid_master", {
|
minetest.register_privilege("monoid_master", {
|
||||||
description = "Allows testing of player monoids.",
|
description = "Allows testing of player monoids.",
|
||||||
give_to_singleplayer = false,
|
give_to_singleplayer = false,
|
||||||
|
give_to_admin = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
local function test(player)
|
local function test(player)
|
||||||
|
Loading…
Reference in New Issue
Block a user