Macro Crafting Manager v2.0
macro (by sorcerykid)
Macro Crafting Manager provides a streamlined drag-and-drop interface for dividing and arranging item stacks within the craft-grid. This mod is intended to be compatible with all versions of Minetest 0.4.14+. It has been in continuous use on the Just Test Tribute server since August 2017 with only minor revisions and no known bugs.
Repository:
https://bitbucket.org/sorcerykid/macro
Download Archive (.zip)
Download Archive (.tar.gz)
Dependencies:
Default Mod
https://github.com/minetest/minetest_game
ActiveFormspecs Mod
https://bitbucket.org/sorcerykid/formspecs
Inventory Plus Mod (optional)
https://github.com/cornernote/minetest-inventory_plus
Source Code License:
Copyright (c) 2017-2018, Leslie Krause
GNU Lesser General Public License v3 (LGPL-3.0)
Media License:
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Usage Instructions:
Now even the most complex crafts like stairs, ladders, chests, rails, and fences are a breeze. What used to be a tiresome and mundane task of moving stacks endlessly around a craft grid, is literally as simple as dragging and dropping -- and voila! Here is what you need to know:
- (A) Macro Bar
The Macro Bar provides 16 predefined macros to simplify the most common crafting tasks. Drag any item from your Main Inventory into the appropriate slot, and the stack will be arranged automatically within the Craft Grid.
(B) Main Inventory
The Main Inventory consists of 32 slots, including the hotbar. As usual, this is where you store your items after crafting.
(C) Trash Can
The Trash Can's sole purpose is the same as always: to expunge items. Its usage is self-explanatory.
(D) Surplus Stack
This slot holds the surplus stack from the previous macro operation. If you close the Macro Crafting Manager prematurely, these items will drop. Be sure to move them into your Main Inventory, otherwise they may be lost.
(E) Output Stack
Once the items within the Craft Grid conform to a recipe, this slot serves as a preview of the output stack. To actually perform the craft, the output stack must be moved into the Main Inventory or Craft Grid.
(F) Craft Grid
The Craft Grid is a secondary inventory intended for crafting items according to recipes found within the Craft Guide. Drag items from the Main Inventory directly into one of the 9 slots or use the Macro Bar.
For game developers, the Macro Crafting Manager also extends the default mod with the following helper function:
- default.drop_item( pos, item, horz, vert )
Spawn item with a vertical velocity, vert, and a random horizontal velocity ranging between 0 and horz from the position, pos. The item may be specified as either an itemstring or an ItemStack object.
Code: Select all
-- the mob should drop items with drop.chance probability in quantities between drop.min and drop.max
for _, drop in ipairs( self.drops ) do
if math.random( 1, drop.chance ) == 1 then
default.drop_item( pos, drop.name .. " " .. math.random( drop.min, drop.max ), 1, 5 )
end
end