mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 04:12:23 +01:00
configurable duration for crate markers
This commit is contained in:
parent
123e470544
commit
1de57191b0
@ -56,4 +56,8 @@ setting("float", "build_cost", 1.0, "Build cost")
|
||||
-- How much charge (an RE battery holds 10000 EU) is equivalent to 1 unit of heat produced by burning coal
|
||||
-- With 100, the battery is 2.5 better than a coal lump, yet 3.7 less powerful than a coal block
|
||||
-- Being rechargeable should pay off for this "average" performance.
|
||||
setting("int", "power_ratio", 100, "The electrical charge to 1 coal heat unit conversion ratio")
|
||||
setting("int", "power_ratio", 100, "The electrical charge to 1 coal heat unit conversion ratio")
|
||||
|
||||
|
||||
setting("float", "marker_crate_good_duration", 3.0, "Duration that 'good' crate markers last")
|
||||
setting("float", "marker_crate_bad_duration", 9.0, "Duration that 'bad' crate markers last")
|
||||
|
@ -60,7 +60,7 @@ minetest.register_entity("digtron:marker_crate_good", {
|
||||
},
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
minetest.after(5.0,
|
||||
minetest.after(digtron.config.marker_crate_good_duration,
|
||||
function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
@ -86,7 +86,7 @@ minetest.register_entity("digtron:marker_crate_bad", {
|
||||
},
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
minetest.after(5.0,
|
||||
minetest.after(digtron.config.marker_crate_bad_duration,
|
||||
function(self)
|
||||
self.object:remove()
|
||||
end,
|
||||
|
@ -20,6 +20,9 @@ digtron_traction_factor (Digtron traction factor) float 3.0 0.0 1000.0
|
||||
#The maximum extrusion setting permitted for a Digtron builder module.
|
||||
digtron_maximum_extrusion (Digtron maximum extrusion) int 25 1 100
|
||||
|
||||
digtron_marker_crate_good_duration (Duration that 'good' crate markers last) float 3.0 0.0 100.0
|
||||
digtron_marker_crate_bad_duration (Duration that 'bad' crate markers last) float 9.0 0.0 100.0
|
||||
|
||||
[Fuel costs]
|
||||
|
||||
#eg, stone.
|
||||
@ -40,4 +43,4 @@ digtron_build_cost (Fuel cost to build one block) float 1.0 0.0 100.0
|
||||
#If the [technic] mod is installed Digtron can draw power from technic batteries.
|
||||
#A full battery holds 10000 electrical units. This is divided by the power ratio
|
||||
#setting to convert it into fuel units.
|
||||
digtron_power_ratio (Electrical charge to coal heat conversion ratio) int 1 1000 100
|
||||
digtron_power_ratio (Electrical charge to coal heat conversion ratio) int 1 1000 100
|
||||
|
@ -114,8 +114,8 @@ digtron.item_place_node = function(itemstack, placer, place_to, param2)
|
||||
if minetest.registered_nodes[item_name] == nil then
|
||||
-- Permitted craft items are handled by the node-specific on_place call, above.
|
||||
-- if we are a craft item and we get here then we're not whitelisted and we should fail.
|
||||
-- Note that builders should be filtering out craft items like this, but this will protect us
|
||||
-- just in case.
|
||||
-- Note that builder settings should be filtering out craft items like this before we get here,
|
||||
-- but this will protect us just in case.
|
||||
return itemstack, false
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user