mt-mods / jumpdrive

Minetest jumpdrive mod
Other
9 stars 10 forks source link

Jumpdrive does not connect to digilines above or below #73

Closed OgelGames closed 4 years ago

OgelGames commented 4 years ago

Should have been fixed/added by https://github.com/mt-mods/jumpdrive/commit/95699d674d781011dc5fc8bf97feb40e517e24e6, but I tested it both locally and on pandorabox, and it still does not work. 😕

Some examples: screenshot_20200607_211331

@BuckarooBanzay @S-S-X

S-S-X commented 4 years ago

I looked at commit and it seems that it might actually work for receiving messages to jd but not for sending messages from jd. For sending every digilines.receptor_send(send_pos, digilines.rules.default, ... should be changed so that digilines.rules.default is jumpdrive.digiline_rules instead. Same goes for digilines.transmit calls if there's any, probably not.

OgelGames commented 4 years ago

Still doesn't work... I should note that it doesn't work for receiving, and I haven't tested sending. I'm using this code in luacontroller for testing:

digiline_send("jumpdrive", { command = "set", x = 1024, y = 1024, z = 2048, r = 15, formupdate = true })
S-S-X commented 4 years ago

Oh yes, now actually after last commit situation is probably that sending works but not receiving. I'm pretty sure receiving will be fixed by changing node rules in first commit:

    digiline = {
        rules = jumpdrive.digiline_rules,
        receptor = {action = function() end},
        effector = {
            action = jumpdrive.digiline_effector

to

    digiline = {
        receptor = {
            rules = jumpdrive.digiline_rules,
            action = function() end
                },
        effector = {
            rules = jumpdrive.digiline_rules,
            action = jumpdrive.digiline_effector

As digilines only look for digiline.effector.rules, digiline.receptor.rules and digiline.wire.rules but wont merge digiline.rules (which would be kinda logical thing to do but it wont do that).

OgelGames commented 4 years ago

That fixes it, thanks @S-S-X 👍

BuckarooBanzay commented 4 years ago

:facepalm: thanks @S-S-X