Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@a-tour-ist
Copy link
Contributor

commit 1:
adding a table with color defined causes the string to start with tableoptions => formspec_elements[e] = nil => crash on L26

digiline_send("ts", {
    {
        command = "clear"
    },
    {
        command = "add",
        element = "table",
        color = "red"
    },
    {
        command = "modify",
        index = 1,
    }
})

commit 2:
setting real_coordinates once caused them to always be true in the formspec, no matter of the actual value.

mem = mem or {}
mem.real_coordinates = not mem.real_coordinates
digiline_send("ts", {
    {
        command = "clear" 
    },
    {
        command = "set", 
        real_coordinates = mem.real_coordinates
    },
    {
        command = "add",
        element = "button",
        name = "start",
        label = mem.real_coordinates and "real_coordinates=true" or "real_coordinates=false",  
        X = 0.3,  
        Y = 0.3, 
        W = 4,
        H = 4 
    },
})

commit 3:
trying to modify an item_grid caused the whole grid to disappear, except for the last item.

digiline_send("ts", {
    {
        command = "clear"
    },
    {
        command = "add",
        element = "item_grid",
        X = 0,
        Y = 0,
        W = 2,
        H = 2,
        name = "grid",
        spacing = 0,
        size = 1,
        interactable = true,
        items = {
            "default:dirt 99",
            "default:stone 42",
            "default:apple 13",
            "default:torch"
        },
        offset = 1,
    },
    {
        command = "modify",
        index= 1,
        X = 1
    },
})

modify_element_string might get a string that starts with an element unknown to formspec_elements.lua (p.ex. tableoptions)
@OgelGames OgelGames changed the title touchscreen fixes Touchscreen fixes Apr 9, 2025
@a-tour-ist a-tour-ist requested a review from OgelGames April 25, 2025 17:49
@BuckarooBanzay BuckarooBanzay added the bug Something isn't working label Aug 4, 2025
@SwissalpS
Copy link
Contributor

tested the three cases, LGTM.

@SwissalpS SwissalpS merged commit 50b35ec into mt-mods:master Oct 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants