Go to file
Robert Zenz 713c871b3d Fixed minor mistake. 2016-01-06 17:24:05 +01:00
deps Updated dependencies. 2015-12-12 13:12:58 +01:00
doc Fixed minor mistake. 2016-01-06 17:24:05 +01:00
mods Fixed minor mistake. 2016-01-06 17:24:05 +01:00
.gitmodules Initial commit. 2015-11-07 19:32:49 +01:00
LICENSE Initial commit. 2015-11-07 19:32:49 +01:00
Makefile Initial commit. 2015-11-07 19:32:49 +01:00
README Fixed typo. 2016-01-02 11:40:33 +01:00
README.md Initial commit. 2015-11-07 19:32:49 +01:00

README.md

minetest-australopithecus-auto-drops

A system which drops all drops from a dug node as items.

Features

  • Items are "dropped" from a dug node with a random velocity in a random direction.
  • The mod is completely configurable from the configuration file.

Usage

The system activates itself, you just need to add the mod to the subgame.

Configuration

The system can be configured by adding settings to the minetest.conf:

# If the system should be activated, defaults to true.
autodrops_activate = true

# If the stacks that are split in some way, defaults to single.
# Possible values are:
#  random: The dropped stacks are split randomly.
#  single: The dropped stacks are split into every single item.
#  stack: The dropped stacks are dropped as they are.
autodrops_split = single

# The maximum velocity of newly dropped items, defaults to "2, 4, 2".
autodrops_velocity = 2, 4, 2

Drop additional items

If you want to drop additional items, in some way, you can easily do this by invoking autodrops.drop, which does accept a position and a List of ItemStacks.

-- Invoked from somewhere.

-- Check if the autodrops object is available, that allows to define it
-- as optional dependency.
-- Check if the autodrops system is active, that is needed to make because
-- the user can always deactivate it from the configuration.
if autodrops ~= nil and autodrops.active then
    -- Now drop your stacks.
    -- position is a position, a table with x, y, z values.
    -- stacks is a List if ItemStacks or item strings (or both). The List
    -- is a table extension available in the utils mod.
    autodrops.drop(position, stacks)
else
    -- Add items directly to the inventory of the player directly.
end

Force activation

You can also force activate the system, even if it has been disabled in the configuration, by invoking autodrops.activate_internal.