Skip to content

Commit

Permalink
Version 1.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Mentrillum committed Nov 9, 2022
1 parent 9df7f42 commit 7e253ce
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,53 @@ static void RewriteConfig(string fileName)
text = text.Replace("\"sound_player_death\"", "\"sound_player_deathcam\"");

text = text.Replace("\"sound_player_death_all\"", "\"sound_player_deathcam_all\"");

text = text.Replace("\"engine_sound\"", "\"constant_sound\"");

text = text.Replace("\"engine_sound_level\"", "\"constant_sound_level\"");

text = text.Replace("\"engine_sound_volume\"", "\"constant_sound_volume\"");

text = ReplaceDifficultyKeyValue(text, "search_range", "search_view_distance");

text = ReplaceDifficultyKeyValue(text, "search_sound_range", "hearing_range");

text = ReplaceDifficultyKeyValue(text, "search_alert_gracetime", "alert_gracetime");

text = ReplaceDifficultyKeyValue(text, "search_chase_duration", "chase_duration");

text = ReplaceDifficultyKeyValue(text, "search_chase_duration_add_visible_min", "chase_duration_add_visible_min");

text = ReplaceDifficultyKeyValue(text, "search_chase_duration_add_visible_max", "chase_duration_add_visible_max");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_init", "chase_persistency_time_init");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_init_attack", "chase_persistency_time_init_attack");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_attack", "chase_persistency_time_add_attack");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_init_newtarget", "chase_persistency_time_init_newtarget");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_newtarget", "chase_persistency_time_add_newtarget");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_visible_min", "chase_persistency_time_add_visible_min");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_visible_min", "chase_persistency_time_add_visible_min");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_visible_max", "chase_persistency_time_add_visible_max");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_init_stun", "chase_persistency_time_init_stun");

text = ReplaceDifficultyKeyValue(text, "search_chase_persistency_time_add_stun", "chase_persistency_time_add_stun");

text = ReplaceDifficultyKeyValue(text, "search_wander_range_min", "wander_range_min");

text = ReplaceDifficultyKeyValue(text, "search_wander_range_max", "wander_range_max");

text = ReplaceDifficultyKeyValue(text, "search_wander_time_min", "wander_time_min");

text = ReplaceDifficultyKeyValue(text, "search_wander_time_max", "wander_time_max");

File.WriteAllText(fileName, text);

ReplaceAnimationNames(fileName, text, "animation_idle");
Expand Down
17 changes: 17 additions & 0 deletions scripting/Stocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,23 @@ public static void ReplaceAnimationNames(string fileName, string text, string ke
File.WriteAllText(fileName, text);
}

public static string ReplaceDifficultyKeyValue(string text, string keyValue, string newKeyValue)
{
text = text.Replace("\"" + keyValue + "\"", "\"" + newKeyValue + "\"");

text = text.Replace("\"" + keyValue + "_easy\"", "\"" + newKeyValue + "_easy\"");

text = text.Replace("\"" + keyValue + "_hard\"", "\"" + newKeyValue + "_hard\"");

text = text.Replace("\"" + keyValue + "_insane\"", "\"" + newKeyValue + "_insane\"");

text = text.Replace("\"" + keyValue + "_nightmare\"", "\"" + newKeyValue + "_nightmare\"");

text = text.Replace("\"" + keyValue + "_apollyon\"", "\"" + newKeyValue + "_apollyon\"");

return text;
}

public static void RewriteMultiSoundSections(string baseKeyName, string fileName, List<string> line, List<string> floatSoundParams, List<int> intSoundParams, KeyValues kv)
{
floatSoundParams.Clear();
Expand Down

0 comments on commit 7e253ce

Please sign in to comment.