View Single Post
Solokiller
Senior Member
Join Date: Sep 2015
Old 11-25-2016 , 07:30   Re: AngelScript Mod Loader
Reply With Quote #10

I've implemented a FileSystem module. This is based on the one i wrote for Sven Co-op, but i've reworked pretty much the entire thing. I fixed a few bugs and simplified some code. I had to remove the SteamPipe filesystem from it because i don't have access to that set up yet.
I'm wondering whether i should hardcode it to only work with that, or to use the one i wrote for the prototype engine to replace it if this plugin is being used for a non-Steam engine.

Currently all directories are hardcoded, but i'll be making it read from a config file so server operators can control which directories scripts can access.
You can find the current list of hardcoded directories here: https://github.com/SamVanheer/ASMod/...Module.cpp#L69

Once i can get a release set up you'll be able to get this information using the asmod_fs_dumpfilesystem console command, which writes that information to a file.

Accessible in Sven Co-op by prepending FS:: to all types, and replacing g_FileSystem with FileSystem:
Code:
    FS::File@ pFile = FileSystem.OpenFile( "scripts/plugins/temp/file.txt", FS::OpenFile::WRITE );
    
    g_Game.AlertMessage( at_console, "Opened file: %1\n", pFile !is null );
    
    if( pFile !is null )
    {
        pFile.Write( "Hello World!\n" );
    }
I think these were the 2 most requested features, so that's persistent data storage done. I also had a request to access model data, but that'll have to wait until i've made some changes to interfaces and until i can get a release set up so people can download and install this.
Solokiller is offline