mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
b08c0905c0
Any of these new submods can be run without any other components that were once part of the big "homedecor" mod, other than homedecor_common and homedecor_i18n Reduced dependencies where possible, but each submod still has its various dependencies more or less the same as before, i.e. some need basic_materials, others need unifieddyes, some need building_blocks, and so on. All of the stuff that used to be under homedecor/handlers got moved to homedecor_common, as did any models and/or textures that are used by more than one other homedecor component. All the miscellaneous items that didn't warrant their own mod ended up in homedecor_misc, which can also be thought of as the remains of the original "homedecor" mod, renamed.
35 lines
1.0 KiB
Lua
35 lines
1.0 KiB
Lua
function homedecor.sit(pos, node, clicker)
|
|
return -- delete it when the engine is stabler for the player's physics
|
|
--[[
|
|
local meta = minetest.get_meta(pos)
|
|
local param2 = node.param2
|
|
local name = clicker:get_player_name()
|
|
|
|
if name == meta:get_string("is_sit") then
|
|
meta:set_string("is_sit", "")
|
|
pos.y = pos.y-0.5
|
|
clicker:setpos(pos)
|
|
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
|
|
clicker:set_physics_override(1, 1, 1)
|
|
default.player_attached[name] = false
|
|
default.player_set_animation(clicker, "stand", 30)
|
|
else
|
|
meta:set_string("is_sit", clicker:get_player_name())
|
|
clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0})
|
|
clicker:set_physics_override(0, 0, 0)
|
|
clicker:setpos(pos)
|
|
default.player_attached[name] = true
|
|
default.player_set_animation(clicker, "sit", 30)
|
|
if param2 == 0 then
|
|
clicker:set_look_yaw(3.15)
|
|
elseif param2 == 1 then
|
|
clicker:set_look_yaw(7.9)
|
|
elseif param2 == 2 then
|
|
clicker:set_look_yaw(6.28)
|
|
elseif param2 == 3 then
|
|
clicker:set_look_yaw(4.75)
|
|
else return end
|
|
end
|
|
--]]
|
|
end
|