diff --git a/data/textures/fontlucida.png b/data/clienttextures/fontlucida.png similarity index 100% rename from data/textures/fontlucida.png rename to data/clienttextures/fontlucida.png diff --git a/data/textures/menulogo.png b/data/clienttextures/menulogo.png similarity index 100% rename from data/textures/menulogo.png rename to data/clienttextures/menulogo.png diff --git a/data/textures/mud.png b/data/clienttextures/mud.png similarity index 100% rename from data/textures/mud.png rename to data/clienttextures/mud.png diff --git a/data/scripts/default.lua b/data/mods/default/init.lua similarity index 98% rename from data/scripts/default.lua rename to data/mods/default/init.lua index b677cefd0..a60979ff4 100644 --- a/data/scripts/default.lua +++ b/data/mods/default/init.lua @@ -72,6 +72,10 @@ function dump(o, dumped) end end +-- Textures: +-- Mods should prefix their textures with modname_, eg. given the mod +-- name "foomod", a texture could be called "foomod_superfurnace.png" +-- -- Global functions: -- minetest.register_entity(name, prototype_table) -- minetest.register_globalstep(func) diff --git a/data/textures/apple.png b/data/mods/default/textures/apple.png similarity index 100% rename from data/textures/apple.png rename to data/mods/default/textures/apple.png diff --git a/data/textures/apple_iron.png b/data/mods/default/textures/apple_iron.png similarity index 100% rename from data/textures/apple_iron.png rename to data/mods/default/textures/apple_iron.png diff --git a/data/textures/book.png b/data/mods/default/textures/book.png similarity index 100% rename from data/textures/book.png rename to data/mods/default/textures/book.png diff --git a/data/textures/bookshelf.png b/data/mods/default/textures/bookshelf.png similarity index 100% rename from data/textures/bookshelf.png rename to data/mods/default/textures/bookshelf.png diff --git a/data/textures/brick.png b/data/mods/default/textures/brick.png similarity index 100% rename from data/textures/brick.png rename to data/mods/default/textures/brick.png diff --git a/data/textures/cactus_side.png b/data/mods/default/textures/cactus_side.png similarity index 100% rename from data/textures/cactus_side.png rename to data/mods/default/textures/cactus_side.png diff --git a/data/textures/cactus_top.png b/data/mods/default/textures/cactus_top.png similarity index 100% rename from data/textures/cactus_top.png rename to data/mods/default/textures/cactus_top.png diff --git a/data/textures/chest_front.png b/data/mods/default/textures/chest_front.png similarity index 100% rename from data/textures/chest_front.png rename to data/mods/default/textures/chest_front.png diff --git a/data/textures/chest_lock.png b/data/mods/default/textures/chest_lock.png similarity index 100% rename from data/textures/chest_lock.png rename to data/mods/default/textures/chest_lock.png diff --git a/data/textures/chest_side.png b/data/mods/default/textures/chest_side.png similarity index 100% rename from data/textures/chest_side.png rename to data/mods/default/textures/chest_side.png diff --git a/data/textures/chest_top.png b/data/mods/default/textures/chest_top.png similarity index 100% rename from data/textures/chest_top.png rename to data/mods/default/textures/chest_top.png diff --git a/data/textures/clay.png b/data/mods/default/textures/clay.png similarity index 100% rename from data/textures/clay.png rename to data/mods/default/textures/clay.png diff --git a/data/textures/clay_brick.png b/data/mods/default/textures/clay_brick.png similarity index 100% rename from data/textures/clay_brick.png rename to data/mods/default/textures/clay_brick.png diff --git a/data/textures/cloud.png b/data/mods/default/textures/cloud.png similarity index 100% rename from data/textures/cloud.png rename to data/mods/default/textures/cloud.png diff --git a/data/textures/cobble.png b/data/mods/default/textures/cobble.png similarity index 100% rename from data/textures/cobble.png rename to data/mods/default/textures/cobble.png diff --git a/data/textures/cooked_rat.png b/data/mods/default/textures/cooked_rat.png similarity index 100% rename from data/textures/cooked_rat.png rename to data/mods/default/textures/cooked_rat.png diff --git a/data/textures/crack.png b/data/mods/default/textures/crack.png similarity index 100% rename from data/textures/crack.png rename to data/mods/default/textures/crack.png diff --git a/data/textures/dungeon_master.png b/data/mods/default/textures/dungeon_master.png similarity index 100% rename from data/textures/dungeon_master.png rename to data/mods/default/textures/dungeon_master.png diff --git a/data/textures/fence.png b/data/mods/default/textures/fence.png similarity index 100% rename from data/textures/fence.png rename to data/mods/default/textures/fence.png diff --git a/data/textures/fireball.png b/data/mods/default/textures/fireball.png similarity index 100% rename from data/textures/fireball.png rename to data/mods/default/textures/fireball.png diff --git a/data/textures/firefly.png b/data/mods/default/textures/firefly.png similarity index 100% rename from data/textures/firefly.png rename to data/mods/default/textures/firefly.png diff --git a/data/textures/furnace_front.png b/data/mods/default/textures/furnace_front.png similarity index 100% rename from data/textures/furnace_front.png rename to data/mods/default/textures/furnace_front.png diff --git a/data/textures/furnace_side.png b/data/mods/default/textures/furnace_side.png similarity index 100% rename from data/textures/furnace_side.png rename to data/mods/default/textures/furnace_side.png diff --git a/data/textures/glass.png b/data/mods/default/textures/glass.png similarity index 100% rename from data/textures/glass.png rename to data/mods/default/textures/glass.png diff --git a/data/textures/grass.png b/data/mods/default/textures/grass.png similarity index 100% rename from data/textures/grass.png rename to data/mods/default/textures/grass.png diff --git a/data/textures/grass_footsteps.png b/data/mods/default/textures/grass_footsteps.png similarity index 100% rename from data/textures/grass_footsteps.png rename to data/mods/default/textures/grass_footsteps.png diff --git a/data/textures/grass_side.png b/data/mods/default/textures/grass_side.png similarity index 100% rename from data/textures/grass_side.png rename to data/mods/default/textures/grass_side.png diff --git a/data/textures/gravel.png b/data/mods/default/textures/gravel.png similarity index 100% rename from data/textures/gravel.png rename to data/mods/default/textures/gravel.png diff --git a/data/textures/heart.png b/data/mods/default/textures/heart.png similarity index 100% rename from data/textures/heart.png rename to data/mods/default/textures/heart.png diff --git a/data/textures/junglegrass.png b/data/mods/default/textures/junglegrass.png similarity index 100% rename from data/textures/junglegrass.png rename to data/mods/default/textures/junglegrass.png diff --git a/data/textures/jungletree.png b/data/mods/default/textures/jungletree.png similarity index 100% rename from data/textures/jungletree.png rename to data/mods/default/textures/jungletree.png diff --git a/data/textures/jungletree_top.png b/data/mods/default/textures/jungletree_top.png similarity index 100% rename from data/textures/jungletree_top.png rename to data/mods/default/textures/jungletree_top.png diff --git a/data/textures/ladder.png b/data/mods/default/textures/ladder.png similarity index 100% rename from data/textures/ladder.png rename to data/mods/default/textures/ladder.png diff --git a/data/textures/lava.png b/data/mods/default/textures/lava.png similarity index 100% rename from data/textures/lava.png rename to data/mods/default/textures/lava.png diff --git a/data/textures/leaves.png b/data/mods/default/textures/leaves.png similarity index 100% rename from data/textures/leaves.png rename to data/mods/default/textures/leaves.png diff --git a/data/textures/lump_of_clay.png b/data/mods/default/textures/lump_of_clay.png similarity index 100% rename from data/textures/lump_of_clay.png rename to data/mods/default/textures/lump_of_clay.png diff --git a/data/textures/lump_of_coal.png b/data/mods/default/textures/lump_of_coal.png similarity index 100% rename from data/textures/lump_of_coal.png rename to data/mods/default/textures/lump_of_coal.png diff --git a/data/textures/lump_of_iron.png b/data/mods/default/textures/lump_of_iron.png similarity index 100% rename from data/textures/lump_of_iron.png rename to data/mods/default/textures/lump_of_iron.png diff --git a/data/textures/mese.png b/data/mods/default/textures/mese.png similarity index 100% rename from data/textures/mese.png rename to data/mods/default/textures/mese.png diff --git a/data/textures/mineral_coal.png b/data/mods/default/textures/mineral_coal.png similarity index 100% rename from data/textures/mineral_coal.png rename to data/mods/default/textures/mineral_coal.png diff --git a/data/textures/mineral_iron.png b/data/mods/default/textures/mineral_iron.png similarity index 100% rename from data/textures/mineral_iron.png rename to data/mods/default/textures/mineral_iron.png diff --git a/data/textures/mossycobble.png b/data/mods/default/textures/mossycobble.png similarity index 100% rename from data/textures/mossycobble.png rename to data/mods/default/textures/mossycobble.png diff --git a/data/mods/default/textures/mud.png b/data/mods/default/textures/mud.png new file mode 100644 index 000000000..7cb9c89a6 Binary files /dev/null and b/data/mods/default/textures/mud.png differ diff --git a/data/textures/nc_back.png b/data/mods/default/textures/nc_back.png similarity index 100% rename from data/textures/nc_back.png rename to data/mods/default/textures/nc_back.png diff --git a/data/textures/nc_front.png b/data/mods/default/textures/nc_front.png similarity index 100% rename from data/textures/nc_front.png rename to data/mods/default/textures/nc_front.png diff --git a/data/textures/nc_rb.png b/data/mods/default/textures/nc_rb.png similarity index 100% rename from data/textures/nc_rb.png rename to data/mods/default/textures/nc_rb.png diff --git a/data/textures/nc_side.png b/data/mods/default/textures/nc_side.png similarity index 100% rename from data/textures/nc_side.png rename to data/mods/default/textures/nc_side.png diff --git a/data/textures/oerkki1.png b/data/mods/default/textures/oerkki1.png similarity index 100% rename from data/textures/oerkki1.png rename to data/mods/default/textures/oerkki1.png diff --git a/data/textures/oerkki1_damaged.png b/data/mods/default/textures/oerkki1_damaged.png similarity index 100% rename from data/textures/oerkki1_damaged.png rename to data/mods/default/textures/oerkki1_damaged.png diff --git a/data/textures/paper.png b/data/mods/default/textures/paper.png similarity index 100% rename from data/textures/paper.png rename to data/mods/default/textures/paper.png diff --git a/data/textures/papyrus.png b/data/mods/default/textures/papyrus.png similarity index 100% rename from data/textures/papyrus.png rename to data/mods/default/textures/papyrus.png diff --git a/data/textures/player.png b/data/mods/default/textures/player.png similarity index 100% rename from data/textures/player.png rename to data/mods/default/textures/player.png diff --git a/data/textures/player_back.png b/data/mods/default/textures/player_back.png similarity index 100% rename from data/textures/player_back.png rename to data/mods/default/textures/player_back.png diff --git a/data/textures/rail.png b/data/mods/default/textures/rail.png similarity index 100% rename from data/textures/rail.png rename to data/mods/default/textures/rail.png diff --git a/data/textures/rail_crossing.png b/data/mods/default/textures/rail_crossing.png similarity index 100% rename from data/textures/rail_crossing.png rename to data/mods/default/textures/rail_crossing.png diff --git a/data/textures/rail_curved.png b/data/mods/default/textures/rail_curved.png similarity index 100% rename from data/textures/rail_curved.png rename to data/mods/default/textures/rail_curved.png diff --git a/data/textures/rail_t_junction.png b/data/mods/default/textures/rail_t_junction.png similarity index 100% rename from data/textures/rail_t_junction.png rename to data/mods/default/textures/rail_t_junction.png diff --git a/data/textures/rat.png b/data/mods/default/textures/rat.png similarity index 100% rename from data/textures/rat.png rename to data/mods/default/textures/rat.png diff --git a/data/textures/sand.png b/data/mods/default/textures/sand.png similarity index 100% rename from data/textures/sand.png rename to data/mods/default/textures/sand.png diff --git a/data/textures/sandstone.png b/data/mods/default/textures/sandstone.png similarity index 100% rename from data/textures/sandstone.png rename to data/mods/default/textures/sandstone.png diff --git a/data/textures/sapling.png b/data/mods/default/textures/sapling.png similarity index 100% rename from data/textures/sapling.png rename to data/mods/default/textures/sapling.png diff --git a/data/textures/scorched_stuff.png b/data/mods/default/textures/scorched_stuff.png similarity index 100% rename from data/textures/scorched_stuff.png rename to data/mods/default/textures/scorched_stuff.png diff --git a/data/textures/sign.png b/data/mods/default/textures/sign.png similarity index 100% rename from data/textures/sign.png rename to data/mods/default/textures/sign.png diff --git a/data/textures/sign_back.png b/data/mods/default/textures/sign_back.png similarity index 100% rename from data/textures/sign_back.png rename to data/mods/default/textures/sign_back.png diff --git a/data/textures/sign_wall.png b/data/mods/default/textures/sign_wall.png similarity index 100% rename from data/textures/sign_wall.png rename to data/mods/default/textures/sign_wall.png diff --git a/data/textures/skybox1.png b/data/mods/default/textures/skybox1.png similarity index 100% rename from data/textures/skybox1.png rename to data/mods/default/textures/skybox1.png diff --git a/data/textures/skybox1_dawn.png b/data/mods/default/textures/skybox1_dawn.png similarity index 100% rename from data/textures/skybox1_dawn.png rename to data/mods/default/textures/skybox1_dawn.png diff --git a/data/textures/skybox1_night.png b/data/mods/default/textures/skybox1_night.png similarity index 100% rename from data/textures/skybox1_night.png rename to data/mods/default/textures/skybox1_night.png diff --git a/data/textures/skybox2.png b/data/mods/default/textures/skybox2.png similarity index 100% rename from data/textures/skybox2.png rename to data/mods/default/textures/skybox2.png diff --git a/data/textures/skybox2_dawn.png b/data/mods/default/textures/skybox2_dawn.png similarity index 100% rename from data/textures/skybox2_dawn.png rename to data/mods/default/textures/skybox2_dawn.png diff --git a/data/textures/skybox2_night.png b/data/mods/default/textures/skybox2_night.png similarity index 100% rename from data/textures/skybox2_night.png rename to data/mods/default/textures/skybox2_night.png diff --git a/data/textures/skybox3.png b/data/mods/default/textures/skybox3.png similarity index 100% rename from data/textures/skybox3.png rename to data/mods/default/textures/skybox3.png diff --git a/data/textures/skybox3_dawn.png b/data/mods/default/textures/skybox3_dawn.png similarity index 100% rename from data/textures/skybox3_dawn.png rename to data/mods/default/textures/skybox3_dawn.png diff --git a/data/textures/skybox3_night.png b/data/mods/default/textures/skybox3_night.png similarity index 100% rename from data/textures/skybox3_night.png rename to data/mods/default/textures/skybox3_night.png diff --git a/data/textures/steel_block.png b/data/mods/default/textures/steel_block.png similarity index 100% rename from data/textures/steel_block.png rename to data/mods/default/textures/steel_block.png diff --git a/data/textures/steel_ingot.png b/data/mods/default/textures/steel_ingot.png similarity index 100% rename from data/textures/steel_ingot.png rename to data/mods/default/textures/steel_ingot.png diff --git a/data/textures/stick.png b/data/mods/default/textures/stick.png similarity index 100% rename from data/textures/stick.png rename to data/mods/default/textures/stick.png diff --git a/data/textures/stone.png b/data/mods/default/textures/stone.png similarity index 100% rename from data/textures/stone.png rename to data/mods/default/textures/stone.png diff --git a/data/textures/tnt_bottom.png b/data/mods/default/textures/tnt_bottom.png similarity index 100% rename from data/textures/tnt_bottom.png rename to data/mods/default/textures/tnt_bottom.png diff --git a/data/textures/tnt_side.png b/data/mods/default/textures/tnt_side.png similarity index 100% rename from data/textures/tnt_side.png rename to data/mods/default/textures/tnt_side.png diff --git a/data/textures/tnt_top.png b/data/mods/default/textures/tnt_top.png similarity index 100% rename from data/textures/tnt_top.png rename to data/mods/default/textures/tnt_top.png diff --git a/data/textures/tool_mesepick.png b/data/mods/default/textures/tool_mesepick.png similarity index 100% rename from data/textures/tool_mesepick.png rename to data/mods/default/textures/tool_mesepick.png diff --git a/data/textures/tool_steelaxe.png b/data/mods/default/textures/tool_steelaxe.png similarity index 100% rename from data/textures/tool_steelaxe.png rename to data/mods/default/textures/tool_steelaxe.png diff --git a/data/textures/tool_steelpick.png b/data/mods/default/textures/tool_steelpick.png similarity index 100% rename from data/textures/tool_steelpick.png rename to data/mods/default/textures/tool_steelpick.png diff --git a/data/textures/tool_steelshovel.png b/data/mods/default/textures/tool_steelshovel.png similarity index 100% rename from data/textures/tool_steelshovel.png rename to data/mods/default/textures/tool_steelshovel.png diff --git a/data/textures/tool_steelsword.png b/data/mods/default/textures/tool_steelsword.png similarity index 100% rename from data/textures/tool_steelsword.png rename to data/mods/default/textures/tool_steelsword.png diff --git a/data/textures/tool_stoneaxe.png b/data/mods/default/textures/tool_stoneaxe.png similarity index 100% rename from data/textures/tool_stoneaxe.png rename to data/mods/default/textures/tool_stoneaxe.png diff --git a/data/textures/tool_stonepick.png b/data/mods/default/textures/tool_stonepick.png similarity index 100% rename from data/textures/tool_stonepick.png rename to data/mods/default/textures/tool_stonepick.png diff --git a/data/textures/tool_stoneshovel.png b/data/mods/default/textures/tool_stoneshovel.png similarity index 100% rename from data/textures/tool_stoneshovel.png rename to data/mods/default/textures/tool_stoneshovel.png diff --git a/data/textures/tool_stonesword.png b/data/mods/default/textures/tool_stonesword.png similarity index 100% rename from data/textures/tool_stonesword.png rename to data/mods/default/textures/tool_stonesword.png diff --git a/data/textures/tool_woodaxe.png b/data/mods/default/textures/tool_woodaxe.png similarity index 100% rename from data/textures/tool_woodaxe.png rename to data/mods/default/textures/tool_woodaxe.png diff --git a/data/textures/tool_woodpick.png b/data/mods/default/textures/tool_woodpick.png similarity index 100% rename from data/textures/tool_woodpick.png rename to data/mods/default/textures/tool_woodpick.png diff --git a/data/textures/tool_woodshovel.png b/data/mods/default/textures/tool_woodshovel.png similarity index 100% rename from data/textures/tool_woodshovel.png rename to data/mods/default/textures/tool_woodshovel.png diff --git a/data/textures/tool_woodsword.png b/data/mods/default/textures/tool_woodsword.png similarity index 100% rename from data/textures/tool_woodsword.png rename to data/mods/default/textures/tool_woodsword.png diff --git a/data/textures/torch.png b/data/mods/default/textures/torch.png similarity index 100% rename from data/textures/torch.png rename to data/mods/default/textures/torch.png diff --git a/data/textures/torch_on_ceiling.png b/data/mods/default/textures/torch_on_ceiling.png similarity index 100% rename from data/textures/torch_on_ceiling.png rename to data/mods/default/textures/torch_on_ceiling.png diff --git a/data/textures/torch_on_floor.png b/data/mods/default/textures/torch_on_floor.png similarity index 100% rename from data/textures/torch_on_floor.png rename to data/mods/default/textures/torch_on_floor.png diff --git a/data/textures/tree.png b/data/mods/default/textures/tree.png similarity index 100% rename from data/textures/tree.png rename to data/mods/default/textures/tree.png diff --git a/data/textures/tree_top.png b/data/mods/default/textures/tree_top.png similarity index 100% rename from data/textures/tree_top.png rename to data/mods/default/textures/tree_top.png diff --git a/data/textures/treeprop.png b/data/mods/default/textures/treeprop.png similarity index 100% rename from data/textures/treeprop.png rename to data/mods/default/textures/treeprop.png diff --git a/data/textures/unknown_block.png b/data/mods/default/textures/unknown_block.png similarity index 100% rename from data/textures/unknown_block.png rename to data/mods/default/textures/unknown_block.png diff --git a/data/textures/unknown_object.png b/data/mods/default/textures/unknown_object.png similarity index 100% rename from data/textures/unknown_object.png rename to data/mods/default/textures/unknown_object.png diff --git a/data/textures/water.png b/data/mods/default/textures/water.png similarity index 100% rename from data/textures/water.png rename to data/mods/default/textures/water.png diff --git a/data/textures/wood.png b/data/mods/default/textures/wood.png similarity index 100% rename from data/textures/wood.png rename to data/mods/default/textures/wood.png diff --git a/src/game.cpp b/src/game.cpp index 6c75863c0..fc87deb29 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -256,9 +256,9 @@ void draw_hotbar(video::IVideoDriver *driver, gui::IGUIFont *font, /* Draw hearts */ + video::ITexture *heart_texture = tsrc->getTextureRaw("heart.png"); + if(heart_texture) { - video::ITexture *heart_texture = - driver->getTexture(getTexturePath("heart.png").c_str()); v2s32 p = pos + v2s32(0, -20); for(s32 i=0; i modspaths; + modspaths.push_back(porting::path_data + DIR_DELIM + "mods"); + for(core::list::Iterator i = modspaths.begin(); + i != modspaths.end(); i++){ + std::string modspath = *i; + std::vector dirlist = fs::GetDirListing(modspath); + for(u32 j=0; j