tidy code
This commit is contained in:
parent
1b3ab4fedf
commit
be6a63eb5c
14
init.lua
14
init.lua
@ -224,7 +224,7 @@ if name and playerplus[name] then
|
||||
|
||||
object:punch(object, 0.1, {
|
||||
full_punch_interval = 0.1,
|
||||
damage_groups = {fleshy = 2},
|
||||
damage_groups = {fleshy = 2}
|
||||
}, near)
|
||||
end
|
||||
|
||||
@ -244,10 +244,7 @@ minetest.register_on_joinplayer(function(player)
|
||||
|
||||
local name = player:get_player_name()
|
||||
|
||||
playerplus[name] = {}
|
||||
playerplus[name].nod_head = ""
|
||||
playerplus[name].nod_feet = ""
|
||||
playerplus[name].nod_stand = ""
|
||||
playerplus[name] = {nod_head = "", nod_feet = "", nod_stand = ""}
|
||||
|
||||
-- apply old sneak glitch if enabled
|
||||
if old_sneak then
|
||||
@ -265,8 +262,9 @@ end)
|
||||
|
||||
-- add privelage to disable knock-back
|
||||
minetest.register_privilege("no_knockback", {
|
||||
description = "Disables player knock-back effect",
|
||||
give_to_singleplayer = false})
|
||||
description = "Disables player knock-back effect",
|
||||
give_to_singleplayer = false
|
||||
})
|
||||
|
||||
-- is player knock-back effect enabled?
|
||||
if minetest.settings:get_bool("player_knockback") == true then
|
||||
@ -345,7 +343,7 @@ minetest.register_tool("playerplus:stick", {
|
||||
wield_image = "playerplus_sword_boing.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.4,
|
||||
damage_groups = {fleshy = 0, knockback = 11, not_in_creative_inventory = 1},
|
||||
damage_groups = {fleshy = 0, knockback = 11, not_in_creative_inventory = 1}
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user