mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-03 09:00:23 +02:00
Compare commits
60 Commits
Author | SHA1 | Date | |
---|---|---|---|
b8db525dac | |||
cbf6256593 | |||
893959b5d4 | |||
8a5a14747e | |||
b53959f177 | |||
685b40f318 | |||
e96d279d29 | |||
c87a179cb5 | |||
7e2256253d | |||
f2cc874ec0 | |||
5c96ede065 | |||
1c4ae1df28 | |||
970220c561 | |||
4ca50e846d | |||
0ab3dd5ffa | |||
7820d88a30 | |||
34841eddf3 | |||
6f588e1927 | |||
d0ff046873 | |||
996b39fb39 | |||
0e411d8696 | |||
c69f45ecd8 | |||
a0eb4803d1 | |||
ac4a7352fd | |||
c7987a6c72 | |||
b24411b189 | |||
a1b2d03a71 | |||
c3f050b737 | |||
00042c77e1 | |||
c1bd944465 | |||
b1fff8617b | |||
c5dd2be569 | |||
f2eb377d96 | |||
3b5c81cb3a | |||
dde5148934 | |||
ce9a29de80 | |||
6ccfd52267 | |||
d392f04c11 | |||
978c2b23a2 | |||
d612f8697d | |||
2274b426a5 | |||
612039cc26 | |||
a98b0c08af | |||
e0166288c6 | |||
9ab92ba056 | |||
8d55d89efe | |||
554acd002b | |||
ca5cd92ff3 | |||
0c2d3a5cba | |||
5a36209ac9 | |||
666200df76 | |||
4bc1bfee8b | |||
304f74c7a4 | |||
833d27975e | |||
d2d8be9f18 | |||
6fe9f96cad | |||
b0002eb7cf | |||
7e648246eb | |||
f0b5eb7a18 | |||
859feb4105 |
9
.editorconfig
Normal file
9
.editorconfig
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
|
||||||
|
[*.{lua,txt,md,json}]
|
||||||
|
charset = utf8
|
||||||
|
indent_size = 8
|
||||||
|
indent_style = tab
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
@ -6,7 +6,6 @@ ignore = {
|
|||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"minetest",
|
"minetest",
|
||||||
"default",
|
|
||||||
"armor",
|
"armor",
|
||||||
"skins",
|
"skins",
|
||||||
"awards",
|
"awards",
|
||||||
@ -19,4 +18,6 @@ read_globals = {
|
|||||||
globals = {
|
globals = {
|
||||||
"i3",
|
"i3",
|
||||||
"core",
|
"core",
|
||||||
|
"sfinv",
|
||||||
|
"unified_inventory",
|
||||||
}
|
}
|
||||||
|
27
API.md
27
API.md
@ -27,12 +27,6 @@ i3.new_tab {
|
|||||||
fields = function(player, data, fields)
|
fields = function(player, data, fields)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Determine if the recipe panels must be hidden or not (must return a boolean)
|
|
||||||
hide_panels = function(player, data)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
return core.is_creative_enabled(name)
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -44,7 +38,7 @@ i3.new_tab {
|
|||||||
|
|
||||||
Updates the current formspec. `extra_formspec` adds an additional formspec string.
|
Updates the current formspec. `extra_formspec` adds an additional formspec string.
|
||||||
|
|
||||||
#### `i3.delete_tab(tabname)`
|
#### `i3.remove_tab(tabname)`
|
||||||
|
|
||||||
Deletes a tab by name.
|
Deletes a tab by name.
|
||||||
|
|
||||||
@ -147,7 +141,7 @@ Recipes can be registered from a given URL containing a JSON file (HTTP support
|
|||||||
|
|
||||||
```Lua
|
```Lua
|
||||||
i3.register_craft({
|
i3.register_craft({
|
||||||
url = "https://raw.githubusercontent.com/minetest-mods/i3/main/test_online_recipe.json"
|
url = "https://raw.githubusercontent.com/minetest-mods/i3/main/tests/test_online_recipe.json"
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -184,7 +178,7 @@ end)
|
|||||||
|
|
||||||
Removes all recipe filters and adds a new one.
|
Removes all recipe filters and adds a new one.
|
||||||
|
|
||||||
#### `i3.delete_recipe_filter(name)`
|
#### `i3.remove_recipe_filter(name)`
|
||||||
|
|
||||||
Removes the recipe filter with the given `name`.
|
Removes the recipe filter with the given `name`.
|
||||||
|
|
||||||
@ -203,12 +197,12 @@ They can be used like so: `<optional_name> +<filter name>=<value1>,<value2>,<...
|
|||||||
Example usages:
|
Example usages:
|
||||||
|
|
||||||
- `+groups=cracky,crumbly`: search for groups `cracky` and `crumbly` in all items.
|
- `+groups=cracky,crumbly`: search for groups `cracky` and `crumbly` in all items.
|
||||||
- `wood +groups=flammable +types=node`: search for group `flammable` amongst items which contain
|
- `wood +groups=flammable`: search for group `flammable` amongst items which contain
|
||||||
`wood` in their names AND have a `node` drawtype.
|
`wood` in their names.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- If `optional_name` is omitted, the search filter will apply to all items, without pre-filtering.
|
- If `optional_name` is omitted, the search filter will apply to all items, without pre-filtering.
|
||||||
- The `+groups` and `+types` filters are currently implemented by default.
|
- The `+groups` filter is currently implemented by default.
|
||||||
|
|
||||||
#### `i3.add_search_filter(name, function(item, values))`
|
#### `i3.add_search_filter(name, function(item, values))`
|
||||||
|
|
||||||
@ -243,15 +237,6 @@ Returns a map of search filters, indexed by name.
|
|||||||
|
|
||||||
### Miscellaneous
|
### Miscellaneous
|
||||||
|
|
||||||
#### `i3.group_stereotypes`
|
|
||||||
|
|
||||||
This is the table indexing the item groups by stereotypes.
|
|
||||||
You can add a stereotype like so:
|
|
||||||
|
|
||||||
```Lua
|
|
||||||
i3.group_stereotypes.radioactive = "mod:item"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `i3.export_url`
|
#### `i3.export_url`
|
||||||
|
|
||||||
If set, the mod will export all the cached recipes and usages in a JSON format
|
If set, the mod will export all the cached recipes and usages in a JSON format
|
||||||
|
@ -18,6 +18,7 @@ This mod requires **Minetest 5.4+**
|
|||||||
- Inventory Sorting (alphabetical + item stack compression)
|
- Inventory Sorting (alphabetical + item stack compression)
|
||||||
- Item Bookmarks
|
- Item Bookmarks
|
||||||
- Waypoints
|
- Waypoints
|
||||||
|
- Item List Compression (**`moreblocks`** supported)
|
||||||
|
|
||||||
**¹** *This mode is a Terraria-like system that shows recipes you can craft from items you ever had in your inventory.
|
**¹** *This mode is a Terraria-like system that shows recipes you can craft from items you ever had in your inventory.
|
||||||
To enable it: `i3_progressive_mode = true` in `minetest.conf`.*
|
To enable it: `i3_progressive_mode = true` in `minetest.conf`.*
|
||||||
@ -30,7 +31,7 @@ To enable it: `i3_progressive_mode = true` in `minetest.conf`.*
|
|||||||
|
|
||||||
#### Recommendations
|
#### Recommendations
|
||||||
|
|
||||||
To use this mod in the best conditions, it's recommended to follow these recommendations:
|
To use this mod in the best conditions:
|
||||||
|
|
||||||
- Use LuaJIT
|
- Use LuaJIT
|
||||||
- Use a HiDPI widescreen display
|
- Use a HiDPI widescreen display
|
||||||
@ -48,4 +49,4 @@ Love this mod? Donations are appreciated: https://www.paypal.me/jpg84240
|
|||||||
|
|
||||||
Demo video (outdated): https://www.youtube.com/watch?v=25nCAaqeacU
|
Demo video (outdated): https://www.youtube.com/watch?v=25nCAaqeacU
|
||||||
|
|
||||||

|

|
||||||
|
319
etc/compress.lua
Normal file
319
etc/compress.lua
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
local fmt, insert = string.format, table.insert
|
||||||
|
|
||||||
|
local wood_types = {
|
||||||
|
"acacia_wood", "aspen_wood", "junglewood", "pine_wood",
|
||||||
|
}
|
||||||
|
|
||||||
|
local material_tools = {
|
||||||
|
"bronze", "diamond", "mese", "stone", "wood",
|
||||||
|
}
|
||||||
|
|
||||||
|
local material_stairs = {
|
||||||
|
"acacia_wood", "aspen_wood", "brick", "bronzeblock", "cobble", "copperblock",
|
||||||
|
"desert_cobble", "desert_sandstone", "desert_sandstone_block", "desert_sandstone_brick",
|
||||||
|
"desert_stone", "desert_stone_block", "desert_stonebrick",
|
||||||
|
"glass", "goldblock", "ice", "junglewood", "mossycobble", "obsidian",
|
||||||
|
"obsidian_block", "obsidian_glass", "obsidianbrick", "pine_wood",
|
||||||
|
"sandstone", "sandstone_block", "sandstonebrick",
|
||||||
|
"silver_sandstone", "silver_sandstone_block", "silver_sandstone_brick",
|
||||||
|
"snowblock", "steelblock", "stone", "stone_block", "stonebrick",
|
||||||
|
"straw", "tinblock",
|
||||||
|
}
|
||||||
|
|
||||||
|
local colors = {
|
||||||
|
"black", "blue", "brown", "cyan", "dark_green", "dark_grey", "green",
|
||||||
|
"grey", "magenta", "orange", "pink", "red", "violet", "yellow",
|
||||||
|
}
|
||||||
|
|
||||||
|
local to_compress = {
|
||||||
|
["default:wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = wood_types,
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:fence_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = wood_types,
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:fence_rail_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = wood_types,
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:mese_post_light"] = {
|
||||||
|
replace = "mese_post_light",
|
||||||
|
by = {
|
||||||
|
"mese_post_light_acacia_wood",
|
||||||
|
"mese_post_light_aspen_wood",
|
||||||
|
"mese_post_light_junglewood",
|
||||||
|
"mese_post_light_pine_wood",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
["doors:gate_wood_closed"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = wood_types,
|
||||||
|
},
|
||||||
|
|
||||||
|
["wool:white"] = {
|
||||||
|
replace = "white",
|
||||||
|
by = colors
|
||||||
|
},
|
||||||
|
|
||||||
|
["dye:white"] = {
|
||||||
|
replace = "white",
|
||||||
|
by = colors
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:axe_steel"] = {
|
||||||
|
replace = "steel",
|
||||||
|
by = material_tools
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:pick_steel"] = {
|
||||||
|
replace = "steel",
|
||||||
|
by = material_tools
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:shovel_steel"] = {
|
||||||
|
replace = "steel",
|
||||||
|
by = material_tools
|
||||||
|
},
|
||||||
|
|
||||||
|
["default:sword_steel"] = {
|
||||||
|
replace = "steel",
|
||||||
|
by = material_tools
|
||||||
|
},
|
||||||
|
|
||||||
|
["farming:hoe_steel"] = {
|
||||||
|
replace = "steel",
|
||||||
|
by = {"wood", "stone"}
|
||||||
|
},
|
||||||
|
|
||||||
|
["stairs:slab_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = material_stairs
|
||||||
|
},
|
||||||
|
|
||||||
|
["stairs:stair_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = material_stairs
|
||||||
|
},
|
||||||
|
|
||||||
|
["stairs:stair_inner_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = material_stairs
|
||||||
|
},
|
||||||
|
|
||||||
|
["stairs:stair_outer_wood"] = {
|
||||||
|
replace = "wood",
|
||||||
|
by = material_stairs
|
||||||
|
},
|
||||||
|
|
||||||
|
["walls:cobble"] = {
|
||||||
|
replace = "cobble",
|
||||||
|
by = {"desertcobble", "mossycobble"}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local circular_saw_names = {
|
||||||
|
{"micro", "_1"},
|
||||||
|
{"panel", "_1"},
|
||||||
|
{"micro", "_2"},
|
||||||
|
{"panel", "_2"},
|
||||||
|
{"micro", "_4"},
|
||||||
|
{"panel", "_4"},
|
||||||
|
{"micro", ""},
|
||||||
|
{"panel", ""},
|
||||||
|
|
||||||
|
{"micro", "_12"},
|
||||||
|
{"panel", "_12"},
|
||||||
|
{"micro", "_14"},
|
||||||
|
{"panel", "_14"},
|
||||||
|
{"micro", "_15"},
|
||||||
|
{"panel", "_15"},
|
||||||
|
{"stair", "_outer"},
|
||||||
|
{"stair", ""},
|
||||||
|
|
||||||
|
{"stair", "_inner"},
|
||||||
|
{"slab", "_1"},
|
||||||
|
{"slab", "_2"},
|
||||||
|
{"slab", "_quarter"},
|
||||||
|
{"slab", ""},
|
||||||
|
{"slab", "_three_quarter"},
|
||||||
|
{"slab", "_14"},
|
||||||
|
{"slab", "_15"},
|
||||||
|
|
||||||
|
{"slab", "_two_sides"},
|
||||||
|
{"slab", "_three_sides"},
|
||||||
|
{"slab", "_three_sides_u"},
|
||||||
|
{"stair", "_half"},
|
||||||
|
{"stair", "_alt_1"},
|
||||||
|
{"stair", "_alt_2"},
|
||||||
|
{"stair", "_alt_4"},
|
||||||
|
{"stair", "_alt"},
|
||||||
|
{"stair", "_right_half"},
|
||||||
|
|
||||||
|
{"slope", ""},
|
||||||
|
{"slope", "_half"},
|
||||||
|
{"slope", "_half_raised"},
|
||||||
|
{"slope", "_inner"},
|
||||||
|
{"slope", "_inner_half"},
|
||||||
|
{"slope", "_inner_half_raised"},
|
||||||
|
{"slope", "_inner_cut"},
|
||||||
|
{"slope", "_inner_cut_half"},
|
||||||
|
|
||||||
|
{"slope", "_inner_cut_half_raised"},
|
||||||
|
{"slope", "_outer"},
|
||||||
|
{"slope", "_outer_half"},
|
||||||
|
{"slope", "_outer_half_raised"},
|
||||||
|
{"slope", "_outer_cut"},
|
||||||
|
{"slope", "_outer_cut_half"},
|
||||||
|
{"slope", "_outer_cut_half_raised"},
|
||||||
|
{"slope", "_cut"},
|
||||||
|
}
|
||||||
|
|
||||||
|
local moreblocks_nodes = {
|
||||||
|
"coal_stone",
|
||||||
|
"wood_tile",
|
||||||
|
"iron_checker",
|
||||||
|
"circle_stone_bricks",
|
||||||
|
"cobble_compressed",
|
||||||
|
"plankstone",
|
||||||
|
"clean_glass",
|
||||||
|
"split_stone_tile",
|
||||||
|
"all_faces_tree",
|
||||||
|
"dirt_compressed",
|
||||||
|
"coal_checker",
|
||||||
|
"clean_glow_glass",
|
||||||
|
"tar",
|
||||||
|
"clean_super_glow_glass",
|
||||||
|
"stone_tile",
|
||||||
|
"cactus_brick",
|
||||||
|
"super_glow_glass",
|
||||||
|
"desert_cobble_compressed",
|
||||||
|
"copperpatina",
|
||||||
|
"coal_stone_bricks",
|
||||||
|
"glow_glass",
|
||||||
|
"cactus_checker",
|
||||||
|
"all_faces_pine_tree",
|
||||||
|
"all_faces_aspen_tree",
|
||||||
|
"all_faces_acacia_tree",
|
||||||
|
"all_faces_jungle_tree",
|
||||||
|
"iron_stone",
|
||||||
|
"grey_bricks",
|
||||||
|
"wood_tile_left",
|
||||||
|
"wood_tile_down",
|
||||||
|
"wood_tile_center",
|
||||||
|
"wood_tile_right",
|
||||||
|
"wood_tile_full",
|
||||||
|
"checker_stone_tile",
|
||||||
|
"iron_glass",
|
||||||
|
"iron_stone_bricks",
|
||||||
|
"wood_tile_flipped",
|
||||||
|
"wood_tile_offset",
|
||||||
|
"coal_glass",
|
||||||
|
|
||||||
|
"straw",
|
||||||
|
|
||||||
|
"stone",
|
||||||
|
"stone_block",
|
||||||
|
"cobble",
|
||||||
|
"mossycobble",
|
||||||
|
"brick",
|
||||||
|
"sandstone",
|
||||||
|
"steelblock",
|
||||||
|
"goldblock",
|
||||||
|
"copperblock",
|
||||||
|
"bronzeblock",
|
||||||
|
"diamondblock",
|
||||||
|
"tinblock",
|
||||||
|
"desert_stone",
|
||||||
|
"desert_stone_block",
|
||||||
|
"desert_cobble",
|
||||||
|
"meselamp",
|
||||||
|
"glass",
|
||||||
|
"tree",
|
||||||
|
"wood",
|
||||||
|
"jungletree",
|
||||||
|
"junglewood",
|
||||||
|
"pine_tree",
|
||||||
|
"pine_wood",
|
||||||
|
"acacia_tree",
|
||||||
|
"acacia_wood",
|
||||||
|
"aspen_tree",
|
||||||
|
"aspen_wood",
|
||||||
|
"obsidian",
|
||||||
|
"obsidian_block",
|
||||||
|
"obsidianbrick",
|
||||||
|
"obsidian_glass",
|
||||||
|
"stonebrick",
|
||||||
|
"desert_stonebrick",
|
||||||
|
"sandstonebrick",
|
||||||
|
"silver_sandstone",
|
||||||
|
"silver_sandstone_brick",
|
||||||
|
"silver_sandstone_block",
|
||||||
|
"desert_sandstone",
|
||||||
|
"desert_sandstone_brick",
|
||||||
|
"desert_sandstone_block",
|
||||||
|
"sandstone_block",
|
||||||
|
"coral_skeleton",
|
||||||
|
"ice",
|
||||||
|
}
|
||||||
|
|
||||||
|
local colors_moreblocks = table.copy(colors)
|
||||||
|
insert(colors_moreblocks, "white")
|
||||||
|
|
||||||
|
local moreblocks_mods = {
|
||||||
|
wool = colors_moreblocks,
|
||||||
|
moreblocks = moreblocks_nodes,
|
||||||
|
}
|
||||||
|
|
||||||
|
local t = {}
|
||||||
|
|
||||||
|
for mod, v in pairs(moreblocks_mods) do
|
||||||
|
for _, nodename in ipairs(v) do
|
||||||
|
t[nodename] = {}
|
||||||
|
|
||||||
|
for _, shape in ipairs(circular_saw_names) do
|
||||||
|
local to_add = true
|
||||||
|
|
||||||
|
if shape[1] == "slope" and shape[2] == "" then
|
||||||
|
to_add = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if to_add then
|
||||||
|
insert(t[nodename], fmt("%s_%s%s", shape[1], nodename, shape[2]))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local slope_name = fmt("slope_%s", nodename)
|
||||||
|
|
||||||
|
to_compress[fmt("%s:%s", mod, slope_name)] = {
|
||||||
|
replace = slope_name,
|
||||||
|
by = t[nodename]
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local compressed = {}
|
||||||
|
|
||||||
|
for k, v in pairs(to_compress) do
|
||||||
|
compressed[k] = compressed[k] or {}
|
||||||
|
|
||||||
|
for _, str in ipairs(v.by) do
|
||||||
|
local it = k:gsub(v.replace, str)
|
||||||
|
insert(compressed[k], it)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local _compressed = {}
|
||||||
|
|
||||||
|
for _, v in pairs(compressed) do
|
||||||
|
for _, v2 in ipairs(v) do
|
||||||
|
_compressed[v2] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return compressed, _compressed
|
62
etc/groups.lua
Normal file
62
etc/groups.lua
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
local S = core.get_translator "i3"
|
||||||
|
|
||||||
|
local group_stereotypes = {
|
||||||
|
dye = "dye:white",
|
||||||
|
wool = "wool:white",
|
||||||
|
wood = "default:wood",
|
||||||
|
tree = "default:tree",
|
||||||
|
sand = "default:sand",
|
||||||
|
glass = "default:glass",
|
||||||
|
stick = "default:stick",
|
||||||
|
stone = "default:stone",
|
||||||
|
leaves = "default:leaves",
|
||||||
|
coal = "default:coal_lump",
|
||||||
|
vessel = "vessels:glass_bottle",
|
||||||
|
flower = "flowers:dandelion_yellow",
|
||||||
|
water_bucket = "bucket:bucket_water",
|
||||||
|
mesecon_conductor_craftable = "mesecons:wire_00000000_off",
|
||||||
|
}
|
||||||
|
|
||||||
|
local group_names = {
|
||||||
|
dye = S"Any dye",
|
||||||
|
coal = S"Any coal",
|
||||||
|
sand = S"Any sand",
|
||||||
|
tree = S"Any tree",
|
||||||
|
wool = S"Any wool",
|
||||||
|
glass = S"Any glass",
|
||||||
|
stick = S"Any stick",
|
||||||
|
stone = S"Any stone",
|
||||||
|
carpet = S"Any carpet",
|
||||||
|
flower = S"Any flower",
|
||||||
|
leaves = S"Any leaves",
|
||||||
|
vessel = S"Any vessel",
|
||||||
|
wood = S"Any wood planks",
|
||||||
|
mushroom = S"Any mushroom",
|
||||||
|
|
||||||
|
["color_red,flower"] = S"Any red flower",
|
||||||
|
["color_blue,flower"] = S"Any blue flower",
|
||||||
|
["color_black,flower"] = S"Any black flower",
|
||||||
|
["color_white,flower"] = S"Any white flower",
|
||||||
|
["color_green,flower"] = S"Any green flower",
|
||||||
|
["color_orange,flower"] = S"Any orange flower",
|
||||||
|
["color_yellow,flower"] = S"Any yellow flower",
|
||||||
|
["color_violet,flower"] = S"Any violet flower",
|
||||||
|
|
||||||
|
["color_red,dye"] = S"Any red dye",
|
||||||
|
["color_blue,dye"] = S"Any blue dye",
|
||||||
|
["color_grey,dye"] = S"Any grey dye",
|
||||||
|
["color_pink,dye"] = S"Any pink dye",
|
||||||
|
["color_cyan,dye"] = S"Any cyan dye",
|
||||||
|
["color_black,dye"] = S"Any black dye",
|
||||||
|
["color_white,dye"] = S"Any white dye",
|
||||||
|
["color_brown,dye"] = S"Any brown dye",
|
||||||
|
["color_green,dye"] = S"Any green dye",
|
||||||
|
["color_orange,dye"] = S"Any orange dye",
|
||||||
|
["color_yellow,dye"] = S"Any yellow dye",
|
||||||
|
["color_violet,dye"] = S"Any violet dye",
|
||||||
|
["color_magenta,dye"] = S"Any magenta dye",
|
||||||
|
["color_dark_grey,dye"] = S"Any dark grey dye",
|
||||||
|
["color_dark_green,dye"] = S"Any dark green dye",
|
||||||
|
}
|
||||||
|
|
||||||
|
return group_stereotypes, group_names
|
13
etc/model_aliases.lua
Normal file
13
etc/model_aliases.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
local model_alias = {
|
||||||
|
["boats:boat"] = {name = "boats:boat", drawtype = "entity"},
|
||||||
|
["carts:cart"] = {name = "carts:cart", drawtype = "entity", frames = "0,0"},
|
||||||
|
["default:chest"] = {name = "default:chest_open"},
|
||||||
|
["default:chest_locked"] = {name = "default:chest_locked_open"},
|
||||||
|
["doors:door_wood"] = {name = "doors:door_wood_a"},
|
||||||
|
["doors:door_glass"] = {name = "doors:door_glass_a"},
|
||||||
|
["doors:door_obsidian_glass"] = {name = "doors:door_obsidian_glass_a"},
|
||||||
|
["doors:door_steel"] = {name = "doors:door_steel_a"},
|
||||||
|
["xpanes:door_steel_bar"] = {name = "xpanes:door_steel_bar_a"},
|
||||||
|
}
|
||||||
|
|
||||||
|
return model_alias
|
119
etc/styles.lua
Normal file
119
etc/styles.lua
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
local fmt = string.format
|
||||||
|
|
||||||
|
local PNG = {
|
||||||
|
bg = "i3_bg.png",
|
||||||
|
bg_full = "i3_bg_full.png",
|
||||||
|
bar = "i3_bar.png",
|
||||||
|
hotbar = "i3_hotbar.png",
|
||||||
|
search = "i3_search.png",
|
||||||
|
heart = "i3_heart.png",
|
||||||
|
heart_half = "i3_heart_half.png",
|
||||||
|
heart_grey = "i3_heart_grey.png",
|
||||||
|
prev = "i3_next.png^\\[transformFX",
|
||||||
|
next = "i3_next.png",
|
||||||
|
arrow = "i3_arrow.png",
|
||||||
|
trash = "i3_trash.png",
|
||||||
|
sort_az = "i3_sort_az.png",
|
||||||
|
sort_za = "i3_sort_za.png",
|
||||||
|
compress = "i3_compress.png",
|
||||||
|
fire = "i3_fire.png",
|
||||||
|
fire_anim = "i3_fire_anim.png",
|
||||||
|
book = "i3_book.png",
|
||||||
|
sign = "i3_sign.png",
|
||||||
|
cancel = "i3_cancel.png",
|
||||||
|
export = "i3_export.png",
|
||||||
|
slot = "i3_slot.png",
|
||||||
|
tab = "i3_tab.png",
|
||||||
|
tab_small = "i3_tab_small.png",
|
||||||
|
tab_top = "i3_tab.png^\\[transformFY",
|
||||||
|
furnace_anim = "i3_furnace_anim.png",
|
||||||
|
bag = "i3_bag.png",
|
||||||
|
armor = "i3_armor.png",
|
||||||
|
awards = "i3_award.png",
|
||||||
|
skins = "i3_skin.png",
|
||||||
|
waypoints = "i3_waypoint.png",
|
||||||
|
teleport = "i3_teleport.png",
|
||||||
|
add = "i3_add.png",
|
||||||
|
refresh = "i3_refresh.png",
|
||||||
|
visible = "i3_visible.png^\\[brighten",
|
||||||
|
nonvisible = "i3_non_visible.png",
|
||||||
|
exit = "i3_exit.png",
|
||||||
|
|
||||||
|
cancel_hover = "i3_cancel.png^\\[brighten",
|
||||||
|
search_hover = "i3_search.png^\\[brighten",
|
||||||
|
export_hover = "i3_export.png^\\[brighten",
|
||||||
|
trash_hover = "i3_trash.png^\\[brighten^\\[colorize:#f00:100",
|
||||||
|
compress_hover = "i3_compress.png^\\[brighten",
|
||||||
|
sort_az_hover = "i3_sort_az.png^\\[brighten",
|
||||||
|
sort_za_hover = "i3_sort_za.png^\\[brighten",
|
||||||
|
prev_hover = "i3_next_hover.png^\\[transformFX",
|
||||||
|
next_hover = "i3_next_hover.png",
|
||||||
|
tab_hover = "i3_tab_hover.png",
|
||||||
|
tab_small_hover = "i3_tab_small_hover.png",
|
||||||
|
tab_hover_top = "i3_tab_hover.png^\\[transformFY",
|
||||||
|
bag_hover = "i3_bag_hover.png",
|
||||||
|
armor_hover = "i3_armor_hover.png",
|
||||||
|
awards_hover = "i3_award_hover.png",
|
||||||
|
skins_hover = "i3_skin_hover.png",
|
||||||
|
waypoints_hover = "i3_waypoint_hover.png",
|
||||||
|
teleport_hover = "i3_teleport.png^\\[brighten",
|
||||||
|
add_hover = "i3_add.png^\\[brighten",
|
||||||
|
refresh_hover = "i3_refresh.png^\\[brighten",
|
||||||
|
exit_hover = "i3_exit.png^\\[brighten",
|
||||||
|
}
|
||||||
|
|
||||||
|
local styles = fmt([[
|
||||||
|
style_type[field;border=false;bgcolor=transparent]
|
||||||
|
style_type[label,field;font_size=16]
|
||||||
|
style_type[button;border=false;content_offset=0]
|
||||||
|
style_type[image_button,item_image_button;border=false;sound=i3_click]
|
||||||
|
style_type[item_image_button;bgimg_hovered=%s]
|
||||||
|
|
||||||
|
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
|
||||||
|
style[exit;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||||
|
style[cancel;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||||
|
style[search;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||||
|
style[prev_page;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[next_page;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[prev_recipe;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[next_recipe;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[prev_usage;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[next_usage;fgimg=%s;fgimg_hovered=%s]
|
||||||
|
style[waypoint_add;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||||
|
style[btn_bag,btn_armor,btn_skins;font=bold;font_size=18;content_offset=0;sound=i3_click]
|
||||||
|
style[craft_rcp,craft_usg;noclip=true;font_size=16;sound=i3_craft;
|
||||||
|
bgimg=i3_btn9.png;bgimg_hovered=i3_btn9_hovered.png;
|
||||||
|
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6]
|
||||||
|
style[confirm_trash_yes,confirm_trash_no;noclip=true;font_size=16;
|
||||||
|
bgimg=i3_btn9.png;bgimg_hovered=i3_btn9_hovered.png;
|
||||||
|
bgimg_pressed=i3_btn9_pressed.png;bgimg_middle=4,6]
|
||||||
|
]],
|
||||||
|
PNG.slot,
|
||||||
|
PNG.exit, PNG.exit_hover,
|
||||||
|
PNG.cancel, PNG.cancel_hover,
|
||||||
|
PNG.search, PNG.search_hover,
|
||||||
|
PNG.prev, PNG.prev_hover,
|
||||||
|
PNG.next, PNG.next_hover,
|
||||||
|
PNG.prev, PNG.prev_hover,
|
||||||
|
PNG.next, PNG.next_hover,
|
||||||
|
PNG.prev, PNG.prev_hover,
|
||||||
|
PNG.next, PNG.next_hover,
|
||||||
|
PNG.add, PNG.add_hover)
|
||||||
|
|
||||||
|
local fs_elements = {
|
||||||
|
label = "label[%f,%f;%s]",
|
||||||
|
box = "box[%f,%f;%f,%f;%s]",
|
||||||
|
image = "image[%f,%f;%f,%f;%s]",
|
||||||
|
tooltip = "tooltip[%f,%f;%f,%f;%s]",
|
||||||
|
button = "button[%f,%f;%f,%f;%s;%s]",
|
||||||
|
item_image = "item_image[%f,%f;%f,%f;%s]",
|
||||||
|
hypertext = "hypertext[%f,%f;%f,%f;%s;%s]",
|
||||||
|
bg9 = "background9[%f,%f;%f,%f;%s;false;%u]",
|
||||||
|
scrollbar = "scrollbar[%f,%f;%f,%f;%s;%s;%u]",
|
||||||
|
model = "model[%f,%f;%f,%f;%s;%s;%s;%s;%s;%s;%s]",
|
||||||
|
image_button = "image_button[%f,%f;%f,%f;%s;%s;%s]",
|
||||||
|
animated_image = "animated_image[%f,%f;%f,%f;;%s;%u;%u]",
|
||||||
|
item_image_button = "item_image_button[%f,%f;%f,%f;%s;%s;%s]",
|
||||||
|
}
|
||||||
|
|
||||||
|
return PNG, styles, fs_elements
|
@ -1,2 +1,5 @@
|
|||||||
# The progressive mode shows recipes you can craft from items you ever had in your inventory.
|
# The progressive mode shows recipes you can craft from items you ever had in your inventory.
|
||||||
i3_progressive_mode (Learn crafting recipes progressively) bool false
|
i3_progressive_mode (Learn crafting recipes progressively) bool false
|
||||||
|
|
||||||
|
# Regroup the items of the same type in the item list.
|
||||||
|
i3_item_compression (Regroup items of the same type) bool true
|
||||||
|
BIN
textures/i3_exit.png
Normal file
BIN
textures/i3_exit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
BIN
textures/i3_tab_small.png
Normal file
BIN
textures/i3_tab_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
textures/i3_tab_small_hover.png
Normal file
BIN
textures/i3_tab_small_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user