mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
011ad78b42
Adds a mesh model that appears when a chest is opened. The chest stays visibly open as long as the player keeps it open. When the player closes the formspec, the chest returns back to the closed shape. While opening and closing, a sound plays. A second person inspecting the chest will trigger a second sound open. However, only after the last player closes the chest, does the chest actually visually close and is the sound close played. This keeps mesh updates to a minimum. While it's possible that a server shutting down may cause chests to remain open, this does not affect the chests' working matter, and opening or closing them should fix them. Old chests are converted to the new style by LBM. I previously had them converted on open but this was unreliable, and LBMs don't have that problem. Open chests cannot be dug up. This prevents people from keeping a chest open and digging it out as well, since closing a chest would place a chest back (swap) at the spot. We could protect against this, but it still messes up the client and causes a lot of "missing node inventory" error messages otherwise. It's unlikely but possible that a player lagging out causes a chest to stay "open" and thus unremovable by digging, but there are other ways of dealing with that - a server restart fixes that issue. If the lid of the chest is obstructed, the sounds continue to play, but the lid isn't opened. Obstructed means that a node is present above the chest lid, however, we ignore several node types like signs, torches (not 3d) and wallmounted nodeboxes (typically signs) since they don't pose any major obstruction in almost any case, and are typically found above chests. Additionally, the selection box of the opened chest does not include the lid, and so one can still interact with e.g. a sign behind an open lid. Due to the fact that chests now have 7+ textures, we can no longer use materials (limit: 6) to texture the chest, and so there is now a single UV mapped image that applies both to open and closed chests. While this does mean texture pack makers need to create it, this is extremely simple and consists of a simple cut'n'paste over the template and should be really easy to do. Only one texture file is now then used for both open and closed chests. |
||
---|---|---|
.. | ||
default_break_glass.1.ogg | ||
default_break_glass.2.ogg | ||
default_break_glass.3.ogg | ||
default_chest_close.ogg | ||
default_chest_open.ogg | ||
default_cool_lava.1.ogg | ||
default_cool_lava.2.ogg | ||
default_cool_lava.3.ogg | ||
default_dig_choppy.ogg | ||
default_dig_cracky.ogg | ||
default_dig_crumbly.ogg | ||
default_dig_dig_immediate.ogg | ||
default_dig_metal.ogg | ||
default_dig_oddly_breakable_by_hand.ogg | ||
default_dig_snappy.ogg | ||
default_dirt_footstep.1.ogg | ||
default_dirt_footstep.2.ogg | ||
default_dug_metal.1.ogg | ||
default_dug_metal.2.ogg | ||
default_dug_node.1.ogg | ||
default_dug_node.2.ogg | ||
default_glass_footstep.ogg | ||
default_grass_footstep.1.ogg | ||
default_grass_footstep.2.ogg | ||
default_grass_footstep.3.ogg | ||
default_gravel_footstep.1.ogg | ||
default_gravel_footstep.2.ogg | ||
default_gravel_footstep.3.ogg | ||
default_gravel_footstep.4.ogg | ||
default_hard_footstep.1.ogg | ||
default_hard_footstep.2.ogg | ||
default_hard_footstep.3.ogg | ||
default_item_smoke.ogg | ||
default_metal_footstep.1.ogg | ||
default_metal_footstep.2.ogg | ||
default_metal_footstep.3.ogg | ||
default_place_node_hard.1.ogg | ||
default_place_node_hard.2.ogg | ||
default_place_node_metal.1.ogg | ||
default_place_node_metal.2.ogg | ||
default_place_node.1.ogg | ||
default_place_node.2.ogg | ||
default_place_node.3.ogg | ||
default_sand_footstep.1.ogg | ||
default_sand_footstep.2.ogg | ||
default_snow_footstep.1.ogg | ||
default_snow_footstep.2.ogg | ||
default_snow_footstep.3.ogg | ||
default_tool_breaks.1.ogg | ||
default_tool_breaks.2.ogg | ||
default_tool_breaks.3.ogg | ||
default_water_footstep.1.ogg | ||
default_water_footstep.2.ogg | ||
default_water_footstep.3.ogg | ||
default_water_footstep.4.ogg | ||
default_wood_footstep.1.ogg | ||
default_wood_footstep.2.ogg | ||
player_damage.ogg |