adventureland-community / typed-adventureland

9 stars 4 forks source link

parent.X #8

Open thmsndk opened 2 years ago

thmsndk commented 2 years ago

here is what show_json(parent.X) renders for my merchant

{
    "servers": [
        {
            "name": "I",
            "region": "EU",
            "players": 61,
            "key": "EUI",
            "port": 2053,
            "addr": "eud1.adventure.land"
        },
        {
            "name": "II",
            "region": "EU",
            "players": 20,
            "key": "EUII",
            "port": 2083,
            "addr": "eud1.adventure.land"
        },
        {
            "name": "PVP",
            "region": "EU",
            "players": 2,
            "key": "EUPVP",
            "port": 2087,
            "addr": "eud1.adventure.land"
        },
        {
            "name": "I",
            "region": "US",
            "players": 22,
            "key": "USI",
            "port": 2053,
            "addr": "usd1.adventure.land"
        },
        {
            "name": "II",
            "region": "US",
            "players": 33,
            "key": "USII",
            "port": 2083,
            "addr": "usd1.adventure.land"
        },
        {
            "name": "III",
            "region": "US",
            "players": 21,
            "key": "USIII",
            "port": 2096,
            "addr": "usd1.adventure.land"
        },
        {
            "name": "PVP",
            "region": "US",
            "players": 5,
            "key": "USPVP",
            "port": 2087,
            "addr": "usd1.adventure.land"
        },
        {
            "name": "I",
            "region": "ASIA",
            "players": 26,
            "key": "ASIAI",
            "port": 8443,
            "addr": "eud1.adventure.land"
        }
    ],
    "characters": [
        {
            "x": -35,
            "y": -147,
            "map": "main",
            "in": "main",
            "name": "thmsn",
            "level": 52,
            "home": "EUI",
            "skin": "marmor12b",
            "server": "EUI",
            "secret": "....",
            "cx": {
                "hair": "hairdo520",
                "head": "fmakeup01"
            },
            "online": 270041.242,
            "type": "merchant",
            "id": "6338087933706240"
        },
        {
            "x": -310.0222172215641,
            "y": 735.724407621379,
            "map": "halloween",
            "in": "halloween",
            "name": "MoulinRouge",
            "level": 68,
            "home": "EUI",
            "skin": "sarmor1h",
            "server": "EUI",
            "secret": "....",
            "cx": {
                "hair": "hairdo210",
                "head": "fmakeup01"
            },
            "online": 259429.531,
            "type": "rogue",
            "id": "4562211757883392"
        },
        {
            "x": -310.0222172215641,
            "y": 735.724407621379,
            "map": "halloween",
            "in": "halloween",
            "name": "RedMill",
            "level": 68,
            "home": "EUI",
            "skin": "sarmor1h",
            "server": "EUI",
            "secret": "....",
            "cx": {
                "hair": "hairdo210",
                "head": "fmakeup01"
            },
            "online": 257278.22300000003,
            "type": "rogue",
            "id": "5983450292551680"
        },
        {
            "x": -310.0222172215641,
            "y": 735.724407621379,
            "map": "halloween",
            "in": "halloween",
            "name": "MoulinRogue",
            "level": 68,
            "home": "EUI",
            "skin": "sarmor1h",
            "server": "EUI",
            "secret": "....",
            "cx": {
                "hair": "hairdo210",
                "head": "fmakeup01"
            },
            "online": 255494.612,
            "type": "rogue",
            "id": "5150671636004864"
        },
        {
            "x": -952.5673699683964,
            "y": -390.9982271380575,
            "map": "desertland",
            "in": "desertland",
            "name": "Ahnaki",
            "level": 62,
            "home": "EUI",
            "skin": "mbody5e",
            "cx": {
                "head": "fmakeup01"
            },
            "online": 0,
            "type": "priest",
            "id": "5733969779228672"
        },
        {
            "x": -472.0000001,
            "y": -312.7842126638974,
            "map": "desertland",
            "in": "desertland",
            "name": "Kiahna",
            "level": 62,
            "home": "EUI",
            "skin": "mbody5f",
            "cx": {
                "head": "fmakeup01"
            },
            "online": 0,
            "type": "mage",
            "id": "6196428375851008"
        },
        {
            "x": -890.9471020142679,
            "y": -168.56558126715095,
            "map": "desertland",
            "in": "desertland",
            "name": "Nihkaa",
            "level": 60,
            "home": "EUI",
            "skin": "mbody2b",
            "cx": {
                "hair": "hairdo206",
                "head": "fmakeup01",
                "makeup": "facemakeup02"
            },
            "online": 0,
            "type": "ranger",
            "id": "4860862057152512"
        },
        {
            "x": 168,
            "y": -134,
            "map": "main",
            "in": "main",
            "name": "Kaanhi",
            "level": 1,
            "skin": "marmor6d",
            "cx": {
                "hair": "hairdo105",
                "head": "makeup117"
            },
            "online": 0,
            "type": "warrior",
            "id": "6201693059940352"
        }
    ],
    "tutorial": {
        "progress": 100,
        "step": 8,
        "task": false,
        "finished": true,
        "completed": []
    },
    "unread": 0,
    "codes": {
        "1": [
            "merchant",
            1060
        ],
        "2": [
            "priest",
            1053
        ],
        "3": [
            "mage",
            1064
        ],
        "4": [
            "ranger",
            1066
        ],
        "5": [
            "warrior",
            1063
        ],
        "6": [
            "rogue",
            92
        ],
        "6196428375851008": [
            "Kiahna",
            1
        ],
        "6338087933706240": [
            "thmsn",
            1067
        ]
    }
}
Telokis commented 1 year ago

Part of this was handled by https://github.com/adventureland-community/typed-adventureland/commit/2183fa5d4f7b01d035f6b12191b3948cf6b2a342. More specifically, the servers and characters part.

They can be seen at https://github.com/adventureland-community/typed-adventureland/blob/dev/src/window.ts#L64.

thmsndk commented 1 year ago

I guess we need to type, and make sure that properties are present on XOnlineCharacter