Add files via upload
parent
9a25624376
commit
b456d67250
|
@ -555,7 +555,7 @@ minetest.register_globalstep(function(dtime)
|
|||
local a="stand"
|
||||
local hunger = -0.0001
|
||||
|
||||
if key.jump and player:get_look_vertical() <= -1.5 and not player:get_attach() and special.use_ability(player,"fly_as_a_bird") then
|
||||
if key.jump and player:get_look_vertical() <= -1.5 and not player:get_attach() and special.have_ability(player,"fly_as_a_bird") and special.use_ability(player,"fly_as_a_bird") then
|
||||
local ob = minetest.add_entity(apos(p,0,1), "examobs:hawk")
|
||||
local en = ob:get_luaentity()
|
||||
en.target = player
|
||||
|
@ -577,7 +577,7 @@ minetest.register_globalstep(function(dtime)
|
|||
local key = target:get_player_control()
|
||||
self.flee = nil
|
||||
self.fight = nil
|
||||
if not key. jump or not target:get_attach() or target:get_hp() <= 0 or self.dead or self.dying then
|
||||
if not key.jump or not target:get_attach() or target:get_hp() <= 0 or self.dead or self.dying then
|
||||
target:set_detach()
|
||||
target:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
target:set_properties({textures = en.playerskin})
|
||||
|
|
|
@ -460,14 +460,6 @@ minetest.register_on_player_receive_fields(function(player, form, pressed)
|
|||
return
|
||||
end
|
||||
end
|
||||
|
||||
for i,v in pairs(invp.adds) do
|
||||
if pressed[i] and invp.adds_func[i] then
|
||||
invp.adds_func[i](player)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
for i,v in pairs(pressed) do
|
||||
if i:sub(1,8) == "itembut_" then
|
||||
|
@ -476,6 +468,13 @@ minetest.register_on_player_receive_fields(function(player, form, pressed)
|
|||
break
|
||||
end
|
||||
end
|
||||
|
||||
for i,v in pairs(invp.adds) do
|
||||
if pressed[i] and invp.adds_func[i] then
|
||||
invp.adds_func[i](player)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif form == "player_style.manual" then
|
||||
if pressed.manuallist then
|
||||
|
|
|
@ -69,8 +69,8 @@ special={
|
|||
use=function(player,c)
|
||||
c = c or -1
|
||||
local m = player:get_meta()
|
||||
local f = m:get_int("fire_resistance")
|
||||
local hp = f+c
|
||||
local f = m:get_int("fire_resistance")
|
||||
local hp = f+c
|
||||
if f > 0 then
|
||||
m:set_int("fire_resistance",hp > 0 and hp or 0)
|
||||
special.hud(player,"default:qblock_e29f00")
|
||||
|
@ -227,6 +227,9 @@ special.hud=function(player,n)
|
|||
end
|
||||
|
||||
special.have_ability=function(player,ab)
|
||||
if player:get_meta():get_int("special_disabled") == 1 then
|
||||
return false
|
||||
end
|
||||
local s = special.shortcuts[ab]
|
||||
local name = player:get_player_name()
|
||||
local i = special.blocks[s].i
|
||||
|
@ -254,7 +257,11 @@ player_style.register_button({
|
|||
type="item_image",
|
||||
info="Abilities",
|
||||
action=function(user)
|
||||
special.show(user)
|
||||
if user:get_meta():get_int("special_disabled") == 1 then
|
||||
minetest.chat_send_player(user:get_player_name(),"Abilities is disallowed in this case")
|
||||
else
|
||||
special.show(user)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
|
|
@ -4,7 +4,11 @@ player_style.register_button({
|
|||
type="image",
|
||||
info="Store",
|
||||
action=function(player)
|
||||
player_style.store(player)
|
||||
if player:get_meta():get_int("store_disabled") == 1 then
|
||||
minetest.chat_send_player(player:get_player_name(),"The store is disallowed in this case")
|
||||
else
|
||||
player_style.store(player)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue