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

User avatar
NetYard5
Member
 
Posts: 66
Joined: Fri Aug 24, 2018 20:28
Location: Malaysia, Kuala Lumpur
GitHub: FI3Mate
IRC: AlloyMixedSteel
In-game: InfinityYards UltraNexo
 

RickSaysMeh
New member
 
Posts: 1
Joined: Thu Dec 13, 2018 00:45

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

by RickSaysMeh » Thu Dec 13, 2018 00:57

Do Mese Blocks conduct vertically? Placing a lightbox on any of the six sides and powering the mese block seems to work as expected, the lightbox turns on. The same is true with a second mese block; HOWEVER, doing the same with a piston does not. The piston only receives power from the sides (X, Z) of the mese block, not the top or bottom. Is this by design? Is it possible to fix this so that pistons can be powered by a mese block above or below? To be clear, the mese block is touching the non-moving side of the piston.
 

User avatar
DS-minetest
Member
 
Posts: 1094
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

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

by DS-minetest » Thu Dec 13, 2018 15:08

RickSaysMeh wrote:Do Mese Blocks conduct vertically?

Yes, they do.
RickSaysMeh wrote:The piston only receives power from the sides (X, Z) of the mese block, not the top or bottom. Is this by design? Is it possible to fix this so that pistons can be powered by a mese block above or below?

As you can see here (https://github.com/minetest-mods/meseco ... it.lua#L49), the default rules (12 rules (4(+x,-x,+z,-z) * 3(up, middle, down))) are taken and the rules toward the pusher are removed.
This could easily be changed.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

thetoolman
New member
 
Posts: 5
Joined: Sat Nov 24, 2018 18:45
GitHub: tealethetoolman
IRC: thetoolman

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

by thetoolman » Mon Jan 28, 2019 19:45

Hey there!

Was wondering if there was a reason or if it has just not been suggested yet.

The LUA controller is cool and all but it is missing a call. This call is split. I put it in on my local copy and it works great and I thought I'd recommend it. I searched this thread for anything having to do with the lua controller and nothing came up talking about it so I figured I'd bring it up.

So some details:
I'm working with the lua controller and digilines and I want to make the lua controller count something that is sent in the digilines string. To be a little more clear here, the digilines chest spits out a string like this "default:cobblestone 9" where the first part is the item, and the last part is the number. (I haven't thought about this in a few months, but I think there's a part in the middle that says whether it is being added or removed). When I include the split function, I can say var item.count=item.count + event.msg.split(" ")[2] and it will add the previous value to this new value. This is great for keeping track of amounts in storage bins. (I need to post in the digiline topic that these numbers and the put/take are a bit wonky and it messes up my numbers, but that's a topic for another post in another thread). This is also good for communication of advanced strings similar to this from other systems I've built but wont get into.

So the code I added in mesecons_luacontroller/init.lua looks like this

local env = {
...
string = {
...
split = string.split,
...
}
....
}

I don't have a github account so I wont be making a merge request, but if someone wants to take a look at this and possibly add it or explain why it's not there, that'd be nice. This way, I don't have to modify the file whenever I pull the latest code.

Thanks

-thetoolman


p.s.
also does anyone know who manages the code base for the lua memory module? Someone did a pretty nasty typo that left the piece absolutely useless (index off by 0 where it is calling the data from the deserialized table). I saw a merge request on that ones page but it also had someones name tagged into it. Looks like it hasn't been updated in a while.)
 

lonestar
Member
 
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

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

by lonestar » Sun Feb 10, 2019 02:56

Is it possible for mese to transmit through three blocks? In Minecraft, redstone is able to transmit this way. For example, you have two sticky pistons stacked on top of each other under a stone block, when redstone is active on top of the stone block, it activate both pistons. Either that or have pistons transfer power to the next.
 

User avatar
Hybrid Dog
Member
 
Posts: 2718
Joined: Thu Nov 01, 2012 12:46

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

by Hybrid Dog » Sun Feb 10, 2019 20:09

You can make a mesecons transmitter node which sends a mesecons signal to three or more nodes in a specific direction. The default mesecons wire sends the signal only to the neighbouring nodes.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

lonestar
Member
 
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

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

by lonestar » Mon Feb 11, 2019 01:17

Hybrid Dog wrote:You can make a mesecons transmitter node which sends a mesecons signal to three or more nodes in a specific direction. The default mesecons wire sends the signal only to the neighbouring nodes.


Can you point to any documentation/tutorial on a transmitter? Doesn't seem to be in mesecons mod pack.
 

User avatar
Hybrid Dog
Member
 
Posts: 2718
Joined: Thu Nov 01, 2012 12:46

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

by Hybrid Dog » Mon Feb 11, 2019 11:53

lonestar wrote:
Hybrid Dog wrote:You can make a mesecons transmitter node which sends a mesecons signal to three or more nodes in a specific direction. The default mesecons wire sends the signal only to the neighbouring nodes.


Can you point to any documentation/tutorial on a transmitter? Doesn't seem to be in mesecons mod pack.

I made a laser beam mod, where I used mesecon.receptor_on, mesecon.receptor_off and the mesecons field in the node definition.
https://github.com/HybridDog/laser/blob ... t.lua#L430
For a transmitter you probably also need to use effector, see the piston for examle: https://github.com/minetest-mods/meseco ... t.lua#L278
I haven't found a documentation of the mesecons API. Maybe it's missing.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
DS-minetest
Member
 
Posts: 1094
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

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

by DS-minetest » Mon Feb 11, 2019 16:25

Hybrid Dog wrote:I haven't found a documentation of the mesecons API. Maybe it's missing.

http://mesecons.net/developers.html
https://github.com/minetest-mods/mesecons/blob/master/mesecons/internal.lua#L1-L47 (There might be other useful code comments somewhere else.)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Superuser
Member
 
Posts: 11
Joined: Thu Jan 10, 2019 01:37
In-game: Superuser

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

by Superuser » Tue Feb 12, 2019 21:32

Awesome mod!
by far, a great way to make machines and etc- fills a gap from minecraft!
I play on blocky survival server
All images on this site are free to use.
 

User avatar
Isja Krass
Member
 
Posts: 43
Joined: Sat Aug 18, 2018 19:30
Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
In-game: init.lua

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

by Isja Krass » Mon Jun 17, 2019 21:42

What happened to my luacontrollers???

+ igmage


I only try to run this code and this is happened.
Code: Select all
if event.msg == "inout_01 /status" then if pin.a == true then digiline_send(event.channel,"![INOUT_01]:has input") else if port.b == true then digiline_send(event.channel,"![INOUT_01]: has output") else digiline_send(event.channel,"![INOUT_01]: nil") end end end
if event.msg == "inout_01 /on" then port.a = true end
if event.msg == "inout_01 /off" then port.a = false end
if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input") end
if event.msg == "inout_01 /check" then if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input = true") else digiline_send(event.channel,"![INOUT_01]: input = false") end end
Attachments
screenshot_20190617_233810.png
(201.91 KiB) Not downloaded yet
my topics | profile | contact me | nothing else to say...
 

User avatar
DS-minetest
Member
 
Posts: 1094
Joined: Thu Jun 19, 2014 19:49
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
GitHub: DS-Minetest
In-game: DS

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

by DS-minetest » Tue Jun 18, 2019 09:32

Isja Krass wrote:What happened to my luacontrollers???

+ igmage


I only try to run this code and this is happened.
Code: Select all
if event.msg == "inout_01 /status" then if pin.a == true then digiline_send(event.channel,"![INOUT_01]:has input") else if port.b == true then digiline_send(event.channel,"![INOUT_01]: has output") else digiline_send(event.channel,"![INOUT_01]: nil") end end end
if event.msg == "inout_01 /on" then port.a = true end
if event.msg == "inout_01 /off" then port.a = false end
if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input") end
if event.msg == "inout_01 /check" then if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input = true") else digiline_send(event.channel,"![INOUT_01]: input = false") end end

Uh, at least use new lines:
Code: Select all
if event.msg == "inout_01 /status" then
if pin.a == true then
digiline_send(event.channel,"![INOUT_01]:has input")
else
if port.b == true then
digiline_send(event.channel,"![INOUT_01]: has output")
else
digiline_send(event.channel,"![INOUT_01]: nil")
end
end
end

if event.msg == "inout_01 /on" then port.a = true end
if event.msg == "inout_01 /off" then port.a = false end
if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input") end

if event.msg == "inout_01 /check" then
if pin.a == true then
digiline_send(event.channel,"![INOUT_01]: input = true")
else
digiline_send(event.channel,"![INOUT_01]: input = false")
end
end

if pin.a == true then digiline_send(event.channel,"![INOUT_01]: input") end sends a digiline message on every event with pin.a == true. If you have now another device that always sends a digiline message back, there are very many messages in a short time and the luacontroller overheats (it gets red).
To avoid this, you might want to check the value of event.type.

Something else:
Don't do something like if pin.a == true then, do instead if pin.a then. pin.a == true gives you true or false but pin.a is already true or false. Such a == true is redundant.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Isja Krass
Member
 
Posts: 43
Joined: Sat Aug 18, 2018 19:30
Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
In-game: init.lua
 

Previous

Return to Mod Releases



Who is online

Users browsing this forum: Bing [Bot] and 3 guests