Skip to content

Commit

Permalink
logs for individual groups
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed Sep 5, 2023
1 parent 7af57a7 commit 12d765f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion modSettingsFramework/content/scripts/local/settings_group.ws
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ abstract class ISettingsGroup
// Corrects values to ranges specified in the xml
public function Validate(): void
{
LogChannel('ModSettingsFramework', "Validating settings for group '" + id + "'");
Parser_Validate();
}

// Reads all settings from CInGameConfigWrapper using ReadSettingValue and sets class variables
public function Read(optional config: CInGameConfigWrapper) : void
{
//TODO logs for individual groups as well
if (!config)
config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Reading settings for group '" + id + "'");
Parser_Read(config);
Validate();
}
Expand All @@ -38,6 +39,7 @@ abstract class ISettingsGroup
if (!config)
config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Writing settings for group '" + id + "'");
Validate();
Parser_Write(config);

Expand All @@ -51,6 +53,7 @@ abstract class ISettingsGroup
if (!config)
config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Resetting settings for group '" + id + "'" + " to preset " + presetIndex);
m_parentMaster.ResetSettingValues(config, id, presetIndex);
Read(config); // get preset values back from config

Expand Down
8 changes: 4 additions & 4 deletions modSettingsFramework/content/scripts/local/settings_master.ws
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class ISettingsMaster
var i, size: int;
var group: ISettingsGroup;

LogChannel('ModSettingsFramework', "Validating settings for '" + id + "'");
LogChannel('ModSettingsFramework', "Validating settings for master '" + id + "'");
size = m_groups.Size();
for(i = 0; i < size; i += 1)
{
Expand All @@ -44,7 +44,7 @@ abstract class ISettingsMaster

config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Reading settings for '" + id + "'");
LogChannel('ModSettingsFramework', "Reading settings for master '" + id + "'");
size = m_groups.Size();
for(i = 0; i < size; i += 1)
{
Expand All @@ -62,7 +62,7 @@ abstract class ISettingsMaster

config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Writing settings for '" + id + "'");
LogChannel('ModSettingsFramework', "Writing settings for master '" + id + "'");
size = m_groups.Size();
for(i = 0; i < size; i += 1)
{
Expand All @@ -82,7 +82,7 @@ abstract class ISettingsMaster

config = theGame.GetInGameConfigWrapper();

LogChannel('ModSettingsFramework', "Resetting settings to default for '" + id + "'");
LogChannel('ModSettingsFramework', "Resetting settings to default for master '" + id + "'");
size = m_groups.Size();
for(i = 0; i < size; i += 1)
{
Expand Down

0 comments on commit 12d765f

Please sign in to comment.