Comments (10)
Yeah, I don't have a Factorio install on Linux so I've only tested the web API there.
Can you check which one of the paths (if any) in https://github.com/mickael9/fac/blob/401fe28d/fac/files.py#L13-L40 matches your install?
from fac-rs.
None -- the case on SteamApps
is wrong there too. I think it might be named SteamApps
on Windows and steamapps
on Linux, although I don't have a windows install near me to check.
It also looks like fac-rs doesn't search ~/.factorio
, which contains the mods/mod-list.json
and player-data.json
files.
from fac-rs.
Right, so what's the full path of your Factorio install then?
from fac-rs.
/home/nathan/.local/share/Steam/steamapps/common/Factorio
is the static files, /home/nathan/.factorio
is the per-user data
from fac-rs.
I patched it to add ~/factorio
and ~/.factorio
to the search path and fix the capitalization, but now it dies because mod_list.json
uses the string "true"
instead of the boolean true
for "enabled"
.
from fac-rs.
The true
vs "true"
is a change in 0.15 I believe. I changed it in ad35af38
from fac-rs.
I just deleted ~/.factorio
, disabled Steam Cloud Sync, and started the game, and ~/.factorio/mods/mod-list.json
was created with the contents:
{
"mods": [
{
"name": "base",
"enabled": "true"
}
]
}
One solution would be to use #[serde(deserialize_with = "path")]
to make a custom deserializer that accepts either a bool or a string, I guess.
from fac-rs.
It looks like cfg!(linux)
isn't actually a thing -- cfg!(target_os = "linux")
works, though.
from fac-rs.
deserialize_with
may not be enough, since when it writes the file back it'll write the values as booleans even if they were originally strings. Just to confirm, you're on 0.14 right? Can you check if the game is able to load mod-list.json with boolean values instead of string values?
from fac-rs.
I'm on version 0.14.23, build 25374, and it's working as far as I can tell with plain bool
. EDIT: The game does change it back to "true"
on exit, though.
from fac-rs.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fac-rs.