Browse Source

working on automatic patching

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
bf3179bfd3
  1. 117
      etc/change_hardcoded_world_name_first/game-install-ENLIVEN
  2. 248
      patches/subgame-basis/mods/bones/init-0.4.15 or lower.lua
  3. 249
      patches/subgame-basis/mods/bones/init.lua
  4. 199
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/LICENSE
  5. 3340
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/crafts.lua
  6. 207
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/gastronomy.lua
  7. 421
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/models/homedecor_beer_mug.obj
  8. BIN
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug.png
  9. BIN
      patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug_inv.png
  10. 199
      patches/subgame-basis/mods/homedecor_modpack/homedecor/LICENSE
  11. 3130
      patches/subgame-basis/mods/homedecor_modpack/homedecor/crafts.lua
  12. 236
      patches/subgame-basis/mods/homedecor_modpack/homedecor/gastronomy.lua
  13. 421
      patches/subgame-basis/mods/homedecor_modpack/homedecor/models/homedecor_beer_mug.obj
  14. BIN
      patches/subgame-basis/mods/homedecor_modpack/homedecor/textures/homedecor_beer_mug.png
  15. BIN
      patches/subgame-basis/mods/homedecor_modpack/homedecor/textures/homedecor_beer_mug_inv.png
  16. 258
      patches/subgame/mods/bones/init-0.4.15 or lower.lua
  17. 9
      patches/subgame/mods/bones/init.lua
  18. 3343
      patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/crafts.lua
  19. 209
      patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/gastronomy.lua
  20. 421
      patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/models/homedecor_beer_mug.obj
  21. BIN
      patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug.png
  22. BIN
      patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug_inv.png
  23. 199
      patches/subgame/mods/homedecor_modpack/homedecor/LICENSE
  24. 323
      patches/subgame/mods/homedecor_modpack/homedecor/crafts.lua
  25. 92
      patches/subgame/mods/homedecor_modpack/homedecor/gastronomy.lua

117
etc/change_hardcoded_world_name_first/game-install-ENLIVEN

@ -10,23 +10,40 @@
# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package)
# Known Issues:
Uberi=`ls /usr/share/minetest/games/ENLIVEN/mods/worldedit | grep Uberi`
if [ ! -z "$Uberi" ]; then
# /usr/share/minetest/games/ENLIVEN/mods/worldedit/Uberi-Minetest-WorldEdit-3322ef9
rm -Rf /usr/share/minetest/games/ENLIVEN/mods/worldedit
fi
if [ -d /usr/share/minetest/games/ENLIVEN/mods/mesecons/mesecons-master ]; then
rm -Rf /usr/share/minetest/games/ENLIVEN/mods/mesecons
fi
# (Ubuntu 14.04 Trusty Tahr Server) folders were found using:
# cd /
# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest)
# sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games)
sudo echo "cached password."
# NOTE: minetest mods are ALWAYS ONLY installed on server
# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
REPO_PATH=$(dirname "$SCRIPTPATH")
#endregion paste this part into terminal to get some great environment variables
PATCHES_PATH="$REPO_PATH/patches"
if [ ! -d "$PATCHES_PATH" ]; then
# maybe moved somewhere or this code was pasted
PATCHES_PATH=$HOME/GitHub/EnlivenMinetest/patches
fi
if [ ! -d "$PATCHES_PATH" ]; then
# maybe running from root of repo
PATCHES_PATH="patches"
fi
if [ ! -d "$PATCHES_PATH" ]; then
# should work if ran from folder where exists
PATCHES_PATH="../patches"
fi
if [ ! -d "$PATCHES_PATH" ]; then
echo "ERROR: could not find patches such as in $PATCHES_PATH"
exit 1
fi
# NOTE: minetest mods (other than 0.4.16 client-side mods) are ALWAYS ONLY installed on server, unless you need them for singleplayer
mtgame_name="minetest_game"
USR_SHARE_MINETEST=/usr/share/games/minetest
try_path="/usr/share/minetest"
@ -54,7 +71,7 @@ MT_MYWORLD_NAME=FCAGameAWorld
MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME
err_txt=$HOME/err-enliven.txt
#endregion paste this part into terminal to get some great environment variables
# BACKUP THE WORLD:
@ -1012,6 +1029,9 @@ fi
wget https://github.com/minetest-mods/mesecons/archive/master.zip
mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP
unzip $MTMOD_SRC_ZIP
if [ -d "$MTMOD_DEST_PATH" ]; then
rm -Rf "$MTMOD_DEST_PATH"
fi
sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH"
if [ ! -d "$MTMOD_DEST_PATH" ]; then
echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." > $err_txt
@ -1345,6 +1365,9 @@ rm -Rvf $MTMOD_UNZ_NAME
wget https://github.com/Uberi/MineTest-WorldEdit/zipball/master
mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP"
unzip "$MTMOD_SRC_ZIP"
if [ -d "$MTMOD_DEST_PATH" ]; then
rm -Rf "$MTMOD_DEST_PATH"
fi
sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH"
if [ ! -d "$MTMOD_DEST_PATH" ]; then
echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." > $err_txt
@ -1719,6 +1742,7 @@ if [ -f $MTMOD_SRC_ZIP ]; then
rm -f $MTMOD_SRC_ZIP
fi
if [ -d "$MTMOD_DEST_PATH" ]; then
# remove old copy, or remove minetest_game's farming
sudo rm -Rf "$MTMOD_DEST_PATH"
fi
wget https://github.com/tenplus1/farming/archive/master.zip
@ -1888,29 +1912,62 @@ fi
echo
echo
echo
echo "adding the following necessary integration mods:"
ls ~/GitHub/EnlivenMinetest/patches/mods-integration/
sudo cp -R ~/GitHub/EnlivenMinetest/patches/mods-integration/* "$MT_MYGAME_MODS_PATH/"
echo
echo "adding the following multiplayer mods:"
ls ~/GitHub/EnlivenMinetest/patches/mods-multiplayer/
sudo cp -R ~/GitHub/EnlivenMinetest/patches/mods-multiplayer/* "$MT_MYGAME_MODS_PATH/"
if [ -d "$PATCHES_PATH" ]; then
echo "adding the following necessary integration mods:"
ls $PATCHES_PATH/mods-integration/
sudo cp -R $PATCHES_PATH/mods-integration/* "$MT_MYGAME_MODS_PATH/"
echo
echo "adding the following multiplayer mods:"
ls $PATCHES_PATH/mods-multiplayer/
sudo cp -R $PATCHES_PATH/mods-multiplayer/* "$MT_MYGAME_MODS_PATH/"
echo "adding non-manual patches to subgame (vs minetest_game and downloaded mods):"
sudo cp -f $PATCHES_PATH/subgame/* "$MT_MYGAME_DIR/"
sudo cp -f $PATCHES_PATH/subgame/menu/* "$MT_MYGAME_DIR/menu/"
sudo cp -f $PATCHES_PATH/subgame/mods/mobs/textures/* "$MT_MYGAME_DIR/mods/mobs/textures/"
sudo cp -f $PATCHES_PATH/subgame/mods/mobs_monster/textures/* "$MT_MYGAME_DIR/mods/mobs_monster/textures/"
echo "mods affected: mobs mobs_monsters"
PATCHED_FLAG=""
BASIS_PATH=$PATCHES_PATH/subgame-basis/mods/bones/init.lua
MTMOD_DEST_NAME=bones
MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/bones
TARGET_PATH=$MTMOD_DEST_PATH/init.lua
TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`"
if [ -z "$TRY_DIFF" ]; then
sudo cp -f $BASIS_PATH "$MT_MYGAME_DIR/mods/bones/"
else
echo "FAILED to patch $MTMOD_DEST_NAME since $TARGET_PATH differs from known"
fi
BASIS_PATH=$PATCHES_PATH/subgame-basis/mods/homedecor_modpack/homedecor/gastronomy.lua
TARGET_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor/gastronomy.lua
MTMOD_DEST_NAME=homedecor_modpack
MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor
TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`"
if [ -z "$TRY_DIFF" ]; then
sudo cp -f $TARGET_PATH "$MTMOD_DEST_PATH/"
else
echo "FAILED to patch $MTMOD_DEST_NAME since $TARGET_PATH differs from known"
fi
BASIS_PATH=$PATCHES_PATH/subgame-basis/mods/homedecor_modpack/homedecor/crafts.lua
TARGET_PATH=$MT_MYGAME_MODS_PATH/homedecor_modpack/homedecor/crafts.lua
MTMOD_DEST_NAME=homedecor_modpack
TRY_DIFF="`diff $BASIS_PATH $TARGET_PATH`"
if [ -z "$TRY_DIFF" ]; then
sudo cp -f $TARGET_PATH "$MTMOD_DEST_PATH/"
else
echo "FAILED to patch $MTMOD_DEST_NAME since $TARGET_PATH differs from known"
fi
else
echo "did not find $PATCHES_PATH, so skipped automatic patching which is partially implemented"
fi
echo
echo "# remove not available on 0.4.16 stable (is only avail on 0.4.16-dev or higher)"
echo "sudo rm -Rf /usr/share/games/minetest/games/ENLIVEN/mods/worldedit/worldedit_brush"
echo "# not recommended:"
echo "sudo cp -R ~/GitHub/EnlivenMinetest/patches/mods-stopgap/* $MT_MYGAME_MODS_PATH/"
echo "sudo cp -R $PATCHES_PATH/mods-stopgap/* $MT_MYGAME_MODS_PATH/"
echo "sudo rm -Rf $MT_MYGAME_MODS_PATH/1.nonworking"
echo
echo
echo "adding non-manual patches to subgame (vs minetest_game and downloaded mods):"
sudo cp -f ~/GitHub/EnlivenMinetest/patches/subgame/* "$MT_MYGAME_DIR/"
sudo cp -f ~/GitHub/EnlivenMinetest/patches/subgame/menu/* "$MT_MYGAME_DIR/menu/"
sudo cp -f ~/GitHub/EnlivenMinetest/patches/subgame/mods/mobs/textures/* "$MT_MYGAME_DIR/mods/mobs/textures/"
sudo cp -f ~/GitHub/EnlivenMinetest/patches/subgame/mods/mobs_monster/textures/* "$MT_MYGAME_DIR/mods/mobs_monster/textures/"
echo "mods affected: mobs"
echo
echo "#### $MT_MYWORLD_DIR/world.mt: ####"
cat "$MT_MYWORLD_DIR/world.mt"
@ -1937,12 +1994,12 @@ echo " * for invhack, remember to do: /giveme invhack:tool"
echo " * uncomment columns in lapis mod"
echo " * Make sure client (server done already above) minetest.conf has secure.trusted_mods = advanced_npc"
echo " * Make sure writable minetest conf was successfully written"
echo " over /usr/local/share/minetest/games/enliven/minetest.conf with:"
echo " over $MT_MYGAME_DIR/minetest.conf with (NOTE: protector_drop is deprecated):"
echo "protector_radius = 7"
echo "protector_pvp = true"
echo "protector_pvp_spawn = 10"
echo "protector_drop = true"
echo "protector_hurt = 1"
echo "protector_drop = false"
echo "protector_hurt = 3"
echo ""
echo "default_privs = interact,shout,home"
echo "max_users = 50"

248
patches/subgame-basis/mods/bones/init-0.4.15 or lower.lua

@ -0,0 +1,248 @@
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
return true
end
return false
end
local bones_formspec =
"size[8,9]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[current_name;main;0,0.3;8,4;]" ..
"list[current_player;main;0,4.85;8,1;]" ..
"list[current_player;main;0,6.08;8,3;8]" ..
"listring[current_name;main]" ..
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85)
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
tiles = {
"bones_top.png^[transform2",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"bones_front.png"
},
paramtype2 = "facedir",
groups = {dig_immediate = 2},
sounds = default.node_sound_gravel_defaults(),
can_dig = function(pos, player)
local inv = minetest.get_meta(pos):get_inventory()
local name = ""
if player then
name = player:get_player_name()
end
return is_owner(pos, name) and inv:is_empty("main")
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if is_owner(pos, player:get_player_name()) then
return count
end
return 0
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return 0
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if is_owner(pos, player:get_player_name()) then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then
minetest.remove_node(pos)
end
end,
on_punch = function(pos, node, player)
if not is_owner(pos, player:get_player_name()) then
return
end
if minetest.get_meta(pos):get_string("infotext") == "" then
return
end
local inv = minetest.get_meta(pos):get_inventory()
local player_inv = player:get_inventory()
local has_space = true
for i = 1, inv:get_size("main") do
local stk = inv:get_stack("main", i)
if player_inv:room_for_item("main", stk) then
inv:set_stack("main", i, nil)
player_inv:add_item("main", stk)
else
has_space = false
break
end
end
-- remove bones if player emptied them
if has_space then
if player_inv:room_for_item("main", {name = "bones:bones"}) then
player_inv:add_item("main", {name = "bones:bones"})
else
minetest.add_item(pos,"bones:bones")
end
minetest.remove_node(pos)
end
end,
on_timer = function(pos, elapsed)
local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed
if time >= share_bones_time then
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
meta:set_string("owner", "")
else
meta:set_int("time", time)
return true
end
end,
on_blast = function(pos)
end,
})
local function may_replace(pos, player)
local node_name = minetest.get_node(pos).name
local node_definition = minetest.registered_nodes[node_name]
-- if the node is unknown, we return false
if not node_definition then
return false
end
-- allow replacing air and liquids
if node_name == "air" or node_definition.liquidtype ~= "none" then
return true
end
-- don't replace filled chests and other nodes that don't allow it
local can_dig_func = node_definition.can_dig
if can_dig_func and not can_dig_func(pos, player) then
return false
end
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
-- flowers being squished by bones are more realistical than a squished stone, too
-- exception are of course any protected buildable_to
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name())
end
local drop = function(pos, itemstack)
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
if obj then
obj:setvelocity({
x = math.random(-10, 10) / 9,
y = 5,
z = math.random(-10, 10) / 9,
})
end
end
minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.setting_get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
bones_mode = "bones"
end
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or minetest.setting_getbool("creative_mode") then
return
end
local player_inv = player:get_inventory()
if player_inv:is_empty("main") and
player_inv:is_empty("craft") then
return
end
local pos = vector.round(player:getpos())
local player_name = player:get_player_name()
-- check if it's possible to place bones, if not find space near player
if bones_mode == "bones" and not may_replace(pos, player) then
local air = minetest.find_node_near(pos, 1, {"air"})
if air and not minetest.is_protected(air, player_name) then
pos = air
else
bones_mode = "drop"
end
end
if bones_mode == "drop" then
-- drop inventory items
for i = 1, player_inv:get_size("main") do
drop(pos, player_inv:get_stack("main", i))
end
player_inv:set_list("main", {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones"))
return
end
local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for i = 1, player_inv:get_size("craft") do
local stack = player_inv:get_stack("craft", i)
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
--drop if no space left
drop(pos, stack)
end
end
player_inv:set_list("main", {})
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
meta:set_string("infotext", player_name .. "'s fresh bones")
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
else
meta:set_int("time", (share_bones_time - share_bones_time_early))
end
minetest.get_node_timer(pos):start(10)
else
meta:set_string("infotext", player_name.."'s bones")
end
end)

249
patches/subgame-basis/mods/bones/init.lua

@ -0,0 +1,249 @@
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
return true
end
return false
end
local bones_formspec =
"size[8,9]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[current_name;main;0,0.3;8,4;]" ..
"list[current_player;main;0,4.85;8,1;]" ..
"list[current_player;main;0,6.08;8,3;8]" ..
"listring[current_name;main]" ..
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85)
local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
tiles = {
"bones_top.png^[transform2",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"bones_front.png"
},
paramtype2 = "facedir",
groups = {dig_immediate = 2},
sounds = default.node_sound_gravel_defaults(),
can_dig = function(pos, player)
local inv = minetest.get_meta(pos):get_inventory()
local name = ""
if player then
name = player:get_player_name()
end
return is_owner(pos, name) and inv:is_empty("main")
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if is_owner(pos, player:get_player_name()) then
return count
end
return 0
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return 0
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if is_owner(pos, player:get_player_name()) then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then
minetest.remove_node(pos)
end
end,
on_punch = function(pos, node, player)
if not is_owner(pos, player:get_player_name()) then
return
end
if minetest.get_meta(pos):get_string("infotext") == "" then
return
end
local inv = minetest.get_meta(pos):get_inventory()
local player_inv = player:get_inventory()
local has_space = true
for i = 1, inv:get_size("main") do
local stk = inv:get_stack("main", i)
if player_inv:room_for_item("main", stk) then
inv:set_stack("main", i, nil)
player_inv:add_item("main", stk)
else
has_space = false
break
end
end
-- remove bones if player emptied them
if has_space then
if player_inv:room_for_item("main", {name = "bones:bones"}) then
player_inv:add_item("main", {name = "bones:bones"})
else
minetest.add_item(pos,"bones:bones")
end
minetest.remove_node(pos)
end
end,
on_timer = function(pos, elapsed)
local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed
if time >= share_bones_time then
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
meta:set_string("owner", "")
else
meta:set_int("time", time)
return true
end
end,
on_blast = function(pos)
end,
})
local function may_replace(pos, player)
local node_name = minetest.get_node(pos).name
local node_definition = minetest.registered_nodes[node_name]
-- if the node is unknown, we return false
if not node_definition then
return false
end
-- allow replacing air and liquids
if node_name == "air" or node_definition.liquidtype ~= "none" then
return true
end
-- don't replace filled chests and other nodes that don't allow it
local can_dig_func = node_definition.can_dig
if can_dig_func and not can_dig_func(pos, player) then
return false
end
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
-- flowers being squished by bones are more realistical than a squished stone, too
-- exception are of course any protected buildable_to
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name())
end
local drop = function(pos, itemstack)
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
if obj then
obj:setvelocity({
x = math.random(-10, 10) / 9,
y = 5,
z = math.random(-10, 10) / 9,
})
end
end
minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
bones_mode = "bones"
end
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then
return
end
local player_inv = player:get_inventory()
if player_inv:is_empty("main") and
player_inv:is_empty("craft") then
return
end
local pos = vector.round(player:getpos())
local player_name = player:get_player_name()
-- check if it's possible to place bones, if not find space near player
if bones_mode == "bones" and not may_replace(pos, player) then
local air = minetest.find_node_near(pos, 1, {"air"})
if air and not minetest.is_protected(air, player_name) then
pos = air
else
bones_mode = "drop"
end
end
if bones_mode == "drop" then
-- drop inventory items
for i = 1, player_inv:get_size("main") do
drop(pos, player_inv:get_stack("main", i))
end
player_inv:set_list("main", {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones"))
return
end
local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for i = 1, player_inv:get_size("craft") do
local stack = player_inv:get_stack("craft", i)
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
--drop if no space left
drop(pos, stack)
end
end
player_inv:set_list("main", {})
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
meta:set_string("infotext", player_name .. "'s fresh bones")
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
else
meta:set_int("time", (share_bones_time - share_bones_time_early))
end
minetest.get_node_timer(pos):start(10)
else
meta:set_string("infotext", player_name.."'s bones")
end
end)

199
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/LICENSE

@ -0,0 +1,199 @@
For the Lua code: LGPL 3.0 or higher
For all models, all textures, and all sounds: CC-by-SA 3.0 or higher
For everything else: WTFPL
Exceptions to the above:
Fancy mesh fire model and texture by NathanS (CC-0).
===============================================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
===============================================================================
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
===============================================================================
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

3340
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/crafts.lua

File diff suppressed because it is too large

207
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/gastronomy.lua

@ -0,0 +1,207 @@
local cutlery_cbox = {
type = "fixed",
fixed = {
{ -5/16, -8/16, -6/16, 5/16, -7/16, 2/16 },
{ -2/16, -8/16, 2/16, 2/16, -4/16, 6/16 }
}
}
homedecor.register("cutlery_set", {
drawtype = "mesh",
mesh = "homedecor_cutlery_set.obj",
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
description = "Cutlery set",
groups = {snappy=3},
selection_box = cutlery_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults(),
})
local bottle_cbox = {
type = "fixed",
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125}
}
}
local fbottle_cbox = {
type = "fixed",
fixed = {
{ -0.375, -0.5, -0.3125, 0.375, 0, 0.3125 }
}
}
local bottle_colors = {"brown", "green"}
for _, b in ipairs(bottle_colors) do
homedecor.register("bottle_"..b, {
tiles = { "homedecor_bottle_"..b..".png" },
inventory_image = "homedecor_bottle_"..b.."_inv.png",
description = "Bottle ("..b..")",
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = bottle_cbox
})
-- 4-bottle sets
homedecor.register("4_bottles_"..b, {
tiles = {
"homedecor_bottle_"..b..".png",
"homedecor_bottle_"..b..".png"
},
inventory_image = "homedecor_4_bottles_"..b.."_inv.png",
description = "Four "..b.." bottles",
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
end
homedecor.register("4_bottles_multi", {
tiles = {
"homedecor_bottle_brown.png",
"homedecor_bottle_green.png"
},
inventory_image = "homedecor_4_bottles_multi_inv.png",
description = "Four misc brown/green bottles",
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
local wine_cbox = homedecor.nodebox.slab_z(-0.75)
homedecor.register("wine_rack", {
description = "Wine Rack",
mesh = "homedecor_wine_rack.obj",
tiles = {
"homedecor_generic_wood_red.png",
"homedecor_bottle_brown.png",
"homedecor_bottle_brown2.png",
"homedecor_bottle_brown3.png",
"homedecor_bottle_brown4.png"
},
inventory_image = "homedecor_wine_rack_inv.png",
groups = {choppy=2},
selection_box = wine_cbox,
collision_box = wine_cbox,
sounds = default.node_sound_defaults(),
})
homedecor.register("dartboard", {
description = "Dartboard",
mesh = "homedecor_dartboard.obj",
tiles = { "homedecor_dartboard.png" },
inventory_image = "homedecor_dartboard_inv.png",
wield_image = "homedecor_dartboard_inv.png",
paramtype2 = "wallmounted",
walkable = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
})
homedecor.register("beer_tap", {
description = "Beer tap",
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
},
inventory_image = "homedecor_beertap_inv.png",
groups = { snappy=3 },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
},
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
local inv = puncher:get_inventory()
local wieldname = wielditem:get_name()
if wieldname == "vessels:drinking_glass" then
if inv:room_for_item("main", "homedecor:beer_mug 1") then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
inv:add_item("main", "homedecor:beer_mug 1")
minetest.chat_send_player(puncher:get_player_name(), "Ahh, a frosty cold beer - look in your inventory for it!")
else
minetest.chat_send_player(puncher:get_player_name(), "No room in your inventory to add a beer mug!")
end
end
end
})
minetest.register_craft({
output = "homedecor:beer_tap",
recipe = {
{ "group:stick","default:steel_ingot","group:stick" },
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
},
})
local beer_cbox = {
type = "fixed",
fixed = { -5/32, -8/16, -9/32 , 7/32, -2/16, 1/32 }
}
homedecor.register("beer_mug", {
description = "Beer mug",
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
inventory_image = "homedecor_beer_mug_inv.png",
groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = beer_cbox,
on_use = minetest.item_eat(2)
})
local svm_cbox = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
}
homedecor.register("soda_machine", {
description = "Soda Vending Machine",
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
selection_box = svm_cbox,
collision_box = svm_cbox,
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
local wieldname = wielditem:get_name()
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
local fdir = node.param2
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
if wieldname == "homedecor:coin" then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
minetest.spawn_item(pos_drop, "homedecor:soda_can")
minetest.sound_play("insert_coin", {
pos=pos, max_hear_distance = 5
})
else
minetest.chat_send_player(puncher:get_player_name(), "Please insert a coin in the machine.")
end
end
})

421
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/models/homedecor_beer_mug.obj

@ -0,0 +1,421 @@
# Blender v2.73 (sub 0) OBJ File: 'beer_mug.blend'
# www.blender.org
o Torus.001
v -0.200872 -0.271336 -0.101373
v 0.027435 -0.500000 0.013804
v 0.078127 -0.500000 -0.007193
v -0.213731 -0.262707 -0.113186
v 0.116925 -0.500000 -0.045991
v 0.137922 -0.500000 -0.096683
v -0.201779 -0.214262 -0.136814
v 0.137922 -0.500000 -0.151551
v 0.116925 -0.500000 -0.202243
v -0.190840 -0.230675 -0.148627
v 0.078127 -0.500000 -0.241041
v 0.027435 -0.500000 -0.262038
v -0.179901 -0.247087 -0.136814
v -0.027433 -0.500000 -0.262038
v -0.078125 -0.500000 -0.241041
v -0.179901 -0.247087 -0.113186
v -0.116923 -0.500000 -0.202243
v -0.137920 -0.500000 -0.151551
v -0.190840 -0.230675 -0.101373
v -0.137920 -0.500000 -0.096682
v -0.116923 -0.500000 -0.045991
v -0.201779 -0.214262 -0.113186
v -0.078125 -0.500000 -0.007193
v -0.027433 -0.500000 0.013804
v -0.183162 -0.175815 -0.136814
v 0.024062 -0.166667 -0.003152
v 0.068522 -0.166667 -0.021568
v -0.175215 -0.198406 -0.148627
v 0.102550 -0.166667 -0.055596
v 0.120966 -0.166667 -0.100055
v -0.167267 -0.220996 -0.136814
v 0.120966 -0.166667 -0.148178
v 0.102550 -0.166667 -0.192638
v -0.167267 -0.220996 -0.113186
v 0.068522 -0.166667 -0.226666
v 0.024062 -0.166667 -0.245082
v -0.175215 -0.198406 -0.101373
v -0.024061 -0.166667 -0.245082
v -0.068520 -0.166667 -0.226666
v -0.183162 -0.175815 -0.113186
v -0.102548 -0.166667 -0.192638
v -0.120964 -0.166667 -0.148178
v -0.159704 -0.151131 -0.136814
v -0.120964 -0.166667 -0.100055
v -0.102548 -0.166667 -0.055596
v -0.155526 -0.177688 -0.148627
v -0.068520 -0.166667 -0.021568
v -0.024060 -0.166667 -0.003152
v -0.151348 -0.204244 -0.136814
v 0.027435 -0.125001 0.013804
v 0.078127 -0.125001 -0.007193
v -0.151348 -0.204244 -0.113186
v 0.116925 -0.125001 -0.045991
v 0.137922 -0.125001 -0.096683
v -0.155526 -0.177688 -0.101373
v 0.137922 -0.125001 -0.151551
v 0.116925 -0.125001 -0.202243
v -0.159704 -0.151131 -0.113186
v 0.078127 -0.125001 -0.241041
v 0.027435 -0.125001 -0.262038
v -0.133701 -0.142626 -0.136814
v -0.027433 -0.125001 -0.262038
v -0.078125 -0.125001 -0.241041
v -0.133701 -0.170549 -0.148627
v -0.116923 -0.125001 -0.202243
v -0.137921 -0.125001 -0.151551
v -0.133701 -0.198472 -0.136814
v -0.137921 -0.125001 -0.096682
v -0.116923 -0.125001 -0.045991
v -0.133701 -0.198472 -0.113186
v -0.078125 -0.125001 -0.007193
v -0.027433 -0.125001 0.013804
v -0.133701 -0.170549 -0.101373
v 0.024062 -0.125001 -0.003152
v 0.068522 -0.125001 -0.021568
v -0.133701 -0.142626 -0.113186
v 0.102550 -0.125001 -0.055596
v 0.120966 -0.125001 -0.100055
v -0.133701 -0.490192 -0.136814
v 0.120966 -0.125001 -0.148178
v 0.102550 -0.125001 -0.192638
v -0.133701 -0.462269 -0.148627
v 0.068522 -0.125001 -0.226666
v 0.024062 -0.125001 -0.245082
v -0.133701 -0.434346 -0.136814
v -0.024061 -0.125001 -0.245082
v -0.068520 -0.125001 -0.226666
v -0.133701 -0.434346 -0.113186
v -0.102548 -0.125001 -0.192638
v -0.120964 -0.125001 -0.148178
v -0.133701 -0.462269 -0.101373
v -0.120964 -0.125001 -0.100055
v -0.102548 -0.125001 -0.055596
v -0.133701 -0.490192 -0.113186
v -0.068520 -0.125001 -0.021568
v -0.024061 -0.125001 -0.003152
v -0.188013 -0.279964 -0.113186
v -0.188013 -0.279964 -0.136814
v -0.200872 -0.271336 -0.148627
v -0.213731 -0.262707 -0.136814
v -0.217850 -0.316409 -0.113186
v -0.204329 -0.316409 -0.101373
v -0.190808 -0.316409 -0.113186
v -0.190808 -0.316409 -0.136814
v -0.204329 -0.316409 -0.148627
v -0.217850 -0.316409 -0.136814
v -0.213731 -0.370111 -0.113186
v -0.200872 -0.361482 -0.101373
v -0.188013 -0.352853 -0.113186
v -0.188013 -0.352853 -0.136814
v -0.200872 -0.361482 -0.148627
v -0.213731 -0.370111 -0.136814
v -0.201779 -0.418556 -0.113186
v -0.190840 -0.402143 -0.101373
v -0.179901 -0.385730 -0.113186
v -0.179901 -0.385730 -0.136814
v -0.190840 -0.402143 -0.148627
v -0.201779 -0.418556 -0.136814
v -0.183162 -0.457002 -0.113186
v -0.175215 -0.434412 -0.101373
v -0.167268 -0.411822 -0.113186
v -0.167268 -0.411822 -0.136814
v -0.175215 -0.434412 -0.148627
v -0.183162 -0.457002 -0.136814
v -0.159704 -0.481686 -0.113186
v -0.155526 -0.455130 -0.101373
v -0.151348 -0.428574 -0.113186
v -0.151348 -0.428574 -0.136814
v -0.155526 -0.455130 -0.148627
v -0.159704 -0.481686 -0.136814
vt 0.156250 0.218750
vt 0.156250 0.187500
vt 0.218750 0.187500
vt 0.218750 0.218750
vt 0.465889 0.405864
vt 0.537350 0.405864
vt 0.603372 0.433211
vt 0.653903 0.483742
vt 0.681251 0.549764
vt 0.681251 0.621226
vt 0.653904 0.687248
vt 0.603372 0.737779
vt 0.537350 0.765126
vt 0.465889 0.765126
vt 0.399867 0.737779
vt 0.349335 0.687248
vt 0.321988 0.621226
vt 0.321988 0.549764
vt 0.349335 0.483742
vt 0.399867 0.433211
vt 0.625000 0.906250
vt 0.687500 0.906250
vt 0.687500 0.937500
vt 0.625000 0.937500
vt 0.937500 0.906250
vt 1.000000 0.906250
vt 1.000000 0.937500
vt 0.937500 0.937500
vt 0.250000 0.906250
vt 0.312500 0.906250
vt 0.312500 0.937500
vt 0.250000 0.937500
vt 0.562500 0.906250
vt 0.562500 0.937500
vt 0.875000 0.906250
vt 0.875000 0.937500
vt 0.187500 0.906250
vt 0.187500 0.937500
vt 0.812500 0.906250
vt 0.812500 0.937500
vt 0.437500 0.906250
vt 0.500000 0.906250
vt 0.500000 0.937500
vt 0.437500 0.937500
vt 0.125000 0.906250
vt 0.125000 0.937500
vt 0.750000 0.906250
vt 0.750000 0.937500
vt 0.375000 0.906250
vt 0.375000 0.937500
vt 0.062500 0.906250
vt 0.062500 0.937500
vt -0.000000 0.906250
vt -0.000000 0.937500
vt 0.281250 0.312500
vt 0.281250 0.281250
vt 0.343750 0.281250
vt 0.343750 0.312500
vt 0.093750 0.218750
vt 0.156250 0.250000
vt 0.093750 0.250000
vt 0.375000 1.000000
vt 0.312500 1.000000
vt 0.281250 0.250000
vt 0.343750 0.250000
vt 0.156250 0.312500
vt 0.156250 0.281250
vt 0.218750 0.281250
vt 0.218750 0.312500
vt 0.531250 0.187500
vt 0.593750 0.187500
vt 0.593750 0.218750
vt 0.531250 0.218750
vt 0.656250 0.187500
vt 0.656250 0.218750
vt 0.093750 0.187500
vt 0.218750 0.250000
vt 0.125000 0.406250
vt 0.187500 0.406250
vt 0.687500 1.000000
vt 0.625000 1.000000
vt 0.937500 0.406250
vt 1.000000 0.406250
vt 0.062500 1.000000
vt 0.125000 1.000000
vt 0.375000 0.406250
vt 0.437500 0.406250
vt 0.687500 0.406250
vt 0.750000 0.406250
vt 0.937500 1.000000
vt 0.875000 1.000000
vt 0.250000 0.406250
vt 0.187500 1.000000
vt 0.093750 0.343750
vt 0.093750 0.312500
vt 0.156250 0.343750
vt 0.500000 0.406250
vt 0.812500 0.406250
vt 0.437500 1.000000
vt 0.218750 0.156250
vt 0.281250 0.156250
vt 0.281250 0.187500
vt 0.750000 1.000000
vt 0.031250 0.250000
vt 0.031250 0.218750
vt 0.562500 0.406250
vt -0.000000 0.406250
vt 0.062500 0.406250
vt 1.000000 1.000000
vt 0.343750 0.187500
vt 0.343750 0.156250
vt 0.406250 0.156250
vt 0.406250 0.187500
vt 0.312500 0.406250
vt 0.625000 0.406250
vt 0.250000 1.000000
vt 0.406250 0.343750
vt 0.406250 0.312500
vt 0.468750 0.312500
vt 0.468750 0.343750
vt 0.875000 0.406250
vt 0.468750 0.156250
vt 0.468750 0.187500
vt 0.500000 1.000000
vt 0.812500 1.000000
vt 0.406250 0.281250
vt 0.406250 0.250000
vt 0.562500 1.000000
vt -0.000000 1.000000
vt 0.218750 0.343750
vt 0.531250 0.312500
vt 0.531250 0.281250
vt 0.593750 0.281250
vt 0.593750 0.312500
vt 0.468750 0.281250
vt 0.468750 0.250000
vt 0.531250 0.250000
vt 0.281250 0.343750
vt 0.593750 0.250000
vt 0.281250 0.218750
vt 0.343750 0.218750
vt 0.031250 0.156250
vt 0.093750 0.156250
vt 0.031250 0.187500
vt 0.813063 0.373140
vt 0.756333 0.349641
vt 0.712914 0.306222
vt 0.689415 0.249492
vt 0.689415 0.188087
vt 0.712914 0.131357
vt 0.756333 0.087938
vt 0.813063 0.064439
vt 0.874467 0.064439
vt 0.931197 0.087938
vt 0.974617 0.131357
vt 0.998115 0.188088
vt 0.998115 0.249492
vt 0.974617 0.306222
vt 0.931197 0.349641
vt 0.874467 0.373140
vt 0.156250 0.156250
vt 0.656250 0.250000
vt 0.031250 0.312500
vt 0.031250 0.281250
vt 0.093750 0.281250
vt 0.656250 0.281250
vt 0.656250 0.312500
vt 0.406250 0.218750
vt 0.468750 0.218750
vt 0.031250 0.343750
vt 0.656250 0.343750
vt 0.593750 0.343750
vt 0.531250 0.343750
vt 0.531250 0.156250
vt 0.593750 0.156250
vt 0.343750 0.343750
vt 0.656250 0.156250
s 1
f 120/1 121/2 115/3 114/4
f 2/5 24/6 23/7 21/8 20/9 18/10 17/11 15/12 14/13 12/14 11/15 9/16 8/17 6/18 5/19 3/20
f 51/21 53/22 77/23 75/24
f 59/25 60/26 84/27 83/28
f 66/29 68/30 92/31 90/32
f 50/33 51/21 75/24 74/34
f 57/35 59/25 83/28 81/36
f 65/37 66/29 90/32 89/38
f 56/39 57/35 81/36 80/40
f 71/41 72/42 96/43 95/44
f 63/45 65/37 89/38 87/46
f 54/47 56/39 80/40 78/48
f 69/49 71/41 95/44 93/50
f 62/51 63/45 87/46 86/52
f 53/22 54/47 78/48 77/23
f 60/53 62/51 86/52 84/54
f 111/55 112/56 106/57 105/58
f 72/42 50/33 74/34 96/43
f 126/59 120/1 119/60 125/61
f 45/62 44/63 92/31 93/50
f 106/57 112/56 107/64 101/65
f 123/66 124/67 118/68 117/69
f 34/70 52/71 55/72 37/73
f 55/72 52/71 70/74 73/75
f 126/59 127/76 121/2 120/1
f 112/56 118/68 113/77 107/64
f 15/78 17/79 65/37 63/45
f 29/80 27/81 75/24 77/23
f 11/82 12/83 60/26 59/25
f 38/84 86/52 87/46 39/85
f 21/86 23/87 71/41 69/49
f 5/88 6/89 54/47 53/22
f 35/90 33/91 81/36 83/28
f 17/79 18/92 66/29 65/37
f 41/93 39/85 87/46 89/38
f 128/94 129/95 123/66 122/96
f 23/87 24/97 72/42 71/41
f 6/89 8/98 56/39 54/47
f 47/99 45/62 93/50 95/44
f 115/3 116/100 110/101 109/102
f 30/103 29/80 77/23 78/48
f 94/104 91/105 126/59 125/61
f 24/97 2/106 50/33 72/42
f 12/107 14/108 62/51 60/53
f 36/109 35/90 83/28 84/27
f 103/110 104/111 98/112 97/113
f 18/92 20/114 68/30 66/29
f 2/106 3/115 51/21 50/33
f 42/116 41/93 89/38 90/32
f 98/117 99/118 10/119 13/120
f 8/98 9/121 57/35 56/39
f 97/113 98/112 13/122 16/123
f 48/124 47/99 95/44 96/43
f 32/125 30/103 78/48 80/40
f 100/126 106/57 101/65 4/127
f 14/108 15/78 63/45 62/51
f 118/68 112/56 111/55 117/69
f 26/128 48/124 96/43 74/34
f 38/84 36/129 84/54 86/52
f 20/114 21/86 69/49 68/30
f 122/96 123/66 117/69 116/130
f 3/115 5/88 53/22 51/21
f 44/63 42/116 90/32 92/31
f 27/81 26/128 74/34 75/24
f 28/131 25/132 43/133 46/134
f 9/121 11/82 59/25 57/35
f 33/91 32/125 80/40 81/36
f 25/132 7/135 22/136 40/137
f 116/130 117/69 111/55 110/138
f 40/137 37/73 55/72 58/139
f 107/64 108/140 102/141 101/65
f 105/58 106/57 100/126 99/118
f 43/133 25/132 40/137 58/139
f 85/142 128/143 127/76 88/144
f 26/145 27/146 29/147 30/148 32/149 33/150 35/151 36/152 38/153 39/154 41/155 42/156 44/157 45/158 47/159 48/160
f 68/30 69/49 93/50 92/31
f 127/76 128/143 122/161 121/2
f 55/72 73/75 76/162 58/139
f 99/118 100/126 7/135 10/119
f 82/163 79/164 130/165 129/95
f 119/60 120/1 114/4 113/77
f 118/68 124/67 119/60 113/77
f 43/133 61/166 64/167 46/134
f 10/119 7/135 25/132 28/131
f 130/165 124/67 123/66 129/95
f 4/127 1/168 19/169 22/136
f 124/67 130/165 125/61 119/60
f 61/166 43/133 58/139 76/162
f 110/101 104/111 103/110 109/102
f 108/140 109/102 103/110 102/141
f 88/144 127/76 126/59 91/105
f 97/113 16/123 19/169 1/168
f 82/163 129/95 128/94 85/170
f 19/169 16/123 34/70 37/73
f 19/169 37/73 40/137 22/136
f 46/134 64/167 67/171 49/172
f 114/4 108/140 107/64 113/77
f 115/3 109/102 108/140 114/4
f 101/65 102/141 1/168 4/127
f 10/119 28/131 31/173 13/120
f 16/123 13/122 31/174 34/70
f 102/141 103/110 97/113 1/168
f 31/174 49/175 52/71 34/70
f 111/55 105/58 104/176 110/138
f 7/135 100/126 4/127 22/136
f 122/161 116/100 115/3 121/2
f 105/58 99/118 98/117 104/176
f 31/173 28/131 46/134 49/172
f 130/165 79/164 94/104 125/61
f 52/71 49/175 67/177 70/74

BIN
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
patches/subgame-basis/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug_inv.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

199
patches/subgame-basis/mods/homedecor_modpack/homedecor/LICENSE

@ -0,0 +1,199 @@
For the Lua code: LGPL 3.0 or higher
For all models, all textures, and all sounds: CC-by-SA 3.0 or higher
For everything else: WTFPL
Exceptions to the above:
Fancy mesh fire model and texture by NathanS (CC-0).
===============================================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
===============================================================================
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
===============================================================================
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

3130
patches/subgame-basis/mods/homedecor_modpack/homedecor/crafts.lua

File diff suppressed because it is too large

236
patches/subgame-basis/mods/homedecor_modpack/homedecor/gastronomy.lua

@ -0,0 +1,236 @@
local S = homedecor_i18n.gettext
local cutlery_cbox = {
type = "fixed",
fixed = {
{ -5/16, -8/16, -6/16, 5/16, -7/16, 2/16 },
{ -2/16, -8/16, 2/16, 2/16, -4/16, 6/16 }
}
}
homedecor.register("cutlery_set", {
drawtype = "mesh",
mesh = "homedecor_cutlery_set.obj",
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
description = S("Cutlery set"),
groups = {snappy=3},
selection_box = cutlery_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults(),
})
local bottle_cbox = {
type = "fixed",
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125}
}
}
local fbottle_cbox = {
type = "fixed",
fixed = {
{ -0.375, -0.5, -0.3125, 0.375, 0, 0.3125 }
}
}
local bottle_colors = {
{ "brown", S("Brown bottle"), S("Four brown bottles") },
{ "green", S("Green bottle"), S("Four green bottles") },
}
for _, b in ipairs(bottle_colors) do
local name, desc, desc4 = unpack(b)
homedecor.register("bottle_"..name, {
tiles = { "homedecor_bottle_"..name..".png" },
inventory_image = "homedecor_bottle_"..name.."_inv.png",
description = desc,
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = bottle_cbox
})
-- 4-bottle sets
homedecor.register("4_bottles_"..name, {
tiles = {
"homedecor_bottle_"..name..".png",
"homedecor_bottle_"..name..".png"
},
inventory_image = "homedecor_4_bottles_"..name.."_inv.png",
description = desc4,
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
end
homedecor.register("4_bottles_multi", {
tiles = {
"homedecor_bottle_brown.png",
"homedecor_bottle_green.png"
},
inventory_image = "homedecor_4_bottles_multi_inv.png",
description = S("Four misc brown/green bottles"),
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
local wine_cbox = homedecor.nodebox.slab_z(-0.75)
homedecor.register("wine_rack", {
description = S("Wine rack"),
mesh = "homedecor_wine_rack.obj",
tiles = {
"homedecor_generic_wood_red.png",
"homedecor_bottle_brown.png",
"homedecor_bottle_brown2.png",
"homedecor_bottle_brown3.png",
"homedecor_bottle_brown4.png"
},
inventory_image = "homedecor_wine_rack_inv.png",
groups = {choppy=2},
selection_box = wine_cbox,
collision_box = wine_cbox,
sounds = default.node_sound_defaults(),
})
homedecor.register("dartboard", {
description = S("Dartboard"),
mesh = "homedecor_dartboard.obj",
tiles = { "homedecor_dartboard.png" },
inventory_image = "homedecor_dartboard_inv.png",
wield_image = "homedecor_dartboard_inv.png",
paramtype2 = "wallmounted",
walkable = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
})
homedecor.register("beer_tap", {
description = S("Beer tap"),
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
},
inventory_image = "homedecor_beertap_inv.png",
groups = { snappy=3 },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local inv = clicker:get_inventory()
local wieldname = itemstack:get_name()
if wieldname == "vessels:drinking_glass" then
if inv:room_for_item("main", "homedecor:beer_mug 1") then
itemstack:take_item()
clicker:set_wielded_item(itemstack)
inv:add_item("main", "homedecor:beer_mug 1")
minetest.chat_send_player(clicker:get_player_name(),
S("Ahh, a frosty cold beer - look in your inventory for it!"))
else
minetest.chat_send_player(clicker:get_player_name(),
S("No room in your inventory to add a beer mug!"))
end
end
end
})
minetest.register_craft({
output = "homedecor:beer_tap",
recipe = {
{ "group:stick","default:steel_ingot","group:stick" },
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
},
})
local beer_cbox = {
type = "fixed",
fixed = { -5/32, -8/16, -9/32 , 7/32, -2/16, 1/32 }
}
homedecor.register("beer_mug", {
description = S("Beer mug"),
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
inventory_image = "homedecor_beer_mug_inv.png",
groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = beer_cbox,
on_use = function(itemstack, user, pointed_thing)
local inv = user:get_inventory()
if not creative.is_enabled_for(user:get_player_name()) then
if inv:room_for_item("main", "vessels:drinking_glass 1") then
inv:add_item("main", "vessels:drinking_glass 1")
else
local pos = user:get_pos()
local dir = user:get_look_dir()
local fdir = minetest.dir_to_facedir(dir)
local pos_fwd = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1],
y = pos.y + 1,
z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
minetest.add_item(pos_fwd, "vessels:drinking_glass 1")
end
minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
return itemstack
end
end
})
local svm_cbox = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
}
homedecor.register("soda_machine", {
description = S("Soda vending machine"),
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
selection_box = svm_cbox,
collision_box = svm_cbox,
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local playername = clicker:get_player_name()
local wielditem = clicker:get_wielded_item()
local wieldname = wielditem:get_name()
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
local fdir = node.param2
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
if wieldname == "homedecor:coin" then
minetest.spawn_item(pos_drop, "homedecor:soda_can")
minetest.sound_play("insert_coin", {
pos=pos, max_hear_distance = 5
})
if not creative.is_enabled_for(playername) then
wielditem:take_item()
clicker:set_wielded_item(wielditem)
return wielditem
end
else
minetest.chat_send_player(playername, S("Please insert a coin in the machine."))
end
end
})

421
patches/subgame-basis/mods/homedecor_modpack/homedecor/models/homedecor_beer_mug.obj

@ -0,0 +1,421 @@
# Blender v2.73 (sub 0) OBJ File: 'beer_mug.blend'
# www.blender.org
o Torus.001
v -0.200872 -0.271336 -0.101373
v 0.027435 -0.500000 0.013804
v 0.078127 -0.500000 -0.007193
v -0.213731 -0.262707 -0.113186
v 0.116925 -0.500000 -0.045991
v 0.137922 -0.500000 -0.096683
v -0.201779 -0.214262 -0.136814
v 0.137922 -0.500000 -0.151551
v 0.116925 -0.500000 -0.202243
v -0.190840 -0.230675 -0.148627
v 0.078127 -0.500000 -0.241041
v 0.027435 -0.500000 -0.262038
v -0.179901 -0.247087 -0.136814
v -0.027433 -0.500000 -0.262038
v -0.078125 -0.500000 -0.241041
v -0.179901 -0.247087 -0.113186
v -0.116923 -0.500000 -0.202243
v -0.137920 -0.500000 -0.151551
v -0.190840 -0.230675 -0.101373
v -0.137920 -0.500000 -0.096682
v -0.116923 -0.500000 -0.045991
v -0.201779 -0.214262 -0.113186
v -0.078125 -0.500000 -0.007193
v -0.027433 -0.500000 0.013804
v -0.183162 -0.175815 -0.136814
v 0.024062 -0.166667 -0.003152
v 0.068522 -0.166667 -0.021568
v -0.175215 -0.198406 -0.148627
v 0.102550 -0.166667 -0.055596
v 0.120966 -0.166667 -0.100055
v -0.167267 -0.220996 -0.136814
v 0.120966 -0.166667 -0.148178
v 0.102550 -0.166667 -0.192638
v -0.167267 -0.220996 -0.113186
v 0.068522 -0.166667 -0.226666
v 0.024062 -0.166667 -0.245082
v -0.175215 -0.198406 -0.101373
v -0.024061 -0.166667 -0.245082
v -0.068520 -0.166667 -0.226666
v -0.183162 -0.175815 -0.113186
v -0.102548 -0.166667 -0.192638
v -0.120964 -0.166667 -0.148178
v -0.159704 -0.151131 -0.136814
v -0.120964 -0.166667 -0.100055
v -0.102548 -0.166667 -0.055596
v -0.155526 -0.177688 -0.148627
v -0.068520 -0.166667 -0.021568
v -0.024060 -0.166667 -0.003152
v -0.151348 -0.204244 -0.136814
v 0.027435 -0.125001 0.013804
v 0.078127 -0.125001 -0.007193
v -0.151348 -0.204244 -0.113186
v 0.116925 -0.125001 -0.045991
v 0.137922 -0.125001 -0.096683
v -0.155526 -0.177688 -0.101373
v 0.137922 -0.125001 -0.151551
v 0.116925 -0.125001 -0.202243
v -0.159704 -0.151131 -0.113186
v 0.078127 -0.125001 -0.241041
v 0.027435 -0.125001 -0.262038
v -0.133701 -0.142626 -0.136814
v -0.027433 -0.125001 -0.262038
v -0.078125 -0.125001 -0.241041
v -0.133701 -0.170549 -0.148627
v -0.116923 -0.125001 -0.202243
v -0.137921 -0.125001 -0.151551
v -0.133701 -0.198472 -0.136814
v -0.137921 -0.125001 -0.096682
v -0.116923 -0.125001 -0.045991
v -0.133701 -0.198472 -0.113186
v -0.078125 -0.125001 -0.007193
v -0.027433 -0.125001 0.013804
v -0.133701 -0.170549 -0.101373
v 0.024062 -0.125001 -0.003152
v 0.068522 -0.125001 -0.021568
v -0.133701 -0.142626 -0.113186
v 0.102550 -0.125001 -0.055596
v 0.120966 -0.125001 -0.100055
v -0.133701 -0.490192 -0.136814
v 0.120966 -0.125001 -0.148178
v 0.102550 -0.125001 -0.192638
v -0.133701 -0.462269 -0.148627
v 0.068522 -0.125001 -0.226666
v 0.024062 -0.125001 -0.245082
v -0.133701 -0.434346 -0.136814
v -0.024061 -0.125001 -0.245082
v -0.068520 -0.125001 -0.226666
v -0.133701 -0.434346 -0.113186
v -0.102548 -0.125001 -0.192638
v -0.120964 -0.125001 -0.148178
v -0.133701 -0.462269 -0.101373
v -0.120964 -0.125001 -0.100055
v -0.102548 -0.125001 -0.055596
v -0.133701 -0.490192 -0.113186
v -0.068520 -0.125001 -0.021568
v -0.024061 -0.125001 -0.003152
v -0.188013 -0.279964 -0.113186
v -0.188013 -0.279964 -0.136814
v -0.200872 -0.271336 -0.148627
v -0.213731 -0.262707 -0.136814
v -0.217850 -0.316409 -0.113186
v -0.204329 -0.316409 -0.101373
v -0.190808 -0.316409 -0.113186
v -0.190808 -0.316409 -0.136814
v -0.204329 -0.316409 -0.148627
v -0.217850 -0.316409 -0.136814
v -0.213731 -0.370111 -0.113186
v -0.200872 -0.361482 -0.101373
v -0.188013 -0.352853 -0.113186
v -0.188013 -0.352853 -0.136814
v -0.200872 -0.361482 -0.148627
v -0.213731 -0.370111 -0.136814
v -0.201779 -0.418556 -0.113186
v -0.190840 -0.402143 -0.101373
v -0.179901 -0.385730 -0.113186
v -0.179901 -0.385730 -0.136814
v -0.190840 -0.402143 -0.148627
v -0.201779 -0.418556 -0.136814
v -0.183162 -0.457002 -0.113186
v -0.175215 -0.434412 -0.101373
v -0.167268 -0.411822 -0.113186
v -0.167268 -0.411822 -0.136814
v -0.175215 -0.434412 -0.148627
v -0.183162 -0.457002 -0.136814
v -0.159704 -0.481686 -0.113186
v -0.155526 -0.455130 -0.101373
v -0.151348 -0.428574 -0.113186
v -0.151348 -0.428574 -0.136814
v -0.155526 -0.455130 -0.148627
v -0.159704 -0.481686 -0.136814
vt 0.156250 0.218750
vt 0.156250 0.187500
vt 0.218750 0.187500
vt 0.218750 0.218750
vt 0.465889 0.405864
vt 0.537350 0.405864
vt 0.603372 0.433211
vt 0.653903 0.483742
vt 0.681251 0.549764
vt 0.681251 0.621226
vt 0.653904 0.687248
vt 0.603372 0.737779
vt 0.537350 0.765126
vt 0.465889 0.765126
vt 0.399867 0.737779
vt 0.349335 0.687248
vt 0.321988 0.621226
vt 0.321988 0.549764
vt 0.349335 0.483742
vt 0.399867 0.433211
vt 0.625000 0.906250
vt 0.687500 0.906250
vt 0.687500 0.937500
vt 0.625000 0.937500
vt 0.937500 0.906250
vt 1.000000 0.906250
vt 1.000000 0.937500
vt 0.937500 0.937500
vt 0.250000 0.906250
vt 0.312500 0.906250
vt 0.312500 0.937500
vt 0.250000 0.937500
vt 0.562500 0.906250
vt 0.562500 0.937500
vt 0.875000 0.906250
vt 0.875000 0.937500
vt 0.187500 0.906250
vt 0.187500 0.937500
vt 0.812500 0.906250
vt 0.812500 0.937500
vt 0.437500 0.906250
vt 0.500000 0.906250
vt 0.500000 0.937500
vt 0.437500 0.937500
vt 0.125000 0.906250
vt 0.125000 0.937500
vt 0.750000 0.906250
vt 0.750000 0.937500
vt 0.375000 0.906250
vt 0.375000 0.937500
vt 0.062500 0.906250
vt 0.062500 0.937500
vt -0.000000 0.906250
vt -0.000000 0.937500
vt 0.281250 0.312500
vt 0.281250 0.281250
vt 0.343750 0.281250
vt 0.343750 0.312500
vt 0.093750 0.218750
vt 0.156250 0.250000
vt 0.093750 0.250000
vt 0.375000 1.000000
vt 0.312500 1.000000
vt 0.281250 0.250000
vt 0.343750 0.250000
vt 0.156250 0.312500
vt 0.156250 0.281250
vt 0.218750 0.281250
vt 0.218750 0.312500
vt 0.531250 0.187500
vt 0.593750 0.187500
vt 0.593750 0.218750
vt 0.531250 0.218750
vt 0.656250 0.187500
vt 0.656250 0.218750
vt 0.093750 0.187500
vt 0.218750 0.250000
vt 0.125000 0.406250
vt 0.187500 0.406250
vt 0.687500 1.000000
vt 0.625000 1.000000
vt 0.937500 0.406250
vt 1.000000 0.406250
vt 0.062500 1.000000
vt 0.125000 1.000000
vt 0.375000 0.406250
vt 0.437500 0.406250
vt 0.687500 0.406250
vt 0.750000 0.406250
vt 0.937500 1.000000
vt 0.875000 1.000000
vt 0.250000 0.406250
vt 0.187500 1.000000
vt 0.093750 0.343750
vt 0.093750 0.312500
vt 0.156250 0.343750
vt 0.500000 0.406250
vt 0.812500 0.406250
vt 0.437500 1.000000
vt 0.218750 0.156250
vt 0.281250 0.156250
vt 0.281250 0.187500
vt 0.750000 1.000000
vt 0.031250 0.250000
vt 0.031250 0.218750
vt 0.562500 0.406250
vt -0.000000 0.406250
vt 0.062500 0.406250
vt 1.000000 1.000000
vt 0.343750 0.187500
vt 0.343750 0.156250
vt 0.406250 0.156250
vt 0.406250 0.187500
vt 0.312500 0.406250
vt 0.625000 0.406250
vt 0.250000 1.000000
vt 0.406250 0.343750
vt 0.406250 0.312500
vt 0.468750 0.312500
vt 0.468750 0.343750
vt 0.875000 0.406250
vt 0.468750 0.156250
vt 0.468750 0.187500
vt 0.500000 1.000000
vt 0.812500 1.000000
vt 0.406250 0.281250
vt 0.406250 0.250000
vt 0.562500 1.000000
vt -0.000000 1.000000
vt 0.218750 0.343750
vt 0.531250 0.312500
vt 0.531250 0.281250
vt 0.593750 0.281250
vt 0.593750 0.312500
vt 0.468750 0.281250
vt 0.468750 0.250000
vt 0.531250 0.250000
vt 0.281250 0.343750
vt 0.593750 0.250000
vt 0.281250 0.218750
vt 0.343750 0.218750
vt 0.031250 0.156250
vt 0.093750 0.156250
vt 0.031250 0.187500
vt 0.813063 0.373140
vt 0.756333 0.349641
vt 0.712914 0.306222
vt 0.689415 0.249492
vt 0.689415 0.188087
vt 0.712914 0.131357
vt 0.756333 0.087938
vt 0.813063 0.064439
vt 0.874467 0.064439
vt 0.931197 0.087938
vt 0.974617 0.131357
vt 0.998115 0.188088
vt 0.998115 0.249492
vt 0.974617 0.306222
vt 0.931197 0.349641
vt 0.874467 0.373140
vt 0.156250 0.156250
vt 0.656250 0.250000
vt 0.031250 0.312500
vt 0.031250 0.281250
vt 0.093750 0.281250
vt 0.656250 0.281250
vt 0.656250 0.312500
vt 0.406250 0.218750
vt 0.468750 0.218750
vt 0.031250 0.343750
vt 0.656250 0.343750
vt 0.593750 0.343750
vt 0.531250 0.343750
vt 0.531250 0.156250
vt 0.593750 0.156250
vt 0.343750 0.343750
vt 0.656250 0.156250
s 1
f 120/1 121/2 115/3 114/4
f 2/5 24/6 23/7 21/8 20/9 18/10 17/11 15/12 14/13 12/14 11/15 9/16 8/17 6/18 5/19 3/20
f 51/21 53/22 77/23 75/24
f 59/25 60/26 84/27 83/28
f 66/29 68/30 92/31 90/32
f 50/33 51/21 75/24 74/34
f 57/35 59/25 83/28 81/36
f 65/37 66/29 90/32 89/38
f 56/39 57/35 81/36 80/40
f 71/41 72/42 96/43 95/44
f 63/45 65/37 89/38 87/46
f 54/47 56/39 80/40 78/48
f 69/49 71/41 95/44 93/50
f 62/51 63/45 87/46 86/52
f 53/22 54/47 78/48 77/23
f 60/53 62/51 86/52 84/54
f 111/55 112/56 106/57 105/58
f 72/42 50/33 74/34 96/43
f 126/59 120/1 119/60 125/61
f 45/62 44/63 92/31 93/50
f 106/57 112/56 107/64 101/65
f 123/66 124/67 118/68 117/69
f 34/70 52/71 55/72 37/73
f 55/72 52/71 70/74 73/75
f 126/59 127/76 121/2 120/1
f 112/56 118/68 113/77 107/64
f 15/78 17/79 65/37 63/45
f 29/80 27/81 75/24 77/23
f 11/82 12/83 60/26 59/25
f 38/84 86/52 87/46 39/85
f 21/86 23/87 71/41 69/49
f 5/88 6/89 54/47 53/22
f 35/90 33/91 81/36 83/28
f 17/79 18/92 66/29 65/37
f 41/93 39/85 87/46 89/38
f 128/94 129/95 123/66 122/96
f 23/87 24/97 72/42 71/41
f 6/89 8/98 56/39 54/47
f 47/99 45/62 93/50 95/44
f 115/3 116/100 110/101 109/102
f 30/103 29/80 77/23 78/48
f 94/104 91/105 126/59 125/61
f 24/97 2/106 50/33 72/42
f 12/107 14/108 62/51 60/53
f 36/109 35/90 83/28 84/27
f 103/110 104/111 98/112 97/113
f 18/92 20/114 68/30 66/29
f 2/106 3/115 51/21 50/33
f 42/116 41/93 89/38 90/32
f 98/117 99/118 10/119 13/120
f 8/98 9/121 57/35 56/39
f 97/113 98/112 13/122 16/123
f 48/124 47/99 95/44 96/43
f 32/125 30/103 78/48 80/40
f 100/126 106/57 101/65 4/127
f 14/108 15/78 63/45 62/51
f 118/68 112/56 111/55 117/69
f 26/128 48/124 96/43 74/34
f 38/84 36/129 84/54 86/52
f 20/114 21/86 69/49 68/30
f 122/96 123/66 117/69 116/130
f 3/115 5/88 53/22 51/21
f 44/63 42/116 90/32 92/31
f 27/81 26/128 74/34 75/24
f 28/131 25/132 43/133 46/134
f 9/121 11/82 59/25 57/35
f 33/91 32/125 80/40 81/36
f 25/132 7/135 22/136 40/137
f 116/130 117/69 111/55 110/138
f 40/137 37/73 55/72 58/139
f 107/64 108/140 102/141 101/65
f 105/58 106/57 100/126 99/118
f 43/133 25/132 40/137 58/139
f 85/142 128/143 127/76 88/144
f 26/145 27/146 29/147 30/148 32/149 33/150 35/151 36/152 38/153 39/154 41/155 42/156 44/157 45/158 47/159 48/160
f 68/30 69/49 93/50 92/31
f 127/76 128/143 122/161 121/2
f 55/72 73/75 76/162 58/139
f 99/118 100/126 7/135 10/119
f 82/163 79/164 130/165 129/95
f 119/60 120/1 114/4 113/77
f 118/68 124/67 119/60 113/77
f 43/133 61/166 64/167 46/134
f 10/119 7/135 25/132 28/131
f 130/165 124/67 123/66 129/95
f 4/127 1/168 19/169 22/136
f 124/67 130/165 125/61 119/60
f 61/166 43/133 58/139 76/162
f 110/101 104/111 103/110 109/102
f 108/140 109/102 103/110 102/141
f 88/144 127/76 126/59 91/105
f 97/113 16/123 19/169 1/168
f 82/163 129/95 128/94 85/170
f 19/169 16/123 34/70 37/73
f 19/169 37/73 40/137 22/136
f 46/134 64/167 67/171 49/172
f 114/4 108/140 107/64 113/77
f 115/3 109/102 108/140 114/4
f 101/65 102/141 1/168 4/127
f 10/119 28/131 31/173 13/120
f 16/123 13/122 31/174 34/70
f 102/141 103/110 97/113 1/168
f 31/174 49/175 52/71 34/70
f 111/55 105/58 104/176 110/138
f 7/135 100/126 4/127 22/136
f 122/161 116/100 115/3 121/2
f 105/58 99/118 98/117 104/176
f 31/173 28/131 46/134 49/172
f 130/165 79/164 94/104 125/61
f 52/71 49/175 67/177 70/74

BIN
patches/subgame-basis/mods/homedecor_modpack/homedecor/textures/homedecor_beer_mug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
patches/subgame-basis/mods/homedecor_modpack/homedecor/textures/homedecor_beer_mug_inv.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

258
patches/subgame/mods/bones/init-0.4.15 or lower.lua

@ -0,0 +1,258 @@
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
return true
end
return false
end
local bones_formspec =
"size[8,9]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"list[current_name;main;0,0.3;8,4;]" ..
"list[current_player;main;0,4.85;8,1;]" ..
"list[current_player;main;0,6.08;8,3;8]" ..
"listring[current_name;main]" ..
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85)
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
tiles = {
"bones_top.png^[transform2",
"bones_bottom.png",
"bones_side.png",
"bones_side.png",
"bones_rear.png",
"bones_front.png"
},
paramtype2 = "facedir",
groups = {dig_immediate = 2},
sounds = default.node_sound_gravel_defaults(),
can_dig = function(pos, player)
local inv = minetest.get_meta(pos):get_inventory()
local name = ""
if player then
name = player:get_player_name()
end
return is_owner(pos, name) and inv:is_empty("main")
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
if is_owner(pos, player:get_player_name()) then
return count
end
return 0
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return 0
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
if is_owner(pos, player:get_player_name()) then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then
minetest.remove_node(pos)
end
end,
on_punch = function(pos, node, player)
if not is_owner(pos, player:get_player_name()) then
return
end
if minetest.get_meta(pos):get_string("infotext") == "" then
return
end
local inv = minetest.get_meta(pos):get_inventory()
local player_inv = player:get_inventory()
local has_space = true
for i = 1, inv:get_size("main") do
local stk = inv:get_stack("main", i)
if player_inv:room_for_item("main", stk) then
inv:set_stack("main", i, nil)
player_inv:add_item("main", stk)
else
has_space = false
break
end
end
-- remove bones if player emptied them
if has_space then
if player_inv:room_for_item("main", {name = "bones:bones"}) then
player_inv:add_item("main", {name = "bones:bones"})
else
minetest.add_item(pos,"bones:bones")
end
minetest.remove_node(pos)
end
end,
on_timer = function(pos, elapsed)
local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed
if time >= share_bones_time then
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
meta:set_string("owner", "")
else
meta:set_int("time", time)
return true
end
end,
on_blast = function(pos)
end,
})
local function may_replace(pos, player)
local node_name = minetest.get_node(pos).name
local node_definition = minetest.registered_nodes[node_name]
-- if the node is unknown, we return false
if not node_definition then
return false
end
-- allow replacing air and liquids
if node_name == "air" or node_definition.liquidtype ~= "none" then
return true
end
-- don't replace filled chests and other nodes that don't allow it
local can_dig_func = node_definition.can_dig
if can_dig_func and not can_dig_func(pos, player) then
return false
end
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
-- flowers being squished by bones are more realistical than a squished stone, too
-- exception are of course any protected buildable_to
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name())
end
local drop = function(pos, itemstack)
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
if obj then
obj:setvelocity({
x = math.random(-10, 10) / 9,
y = 5,
z = math.random(-10, 10) / 9,
})
end
end
minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.setting_get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
bones_mode = "bones"
end
local pos = vector.round(player:getpos())
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or minetest.setting_getbool("creative_mode") then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return
end
local player_inv = player:get_inventory()
if player_inv:is_empty("main") and
player_inv:is_empty("craft") then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return
end
local pos = vector.round(player:getpos())
local player_name = player:get_player_name()
-- check if it's possible to place bones, if not find space near player
if bones_mode == "bones" and not may_replace(pos, player) then
local air = minetest.find_node_near(pos, 1, {"air"})
if air and not minetest.is_protected(air, player_name) then
pos = air
else
bones_mode = "drop"
end
end
if bones_mode == "drop" then
-- drop inventory items
for i = 1, player_inv:get_size("main") do
drop(pos, player_inv:get_stack("main", i))
end
player_inv:set_list("main", {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones"))
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return
end
local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for i = 1, player_inv:get_size("craft") do
local stack = player_inv:get_stack("craft", i)
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
--drop if no space left
drop(pos, stack)
end
end
player_inv:set_list("main", {})
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
meta:set_string("infotext", player_name .. "'s fresh bones")
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
else
meta:set_int("time", (share_bones_time - share_bones_time_early))
end
minetest.get_node_timer(pos):start(10)
else
meta:set_string("infotext", player_name.."'s bones")
end
end)

9
patches/subgame/mods/bones/init.lua

@ -21,8 +21,8 @@ local bones_formspec =
"listring[current_player;main]" ..
default.get_hotbar_bg(0,4.85)
local share_bones_time = tonumber(minetest.setting_get("share_bones_time")) or 1200
local share_bones_time_early = tonumber(minetest.setting_get("share_bones_time_early")) or share_bones_time / 4
local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
@ -161,14 +161,15 @@ end
minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.setting_get("bones_mode") or "bones"
local bones_mode = minetest.settings:get("bones_mode") or "bones"
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
bones_mode = "bones"
end
local pos = vector.round(player:getpos())
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or minetest.setting_getbool("creative_mode") then
if bones_mode == "keep" or (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return

3343
patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/crafts.lua

File diff suppressed because it is too large

209
patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/gastronomy.lua

@ -0,0 +1,209 @@
local cutlery_cbox = {
type = "fixed",
fixed = {
{ -5/16, -8/16, -6/16, 5/16, -7/16, 2/16 },
{ -2/16, -8/16, 2/16, 2/16, -4/16, 6/16 }
}
}
homedecor.register("cutlery_set", {
drawtype = "mesh",
mesh = "homedecor_cutlery_set.obj",
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
description = "Cutlery set",
groups = {snappy=3},
selection_box = cutlery_cbox,
walkable = false,
sounds = default.node_sound_glass_defaults(),
})
local bottle_cbox = {
type = "fixed",
fixed = {
{ -0.125, -0.5, -0.125, 0.125, 0, 0.125}
}
}
local fbottle_cbox = {
type = "fixed",
fixed = {
{ -0.375, -0.5, -0.3125, 0.375, 0, 0.3125 }
}
}
local bottle_colors = {"brown", "green"}
for _, b in ipairs(bottle_colors) do
homedecor.register("bottle_"..b, {
tiles = { "homedecor_bottle_"..b..".png" },
inventory_image = "homedecor_bottle_"..b.."_inv.png",
description = "Bottle ("..b..")",
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = bottle_cbox
})
-- 4-bottle sets
homedecor.register("4_bottles_"..b, {
tiles = {
"homedecor_bottle_"..b..".png",
"homedecor_bottle_"..b..".png"
},
inventory_image = "homedecor_4_bottles_"..b.."_inv.png",
description = "Four "..b.." bottles",
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
end
homedecor.register("4_bottles_multi", {
tiles = {
"homedecor_bottle_brown.png",
"homedecor_bottle_green.png"
},
inventory_image = "homedecor_4_bottles_multi_inv.png",
description = "Four misc brown/green bottles",
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = fbottle_cbox
})
local wine_cbox = homedecor.nodebox.slab_z(-0.75)
homedecor.register("drink_rack", {
description = "Drink rack",
mesh = "homedecor_wine_rack.obj",
tiles = {
"homedecor_generic_wood_red.png",
"homedecor_bottle_brown.png",
"homedecor_bottle_brown2.png",
"homedecor_bottle_brown3.png",
"homedecor_bottle_brown4.png"
},
inventory_image = "homedecor_wine_rack_inv.png",
groups = {choppy=2},
selection_box = wine_cbox,
collision_box = wine_cbox,
sounds = default.node_sound_defaults(),
})
homedecor.register("dartboard", {
description = "Dartboard",
mesh = "homedecor_dartboard.obj",
tiles = { "homedecor_dartboard.png" },
inventory_image = "homedecor_dartboard_inv.png",
wield_image = "homedecor_dartboard_inv.png",
paramtype2 = "wallmounted",
walkable = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
})
homedecor.register("drink_tap", {
description = "Drink tap",
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
{ name = "homedecor_generic_metal.png", color = homedecor.color_black }
},
inventory_image = "homedecor_beertap_inv.png",
groups = { snappy=3 },
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
},
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
local inv = puncher:get_inventory()
local wieldname = wielditem:get_name()
if wieldname == "vessels:drinking_glass" then
if inv:room_for_item("main", "homedecor:drink_mug 1") then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
inv:add_item("main", "homedecor:drink_mug 1")
minetest.chat_send_player(puncher:get_player_name(), "Ahh, a nice cold drink - look in your inventory for it!")
else
minetest.chat_send_player(puncher:get_player_name(), "No room in your inventory to add a drink mug!")
end
end
end
})
minetest.register_alias("homedecor:beer_tap", "homedecor:drink_tap")
minetest.register_craft({
output = "homedecor:drink_tap",
recipe = {
{ "group:stick","default:steel_ingot","group:stick" },
{ "homedecor:kitchen_faucet","default:steel_ingot","homedecor:kitchen_faucet" },
{ "default:steel_ingot","default:steel_ingot","default:steel_ingot" }
},
})
local beer_cbox = {
type = "fixed",
fixed = { -5/32, -8/16, -9/32 , 7/32, -2/16, 1/32 }
}
homedecor.register("drink_mug", {
description = "Drink mug",
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
inventory_image = "homedecor_beer_mug_inv.png",
groups = { snappy=3, oddly_breakable_by_hand=3 },
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = beer_cbox,
on_use = minetest.item_eat(2)
})
minetest.register_alias("homedecor:beer_mug", "homedecor:drink_mug")
local svm_cbox = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}
}
homedecor.register("soda_machine", {
description = "Soda Vending Machine",
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
selection_box = svm_cbox,
collision_box = svm_cbox,
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
local wieldname = wielditem:get_name()
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
local fdir = node.param2
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
if wieldname == "homedecor:coin" then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
minetest.spawn_item(pos_drop, "homedecor:soda_can")
minetest.sound_play("insert_coin", {
pos=pos, max_hear_distance = 5
})
else
minetest.chat_send_player(puncher:get_player_name(), "Please insert a coin in the machine.")
end
end
})

421
patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/models/homedecor_beer_mug.obj

@ -0,0 +1,421 @@
# Blender v2.73 (sub 0) OBJ File: 'beer_mug.blend'
# www.blender.org
o Torus.001
v -0.200872 -0.271336 -0.101373
v 0.027435 -0.500000 0.013804
v 0.078127 -0.500000 -0.007193
v -0.213731 -0.262707 -0.113186
v 0.116925 -0.500000 -0.045991
v 0.137922 -0.500000 -0.096683
v -0.201779 -0.214262 -0.136814
v 0.137922 -0.500000 -0.151551
v 0.116925 -0.500000 -0.202243
v -0.190840 -0.230675 -0.148627
v 0.078127 -0.500000 -0.241041
v 0.027435 -0.500000 -0.262038
v -0.179901 -0.247087 -0.136814
v -0.027433 -0.500000 -0.262038
v -0.078125 -0.500000 -0.241041
v -0.179901 -0.247087 -0.113186
v -0.116923 -0.500000 -0.202243
v -0.137920 -0.500000 -0.151551
v -0.190840 -0.230675 -0.101373
v -0.137920 -0.500000 -0.096682
v -0.116923 -0.500000 -0.045991
v -0.201779 -0.214262 -0.113186
v -0.078125 -0.500000 -0.007193
v -0.027433 -0.500000 0.013804
v -0.183162 -0.175815 -0.136814
v 0.024062 -0.166667 -0.003152
v 0.068522 -0.166667 -0.021568
v -0.175215 -0.198406 -0.148627
v 0.102550 -0.166667 -0.055596
v 0.120966 -0.166667 -0.100055
v -0.167267 -0.220996 -0.136814
v 0.120966 -0.166667 -0.148178
v 0.102550 -0.166667 -0.192638
v -0.167267 -0.220996 -0.113186
v 0.068522 -0.166667 -0.226666
v 0.024062 -0.166667 -0.245082
v -0.175215 -0.198406 -0.101373
v -0.024061 -0.166667 -0.245082
v -0.068520 -0.166667 -0.226666
v -0.183162 -0.175815 -0.113186
v -0.102548 -0.166667 -0.192638
v -0.120964 -0.166667 -0.148178
v -0.159704 -0.151131 -0.136814
v -0.120964 -0.166667 -0.100055
v -0.102548 -0.166667 -0.055596
v -0.155526 -0.177688 -0.148627
v -0.068520 -0.166667 -0.021568
v -0.024060 -0.166667 -0.003152
v -0.151348 -0.204244 -0.136814
v 0.027435 -0.125001 0.013804
v 0.078127 -0.125001 -0.007193
v -0.151348 -0.204244 -0.113186
v 0.116925 -0.125001 -0.045991
v 0.137922 -0.125001 -0.096683
v -0.155526 -0.177688 -0.101373
v 0.137922 -0.125001 -0.151551
v 0.116925 -0.125001 -0.202243
v -0.159704 -0.151131 -0.113186
v 0.078127 -0.125001 -0.241041
v 0.027435 -0.125001 -0.262038
v -0.133701 -0.142626 -0.136814
v -0.027433 -0.125001 -0.262038
v -0.078125 -0.125001 -0.241041
v -0.133701 -0.170549 -0.148627
v -0.116923 -0.125001 -0.202243
v -0.137921 -0.125001 -0.151551
v -0.133701 -0.198472 -0.136814
v -0.137921 -0.125001 -0.096682
v -0.116923 -0.125001 -0.045991
v -0.133701 -0.198472 -0.113186
v -0.078125 -0.125001 -0.007193
v -0.027433 -0.125001 0.013804
v -0.133701 -0.170549 -0.101373
v 0.024062 -0.125001 -0.003152
v 0.068522 -0.125001 -0.021568
v -0.133701 -0.142626 -0.113186
v 0.102550 -0.125001 -0.055596
v 0.120966 -0.125001 -0.100055
v -0.133701 -0.490192 -0.136814
v 0.120966 -0.125001 -0.148178
v 0.102550 -0.125001 -0.192638
v -0.133701 -0.462269 -0.148627
v 0.068522 -0.125001 -0.226666
v 0.024062 -0.125001 -0.245082
v -0.133701 -0.434346 -0.136814
v -0.024061 -0.125001 -0.245082
v -0.068520 -0.125001 -0.226666
v -0.133701 -0.434346 -0.113186
v -0.102548 -0.125001 -0.192638
v -0.120964 -0.125001 -0.148178
v -0.133701 -0.462269 -0.101373
v -0.120964 -0.125001 -0.100055
v -0.102548 -0.125001 -0.055596
v -0.133701 -0.490192 -0.113186
v -0.068520 -0.125001 -0.021568
v -0.024061 -0.125001 -0.003152
v -0.188013 -0.279964 -0.113186
v -0.188013 -0.279964 -0.136814
v -0.200872 -0.271336 -0.148627
v -0.213731 -0.262707 -0.136814
v -0.217850 -0.316409 -0.113186
v -0.204329 -0.316409 -0.101373
v -0.190808 -0.316409 -0.113186
v -0.190808 -0.316409 -0.136814
v -0.204329 -0.316409 -0.148627
v -0.217850 -0.316409 -0.136814
v -0.213731 -0.370111 -0.113186
v -0.200872 -0.361482 -0.101373
v -0.188013 -0.352853 -0.113186
v -0.188013 -0.352853 -0.136814
v -0.200872 -0.361482 -0.148627
v -0.213731 -0.370111 -0.136814
v -0.201779 -0.418556 -0.113186
v -0.190840 -0.402143 -0.101373
v -0.179901 -0.385730 -0.113186
v -0.179901 -0.385730 -0.136814
v -0.190840 -0.402143 -0.148627
v -0.201779 -0.418556 -0.136814
v -0.183162 -0.457002 -0.113186
v -0.175215 -0.434412 -0.101373
v -0.167268 -0.411822 -0.113186
v -0.167268 -0.411822 -0.136814
v -0.175215 -0.434412 -0.148627
v -0.183162 -0.457002 -0.136814
v -0.159704 -0.481686 -0.113186
v -0.155526 -0.455130 -0.101373
v -0.151348 -0.428574 -0.113186
v -0.151348 -0.428574 -0.136814
v -0.155526 -0.455130 -0.148627
v -0.159704 -0.481686 -0.136814
vt 0.156250 0.218750
vt 0.156250 0.187500
vt 0.218750 0.187500
vt 0.218750 0.218750
vt 0.465889 0.405864
vt 0.537350 0.405864
vt 0.603372 0.433211
vt 0.653903 0.483742
vt 0.681251 0.549764
vt 0.681251 0.621226
vt 0.653904 0.687248
vt 0.603372 0.737779
vt 0.537350 0.765126
vt 0.465889 0.765126
vt 0.399867 0.737779
vt 0.349335 0.687248
vt 0.321988 0.621226
vt 0.321988 0.549764
vt 0.349335 0.483742
vt 0.399867 0.433211
vt 0.625000 0.906250
vt 0.687500 0.906250
vt 0.687500 0.937500
vt 0.625000 0.937500
vt 0.937500 0.906250
vt 1.000000 0.906250
vt 1.000000 0.937500
vt 0.937500 0.937500
vt 0.250000 0.906250
vt 0.312500 0.906250
vt 0.312500 0.937500
vt 0.250000 0.937500
vt 0.562500 0.906250
vt 0.562500 0.937500
vt 0.875000 0.906250
vt 0.875000 0.937500
vt 0.187500 0.906250
vt 0.187500 0.937500
vt 0.812500 0.906250
vt 0.812500 0.937500
vt 0.437500 0.906250
vt 0.500000 0.906250
vt 0.500000 0.937500
vt 0.437500 0.937500
vt 0.125000 0.906250
vt 0.125000 0.937500
vt 0.750000 0.906250
vt 0.750000 0.937500
vt 0.375000 0.906250
vt 0.375000 0.937500
vt 0.062500 0.906250
vt 0.062500 0.937500
vt -0.000000 0.906250
vt -0.000000 0.937500
vt 0.281250 0.312500
vt 0.281250 0.281250
vt 0.343750 0.281250
vt 0.343750 0.312500
vt 0.093750 0.218750
vt 0.156250 0.250000
vt 0.093750 0.250000
vt 0.375000 1.000000
vt 0.312500 1.000000
vt 0.281250 0.250000
vt 0.343750 0.250000
vt 0.156250 0.312500
vt 0.156250 0.281250
vt 0.218750 0.281250
vt 0.218750 0.312500
vt 0.531250 0.187500
vt 0.593750 0.187500
vt 0.593750 0.218750
vt 0.531250 0.218750
vt 0.656250 0.187500
vt 0.656250 0.218750
vt 0.093750 0.187500
vt 0.218750 0.250000
vt 0.125000 0.406250
vt 0.187500 0.406250
vt 0.687500 1.000000
vt 0.625000 1.000000
vt 0.937500 0.406250
vt 1.000000 0.406250
vt 0.062500 1.000000
vt 0.125000 1.000000
vt 0.375000 0.406250
vt 0.437500 0.406250
vt 0.687500 0.406250
vt 0.750000 0.406250
vt 0.937500 1.000000
vt 0.875000 1.000000
vt 0.250000 0.406250
vt 0.187500 1.000000
vt 0.093750 0.343750
vt 0.093750 0.312500
vt 0.156250 0.343750
vt 0.500000 0.406250
vt 0.812500 0.406250
vt 0.437500 1.000000
vt 0.218750 0.156250
vt 0.281250 0.156250
vt 0.281250 0.187500
vt 0.750000 1.000000
vt 0.031250 0.250000
vt 0.031250 0.218750
vt 0.562500 0.406250
vt -0.000000 0.406250
vt 0.062500 0.406250
vt 1.000000 1.000000
vt 0.343750 0.187500
vt 0.343750 0.156250
vt 0.406250 0.156250
vt 0.406250 0.187500
vt 0.312500 0.406250
vt 0.625000 0.406250
vt 0.250000 1.000000
vt 0.406250 0.343750
vt 0.406250 0.312500
vt 0.468750 0.312500
vt 0.468750 0.343750
vt 0.875000 0.406250
vt 0.468750 0.156250
vt 0.468750 0.187500
vt 0.500000 1.000000
vt 0.812500 1.000000
vt 0.406250 0.281250
vt 0.406250 0.250000
vt 0.562500 1.000000
vt -0.000000 1.000000
vt 0.218750 0.343750
vt 0.531250 0.312500
vt 0.531250 0.281250
vt 0.593750 0.281250
vt 0.593750 0.312500
vt 0.468750 0.281250
vt 0.468750 0.250000
vt 0.531250 0.250000
vt 0.281250 0.343750
vt 0.593750 0.250000
vt 0.281250 0.218750
vt 0.343750 0.218750
vt 0.031250 0.156250
vt 0.093750 0.156250
vt 0.031250 0.187500
vt 0.813063 0.373140
vt 0.756333 0.349641
vt 0.712914 0.306222
vt 0.689415 0.249492
vt 0.689415 0.188087
vt 0.712914 0.131357
vt 0.756333 0.087938
vt 0.813063 0.064439
vt 0.874467 0.064439
vt 0.931197 0.087938
vt 0.974617 0.131357
vt 0.998115 0.188088
vt 0.998115 0.249492
vt 0.974617 0.306222
vt 0.931197 0.349641
vt 0.874467 0.373140
vt 0.156250 0.156250
vt 0.656250 0.250000
vt 0.031250 0.312500
vt 0.031250 0.281250
vt 0.093750 0.281250
vt 0.656250 0.281250
vt 0.656250 0.312500
vt 0.406250 0.218750
vt 0.468750 0.218750
vt 0.031250 0.343750
vt 0.656250 0.343750
vt 0.593750 0.343750
vt 0.531250 0.343750
vt 0.531250 0.156250
vt 0.593750 0.156250
vt 0.343750 0.343750
vt 0.656250 0.156250
s 1
f 120/1 121/2 115/3 114/4
f 2/5 24/6 23/7 21/8 20/9 18/10 17/11 15/12 14/13 12/14 11/15 9/16 8/17 6/18 5/19 3/20
f 51/21 53/22 77/23 75/24
f 59/25 60/26 84/27 83/28
f 66/29 68/30 92/31 90/32
f 50/33 51/21 75/24 74/34
f 57/35 59/25 83/28 81/36
f 65/37 66/29 90/32 89/38
f 56/39 57/35 81/36 80/40
f 71/41 72/42 96/43 95/44
f 63/45 65/37 89/38 87/46
f 54/47 56/39 80/40 78/48
f 69/49 71/41 95/44 93/50
f 62/51 63/45 87/46 86/52
f 53/22 54/47 78/48 77/23
f 60/53 62/51 86/52 84/54
f 111/55 112/56 106/57 105/58
f 72/42 50/33 74/34 96/43
f 126/59 120/1 119/60 125/61
f 45/62 44/63 92/31 93/50
f 106/57 112/56 107/64 101/65
f 123/66 124/67 118/68 117/69
f 34/70 52/71 55/72 37/73
f 55/72 52/71 70/74 73/75
f 126/59 127/76 121/2 120/1
f 112/56 118/68 113/77 107/64
f 15/78 17/79 65/37 63/45
f 29/80 27/81 75/24 77/23
f 11/82 12/83 60/26 59/25
f 38/84 86/52 87/46 39/85
f 21/86 23/87 71/41 69/49
f 5/88 6/89 54/47 53/22
f 35/90 33/91 81/36 83/28
f 17/79 18/92 66/29 65/37
f 41/93 39/85 87/46 89/38
f 128/94 129/95 123/66 122/96
f 23/87 24/97 72/42 71/41
f 6/89 8/98 56/39 54/47
f 47/99 45/62 93/50 95/44
f 115/3 116/100 110/101 109/102
f 30/103 29/80 77/23 78/48
f 94/104 91/105 126/59 125/61
f 24/97 2/106 50/33 72/42
f 12/107 14/108 62/51 60/53
f 36/109 35/90 83/28 84/27
f 103/110 104/111 98/112 97/113
f 18/92 20/114 68/30 66/29
f 2/106 3/115 51/21 50/33
f 42/116 41/93 89/38 90/32
f 98/117 99/118 10/119 13/120
f 8/98 9/121 57/35 56/39
f 97/113 98/112 13/122 16/123
f 48/124 47/99 95/44 96/43
f 32/125 30/103 78/48 80/40
f 100/126 106/57 101/65 4/127
f 14/108 15/78 63/45 62/51
f 118/68 112/56 111/55 117/69
f 26/128 48/124 96/43 74/34
f 38/84 36/129 84/54 86/52
f 20/114 21/86 69/49 68/30
f 122/96 123/66 117/69 116/130
f 3/115 5/88 53/22 51/21
f 44/63 42/116 90/32 92/31
f 27/81 26/128 74/34 75/24
f 28/131 25/132 43/133 46/134
f 9/121 11/82 59/25 57/35
f 33/91 32/125 80/40 81/36
f 25/132 7/135 22/136 40/137
f 116/130 117/69 111/55 110/138
f 40/137 37/73 55/72 58/139
f 107/64 108/140 102/141 101/65
f 105/58 106/57 100/126 99/118
f 43/133 25/132 40/137 58/139
f 85/142 128/143 127/76 88/144
f 26/145 27/146 29/147 30/148 32/149 33/150 35/151 36/152 38/153 39/154 41/155 42/156 44/157 45/158 47/159 48/160
f 68/30 69/49 93/50 92/31
f 127/76 128/143 122/161 121/2
f 55/72 73/75 76/162 58/139
f 99/118 100/126 7/135 10/119
f 82/163 79/164 130/165 129/95
f 119/60 120/1 114/4 113/77
f 118/68 124/67 119/60 113/77
f 43/133 61/166 64/167 46/134
f 10/119 7/135 25/132 28/131
f 130/165 124/67 123/66 129/95
f 4/127 1/168 19/169 22/136
f 124/67 130/165 125/61 119/60
f 61/166 43/133 58/139 76/162
f 110/101 104/111 103/110 109/102
f 108/140 109/102 103/110 102/141
f 88/144 127/76 126/59 91/105
f 97/113 16/123 19/169 1/168
f 82/163 129/95 128/94 85/170
f 19/169 16/123 34/70 37/73
f 19/169 37/73 40/137 22/136
f 46/134 64/167 67/171 49/172
f 114/4 108/140 107/64 113/77
f 115/3 109/102 108/140 114/4
f 101/65 102/141 1/168 4/127
f 10/119 28/131 31/173 13/120
f 16/123 13/122 31/174 34/70
f 102/141 103/110 97/113 1/168
f 31/174 49/175 52/71 34/70
f 111/55 105/58 104/176 110/138
f 7/135 100/126 4/127 22/136
f 122/161 116/100 115/3 121/2
f 105/58 99/118 98/117 104/176
f 31/173 28/131 46/134 49/172
f 130/165 79/164 94/104 125/61
f 52/71 49/175 67/177 70/74

BIN
patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
patches/subgame/mods/homedecor_modpack-0.4.15 or lower/homedecor/textures/homedecor_beer_mug_inv.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

199
patches/subgame/mods/homedecor_modpack/homedecor/LICENSE

@ -0,0 +1,199 @@
For the Lua code: LGPL 3.0 or higher
For all models, all textures, and all sounds: CC-by-SA 3.0 or higher
For everything else: WTFPL
Exceptions to the above:
Fancy mesh fire model and texture by NathanS (CC-0).
===============================================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
===============================================================================
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
===============================================================================
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

323
patches/subgame/mods/homedecor_modpack/homedecor/crafts.lua

@ -537,10 +537,8 @@ minetest.register_craft({
recipe = "homedecor:skylight_frosted",
})
-- Various colors of shutters
minetest.register_craft( {
output = "homedecor:shutter_oak 2",
output = "homedecor:shutter 2",
recipe = {
{ "group:stick", "group:stick" },
{ "group:stick", "group:stick" },
@ -554,201 +552,6 @@ minetest.register_craft({
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_black 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:black"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_black",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_dark_grey 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:dark_grey"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_dark_grey",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_grey 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:grey"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_grey",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_white 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:white"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_white",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_mahogany 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:brown"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_mahogany",
burntime = 30,
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_red 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:red"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_red",
burntime = 30,
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_yellow 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:yellow"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_yellow",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_forest_green 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:dark_green"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_forest_green",
burntime = 30,
})
--
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_light_blue 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"unifieddyes:light_blue"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_light_blue",
burntime = 30,
})
minetest.register_craft( {
type = "shapeless",
output = "homedecor:shutter_violet 4",
recipe = {
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"homedecor:shutter_oak",
"dye:violet"
},
})
minetest.register_craft({
type = "fuel",
recipe = "homedecor:shutter_violet",
burntime = 30,
})
--
minetest.register_craft( {
output = "homedecor:drawer_small",
recipe = {
@ -1495,15 +1298,7 @@ minetest.register_craft( {
-- other types of fences
minetest.register_craft( {
output = "homedecor:fence_wrought_iron_2 2",
recipe = {
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
},
})
minetest.register_craft( {
output = "homedecor:fence_wrought_iron_2 2",
output = "homedecor:fence_wrought_iron_2 4",
recipe = {
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
{ "homedecor:pole_wrought_iron", "default:iron_lump" },
@ -2424,30 +2219,29 @@ minetest.register_craft( {
-- bathroom/kitchen tiles
local color_pairings = {
{ "grey", "white", "1" },
{ "dark_grey", "white", "2" },
{ "black", "white", "3" },
{ "black", "dark_grey", "4" },
{ "red", "white", "red" },
{ "green", "white", "green" },
{ "blue", "white", "blue" },
{ "yellow", "white", "yellow" },
{ "brown", "white", "tan" }
}
minetest.register_craft( {
output = "homedecor:bathroom_tiles_light 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye:white" }
},
})
for i in ipairs(color_pairings) do
local dye1 = color_pairings[i][1]
local dye2 = color_pairings[i][2]
local result = color_pairings[i][3]
minetest.register_craft( {
output = "homedecor:tiles_"..result.." 2",
minetest.register_craft( {
output = "homedecor:bathroom_tiles_medium 4",
recipe = {
{ "group:marble", "dye:"..dye1 },
{ "group:marble", "dye:"..dye2 }
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye:grey" }
},
})
end
})
minetest.register_craft( {
output = "homedecor:bathroom_tiles_dark 4",
recipe = {
{ "group:marble", "group:marble", "" },
{ "group:marble", "group:marble", "dye:dark_grey" }
},
})
-- misc electrical
@ -2673,39 +2467,21 @@ minetest.register_craft( {
},
})
local bedcolors = {
{ "red", "red"},
{ "orange", "orange" },
{ "yellow", "yellow"},
{ "green", "dark_green"},
{ "blue", "blue"},
{ "violet", "violet"},
{ "pink", "pink"},
{ "darkgrey", "dark_grey"},
{ "brown", "brown" },
}
for c in ipairs(bedcolors) do
local color = bedcolors[c][1]
local woolcolor = bedcolors[c][2]
minetest.register_craft( {
output = "homedecor:bed_"..color.."_regular",
minetest.register_craft( {
output = "homedecor:bed_regular",
recipe = {
{ "group:stick", "", "group:stick" },
{ "wool:white", "wool:"..woolcolor, "wool:"..woolcolor },
{ "wool:white", "wool:white", "wool:white" },
{ "group:wood", "", "group:wood" },
},
})
})
minetest.register_craft( {
output = "homedecor:bed_"..color.."_kingsize",
minetest.register_craft( {
output = "homedecor:bed_kingsize",
recipe = {
{ "homedecor:bed_"..color.."_regular", "homedecor:bed_"..color.."_regular" }
{ "homedecor:bed_regular", "homedecor:bed_regular" }
},
})
end
})
minetest.register_craft( {
output = "homedecor:bottle_green",
@ -3045,7 +2821,6 @@ minetest.register_craft({
})
minetest.register_alias("homedecor:wine_rack", "homedecor:drink_rack")
local picture_dyes = {
{"dye:brown", "dye:green"}, -- the figure sitting by the tree, wielding a pick
{"dye:green", "dye:blue"} -- the "family photo"
@ -3061,18 +2836,14 @@ for i in ipairs(picture_dyes) do
})
end
local dlamp_colors = { "red","blue","green","violet" }
for _, color in ipairs(dlamp_colors) do
minetest.register_craft({
output = "homedecor:desk_lamp_"..color,
minetest.register_craft({
output = "homedecor:desk_lamp 2",
recipe = {
{ "", "homedecor:steel_strip", "homedecor:glowlight_small_cube" },
{ "", "homedecor:copper_wire", "" },
{ "homedecor:plastic_sheeting", "dye:"..color, "homedecor:plastic_sheeting" },
{ "", "default:steel_ingot", "homedecor:glowlight_small_cube" },
{ "", "homedecor:steel_strip", "" },
{ "homedecor:plastic_sheeting", "homedecor:copper_wire", "homedecor:plastic_sheeting" },
},
})
end
})
minetest.register_craft({
output = "homedecor:hanging_lantern 2",
@ -3245,10 +3016,28 @@ minetest.register_craft({
})
minetest.register_craft({
output = "homedecor:stained_glass",
output = "homedecor:stained_glass 3",
recipe = {
{"", "dye:blue", ""},
{"dye:red", "xpanes:pane_flat", "dye:green"},
{"", "dye:yellow", ""},
},
})
minetest.register_craft({
output = "homedecor:stained_glass 2",
recipe = {
{"", "dye:blue", ""},
{"dye:red", "cottages:glass_pane_side", "dye:green"},
{"", "dye:yellow", ""},
},
})
minetest.register_craft({
output = "homedecor:stained_glass 2",
recipe = {
{"", "dye:blue", ""},
{"dye:red", "xpanes:pane", "dye:green"},
{"dye:red", "cottages:glass_pane", "dye:green"},
{"", "dye:yellow", ""},
},
})

92
patches/subgame/mods/homedecor_modpack/homedecor/gastronomy.lua

@ -1,4 +1,6 @@
local S = homedecor_i18n.gettext
local cutlery_cbox = {
type = "fixed",
fixed = {
@ -12,7 +14,7 @@ homedecor.register("cutlery_set", {
mesh = "homedecor_cutlery_set.obj",
tiles = { "homedecor_cutlery_set.png" },
inventory_image = "homedecor_cutlery_set_inv.png",
description = "Cutlery set",
description = S("Cutlery set"),
groups = {snappy=3},
selection_box = cutlery_cbox,
walkable = false,
@ -33,14 +35,19 @@ local fbottle_cbox = {
}
}
local bottle_colors = {"brown", "green"}
local bottle_colors = {
{ "brown", S("Brown bottle"), S("Four brown bottles") },
{ "green", S("Green bottle"), S("Four green bottles") },
}
for _, b in ipairs(bottle_colors) do
homedecor.register("bottle_"..b, {
tiles = { "homedecor_bottle_"..b..".png" },
inventory_image = "homedecor_bottle_"..b.."_inv.png",
description = "Bottle ("..b..")",
local name, desc, desc4 = unpack(b)
homedecor.register("bottle_"..name, {
tiles = { "homedecor_bottle_"..name..".png" },
inventory_image = "homedecor_bottle_"..name.."_inv.png",
description = desc,
mesh = "homedecor_bottle.obj",
walkable = false,
groups = {snappy=3},
@ -50,13 +57,13 @@ for _, b in ipairs(bottle_colors) do
-- 4-bottle sets
homedecor.register("4_bottles_"..b, {
homedecor.register("4_bottles_"..name, {
tiles = {
"homedecor_bottle_"..b..".png",
"homedecor_bottle_"..b..".png"
"homedecor_bottle_"..name..".png",
"homedecor_bottle_"..name..".png"
},
inventory_image = "homedecor_4_bottles_"..b.."_inv.png",
description = "Four "..b.." bottles",
inventory_image = "homedecor_4_bottles_"..name.."_inv.png",
description = desc4,
mesh = "homedecor_4_bottles.obj",
walkable = false,
groups = {snappy=3},
@ -71,7 +78,7 @@ homedecor.register("4_bottles_multi", {
"homedecor_bottle_green.png"
},
inventory_image = "homedecor_4_bottles_multi_inv.png",
description = "Four misc brown/green bottles",
description = S("Four misc brown/green bottles"),
mesh = "homedecor_4_bottles.obj",
groups = {snappy=3},
walkable = false,
@ -81,7 +88,7 @@ homedecor.register("4_bottles_multi", {
local wine_cbox = homedecor.nodebox.slab_z(-0.75)
homedecor.register("drink_rack", {
description = "Drink rack",
description = S("Drink rack"),
mesh = "homedecor_wine_rack.obj",
tiles = {
"homedecor_generic_wood_red.png",
@ -98,7 +105,7 @@ homedecor.register("drink_rack", {
})
homedecor.register("dartboard", {
description = "Dartboard",
description = S("Dartboard"),
mesh = "homedecor_dartboard.obj",
tiles = { "homedecor_dartboard.png" },
inventory_image = "homedecor_dartboard_inv.png",
@ -114,7 +121,7 @@ homedecor.register("dartboard", {
})
homedecor.register("drink_tap", {
description = "Drink tap",
description = S("drink tap"),
mesh = "homedecor_beer_taps.obj",
tiles = {
"homedecor_generic_metal_bright.png",
@ -127,26 +134,26 @@ homedecor.register("drink_tap", {
type = "fixed",
fixed = { -0.25, -0.5, -0.4375, 0.25, 0.235, 0 }
},
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
local inv = puncher:get_inventory()
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local inv = clicker:get_inventory()
local wieldname = wielditem:get_name()
local wieldname = itemstack:get_name()
if wieldname == "vessels:drinking_glass" then
if inv:room_for_item("main", "homedecor:drink_mug 1") then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
itemstack:take_item()
clicker:set_wielded_item(itemstack)
inv:add_item("main", "homedecor:drink_mug 1")
minetest.chat_send_player(puncher:get_player_name(), "Ahh, a nice cold drink - look in your inventory for it!")
minetest.chat_send_player(clicker:get_player_name(),
S("Ahh, a nice cold drink - look in your inventory for it!"))
else
minetest.chat_send_player(puncher:get_player_name(), "No room in your inventory to add a drink mug!")
minetest.chat_send_player(clicker:get_player_name(),
S("No room in your inventory to add a drink mug!"))
end
end
end
})
minetest.register_alias("homedecor:beer_tap", "homedecor:drink_tap")
minetest.register_craft({
output = "homedecor:drink_tap",
recipe = {
@ -162,7 +169,7 @@ local beer_cbox = {
}
homedecor.register("drink_mug", {
description = "Drink mug",
description = S("Drink mug"),
drawtype = "mesh",
mesh = "homedecor_beer_mug.obj",
tiles = { "homedecor_beer_mug.png" },
@ -171,7 +178,24 @@ homedecor.register("drink_mug", {
walkable = false,
sounds = default.node_sound_glass_defaults(),
selection_box = beer_cbox,
on_use = minetest.item_eat(2)
on_use = function(itemstack, user, pointed_thing)
local inv = user:get_inventory()
if not creative.is_enabled_for(user:get_player_name()) then
if inv:room_for_item("main", "vessels:drinking_glass 1") then
inv:add_item("main", "vessels:drinking_glass 1")
else
local pos = user:get_pos()
local dir = user:get_look_dir()
local fdir = minetest.dir_to_facedir(dir)
local pos_fwd = { x = pos.x + homedecor.fdir_to_fwd[fdir+1][1],
y = pos.y + 1,
z = pos.z + homedecor.fdir_to_fwd[fdir+1][2] }
minetest.add_item(pos_fwd, "vessels:drinking_glass 1")
end
minetest.do_item_eat(2, nil, itemstack, user, pointed_thing)
return itemstack
end
end
})
minetest.register_alias("homedecor:beer_mug", "homedecor:drink_mug")
@ -181,7 +205,7 @@ local svm_cbox = {
}
homedecor.register("soda_machine", {
description = "Soda Vending Machine",
description = S("Soda vending machine"),
mesh = "homedecor_soda_machine.obj",
tiles = {"homedecor_soda_machine.png"},
groups = {snappy=3},
@ -190,21 +214,25 @@ homedecor.register("soda_machine", {
expand = { top="placeholder" },
sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.rotate_simple,
on_punch = function(pos, node, puncher, pointed_thing)
local wielditem = puncher:get_wielded_item()
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local playername = clicker:get_player_name()
local wielditem = clicker:get_wielded_item()
local wieldname = wielditem:get_name()
local fdir_to_fwd = { {0, -1}, {-1, 0}, {0, 1}, {1, 0} }
local fdir = node.param2
local pos_drop = { x=pos.x+fdir_to_fwd[fdir+1][1], y=pos.y, z=pos.z+fdir_to_fwd[fdir+1][2] }
if wieldname == "homedecor:coin" then
wielditem:take_item()
puncher:set_wielded_item(wielditem)
minetest.spawn_item(pos_drop, "homedecor:soda_can")
minetest.sound_play("insert_coin", {
pos=pos, max_hear_distance = 5
})
if not creative.is_enabled_for(playername) then
wielditem:take_item()
clicker:set_wielded_item(wielditem)
return wielditem
end
else
minetest.chat_send_player(puncher:get_player_name(), "Please insert a coin in the machine.")
minetest.chat_send_player(playername, S("Please insert a coin in the machine."))
end
end
})

Loading…
Cancel
Save