From 746490cff87b8a3f4041a057ad362396d70a8e67 Mon Sep 17 00:00:00 2001 From: MoNTE48 Date: Sun, 2 Jun 2019 23:30:52 +0200 Subject: [PATCH] Fix signs crash, creative inventory button, etc. Drop cart and boat after 120s --- games/default/files/boats/init.lua | 4 ++-- games/default/files/boost_cart/cart_entity.lua | 3 +-- .../files/creative/categories/decorative.lua | 1 - .../default/files/creative/categories/mese.lua | 3 ++- games/default/files/creative/inventory.lua | 9 +++++++-- .../files/creative/textures/button_pressed.png | Bin 0 -> 93 bytes games/default/files/default/nodes.lua | 2 +- games/default/files/doors/init.lua | 10 ++++++++++ games/default/files/signs/init.lua | 2 +- .../vessels/textures/vessels_glass_bottle.png | Bin 228 -> 198 bytes 10 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 games/default/files/creative/textures/button_pressed.png diff --git a/games/default/files/boats/init.lua b/games/default/files/boats/init.lua index 32acb059d..88150ce2c 100644 --- a/games/default/files/boats/init.lua +++ b/games/default/files/boats/init.lua @@ -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 diff --git a/games/default/files/boost_cart/cart_entity.lua b/games/default/files/boost_cart/cart_entity.lua index c5a9283a9..efe00e06d 100644 --- a/games/default/files/boost_cart/cart_entity.lua +++ b/games/default/files/boost_cart/cart_entity.lua @@ -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 diff --git a/games/default/files/creative/categories/decorative.lua b/games/default/files/creative/categories/decorative.lua index 4e4bd04d9..08d24d0ec 100644 --- a/games/default/files/creative/categories/decorative.lua +++ b/games/default/files/creative/categories/decorative.lua @@ -8,7 +8,6 @@ return { "default:stonebrick", "default:vine", "default:dry_grass", - "fences:fence_wood", "default:stonebrickmossy", "default:stonebrickcarved", "default:stone", diff --git a/games/default/files/creative/categories/mese.lua b/games/default/files/creative/categories/mese.lua index 91002e58e..6b69a20fb 100644 --- a/games/default/files/creative/categories/mese.lua +++ b/games/default/files/creative/categories/mese.lua @@ -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", diff --git a/games/default/files/creative/inventory.lua b/games/default/files/creative/inventory.lua index 8476ec692..9c5292b34 100644 --- a/games/default/files/creative/inventory.lua +++ b/games/default/files/creative/inventory.lua @@ -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 diff --git a/games/default/files/creative/textures/button_pressed.png b/games/default/files/creative/textures/button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..11b3293e7820faacb284a70dc3f5d3d1bd674235 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UDxNNmAr*6y6BfvP`J*o1CuNXz mUMwH>v5pSV=CJ)%6`DeM%{KgsQPSoMMLf@%jFHYVl}t7b!% gz(e{Ilz*8?zt(0rU1?h23$%;D)78&qol`;+0Fog=$N&HU delta 212 zcmV;_04x8-0ptOY7=Hu<0001iRAPAjQLCFJDf z%&(=vTsgH+EviK!pgtRyHx|y$&bqp~lK?Ce00001bW%=J06^y0W&i*HWl2OqRCobn zpdnyXb`8KUkX~M1h9ZzLYtLEy0(=Y%4^XYS02IP2z>BUW0ZnWS0