[Mod] Shapes Library [lib_shapes][git]

Posts: 241
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

[Mod] Shapes Library [lib_shapes][git]

by ShadMOrdre » Fri Jan 19, 2018 23:36

This mod is a reworking of my building_essentials and lib_node_shapes mods. This mod contains only the shapes, to be used as craftitems for additional mods.

There are links included to other mods made by me that don't have forum posts for themselves.

Additional mods that use this library: (Note: These mods carry dependencies on default as well)
lib_architecture: Download Browse Code
lib_doors: Download Browse Code
lib_fences: Download Browse Code
lib_furniture: Download Browse Code
lib_general: Download Browse Code
lib_lights: Download Browse Code

DOWNLOAD: https://github.com/ShadMOrdre/lib_shapes/archive/master.zip
Browse Code: https://github.com/ShadMOrdre/lib_shapes

OPTIONAL DEP: default?

LICENSES: LGPLv2.1, for code by me, CC-BY-SA-4.0 for graphics by me. Other licenses apply for code and graphics done by others. Where found, those licenses included.

MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

Posts: 558
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Shapes Library [lib_shapes][git]

by bell07 » Sat Jan 20, 2018 09:36

How to use the library? I looked to the linked mods and all of them does use an copy of the shape instead of provided in this mod.

One suggestion: Maybe you add the "do_shape" function for each shape to the lib_shapes mod for easy usage?

something like
Code: Select all
lib_shapes.register_shape("myshape", {
   description = "My Shape",
   shape_type = "basic",
   node_box = { },
   do_shape = function(self, name, template_node or textures or any other required info to get a shaped node),
      --do magic, apply textures to the shape
      minetest.register_node(new_shaped_node, def)

In other mod it should be usable as
Code: Select all
local shape = lib_shapes.get("myshape")
shape:do_shape("dirty_shape", "default:dirt")

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 6 guests