diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-01-01 17:12:32 -0700 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-01-01 17:12:32 -0700 |
commit | 47e42801d291249d1d0da28904695c9411650d6d (patch) | |
tree | 730a9b02bcd4ec9e7fbb80162b7e9b9eaf2570c8 /init.lua | |
parent | 12748d2f89cc94f95c5132e8127fe9f5e21c17b8 (diff) |
Adding fuel usage
Adding fuel usage for digging and building. Fuel storage hopper module
added to hold fuel.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -8,15 +8,31 @@ dofile( minetest.get_modpath( "digtron" ) .. "/node_controllers.lua" ) -- contro dofile( minetest.get_modpath( "digtron" ) .."/recipes.lua" ) -digtron.refractory = 1.0 -- How long a digtron waits between cycles. +digtron.cycle_time = 1.0 -- How long a digtron waits between cycles. digtron.traction_factor = 3.0 -- How many digtron nodes can be moved for each adjacent solid node that the digtron has traction against +-- fuel costs. For comparison, in the default game: +-- one default tree block is 30 units +-- one coal lump is 40 units +-- one coal block is 370 units (apparently it's slightly more productive making your coal lumps into blocks before burning) +-- one book is 3 units + +local dig_cost_adjustment_factor = 0.5 -- across-the-board multiplier to make overall fuel costs easier to modify + +digtron.dig_cost_default = 1.0 * dig_cost_adjustment_factor -- how much fuel is required to dig a node if not in one of the following groups. +-- If a node is in more than one of the following groups, the group with the maximum cost for that node is used. +digtron.dig_cost_cracky = 2.0 * dig_cost_adjustment_factor -- eg, stone +digtron.dig_cost_crumbly = 1.0 * dig_cost_adjustment_factor -- eg, dirt, sand +digtron.dig_cost_choppy = 1.5 * dig_cost_adjustment_factor -- eg, wood + +digtron.build_cost = 1.0 -- how much fuel is required to build a node + -- digtron group numbers: -- 1 - generic digtron node, nothing special is done with these. They're just dragged along. -- 2 - inventory-holding digtron, has a "main" inventory that the digtron can add to and take from. -- 3 - digger head, has an "execute_dig" method in its definition -- 4 - builder head, has a "test_build" and "execute_build" method in its definition - +-- 5 - fuel-holding digtron, has a "main" invetory that the control node can draw fuel items from. Separate from general inventory, nothing gets put here automatically. minetest.register_lbm({ name = "digtron:sand_digger_upgrade", |