circular saw flag
This commit is contained in:
parent
d711fd5f33
commit
2906e9e8b9
@ -15,6 +15,6 @@ read_globals = {
|
|||||||
"dump",
|
"dump",
|
||||||
|
|
||||||
-- optional deps
|
-- optional deps
|
||||||
"technic"
|
"technic", "circular_saw"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ Vue.component("item-detail", {
|
|||||||
<span v-if="item.pointable" class="badge badge-success">Pointable</span>
|
<span v-if="item.pointable" class="badge badge-success">Pointable</span>
|
||||||
<span v-if="item.airlike" class="badge badge-success">Airlike</span>
|
<span v-if="item.airlike" class="badge badge-success">Airlike</span>
|
||||||
<span v-if="item.walkable" class="badge badge-success">Walkable</span>
|
<span v-if="item.walkable" class="badge badge-success">Walkable</span>
|
||||||
|
<span v-if="item.circular_saw" class="badge badge-primary">Circular-saw compatible</span>
|
||||||
<p>Stack-max: <span class="badge badge-primary">{{ item.stack_max }}</span></p>
|
<p>Stack-max: <span class="badge badge-primary">{{ item.stack_max }}</span></p>
|
||||||
<p v-if="item.light_source">Light-source: <span class="badge badge-primary">{{ item.light_source }}</span></p>
|
<p v-if="item.light_source">Light-source: <span class="badge badge-primary">{{ item.light_source }}</span></p>
|
||||||
<p v-if="item.damage_per_second">Damage per second: <span class="badge badge-warning">{{ item.damage_per_second }}</span></p>
|
<p v-if="item.damage_per_second">Damage per second: <span class="badge badge-warning">{{ item.damage_per_second }}</span></p>
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
|
||||||
function mtinfo.map_list(target, list, keys, filter)
|
function mtinfo.map_list(target, list, keys, filter, enhancefn)
|
||||||
filter = filter or function()
|
filter = filter or function()
|
||||||
-- show all
|
-- show all
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- no-op
|
||||||
|
enhancefn = enhancefn or function() end
|
||||||
|
|
||||||
for name, def in pairs(list) do
|
for name, def in pairs(list) do
|
||||||
if filter(def) then
|
if filter(def) then
|
||||||
local item = {}
|
local item = {}
|
||||||
@ -18,6 +21,7 @@ function mtinfo.map_list(target, list, keys, filter)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
enhancefn(name, item)
|
||||||
target[name] = item
|
target[name] = item
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
11
items.lua
11
items.lua
@ -32,14 +32,19 @@ local item_mapped_keys = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mtinfo.export_items()
|
function mtinfo.export_items()
|
||||||
local data = {}
|
local data = {}
|
||||||
|
local has_moreblocks = minetest.get_modpath("moreblocks")
|
||||||
|
|
||||||
mtinfo.map_list(data, minetest.registered_items, item_mapped_keys, function(def)
|
mtinfo.map_list(data, minetest.registered_items, item_mapped_keys, function(def)
|
||||||
if def.groups and def.groups.not_in_creative_inventory then
|
if def.groups and def.groups.not_in_creative_inventory then
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
end, function(name, item)
|
||||||
|
if has_moreblocks and circular_saw.known_nodes[name] then
|
||||||
|
item.circular_saw = true
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
mtinfo.export_json(mtinfo.basepath.."/data/items.js", data, "mtinfo.items")
|
mtinfo.export_json(mtinfo.basepath.."/data/items.js", data, "mtinfo.items")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user