Component Lib 🔗
This library intends on providing an API to dynamically create a set of components based off of a given material.
Docs 🔗
Creating a material 🔗
Materials are simply stored as a table of materials. As of right now, they have a name, description, and color as shown below
local example_materials = {
-- A material contains 3 things
--- A name, used for the registration
--- A description, used for the display name of the item
--- A color, used when colorizing the image
cobalt_mat = {
name = "cobalt",
description = "Cobalt",
color = "#06b5c9",
},
}
Creating a component 🔗
Components are stored in a similar way as materials, but each needs a name, description, and an image to use when generating the items
local example_components = {
-- Components are similar, you just need 3 things
-- A name, used for registration (%s will be replaces with the material's name)
-- A description, used for registration (%s will be replaces with the material's description)
-- An image, which works the same way as normal luanti textures
widget = {
name = "%s_widget",
description = "%s Widget",
image = "component_lib_widget.png^[colorize:%s:100",
}
}
TODO 🔗
- [ ] Add node creation
- [ ] Change mod name when being used as a library
- [ ] Allow for the rest of craftitem things to be added
- [ ] Better examples?
Crazy things are going to come for this
as i was mentioning earlier about another mod that seems to be attempting to recreate gregtech mechanics to a certain extent, this is sure leaning into copious amounts of tech related materials and we could have something crazy on our hands, is it terrifying? yes, but dont we all want giant machines in our base and nuclear reactors their too? yeah!, of Course!!