[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]
- NetYard5
- Member
- Posts: 66
- Joined: Fri Aug 24, 2018 20:28
- GitHub: FI3Mate
- IRC: AlloyMixedSteel
- In-game: InfinityYards UltraNexo
- Location: Malaysia, Kuala Lumpur
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Okay got it, thanks.
-
- New member
- Posts: 1
- Joined: Thu Dec 13, 2018 00:45
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Yes, they do.RickSaysMeh wrote:Do Mese Blocks conduct vertically?
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.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?
This could easily be changed.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
-
- New member
- Posts: 6
- Joined: Sat Nov 24, 2018 18:45
- GitHub: tealethetoolman
- IRC: thetoolman
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.)
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.)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
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.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Can you point to any documentation/tutorial on a transmitter? Doesn't seem to be in mesecons mod pack.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.
- Hybrid Dog
- Member
- Posts: 2835
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I made a laser beam mod, where I used mesecon.receptor_on, mesecon.receptor_off and the mesecons field in the node definition.lonestar wrote:Can you point to any documentation/tutorial on a transmitter? Doesn't seem to be in mesecons mod pack.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.
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.
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
http://mesecons.net/developers.htmlHybrid Dog wrote:I haven't found a documentation of the mesecons API. Maybe it's missing.
https://github.com/minetest-mods/meseco ... lua#L1-L47 (There might be other useful code comments somewhere else.)
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Awesome mod!
by far, a great way to make machines and etc- fills a gap from minecraft!
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.
All images on this site are free to use.
-
- Member
- Posts: 46
- Joined: Sat Aug 18, 2018 19:30
- In-game: init.lua
- Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
What happened to my luacontrollers???
I only try to run this code and this is happened.
Spoiler
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) Viewed 2211 times
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Uh, at least use new lines:Isja Krass wrote:What happened to my luacontrollers???
I only try to run this code and this is happened.Spoiler
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
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
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.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
-
- Member
- Posts: 46
- Joined: Sat Aug 18, 2018 19:30
- In-game: init.lua
- Location: {X=25.25, y=-400, z=478,8} Bavaria, Germany
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
thanks for Support ;-)
-
- Member
- Posts: 3476
- Joined: Sun Jul 12, 2015 22:51
- GitHub: BBmine
- IRC: BBmine
- In-game: Baggins
- Location: USA
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I followed the guide on http://mesecons.net/uberi/projects/Clock/index.html. Only the blinking colon gets power, and the number blocks remain off.
Spoiler
- Attachments
-
- screenshot_20190722_132636.png (263.26 KiB) Viewed 2211 times
-
- screenshot_20190722_132633.png (409.4 KiB) Viewed 2211 times
-
- screenshot_20190722_132627.png (485.78 KiB) Viewed 2211 times
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I just opened a new issue on github about this: https://github.com/minetest-mods/mesecons/issues/470thetoolman wrote: 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.
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.
So the code I added in mesecons_luacontroller/init.lua looks like this
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.Code: Select all
local env = { ... string = { ... split = string.split, ... } .... }
However, the message parameter sent by the digilines chest is a table.
https://github.com/minetest-mods/digili ... ry.lua#L10
Code: Select all
local msg = {
action = action,
stack = stack and stack:to_table(),
from_slot = from_slot,
to_slot = to_slot,
-- Duplicate the vector in case the caller expects it not to change.
side = side and vector.new(side)
}
If the stack paramter is an itemstring (ie "default:dirt 5"), then string.split would be required.
However, it might be possible to access the various table members of the stack parameter.
eg:
Code: Select all
local table = msg.stack
for i, item in ipairs(table) do
if not item then
print("[" .. i .. "] could not get item entry")
else
local name = nil
local count = nil
if item.name then
name = item.name
end
if item.count then
count = item.name
end
if name and count then
print("[" .. i .. "] name=['" .. item.name .. "'] count= ['" .. item.count .. "']")
else
if not name then
print("[" .. i .. "] could not get item name")
end
if not count then
print("[" .. i .. "] could not get item count")
end
end
end
end
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I think you have a code error (Look at the lua controllers). I have also a error in the code. I have nearly the solution.BBmine wrote:I followed the guide on http://mesecons.net/uberi/projects/Clock/index.html. Only the blinking colon gets power, and the number blocks remain off.
Spoiler
-
- Member
- Posts: 316
- Joined: Sun Feb 15, 2015 07:14
- IRC: redneonglow redblade7
- In-game: redblade7 redblade7_owner
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I have a feature request for Mesecons:
Power and blinky plants that only activate during nighttime (in-game time).
What do you think?
Power and blinky plants that only activate during nighttime (in-game time).
What do you think?
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
That could be interesting but there is already a light sensor and an rtc clock (through digilines though, not mesecons) you can already build that kind of detection if you want.
-
- Member
- Posts: 316
- Joined: Sun Feb 15, 2015 07:14
- IRC: redneonglow redblade7
- In-game: redblade7 redblade7_owner
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I'm kind of a n00b to Mesecons. How do I use the light sensor to have light stones wired to up to plants only turn on when it's dark?Yvanhoe wrote:That could be interesting but there is already a light sensor and an rtc clock (through digilines though, not mesecons) you can already build that kind of detection if you want.
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
You will probably need a luacontroller for that as well. This documentation will help: http://mesecons.net/digilines.html
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
This is like a fly on the wall with cannons ;-).
Take the solarpanel and the not-gate, that's all.
The not-gate reverses the signal, at day the solarpanel sends a signal to the not-gate,
the gate reverses the signal, the light is off.
At night, the solarpanel sends no signal to the not-gate, the gate reverses the signal, the light is on.
Greetings, Clyde.
Take the solarpanel and the not-gate, that's all.
The not-gate reverses the signal, at day the solarpanel sends a signal to the not-gate,
the gate reverses the signal, the light is off.
At night, the solarpanel sends no signal to the not-gate, the gate reverses the signal, the light is on.
Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152
-
- Member
- Posts: 316
- Joined: Sun Feb 15, 2015 07:14
- IRC: redneonglow redblade7
- In-game: redblade7 redblade7_owner
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
Clyde wrote:This is like a fly on the wall with cannons ;-).
Take the solarpanel and the not-gate, that's all.
The not-gate reverses the signal, at day the solarpanel sends a signal to the not-gate,
the gate reverses the signal, the light is off.
At night, the solarpanel sends no signal to the not-gate, the gate reverses the signal, the light is on.
Greetings, Clyde.
Thank you!
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
@redblade7: If you want to have a blinky plant that is only activated at night, connect the output of the not gate and a blinky plant with the inputs of an and gate. (Or don't use a not gate and instead connect a solar panel and a blinky plant with a xor gate.)
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
redblade7 wrote:I have a feature request for Mesecons:
Power and blinky plants that only activate during nighttime (in-game time).
What do you think?
That would be a quick and dirty hack to turn the blink plant on, only when the solar panel is off.Clyde wrote:This is like a fly on the wall with cannons ;-).
Take the solarpanel and the not-gate, that's all.
The not-gate reverses the signal, at day the solarpanel sends a signal to the not-gate,
the gate reverses the signal, the light is off.
At night, the solarpanel sends no signal to the not-gate, the gate reverses the signal, the light is on.
Greetings, Clyde.
If you only cared about the light-level (and not the time of day/night) then using a not-gate with the solar panel would work just fine.
However, the solar panel is also affected by artificial light sources and if enough are present to raise the level at at or above level 12, then the solar panel will be off (and this irrespective of it being day or nighttime).
Considering that the max light level is 15 and that the min threshold is 12 -- (it probably won't be dark / night-time when the solar panel is off).
To make it work properly you would have to remove all artificial light sources within a certain radius, and it is further complicated if it used inside vs outside.
Hence, this is why an rtc clock should be used with a solarpanel to be effective.
I'll describe this using pseudo-logic/algebra:
Code: Select all
// note max_level = 15
min=12 // on-off light_level threshold
L = light_level // the light-level hitting the solar panel
We can just simply to this:
solarpanel_on = (L >= min)
solarpanel_off = (L < min) = not solarpanel_on
https://github.com/minetest-mods/meseco ... it.lua#L73
https://github.com/minetest-mods/meseco ... it.lua#L88
Code: Select all
{nodenames = {"mesecons_solarpanel:solar_panel_off"},
if light >= 12 then
node.name = "mesecons_solarpanel:solar_panel_on"
{nodenames = {"mesecons_solarpanel:solar_panel_on"},
if light < 12 then
node.name = "mesecons_solarpanel:solar_panel_off"
- Tedypig
- Member
- Posts: 286
- Joined: Tue Mar 05, 2013 12:33
- IRC: Piggybear87
- In-game: Piggybear
- Location: Largo, FL, USA
Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesec
I've been gone a while, but what changed? I had an automatic farm setup I used on servers with Mesecons, and now they don't work properly. It used sticky pistons to quickly raise and lower the dirt, and then vacuum tubes to collect it all and send it to chests, and then deployers to replant. Now, none of it works, the plants just break and vanish (no drops at all (nice waste of 3 stacks of seeds)), and the deployer doesn't plant seeds/plants/whatever. Is there a way to fix this? Right now, I have hours of hard work collecting resources sitting in a hole doing nothing.
Who is online
Users browsing this forum: No registered users and 47 guests