Posts by FriedEngineer

    FriedEngineer added a new file:

    The trader image cannot be found when the backend server is run on Linux (in https://github.com/zhliau/fika-spt-server-docker for example). Here's the error:

    Code
    [Client Request] 1.1.1.1 \files\trader\avatar\giftsarchive.jpg
    Error: ENOENT: no such file or directory, open 'user/mods/./res/archive.jpg'


    The crux of the error is a fundamental difference with how the `.split` method works in Linux vs Windows. A simple fix is to load the mod name directly from the package.json by changing

    Code
    this.mod = this.modName;

    to

    Code
    this.mod = `${require("../package.json").name}`;

    (and you could just get rid of the the modName variable entirely at that point)


    I did a deep dive into this same `split` issue in my comment here, and provided some other potential fixes.

    FriedEngineer added a new file:

    FriedEngineer added a new version:

    Quote

    Update for 3.11


    No functionality change.

    Changes

    • Reduce default max backup files per profile to 20
    • Swap VFS for FileSystemSync (required by 3.11) and simplify FileSystem calls
    • Check for headless_ instead of dedicated_ profiles to ignore (required for 3.11 compatible Fika)

    FriedEngineer added a new file: