Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form: Update Base #57

Closed
Lenni009 opened this issue Mar 30, 2024 · 2 comments
Closed

Form: Update Base #57

Lenni009 opened this issue Mar 30, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Lenni009
Copy link
Member

Editable fields:

  • Everything buildable
    • Name
    • Image
    • Type
    • Arena
    • Exocraft
    • Landingpad, etc.
    • Layout
    • Features
    • Additional info
  • User specific fields
    • Username -> synced with Builder
    • If Builder is null, show Builderlink
    • Discord name
    • Friend Code
    • Social Media links, etc.

Unchangeable fields:

  • Everything related to location
    • Glyphs, Coords
    • Geo Coords
    • Planet, System, Region, Galaxy
    • Civilized
    • Mode
    • Platform
@Lenni009 Lenni009 added this to the Release milestone Mar 30, 2024
@Lenni009 Lenni009 added the enhancement New feature or request label Mar 30, 2024
@Lenni009 Lenni009 mentioned this issue Mar 30, 2024
Closed
@Lenni009
Copy link
Member Author

Method for getting all the infobox content (some is not saved in cargo):

https://nomanssky.fandom.com/api.php?action=parse&format=json&origin=*&page=Eisvana%20Research%20Outpost&prop=sections%7Cwikitext&section=0

returns

{
    "parse": {
        "title": "Eisvana Research Outpost",
        "pageid": 546876,
        "sections": [],
        "wikitext": {
            "*": "{{Version|Echoes}}\n{{Eisvana}}\n{{Base infobox\n| name = Eisvana Research Outpost\n| image = 20230928192154_1.jpg\n| civilized = Eisvana\n| researchteam = Eisvana Wiki Scholars\n| builderlink = Lenni009\n| builder =\n| galaxy = Eissentam\n| region = Uskabar\n| system = EV6-30 Cadiaue-Omf\n| planet = Sidenh Alpha\n| moon =\n| axes = -11.28, +95.92\n| coordinates = {{Glyphs2Coords|6030A21107FE}}\n| portalglyphs = 6030A21107FE\n| type = Residential\n| mode = Permadeath\n| platform = PC\n| release = Echoes\n| farm = No\n| geobay = No\n| landingpad = Yes\n| arena = No\n| terminal = Yes\n| racetrack = No\n| censusplayer = Lenni\n| censusreddit = Lenni009\n| censusdiscord = lenni009\n| censusfriend =\n| censusarrival = 2023/09/25\n| censusrenewal = 2023, 2024\n| censusshow = Y\n}}\n'''Eisvana Research Outpost''' is a player base."
        }
    }
}

Which can then be piped into parseWikiTemplate to get an object representation of the infobox in the shape of Record<string, string>

@Lenni009
Copy link
Member Author

Lenni009 commented Apr 2, 2024

Make a new component DynamicSections that checks whether there are any unexpected h2 sections, and then adds those to the editor as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant