Change: bluestone, throwing, change stack_max for boats, carts and mobs
This commit is contained in:
parent
a68d82bf3f
commit
205e432ef7
|
@ -69,7 +69,8 @@ function beds.register_bed(name, def)
|
|||
minetest.set_node(pos, {name = name, param2 = dir})
|
||||
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
and creative.is_enabled_for(player_name)) or
|
||||
not minetest.is_singleplayer() then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -54,12 +54,12 @@ minetest.register_craft({
|
|||
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_off"},
|
||||
interval = 1,
|
||||
interval = 3,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light >= 12 then
|
||||
if light >= 10 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2})
|
||||
mesecon:receptor_on(pos)
|
||||
end
|
||||
|
@ -68,12 +68,12 @@ minetest.register_abm(
|
|||
|
||||
minetest.register_abm(
|
||||
{nodenames = {"mesecons_solarpanel:solar_panel_on"},
|
||||
interval = 1,
|
||||
interval = 3,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local light = minetest.get_node_light(pos, nil)
|
||||
|
||||
if light < 12 then
|
||||
if light < 10 then
|
||||
minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2})
|
||||
mesecon:receptor_off(pos)
|
||||
end
|
||||
|
|
|
@ -112,7 +112,7 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
--[[minetest.register_abm({
|
||||
nodenames = {"mesecons_torch:mesecon_torch_off","mesecons_torch:mesecon_torch_on"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
|
@ -135,7 +135,7 @@ minetest.register_abm({
|
|||
mesecon:receptor_on(pos, torch_get_output_rules(node))
|
||||
end
|
||||
end
|
||||
})
|
||||
})]]
|
||||
|
||||
-- Param2 Table (Block Attached To)
|
||||
-- 5 = z-1
|
||||
|
|
|
@ -290,8 +290,8 @@ minetest.register_entity("boats:boat", boat)
|
|||
minetest.register_craftitem("boats:boat", {
|
||||
description = "Boat",
|
||||
inventory_image = "boats_inventory.png",
|
||||
wield_scale = {x = 2, y = 2, z = 1},
|
||||
liquids_pointable = true,
|
||||
stack_max = 1,
|
||||
groups = {rail = 1, flammable = 2},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
|
|
@ -442,6 +442,7 @@ if not boost_cart.mtg_compat then
|
|||
description = "Cart (Sneak+Click to pick up)",
|
||||
inventory_image = "carts_cart_inv.png",
|
||||
wield_image = "carts_cart_inv.png",
|
||||
stack_max = 1,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" then
|
||||
return
|
||||
|
|
|
@ -309,7 +309,6 @@ minetest.register_tool("default:pole", {
|
|||
description = "Fishing Pole",
|
||||
groups = {},
|
||||
inventory_image = "default_tool_fishing_pole.png",
|
||||
stack_max = 1,
|
||||
groups = {tools = 1},
|
||||
liquids_pointable = true,
|
||||
on_use = function (itemstack, user, pointed_thing)
|
||||
|
|
|
@ -3826,6 +3826,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
|
|||
description = desc,
|
||||
inventory_image = invimg,
|
||||
groups = grp,
|
||||
stack_max = 1,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
|||
for k, obj in pairs(objs) do
|
||||
if obj:get_luaentity() ~= nil then
|
||||
if obj:get_luaentity().name ~= "throwing:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then
|
||||
local damage = 3
|
||||
local damage = 5
|
||||
obj:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups={fleshy=damage},
|
||||
|
@ -57,7 +57,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
|||
self.object:remove()
|
||||
end
|
||||
else
|
||||
local damage = 3
|
||||
local damage = 5
|
||||
obj:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups={fleshy=damage},
|
||||
|
|
|
@ -3,6 +3,7 @@ arrows = {
|
|||
}
|
||||
|
||||
local creative = minetest.settings:get_bool("creative_mode")
|
||||
local wear
|
||||
|
||||
local throwing_shoot_arrow = function(itemstack, player)
|
||||
for _,arrow in ipairs(arrows) do
|
||||
|
@ -27,19 +28,22 @@ local throwing_shoot_arrow = function(itemstack, player)
|
|||
return false
|
||||
end
|
||||
|
||||
local wear
|
||||
minetest.register_tool("throwing:bow", {
|
||||
description = "Bow",
|
||||
inventory_image = "throwing_bow.png",
|
||||
stack_max = 1,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:replace("throwing:bow_0")
|
||||
itemstack:add_wear(wear)
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
itemstack:replace("throwing:bow_arrow")
|
||||
return itemstack
|
||||
end,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
})
|
||||
|
||||
minetest.register_tool("throwing:bow_arrow", {
|
||||
description = "Bow with arrow",
|
||||
inventory_image = "throwing_bow_arrow.png",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:replace("throwing:bow")
|
||||
itemstack:add_wear(wear)
|
||||
if throwing_shoot_arrow(itemstack, user, pointed_thing) then
|
||||
if not creative then
|
||||
|
@ -48,59 +52,6 @@ minetest.register_tool("throwing:bow", {
|
|||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("throwing:bow_0", {
|
||||
description = "Bow",
|
||||
inventory_image = "throwing_bow_0.png",
|
||||
stack_max = 1,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:replace("throwing:bow_1")
|
||||
itemstack:add_wear(wear)
|
||||
return itemstack
|
||||
end,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:add_wear(wear)
|
||||
if throwing_shoot_arrow(itemstack, user, pointed_thing) then
|
||||
if not creative then
|
||||
itemstack:add_wear(65535/385)
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("throwing:bow_1", {
|
||||
description = "Bow",
|
||||
inventory_image = "throwing_bow_1.png",
|
||||
stack_max = 1,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:replace("throwing:bow_2")
|
||||
itemstack:add_wear(wear)
|
||||
return itemstack
|
||||
end,
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:add_wear(wear)
|
||||
if throwing_shoot_arrow(itemstack, user, pointed_thing) then
|
||||
if not creative then
|
||||
itemstack:add_wear(65535/385)
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_tool("throwing:bow_2", {
|
||||
description = "Bow",
|
||||
inventory_image = "throwing_bow_2.png",
|
||||
stack_max = 1,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
wear = itemstack:get_wear()
|
||||
itemstack:replace("throwing:bow")
|
||||
|
@ -123,4 +74,8 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("throwing:bow_0", "throwing:bow_arrow")
|
||||
minetest.register_alias("throwing:bow_1", "throwing:bow_arrow")
|
||||
minetest.register_alias("throwing:bow_2", "throwing:bow_arrow")
|
||||
|
||||
dofile(minetest.get_modpath("throwing").."/arrow.lua")
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 572 B |
Binary file not shown.
Before Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
Loading…
Reference in New Issue