use fs_homepath as default integration bus dir

This commit is contained in:
RaidMax 2023-06-11 17:29:25 -05:00
parent e2c07daece
commit 47ed505fae
3 changed files with 13 additions and 11 deletions

View File

@ -38,6 +38,8 @@ Setup()
level notify( level.notifyTypes.gameFunctionsInitialized ); level notify( level.notifyTypes.gameFunctionsInitialized );
scripts\_integration_base::_SetDvarIfUninitialized( level.commonKeys.busdir, GetDvar( "fs_homepath" ) + "userraw/" + "scriptdata" );
if ( GetDvarInt( level.commonKeys.enabled ) != 1 ) if ( GetDvarInt( level.commonKeys.enabled ) != 1 )
{ {
return; return;

View File

@ -212,7 +212,7 @@ OnBusModeRequestedCallback( event )
scripts\_integration_base::LogDebug( "Bus mode updated" ); scripts\_integration_base::LogDebug( "Bus mode updated" );
if ( GetDvar( level.commonKeys.busMode ) == "file" || GetDvar( level.commonKeys.busDir ) != "" ) if ( GetDvar( level.commonKeys.busMode ) == "file" && GetDvar( level.commonKeys.busDir ) != "" )
{ {
level.busMethods[level.commonFunctions.getInboundData] = level.overrideMethods[level.commonFunctions.getInboundData]; level.busMethods[level.commonFunctions.getInboundData] = level.overrideMethods[level.commonFunctions.getInboundData];
level.busMethods[level.commonFunctions.getOutboundData] = level.overrideMethods[level.commonFunctions.getOutboundData]; level.busMethods[level.commonFunctions.getOutboundData] = level.overrideMethods[level.commonFunctions.getOutboundData];

View File

@ -49,25 +49,25 @@ Setup()
level.overrideMethods[level.commonFunctions.getOutboundData] = ::GetOutboundData; level.overrideMethods[level.commonFunctions.getOutboundData] = ::GetOutboundData;
level.overrideMethods[level.commonFunctions.setInboundData] = ::SetInboundData; level.overrideMethods[level.commonFunctions.setInboundData] = ::SetInboundData;
level.overrideMethods[level.commonFunctions.setOutboundData] = ::SetOutboundData; level.overrideMethods[level.commonFunctions.setOutboundData] = ::SetOutboundData;
scripts\_integration_base::_SetDvarIfUninitialized( level.commonKeys.busdir, GetDvar("fs_homepath") ); scripts\_integration_base::_SetDvarIfUninitialized( level.commonKeys.busdir, GetDvar( "fs_homepath" ) );
} }
GetInboundData(location) GetInboundData( location )
{
return readFile( location);
}
GetOutboundData(location)
{ {
return readFile( location ); return readFile( location );
} }
SetInboundData(location, data ) GetOutboundData( location )
{
return readFile( location );
}
SetInboundData( location, data )
{ {
writeFile( location, data ); writeFile( location, data );
} }
SetOutboundData(location, data ) SetOutboundData( location, data )
{ {
writeFile(location, data ); writeFile( location, data );
} }