Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous fixes #3714

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ChaosMod/Util/OptionsFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class OptionsFile

public:
OptionsFile(const char *fileName, std::vector<const char *> compatFileNames = {})
: m_FileName(fileName), m_FoundFileName(""), m_CompatFileNames(compatFileNames)
: m_FileName(fileName), m_FoundFileName(fileName), m_CompatFileNames(compatFileNames)
{
Reset();
}
Expand Down Expand Up @@ -73,7 +73,7 @@ class OptionsFile
std::ofstream file(m_FoundFileName, std::ofstream::out | std::ofstream::trunc);
if (!file)
{
LOG("Couldn't write config file " << m_FileName);
LOG("Couldn't write config file " << m_FoundFileName);
return;
}
for (auto &[key, value] : m_Options)
Expand Down
2 changes: 1 addition & 1 deletion ConfigApp/Workshop/WorkshopEditDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ string handleEffectId(string itemName)
if (file.Type == WorkshopSubmissionFileType.Sound)
{
var effectId = itemName;
if (!Effects.EffectsMap.ContainsKey(effectId))
if (!Effects.EffectsMap.ContainsKey(effectId) && itemName.Length > 4)
effectId = itemName[..^4];
if (Effects.EffectsMap.ContainsKey(effectId))
itemName += $" ({Effects.EffectsMap[effectId].Name})";
Expand Down
2 changes: 1 addition & 1 deletion ConfigApp/Workshop/WorkshopSubmissionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void UpdateSearchTerms()
{
foreach (var line in File.ReadAllLines(m_FileHandler.SubmissionDirectory + file.Name))
{
var match = Regex.Match(line, @"(?:Name|ScriptId)\s*=\s*""((?:\\""|[^""])+)""");
var match = Regex.Match(line, @"(?:Name|ScriptId|EffectId)\s*=\s*""((?:\\""|[^""])+)""");
if (match.Success)
{
SearchTerms.Add(new(match.Groups[1].Value, file.Name));
Expand Down