Fix signs crash, creative inventory button, etc. Drop cart and boat after 120s
This commit is contained in:
parent
dfbf1293f6
commit
746490cff8
|
@ -155,8 +155,8 @@ function boat.on_step(self, dtime)
|
|||
|
||||
self.count = (self.count or 0) + dtime
|
||||
|
||||
-- after 300 seconds remove boat and drop as item if not boarded
|
||||
if self.count > 300 then
|
||||
-- Drop boat if the player is not on board
|
||||
if self.count > 120 then
|
||||
minetest.add_item(self.object:get_pos(), "boats:boat")
|
||||
self.object:remove()
|
||||
return
|
||||
|
|
|
@ -197,7 +197,7 @@ function cart_entity:on_step(dtime)
|
|||
if not self.driver and #self.attached_items == 0 then
|
||||
self.count = (self.count or 0) + dtime
|
||||
|
||||
if self.count > 300 then
|
||||
if self.count > 120 then
|
||||
minetest.add_item(self.object:get_pos(), "carts:cart")
|
||||
if self.sound_handle then
|
||||
minetest.sound_stop(self.sound_handle)
|
||||
|
@ -469,7 +469,6 @@ if not boost_cart.mtg_compat then
|
|||
return
|
||||
end
|
||||
|
||||
minetest.sound_play({pos = pointed_thing.above, name = "default_place_node_metal", gain = 1})
|
||||
if not minetest.settings:get_bool("creative_mode") or not minetest.is_singleplayer() then
|
||||
itemstack:take_item()
|
||||
end
|
||||
|
|
|
@ -8,7 +8,6 @@ return {
|
|||
"default:stonebrick",
|
||||
"default:vine",
|
||||
"default:dry_grass",
|
||||
"fences:fence_wood",
|
||||
"default:stonebrickmossy",
|
||||
"default:stonebrickcarved",
|
||||
"default:stone",
|
||||
|
|
|
@ -4,7 +4,8 @@ return {
|
|||
"mesecons_solarpanel:solar_panel_off",
|
||||
"mesecons_walllever:wall_lever_off",
|
||||
"mesecons_torch:bluestoneblock",
|
||||
"fences:fencegate",
|
||||
"default:fence_wood",
|
||||
"doors:gate_wood_closed",
|
||||
"mesecons_pressureplates:pressure_plate_stone_off",
|
||||
"mesecons_pistons:piston_normal_off",
|
||||
"mesecons_pressureplates:pressure_plate_wood_off",
|
||||
|
|
|
@ -132,9 +132,14 @@ local function get_button_formspec(player_name, start_i)
|
|||
if not item then
|
||||
return buttons
|
||||
end
|
||||
local def = minetest.registered_items[item]
|
||||
local tooltip = def and def.description or ""
|
||||
buttons = buttons.."item_image["..
|
||||
(x + 0.01)..","..(y + 1.67)..";1,1;"..item.."]image_button["..
|
||||
(x + 0.01)..","..(y + 1.67)..";1,1;blank.png;"..item..";;;false]"
|
||||
(x + 0.02)..","..(y + 1.68)..";1,1;"..item.."]image_button["..
|
||||
(x + 0.02)..","..(y + 1.68)..";1,1;blank.png;"..item..
|
||||
";;;false;button_pressed.png]"..
|
||||
"tooltip["..item..";"..tooltip..";#000;#FFF]"
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 93 B |
|
@ -787,7 +787,7 @@ minetest.register_node("default:goldblock", {
|
|||
tiles = {"default_gold_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_emerald", {
|
||||
|
|
|
@ -646,6 +646,16 @@ function doors.register_fencegate(name, def)
|
|||
max_hear_distance = 8})
|
||||
return itemstack
|
||||
end,
|
||||
mesecons = {effector = {
|
||||
action_on = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local node_def = minetest.registered_nodes[node.name]
|
||||
minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2})
|
||||
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
|
||||
max_hear_distance = 8})
|
||||
return itemstack
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ minetest.register_node("signs:wall_sign", {
|
|||
found = true
|
||||
end
|
||||
end
|
||||
if not found then
|
||||
if not found and signs.wall_sign_positions[p2] then
|
||||
local obj = minetest.add_entity(vector.add(pos,
|
||||
signs.wall_sign_positions[p2][1]), "signs:sign_text")
|
||||
obj:set_properties({
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 198 B |
Loading…
Reference in New Issue