Skip to content

Commit

Permalink
Add global schema support for 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
azzyr committed Apr 26, 2023
1 parent 688a060 commit e94bcc6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Binary file modified addons/sourcemod/plugins/TF2Classic-SchemaDownloader.smx
Binary file not shown.
19 changes: 17 additions & 2 deletions addons/sourcemod/scripting/TF2Classic-SchemaDownloader.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public Plugin myinfo =
{
name = "TF2Classic Schema Downloader",
author = "azzy",
version = "1.2"
version = "1.3"
}

Handle UseValveFs;
Expand All @@ -30,19 +30,34 @@ public void OnMapStart()
{
Load(ItemSchemaPath);
PrintToServer("[TF2Classic Schema Downloader] Item Schema for map %s added to Downloads Table", MapName);
}
else if(FileExists("maps/custom_items_game.txt", GetConVarBool(UseValveFs), NULL_STRING))
{
Load("maps/custom_items_game.txt");
PrintToServer("[TF2Classic Schema Downloader] Global Item Schema added to Downloads Table", MapName);
}

if(FileExists(SoundScriptPath, GetConVarBool(UseValveFs), NULL_STRING))
{
Load(SoundScriptPath);
PrintToServer("[TF2Classic Schema Downloader] Sound Script for map %s added to Downloads Table", MapName);
}
}
else if(FileExists("maps/custom_level_sounds.txt", GetConVarBool(UseValveFs), NULL_STRING))
{
Load("maps/custom_level_sounds.txt");
PrintToServer("[TF2Classic Schema Downloader] Global Sound Script added to Downloads Table", MapName);
}

if(FileExists(ParticleScriptPath, GetConVarBool(UseValveFs), NULL_STRING))
{
Load(ParticleScriptPath);
PrintToServer("[TF2Classic Schema Downloader] Particle Script for map %s added to Downloads Table", MapName);
}
else if(FileExists("maps/custom_particles.txt", GetConVarBool(UseValveFs), NULL_STRING))
{
Load("maps/custom_particles.txt");
PrintToServer("[TF2Classic Schema Downloader] Global Particle Script added to Downloads Table", MapName);
}
}

void Load(const char[] path)
Expand Down

0 comments on commit e94bcc6

Please sign in to comment.