capturetheflag icon indicating copy to clipboard operation
capturetheflag copied to clipboard

Highlight visited chests

Open xenonca opened this issue 3 years ago • 4 comments

Make it visible for your teammates when a chest has already been opened by someone. AFAIK it is not (yet) possible to change node textures during run time, this is why I'm using minetest.swap_node().

xenonca avatar Feb 04 '22 20:02 xenonca

How are opened chests handled in MTG?

LoneWolfHT avatar Feb 04 '22 21:02 LoneWolfHT

How are opened chests handled in MTG?

The same approach https://github.com/minetest/minetest_game/blob/42baede13fdf855773cc44ce10f4a3ea4e239404/mods/default/chests.lua#L134

savilli avatar Feb 04 '22 21:02 savilli

How are opened chests handled in MTG?

I think I should have been more clear with the explanation, what I mean is that visited chests, chests that have already been touched/opened by a player, will be distinguishable from untouched ones.

xenonca avatar Feb 04 '22 21:02 xenonca

Looks like massive code duplication to me; shouldn't this basically be the same def. as the treasure chest except for the tiles (and maybe glow)? Why don't you table.copy the treasure chest def. and alter it then?

After some more thought, I believe the ideal solution might be "treasure boxes" which when dug drop all their contents.

appgurueu avatar Feb 06 '22 16:02 appgurueu