[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

lesto
New member
Posts: 9
Joined: Sun Nov 25, 2012 20:00

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by lesto » Post

also, can you please make Object Detector value modificable only by owner?

like a protect chest can be used only by owner. so i can build things that can be activate only by me or my friend (if only i had one in-game.. :) )

Thanks.

Josh04
Member
Posts: 92
Joined: Wed Aug 20, 2014 13:44
GitHub: DerMinetestPro
IRC: Josh04
In-game: Josh04
Location: Deutschland

Re: [Mod] Mesecons (= redstone)

by Josh04 » Post

Oh my God! I LOVE THIS MOD!

P.S. ?Unknown?
Nennt mich nicht Josh! Sagt Josh04 oder JJ!
Wer etwas von mir wissen will, schreib mir eine PM
Schreibt mir auch eine PM, wenn ihr meine Lieblings-Mods oder Tex-Packs erfahren wollt!

User avatar
Megaf
Member
Posts: 99
Joined: Fri Nov 01, 2013 18:00
GitHub: megaf
IRC: Megaf
In-game: Megaf
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Megaf » Post

Hi, I make a fork and added a grey fence that is able to conduct mese signals.
I've done that because we like to use fences to build lamp posts and it would be so much better if fences could conduct electricity.

Also, the conducting fence is a good alternative to vertical mese wires.

I made a pull request already and hopefully Jeija will merge it.

Image

Image

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Jeija » Post

Hi Megaf, nice to hear that. I support your idea of creating a fork. Even though I'd love to work more on mesecons, I just don't have the time for it. I encourage you to maintain a fork of mesecons that might not only implement new fences, but also other features you or other people like to have. That way, mesecons remains a solid base. However, I recommend you to change your fork's name a little, so people know the difference.

I know there are many pull request to mesecons, but I cannot responsibly test and merge them. Otherwise, security risks (like the one with the command block), performance issues or bugs may appear.

Afton
New member
Posts: 5
Joined: Wed Sep 17, 2014 02:15
GitHub: Aftonone
In-game: Afton

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Afton » Post

Hey! Is there a way to get a wire through a certain block? And I also want to be able to stack vertical wires without them making those plate things... For instance regarding the first request... In minecraft you can get redstone dust to send signal THROUGH a piece of wool...Example: __
◘◘
()()

_ = mesecon wire
◘ = wool
() = something that needs power

In thsi thing the wire can sit on top of the wool but the signal gos through the wool into the piston....

Thanks a ton! Great job on your AWESOME mod!!! Cheers!

-Afton
Life is short.....eat dessert first!

When people hurt you over and over, think of them like sandpaper. They may scratch and hurt you a bit, but in the end, you end up polished and they end up useless. - Chris Colfer (Actor, singer, 1990-)

Christian Metal rocks!!! \m/

AutiCoder
New member
Posts: 3
Joined: Sat Sep 06, 2014 08:55
In-game: AutiCoder

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by AutiCoder » Post

Hi , i noticed a little thing in your mod ;
glass doors are not opening with mesecon input ,
i did fix this with adding :
"
doors:register_door("doors:door_glass", {
description = "Glass Door",
inventory_image = "door_glass.png",
groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1},
tiles_bottom = {"door_glass_b.png", "door_glass_side.png"},
tiles_top = {"door_glass_a.png", "door_glass_side.png"},
sounds = default.node_sound_glass_defaults(),
})

"
at the end of mesecons_compatibility .

Greetings
"Think , create , test , fail , and repeat until you succeed "

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Inocudom » Post

Jeija wrote:Hi Megaf, nice to hear that. I support your idea of creating a fork. Even though I'd love to work more on mesecons, I just don't have the time for it. I encourage you to maintain a fork of mesecons that might not only implement new fences, but also other features you or other people like to have. That way, mesecons remains a solid base. However, I recommend you to change your fork's name a little, so people know the difference.

I know there are many pull request to mesecons, but I cannot responsibly test and merge them. Otherwise, security risks (like the one with the command block), performance issues or bugs may appear.
Jeija doesn't have time to work on mesecons anymore. Ask Megaf to do so for his fork.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by 4aiman » Post

AutiCoder wrote:Hi , i noticed a little thing in your mod ;
glass doors are not opening with mesecon input ,
i did fix this with adding :
"
doors:register_door("doors:door_glass", {
description = "Glass Door",
inventory_image = "door_glass.png",
groups = {snappy=1,cracky=1,oddly_breakable_by_hand=3,door=1},
tiles_bottom = {"door_glass_b.png", "door_glass_side.png"},
tiles_top = {"door_glass_a.png", "door_glass_side.png"},
sounds = default.node_sound_glass_defaults(),
})

Mesecons compatibility belongs to mesecons, thus you should've gotten an exception about naming conventions. Am I wrong?

"
at the end of mesecons_compatibility .

Greetings

varnayskiy
New member
Posts: 5
Joined: Tue Jun 24, 2014 15:13

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by varnayskiy » Post

Hellow, a I have YANI :) Iron bars under voltage. What do you think about it?

Sunfirel
Member
Posts: 17
Joined: Wed Aug 27, 2014 12:54
IRC: Sunfirel
In-game: Sunfirel

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Sunfirel » Post

This mod is awesome, but I seen a bug. When chest is pushed by sticky movestone, it can't be opened and behaves like normal block. Tried in 0.4.9 and 0.4.10 and still the same.

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by LordHawk » Post

I saw a YouTube (http://www.youtube.com/watch?v=yEqClE9Jt6A) video that uses two sticky pistons together. One of the pistons pushes and pulls the other sticky piston. I have tried to duplicate this, but the piston is not pulled back when the power is off. It is pushed right, but just left where it was pushed when the first piston pulls back. Is that video still possible?

LordHawk
New member
Posts: 9
Joined: Tue Sep 30, 2014 17:33

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by LordHawk » Post

LordHawk wrote:I saw a YouTube (http://www.youtube.com/watch?v=yEqClE9Jt6A) video that uses two sticky pistons together. One of the pistons pushes and pulls the other sticky piston. I have tried to duplicate this, but the piston is not pulled back when the power is off. It is pushed right, but just left where it was pushed when the first piston pulls back. Is that video still possible?
I figured out how to do the code in the video. You have to use a Microcontroller. The code to get the video section to work:

Code: Select all

if pin.a == false then --off
  if port.d then
    port.d = false
    interrupt(0.2,"stage1")
  end
  if port.b and event.iid == "stage1" then
    port.b = false
    interrupt(0.2,"stage2")
  end  
else --on
  port.b = true
  port.d = true
end
The is another tutorial (I forget where it is) to to use 2 sticky pistons to move move than one block. The code in that example didn't work for me. The second piston kept opening an closing. This is code I used to get that to work:

Code: Select all

if pin.a == false then --off
  if port.d then
    port.d = false
    interrupt(0.2,"stage1")
  end
  if port.b and event.iid == "stage1" then
    port.b = false
    interrupt(0.2,"stage2")
  end
  if event.iid == "stage2" then
    port.c = true
    interrupt(0.2,"stage3")
  end
  if event.iid == "stage3" then
    port.c = false
    interrupt(0.2, nil)
  end
  
else --on
  port.b = true
  port.d = true
end

User avatar
Esteban
Member
Posts: 873
Joined: Sun Sep 08, 2013 13:26
In-game: Esteban
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Esteban » Post

I noticed that the command block only works with things like buttons or levers. I was trying to use command blocks and player sensor for a PvP map and it does not work. I tried with pressure plates and the same happens. Is the mod like that or is my mistake?

EDIT: the command block has this setting:
give @nearest default:stick
Scan avatar or click here to read a Message of Hope (PDF)

theoluk
Member
Posts: 21
Joined: Sun May 11, 2014 18:24

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by theoluk » Post

I am running the latest version of mesecons on morn76's build for mac of minetest 4.10. For some reason, command blocks, luacontrollers, and microcontrollers don't work. At all. I can place them, but once I type in the code, It won't run when powered.
Please Help!

theoluk
Member
Posts: 21
Joined: Sun May 11, 2014 18:24

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by theoluk » Post

I am running the latest version of mesecons on morn76's build for mac of minetest 4.10. For some reason, command blocks, luacontrollers, and microcontrollers don't work. At all. I can place them, but once I type in the code, It won't run when powered.
Please Help!

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

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Don » Post

Just wondering if you could add bat_blocks? to your depends.txt. It would be greatly appreciated.
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

davegoopot
Member
Posts: 15
Joined: Sat Apr 06, 2013 08:43
GitHub: davegoopot

Mesecons - Post to chat from luacontroller?

by davegoopot » Post

Hi,

I'd like to be able to post to the chat window from code in the luacontroller. I can't do,

Code: Select all

minetest.chat_send_all("Hello from Minetest!!!")
...since that is not one of the safe commands. Is there a good way to do this without tinkering with the init.lua file?

Thanks,

Dave.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Jeija » Post

You could just use the command block instead of the luacontroller for that purpose.
If you want to send something to everyone, just use
say [TEXT]
and if you want send something to just one person, use
tell [PERSON] [TEXT]

davegoopot
Member
Posts: 15
Joined: Sat Apr 06, 2013 08:43
GitHub: davegoopot

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by davegoopot » Post

Hi Jeija,

Thanks for the reply. I didn't give the full requirement: I'm actually putting together some ideas to use Minetest in a local code club to teach kids about programming. I'm planning a dice-rolling game. So e.g. I wanted to do something like:

Code: Select all

x = math.random(1,6)
minetest.chat_send_all("You rolled a: " .. x)
I guess I'm looking at adding more values into the table returned from create_environment. Is that right?

On a similar topic, can the luacontroller set blocks in the world? I.e. do the equivalent of a call to minetest.place_node?

I'm a complete noob to Minetest so if I've missed a really simple way of doing this please point me in the right direction. I'm trying for an in-game experience rather than having our kids edit init.lua files -- minimizing the initial friction is key as they are all brand new to coding.

Thanks,

Dave.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Jeija » Post

Hi davegoopot,

I'd then recommend you to edit the mesecons_luacontroller/init.lua file yourself to add minetest.chat_send_all to the safe commands. Due to obvious reaons I can't make that change upstream. For instance, you could just add

Code: Select all

minetest = minetest
to the return value of create_environment to import all minetest.* commands to the list of allowed commands.

As you say the children you're teaching have no experiences in coding, long function names and such may be very confusing. Therefore, you might want to change names of the commands to something simpler, like

Code: Select all

say = minetest.chat_send_all

Code: Select all

place = function (name, pos)
    minetest.set_node(pos, {name = name})
end
Last year, I also taught some kids basic programming in Lua. As the Laptops we had were by far not powerful enough to run something like minetest, I could not use mesecons / minetest. Nevertheless, I think Lua really is a great language for beginners (personally, I prefer it over python due to closer similarity to other languages such as JavaScript). Therefore I used http://love2d.org/ to make some very simple drawings and games.
In case you're interested, I also did some beginner-friendly hardware stuff, such as soldering a kit with a little board to play games on and programming it (https://github.com/Jeija/pollinspiel-lernkit) and a chinese 10€ LED-Matrix (https://github.com/Jeija/jymcu-3208-lernkit).

Hope I could help you!

davegoopot
Member
Posts: 15
Joined: Sat Apr 06, 2013 08:43
GitHub: davegoopot

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by davegoopot » Post

Hi Jeija,

Thanks for the reply. Love2d looks *really* useful. I'll ignore the comment about Lua being good because it is *more* like JS than python ;-)

I'm toying with the idea of packaging up a few mods into a Minetest game. Does that make sense? I could then include the minor modifications to the init.lua with that game pack.

Ideally I'd copy your code over to a new github repo and make the changes in public there. Would that be okay with you? I'd mark it clearly with the CC-BY-SA 3.0 and LGPL version 3 licenses that you put on Mescons already. Don't worry if you'd rather I didn't make a public repo -- just let me know and I'll work round it.

Thanks again,

Dave.

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Jeija » Post

Hi Dave,

sure you can fork mesecons to include your changes. Rather than licensing stuff I'd be More concerned about people installing your fork on servers. It would be great if you could make a note telling people what changes you made and that these changes may permit people to basically destroy the map (like placing nodes all over the place in the luacontroller).

And concerning my JS comment: From a beginner's perspective, it is actually a big deal whether you use e.g. indents or brackets / keywords, whether you use classes all the time or rather not. And even though JS is not a particularly good language, it is quite likely people will get in contact with it in web development (which can be, btw, also quite nice for kids because one can show creations to other people on websites).

- Jeija

davegoopot
Member
Posts: 15
Joined: Sat Apr 06, 2013 08:43
GitHub: davegoopot

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by davegoopot » Post

Hi Jeija,

Yes I'm all fine with that. I hope to have some time to work on this over the weekend.

Dave.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Inocudom » Post

I got this error today:

Code: Select all

13:41:53: ERROR[main]: ServerError: ...test-mod-mesecons-master/mesecons_luacontroller/init.lua:176: attempt to perform arithmetic on global 'print_count' (a nil value)
13:41:53: ERROR[main]: stack traceback:
13:41:53: ERROR[main]: 	...test-mod-mesecons-master/mesecons_luacontroller/init.lua:176: in function <...test-mod-mesecons-master/mesecons_luacontroller/init.lua:175>

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec

by Jeija » Post

Inocudom, this should have fixed the issue. It's kind of embarassing, I had already fixed that bug locally, but forgot to

Code: Select all

git add .
before git commit. I hope everything works now for you, thanks for telling me!

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests