[Mod] Get Comfortable [cozy]

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Get Comfortable [cozy]

by everamzah » Wed Mar 02, 2016 11:02

Description: Adds commands to /lay or /sit.
License: WTFPL
Depends: default
Download: cozy.zip

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_globalstep(function(dtime)
        local players = minetest.get_connected_players()
        for i=1, #players do
                local name = players[i]:get_player_name()
                if default.player_attached[name] and not players[i]:get_attach() and
                                (players[i]:get_player_control().up == true or
                                players[i]:get_player_control().down == true or
                                players[i]:get_player_control().left == true or
                                players[i]:get_player_control().right == true or
                                players[i]:get_player_control().jump == true) then
                        players[i]:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
                        players[i]:set_physics_override(1, 1, 1)
                        default.player_attached[name] = false
                        default.player_set_animation(players[i], "stand", 30)
                end
        end
end)

minetest.register_chatcommand("sit", {
        description = "Sit down",
        func = function(name)
                local player = minetest.get_player_by_name(name)
                if default.player_attached[name] then
                        player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
                        player:set_physics_override(1, 1, 1)
                        default.player_attached[name] = false
                        default.player_set_animation(player, "stand", 30)
                else
                        player:set_eye_offset({x=0, y=-7, z=2}, {x=0, y=0, z=0})
                        player:set_physics_override(0, 0, 0)
                        default.player_attached[name] = true
                        default.player_set_animation(player, "sit", 30)
                end
        end
})

minetest.register_chatcommand("lay", {
        description = "Lay down",
        func = function(name)
                local player = minetest.get_player_by_name(name)
                if default.player_attached[name] then
                        player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
                        player:set_physics_override(1, 1, 1)
                        default.player_attached[name] = false
                        default.player_set_animation(player, "stand", 30)
                else
                        player:set_eye_offset({x=0, y=-13, z=0}, {x=0, y=0, z=0})
                        player:set_physics_override(0, 0, 0)
                        default.player_attached[name] = true
                        default.player_set_animation(player, "lay", 0)
                end
        end
})


Image
Attachments
screenshot.png
screenshot.png (208.33 KiB) Viewed 2092 times
cozy.zip
(208.81 KiB) Downloaded 292 times
cozy.tgz
(610 Bytes) Downloaded 99 times
Last edited by everamzah on Thu Mar 03, 2016 14:15, edited 2 times in total.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Get Comfortable [cozy]

by firefox » Wed Mar 02, 2016 14:11

great!!!!!!
+1
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Get Comfortable [cozy]

by Don » Wed Mar 02, 2016 15:03

+1
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: [Mod] Get Comfortable [cozy]

by benrob0329 » Wed Mar 02, 2016 16:04

Awesome!
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: [Mod] Get Comfortable [cozy]

by Dragonop » Wed Mar 02, 2016 22:11

Nice mod, I saw something simiilar on a server that is now closed, it's nice to have it back-
+1
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: [Mod] Get Comfortable [cozy]

by KCoombes » Wed Mar 02, 2016 22:45

+1
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Get Comfortable [cozy]

by philipbenr » Thu Mar 03, 2016 01:21

I would suggest a uploading a .zip archive for all those windows users who don't use 7-zip...
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Get Comfortable [cozy]

by Diamond knight » Thu Mar 03, 2016 23:34

maybe it could change the eye offset
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

User avatar
benrob0329
Member
 
Posts: 1192
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
In-game: benrob03

Re: [Mod] Get Comfortable [cozy]

by benrob0329 » Fri Mar 04, 2016 00:34

It does, actually!

Say, devs, could this be merged with the default player code?
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Get Comfortable [cozy]

by Minetestforfun » Fri Mar 04, 2016 12:19

Great work, should be in Minetest Game ! :)
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Get Comfortable [cozy]

by Diamond knight » Mon May 30, 2016 14:07

i agree too, this would go perfect in minetest, not too op, fits with game, no unnessesary lag
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Get Comfortable [cozy]

by everamzah » Sat Jun 25, 2016 21:37

It's been brought to my attention that by attaching to a boat and issuing /lay twice one is able to fly forward, backward, left, and right; but not up or down. I have not yet been able to verify this.

https://github.com/everamzah/dcb/issues/13
https://github.com/minetest-mods/cozy/issues/1
 

Minetest_Neko_
New member
 
Posts: 9
Joined: Thu Nov 17, 2016 01:26
GitHub: GitMee
IRC: Roc
In-game: Neko_

Re: [Mod] Get Comfortable [cozy]

by Minetest_Neko_ » Thu Nov 17, 2016 04:36

How.. DO i get this to work,,, in my files
lol pls help
 

User avatar
AnxiousInfusion
Member
 
Posts: 146
Joined: Sun Aug 02, 2015 05:43
GitHub: AnxiousInfusion[GitLab]
IRC: AnxiousInfusion
In-game: AnxiousInfusion

Re: [Mod] Get Comfortable [cozy]

by AnxiousInfusion » Thu Nov 17, 2016 05:00

You have it in your ~/minetest/mods directory? It is enabled in minetest.mt or by mods menu? Sitting and laying work by issuing commands in chat.
 

Minetest_Neko_
New member
 
Posts: 9
Joined: Thu Nov 17, 2016 01:26
GitHub: GitMee
IRC: Roc
In-game: Neko_

Re: [Mod] Get Comfortable [cozy]

by Minetest_Neko_ » Thu Nov 17, 2016 16:21

How did you get it to work?? it says to me theres a error no A-Z characters aloud, or something like that.
Help pls :3
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Get Comfortable [cozy]

by Diamond knight » Fri Nov 18, 2016 22:32

this should be in 0.4.15

it fits the criteria, it doesn't cause much lag, doesn't mess with the game, it is something that can bring your furniture to life (minetest_game player built out of slabs "furniture" at least)
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 8 guests

cron