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

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Sat Dec 31, 2011 21:32

windows users will have to wait a little more :)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Jan 01, 2012 08:04

Question, wouldn't the drawtype 'torchlike' be better suited instead of 'raillike'? Since 'torchlike' changes depending on where it is placed on a node (sides/top/bottom)? Then you would be able to change how the mesecon looks when placed on the side (side mainly because that is your "vertical" problem)
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Sun Jan 01, 2012 08:10

I dont think it will be better. Torches are just attached to blocks, they aren't on them like redstone in minecraft.
Redstone for minetest: Mesecons (mesecons.net)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Jan 01, 2012 08:16

Okay, but would it solve your "vertical" problem though? (I am just curious since I don't know how drawtypes actually work :P)
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Sun Jan 01, 2012 08:19

Nope, It wouldnt solve it, but signs would be interesting for that.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Sun Jan 01, 2012 11:40

1. You could make lamps torchlike so that we would rotate them and attach to blocks.
2. Can you make signal pass throw wooden blocks? In minecraft, if I want to power a lamp (for example), I can attach it to a block and place a wire behind that block, so that my circuit would'n be seen. For now with mesecons I need to place a con just near the lamp in the open space. It's not so pretty.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Sun Jan 01, 2012 11:48

neko259, +1
My game: RTMG
GENTOO USER
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Sun Jan 01, 2012 11:59

@neko259:
1. I will make this as soon as it is possible to set the orientation of a node in the lua api. If I did that now, it would look ugly, because the lamp would rotate every time you turn it on/off (I had already planned that, see the textures for it in the textures folder)
2. Good Idea, should be possible as I got different mesecon rules now, I can do something like that... Maybe I'll make something like a sender block that makes current be transferred through one block.
Redstone for minetest: Mesecons (mesecons.net)
 

hmmm
Member
 
Posts: 69
Joined: Sun Aug 07, 2011 17:49

by hmmm » Mon Jan 02, 2012 03:31

Jeija wrote:I dont think it will be better. Torches are just attached to blocks, they aren't on them like redstone in minecraft.

Redstone is actually a part of the block above the one they are attached too.
Last edited by hmmm on Mon Jan 02, 2012 03:32, edited 1 time in total.
 

hmmm
Member
 
Posts: 69
Joined: Sun Aug 07, 2011 17:49

by hmmm » Mon Jan 02, 2012 03:50

I figured I'd report a bug! Ain't that just the grandest?
How To Shut Down Minetest Ingame!
1. Attach a blinky plant thingy with a mesecon thingy to a sticky piston thingy.
2. Place a Chest thingy infront of the sticky piston thingy and open the chest thingy.
3. Wait for the sticky piston to move the chest thingy (also works with furnace thingys and locked chest thingys!) with the chest thingy opened and enjoy! :)

The way I see it, you have 4 options (I personally prefer option 2):
1. Prevent sticky pistons (and also regular pistons) from moving those types of blocks.
2. Prevent sticky pistons (and also regular pistons) from moving those types of blocks while they're opened.
3. Make the chest/furnace close when it's moved.
4. Make the chest/furnace stay open even though it's moved.
 

hmmm
Member
 
Posts: 69
Joined: Sun Aug 07, 2011 17:49

by hmmm » Mon Jan 02, 2012 04:29

I just realized something pretty cool. When chests are moved, all their items are deleted. And with a button you can make an easy way to get rid of excess blocks like dirt and cobble without having to make a bunch of chests to fill them up with. So if you can fix the bug without doing option 1 or 4 (because 4 cant be done since it deletes the itmes) it would be really awesome and everyone will love this mod even more!
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Mon Jan 02, 2012 05:18

hmmm wrote:I just realized something pretty cool. When chests are moved, all their items are deleted. And with a button you can make an easy way to get rid of excess blocks like dirt and cobble without having to make a bunch of chests to fill them up with. So if you can fix the bug without doing option 1 or 4 (because 4 cant be done since it deletes the itmes) it would be really awesome and everyone will love this mod even more!


This has been known since movestones. Well, the deleting of items anyway. I don't know about the crashing, but it probably was known also.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Mon Jan 02, 2012 07:15

Thanks for filing the bug! I never tried that before!
I suppose it is not possible to fix the bug using option 1 or 4. I made a bugfix for option 1. I will release it when I also implemented this for movestones, sticky pistons and so on.
Cheers, Jeija
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Staffs
Member
 
Posts: 329
Joined: Thu Aug 04, 2011 13:16

by Staffs » Mon Jan 02, 2012 13:54

I was going to make a furnace but when i putted 2 stones like this
x-stone
0-nothing
------
|000|
|000|
|xx0|
------
I made something like a pressure pad or something whatever. My point is when i putted that thing on ground the game crashed :(
Here are the last lines of my terminal.
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
05:48:33: ACTION[ServerThread]: Staffs places material 2146 at (3,10,-23)
05:48:34: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: ...leron55-minetest-0.4/bin/../data/mods/jeija/init.lua:1730: attempt to call method 'get_objects_inside_radius' (a nil value)
05:48:34: ERROR[ServerThread]: stack traceback:

In thread aaff1b70:
/home/n/duno/bin/minetest/celeron55-minetest-0.4/src/server.cpp:113: virtual void* ServerThread::Thread(): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD a65d3b70:
#0  virtual void* EmergeThread::Thread()
#1  virtual MapBlock* ServerMap::emergeBlock(v3s16, bool): p=(3,3,0), allow_generate=0
#2  MapBlock* ServerMap::loadBlock(v3s16)
#3  void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool)
DEBUG STACK FOR THREAD aaff1b70:
#0  virtual void* ServerThread::Thread()
(Leftover data: #1  void Server::AsyncRunStep())
(Leftover data: #2  virtual void ServerEnvironment::step(float))
(Leftover data: #3  void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
(Leftover data: #4  void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
DEBUG STACK FOR THREAD acbf7b70:
#0  virtual void* MeshUpdateThread::Thread()
DEBUG STACK FOR THREAD b6934730:
#0  int main(int, char**)
#1  void ClientMap::renderMap(irr::video::IVideoDriver*, irr::s32)
(Leftover data: #2  virtual void ClientEnvironment::step(float))
(Leftover data: #3  void Client::Receive())
(Leftover data: #4  void Client::ProcessData(irr::u8*, irr::u32, irr::u16))
(Leftover data: #5  static InventoryItem* InventoryItem::deSerialize(std::istream&, IGameDef*))
zsh: abort      ./minetest
n|bin % 
I love mods :D
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon Jan 02, 2012 14:18

Staffs wrote:I was going to make a furnace but when i putted 2 stones like this
x-stone
0-nothing
------
|000|
|000|
|xx0|
------
I made something like a pressure pad or something whatever. My point is when i putted that thing on ground the game crashed :(
Here are the last lines of my terminal.
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
05:48:33: ACTION[ServerThread]: Staffs places material 2146 at (3,10,-23)
05:48:34: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: ...leron55-minetest-0.4/bin/../data/mods/jeija/init.lua:1730: attempt to call method 'get_objects_inside_radius' (a nil value)
05:48:34: ERROR[ServerThread]: stack traceback:

In thread aaff1b70:
/home/n/duno/bin/minetest/celeron55-minetest-0.4/src/server.cpp:113: virtual void* ServerThread::Thread(): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD a65d3b70:
#0  virtual void* EmergeThread::Thread()
#1  virtual MapBlock* ServerMap::emergeBlock(v3s16, bool): p=(3,3,0), allow_generate=0
#2  MapBlock* ServerMap::loadBlock(v3s16)
#3  void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool)
DEBUG STACK FOR THREAD aaff1b70:
#0  virtual void* ServerThread::Thread()
(Leftover data: #1  void Server::AsyncRunStep())
(Leftover data: #2  virtual void ServerEnvironment::step(float))
(Leftover data: #3  void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
(Leftover data: #4  void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
DEBUG STACK FOR THREAD acbf7b70:
#0  virtual void* MeshUpdateThread::Thread()
DEBUG STACK FOR THREAD b6934730:
#0  int main(int, char**)
#1  void ClientMap::renderMap(irr::video::IVideoDriver*, irr::s32)
(Leftover data: #2  virtual void ClientEnvironment::step(float))
(Leftover data: #3  void Client::Receive())
(Leftover data: #4  void Client::ProcessData(irr::u8*, irr::u32, irr::u16))
(Leftover data: #5  static InventoryItem* InventoryItem::deSerialize(std::istream&, IGameDef*))
zsh: abort      ./minetest
n|bin % 

You need to build Minetest from Source
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Staffs
Member
 
Posts: 329
Joined: Thu Aug 04, 2011 13:16

by Staffs » Mon Jan 02, 2012 16:08

I did. I guess i need new version huh ?
I love mods :D
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Mon Jan 02, 2012 16:20

Staffs wrote:I did. I guess i need new version huh ?

Yes
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Mon Jan 02, 2012 19:34

:D I have created a basic one time delay system. I'll post how-to later. I'll be working on creating a delay system that isn't one time for now.

(note: this time delay is not another mod, or a change to the mesecons, it is just a delay system using material already in the mod)
Last edited by Gatharoth on Tue Jan 03, 2012 00:15, edited 1 time in total.
 

Ushiua
New member
 
Posts: 4
Joined: Mon Jan 02, 2012 16:09

by Ushiua » Mon Jan 02, 2012 20:28

You are my god.
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Tue Jan 03, 2012 06:58

Okay found a bug, sticky movestones return to regular movestones after the first use. Well, its not a bug if that was intentional.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Jan 03, 2012 07:54

Its a bug, I may fix that. But it will take some time... I don't have that much time for mod development at the moment.
Redstone for minetest: Mesecons (mesecons.net)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Tue Jan 03, 2012 08:55

Ah, okays. Well, that's okay. I mean come on, mod development for a game that hasn't even hit alpha/beta stage yet isn't too important.

(I said alpha stage, because to "most" gaming companies, this does not have all it's intended features and systems, where as an alpha stage game will have them, but of course, they will be buggy.)
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Tue Jan 03, 2012 13:54

jeija do you mind if i use a heavily modified section of your code in one of my mods?
If you can think it, you can make it.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Jan 03, 2012 13:57

Nope! Just take it if you want. The code is under the do-what-the-f***-you-want license.
But please tell me what you needed the code for... I'm just so curious ^^.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Tue Jan 03, 2012 13:59

Jeija wrote:Nope! Just take it if you want. The code is under the do-what-the-f***-you-want license.
But please tell me what you needed the code for... I'm just so curious ^^.

i can't tell you right now..because i am going to release a HUGE mod maybe in a week or so..but trust me you will know soon :D
If you can think it, you can make it.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Jan 03, 2012 14:02

:D!!!
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Staffs
Member
 
Posts: 329
Joined: Thu Aug 04, 2011 13:16

by Staffs » Tue Jan 03, 2012 16:20

I think you should change "Object detector" crafting. Cause its SO hard to find iron :/
I love mods :D
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Tue Jan 03, 2012 16:25

Staffs wrote:I think you should change "Object detector" crafting. Cause its SO hard to find iron :/

It's a bug, not a feature. We must be patient and pray^W wait for it to be fixed.
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jan 03, 2012 17:01

I tried to make an inverter since wireless inverters were a bit cumbersome:

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
--INVERTER: add this to your init.lua file, near the bottom somewhere

minetest.register_node("jeija:mesecon_inverter_off", {
    drawtype = "raillike",
    paramtype = "light",
    is_ground_content = true,
    tile_images = {"jeija_mesecon_inverter.png"},
    inventory_image = "jeija_mesecon_inverter.png",
    material = minetest.digprop_constanttime(0.1),
    walkable = false,
    selection_box = {
        type = "fixed",
    },
})

minetest.register_node("jeija:mesecon_inverter_on", {
    drawtype = "raillike",
    paramtype = "light",
    is_ground_content = true,
    tile_images = {"jeija_mesecon_inverter.png"},
    inventory_image = "jeija_mesecon_inverter.png",
    material = minetest.digprop_constanttime(0.1),
    walkable = false,
    selection_box = {
        type = "fixed",
    },
    dug_item='node "jeija:mesecon_inverter_off" 1',
})

--mesecon:register_on_signal_on(function(pos, node)
minetest.register_on_punchnode(function(pos, node)
    if node.name=="jeija:mesecon_inverter_on" then
        minetest.env:add_node(pos, {name="jeija:mesecon_inverter_off"})
        nodeupdate(pos)
        mesecon:receptor_off(pos)
    end
end)

mesecon:register_on_signal_off(function(pos, node)
    if node.name=="jeija:mesecon_inverter_off" then
        minetest.env:add_node(pos, {name="jeija:mesecon_inverter_on"})
        nodeupdate(pos)
        mesecon:receptor_on(pos)
    end
end)

minetest.register_on_dignode(
    function(pos, oldnode, digger)
        if oldnode.name == "jeija:mesecon_inverter_on" then
            mesecon:receptor_off(pos)
        end
    end
)

mesecon:add_receptor_node("jeija:mesecon_inverter_on")
mesecon:add_receptor_node_off("jeija:mesecon_inverter_off")

minetest.register_craft({
    output = 'node "jeija:mesecon_inverter_off" 2',
    recipe = {
        {'node "jeija:mesecon_off"'},
        {'node "default:junglegrass"'},
        {'node "jeija:mesecon_off"'},
    }
})


It's not working, though - MineTest crashes due to the two signal handlers causing conflicting messages to be sent. You can see what I mean if you put in print() statement in the function bodies: "signal on signal off signal on..."

My question is, how would I write it to create a "proper" inverter? Is it possible with the current architecture? I'm new to lua and any help would be appreciated.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Jan 03, 2012 17:19

@Temperest: First of all, huge thanks for (trying to) contribute/ing to the mod!!!
I tried the same thing, and of course this bug also happened to me...
There are two ways to handle this problem:
1) Make a delay using an ABM or - much better the on_globalstep event. (Just create a timer and put timer=timer+dtime in the globalstep func). Create a like 1 second delay so that the server can't crash. Handle the turnoff/turnon after the 1 second has passed.
--> I use this method for the wireless inverters
2) Make the inverter directional. The output is always on the other side of the input. Unfortunately, you would have to get the orientation of the node for this (im not sure if this is possible at all) or save your own orientation in param2 i guess of the inverter node.

I hope you could understand me and I could help you. If not, feel free to ask again!
Cheers, Jeija
Last edited by Jeija on Tue Jan 03, 2012 17:20, edited 1 time in total.
Redstone for minetest: Mesecons (mesecons.net)
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 53 guests

cron