Compare commits
No commits in common. "master" and "2023-04-24" have entirely different histories.
master
...
2023-04-24
50
.luacheckrc
50
.luacheckrc
|
@ -1,50 +0,0 @@
|
|||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
globals = {
|
||||
"minetest","mcl_tmp_message","mcl_player"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
-- My mod
|
||||
"mcl_cozy",
|
||||
|
||||
-- Builtin
|
||||
"vector", "ItemStack",
|
||||
"dump", "DIR_DELIM", "VoxelArea", "Settings",
|
||||
|
||||
-- MTG
|
||||
"default", "sfinv", "creative",
|
||||
|
||||
-- Mineclone
|
||||
"mcl_loot", "tga_encoder", "mcl_util", "flowlib", "mcl_sounds", "mcl_autogroup",
|
||||
"mcl_events", "biomeinfo", "mcl_damage", "mcl_particles", "mcl_worlds", "mcl_colors",
|
||||
"mcl_explosions", "mcl_vars", "controls", "walkover", "mcl_meshhand", "mcl_fovapi",
|
||||
"playerphysics", "mcl_hunger", "mcl_death_drop", "mcl_playerplus",
|
||||
"mcl_gamemode", "mcl_spawn", "mcl_skins", "mcl_sprint", "mcl_playerinfo",
|
||||
"mcl_item_id", "tt", "mcl_craftguide", "doc", "mcl_dripping",
|
||||
"mcl_entity_invs", "mcl_item_entity", "mcl_burning",
|
||||
"mcl_minecarts", "pillager", "mobs_mc", "sounds",
|
||||
"textures", "mcl_mobs", "mcl_paintings",
|
||||
"mcl_grindstone", "mcl_walls", "mcl_bamboo",
|
||||
"mcl_maps", "mcl_clock", "mcl_end", "mcl_starting_inventory",
|
||||
"mcl_bows", "mcl_bows_s", "mcl_dye", "mcl_copper",
|
||||
"mcl_flowerpots", "mcl_furnaces", "mcl_farming",
|
||||
"mcl_campfires", "mcl_crafting_table", "mcl_doors",
|
||||
"mcl_jukebox", "screwdriver", "mcl_itemframes",
|
||||
"mcl_heads", "mcl_beacons", "xpanes", "mcl_enchanting",
|
||||
"mcl_beds", "mcl_throwing", "mcl_banners", "mcl_mobspawners",
|
||||
"mcl_cocoas", "mcl_smithing_table", "mcl_flowers",
|
||||
"mcl_core", "mcl_torches", "mcl_target", "mesecon", "mcl_observers",
|
||||
"mcl_sculk", "mcl_armor", "mcl_lanterns", "mcl_stairs", "mcl_bells",
|
||||
"mcl_hamburger", "mcl_signs", "mcl_honey", "mcl_stonecutter", "mcl_fire",
|
||||
"mcl_compass", "mcl_ocean", "mcl_fences", "mcl_buckets", "mcl_potions",
|
||||
"tnt", "mcl_cherry_blossom", "mcl_portals", "mcl_chests", "mcl_shields",
|
||||
"mcl_wip", "mcl_raids", "mcl_moon", "lightning", "mcl_weather",
|
||||
"mcl_formspec", "mcl_death_messages", "mcl_bossbars", "awards",
|
||||
"mcl_inventory", "mcl_title", "mcl_offhand", "hb", "mcl_experience",
|
||||
"mcl_info", "mcl_credits", "tsm_railcorridors", "mcl_mapgen_core",
|
||||
"mcl_structures", "settlements", "mcl_dungeons", "mcl_colors_official"
|
||||
}
|
|
@ -1,7 +1,4 @@
|
|||
# MineClone2 Get Comfortable
|
||||
|
||||
**Migrated, see <https://codeberg.org/rudzik8/mcl_cozy>**
|
||||
|
||||
[![ContentDB](https://content.minetest.net/packages/rudzik8/mcl_cozy/shields/downloads/)](https://content.minetest.net/packages/rudzik8/mcl_cozy/)
|
||||
|
||||
Adds commands to /lay or /sit to the MineClone 2/5/a game. Port of good old [cozy mod](https://forum.minetest.net/viewtopic.php?f=11&t=14143) (originally made for MTG by everamzah) to work with MCL properly and even provide some nice new features!
|
||||
|
|
18
init.lua
18
init.lua
|
@ -41,16 +41,14 @@ minetest.register_globalstep(function(dtime)
|
|||
players[i]:get_player_control().jump == true or
|
||||
players[i]:get_player_control().sneak == true) then
|
||||
players[i]:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
playerphysics.remove_physics_factor(players[i], "speed", "mcl_cozy:attached")
|
||||
playerphysics.remove_physics_factor(players[i], "jump", "mcl_cozy:attached")
|
||||
players[i]:set_physics_override(1, 1, 1)
|
||||
mcl_player.player_attached[name] = false
|
||||
mcl_player.player_set_animation(players[i], "stand", 30)
|
||||
end
|
||||
-- check the node below player (and if it's air, just unmount)
|
||||
if minetest.get_node(vector.offset(players[i]:get_pos(),0,-1,0)).name == "air" then
|
||||
players[i]:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
playerphysics.remove_physics_factor(players[i], "speed", "mcl_cozy:attached")
|
||||
playerphysics.remove_physics_factor(players[i], "jump", "mcl_cozy:attached")
|
||||
players[i]:set_physics_override(1, 1, 1)
|
||||
mcl_player.player_attached[name] = false
|
||||
end
|
||||
end
|
||||
|
@ -64,15 +62,13 @@ minetest.register_chatcommand("sit", {
|
|||
if minetest.get_node(vector.offset(player:get_pos(),0,-1,0)).name == "air" then return end
|
||||
if mcl_player.player_attached[name] then
|
||||
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
playerphysics.remove_physics_factor(player, "speed", "mcl_cozy:attached")
|
||||
playerphysics.remove_physics_factor(player, "jump", "mcl_cozy:attached")
|
||||
player:set_physics_override(1, 1, 1)
|
||||
mcl_player.player_attached[name] = false
|
||||
mcl_player.player_set_animation(player, "stand", 30)
|
||||
print_action_stand(name)
|
||||
else
|
||||
player:set_eye_offset({x=0, y=-7, z=2}, {x=0, y=0, z=0})
|
||||
playerphysics.add_physics_factor(player, "speed", "mcl_cozy:attached", 0)
|
||||
playerphysics.add_physics_factor(player, "jump", "mcl_cozy:attached", 0)
|
||||
player:set_physics_override(0, 0, 0)
|
||||
mcl_player.player_attached[name] = true
|
||||
mcl_player.player_set_animation(player, "sit", 30)
|
||||
print_action_sit(name)
|
||||
|
@ -88,15 +84,13 @@ minetest.register_chatcommand("lay", {
|
|||
if minetest.get_node(vector.offset(player:get_pos(),0,-1,0)).name == "air" then return end
|
||||
if mcl_player.player_attached[name] then
|
||||
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
playerphysics.remove_physics_factor(player, "speed", "mcl_cozy:attached")
|
||||
playerphysics.remove_physics_factor(player, "jump", "mcl_cozy:attached")
|
||||
player:set_physics_override(1, 1, 1)
|
||||
mcl_player.player_attached[name] = false
|
||||
mcl_player.player_set_animation(player, "stand", 30)
|
||||
print_action_stand(name)
|
||||
else
|
||||
player:set_eye_offset({x=0, y=-13, z=0}, {x=0, y=0, z=0})
|
||||
playerphysics.add_physics_factor(player, "speed", "mcl_cozy:attached", 0)
|
||||
playerphysics.add_physics_factor(player, "jump", "mcl_cozy:attached", 0)
|
||||
player:set_physics_override(0, 0, 0)
|
||||
mcl_player.player_attached[name] = true
|
||||
mcl_player.player_set_animation(player, "lay", 0)
|
||||
print_action_lay(name)
|
||||
|
|
Reference in New Issue