Git Product home page Git Product logo

Comments (9)

thmsndk avatar thmsndk commented on September 18, 2024 1

Next time, i'll read the spec before asking questions then 😆

from screeps3d.

thmsndk avatar thmsndk commented on September 18, 2024

@ags131 would you expect to be able to point to a location to find this credential file, or should the user dump it into a specific directory, or how is the usage?

Also, random links for yml parsing
https://stackoverflow.com/questions/25650113/how-to-parse-a-yaml-string
https://github.com/aaubry/YamlDotNet (Available at Unity Asset Store)
https://github.com/xoofx/SharpYaml

from screeps3d.

AlinaNova21 avatar AlinaNova21 commented on September 18, 2024

Hence the spec, it has a list of locations to find the file in ;)

from screeps3d.

AlinaNova21 avatar AlinaNova21 commented on September 18, 2024
  • Env Variable ($SCREEPS_CONFIG)
  • Project Root (Optional) - (project/.screeps.yaml)
  • Current Working Directory - (./.screeps.yaml)
  • XDG Config Directory - ($XDG_CONFIG_HOME/screeps/config.yaml)
  • XDG Config Default Directory - ($HOME/.config/screeps/config.yaml)
  • APPDATA (Windows Only) - (%APPDATA%/screeps/config.yaml)
  • Home Directory - (~/.screeps.yaml)

from screeps3d.

thmsndk avatar thmsndk commented on September 18, 2024

This Unity Asset mentioned in the last comment
https://assetstore.unity.com/packages/tools/integration/yamldotnet-for-unity-36292
seems to have all the bells and whistles we need :)

@ags131 i'm not sure what $XDG_CONFIG_HOME is, is that something linux specific? or an environmentvariable, we gotta remember MAC aswell 🤔

from screeps3d.

AlinaNova21 avatar AlinaNova21 commented on September 18, 2024

$XDG_CONFIG_HOME is an environment variable in linux, although I think it exists for some mac setups too
All variables prefixed with $ like $HOME are environment variables, its the linux/mac way of denoting them. (While windows does %APPDATA%)

Some more reference data:
go-screeps config structure: https://github.com/screepers/go-screeps/blob/master/config/config.go
go-screeps loader: https://github.com/screepers/go-screeps/blob/master/config/loader.go
screeps-api fromConfig: https://github.com/screepers/node-screeps-api/blob/master/src/ScreepsAPI.js#L18-L66

from screeps3d.

thmsndk avatar thmsndk commented on September 18, 2024

Can probably use this to get environment variables, would have to test it I guess 🤔
https://docs.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?redirectedfrom=MSDN&view=netframework-4.8#System_Environment_GetEnvironmentVariable_System_String_

from screeps3d.

thmsndk avatar thmsndk commented on September 18, 2024

<@UK28UEQ22> Leave the $ out when getting the variables, the $ is linux/bash specific syntax https://github.com/thmsndk/Screeps3D/blob/develop/Assets/Scripts/Screeps_API/ServerListProviders/SS3UCFServerListProvider.cs#L135-L140
View in Slack

from screeps3d.

thmsndk avatar thmsndk commented on September 18, 2024

Yep! You don't support .yml 😛
View in Slack

from screeps3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.