Misc updates
This commit is contained in:
parent
bc83280090
commit
f5e8daed8d
@ -1,4 +1,4 @@
|
||||
name = creative
|
||||
description = Minetest Game mod: creative
|
||||
depends = sfinv
|
||||
optional_depends = default
|
||||
optional_depends = default, player_stats
|
||||
|
Binary file not shown.
@ -161,10 +161,13 @@ function mobkit.get_nodes_in_area(pos1,pos2,full)
|
||||
y=y+sy
|
||||
|
||||
local pos = {x=x,y=y,z=z}
|
||||
local node = mobkit.nodeatpos(pos)
|
||||
if node then
|
||||
if full==true then
|
||||
result[pos] = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
result[pos] = node
|
||||
else
|
||||
result[minetest.registered_nodes[minetest.get_node(pos).name]] = true
|
||||
result[node] = true
|
||||
end
|
||||
end
|
||||
|
||||
cnt=cnt+1
|
||||
@ -892,6 +895,11 @@ function mobkit.actfunc(self, staticdata, dtime_s)
|
||||
end
|
||||
end
|
||||
|
||||
if self.textures==nil then
|
||||
local prop_tex = self.object:get_properties().textures
|
||||
if prop_tex then self.textures=prop_tex end
|
||||
end
|
||||
|
||||
if not self.memory then -- this is the initial activation
|
||||
self.memory = {}
|
||||
|
||||
@ -904,7 +912,7 @@ function mobkit.actfunc(self, staticdata, dtime_s)
|
||||
end
|
||||
|
||||
-- apply texture
|
||||
if self.texture_no then
|
||||
if self.textures and self.texture_no then
|
||||
local props = {}
|
||||
props.textures = {self.textures[self.texture_no]}
|
||||
self.object:set_properties(props)
|
||||
@ -1288,8 +1296,13 @@ end
|
||||
function mobkit.hq_warn(self,prty,tgtobj)
|
||||
local timer=0
|
||||
local tgttime = 0
|
||||
local init = true
|
||||
local func = function(self)
|
||||
if not mobkit.is_alive(tgtobj) then return true end
|
||||
if init then
|
||||
mobkit.animate(self,'stand')
|
||||
init = false
|
||||
end
|
||||
local pos = mobkit.get_stand_pos(self)
|
||||
local opos = tgtobj:get_pos()
|
||||
local dist = vector.distance(pos,opos)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 6.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 9.6 KiB |
@ -2,7 +2,6 @@ vkore = {
|
||||
settings = {
|
||||
game_mode = "dev",
|
||||
world_size = 3200,
|
||||
player_limit = 5,
|
||||
},
|
||||
}
|
||||
|
||||
@ -47,3 +46,13 @@ function vkore.scan_flood(pos, range, func)
|
||||
q = nxt
|
||||
end
|
||||
end
|
||||
|
||||
-- add 'all' group to all registered nodes for use with group-based builtin functions like find_nodes_in_area()
|
||||
minetest.register_on_mods_loaded(function()
|
||||
for name, def in pairs(minetest.registered_nodes) do
|
||||
if not def.groups then def.groups = {} end
|
||||
def.groups.all = 1
|
||||
|
||||
minetest.override_item(name, {groups = def.groups})
|
||||
end
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user