dungeon walls resprite, fix TOSTRING problem from C4viwlle

This commit is contained in:
Ed
2025-04-26 13:29:23 +03:00
parent 1ee7b9b76c
commit 7941be4490
25 changed files with 62 additions and 65 deletions

View File

@@ -28,17 +28,6 @@ namespace Content.Shared.Localizations
var culture = new CultureInfo(_cfg.GetCVar(CCVars.Language));
_loc.LoadCulture(culture);
_loc.AddFunction(culture, "PRESSURE", FormatPressure);
_loc.AddFunction(culture, "POWERWATTS", FormatPowerWatts);
_loc.AddFunction(culture, "POWERJOULES", FormatPowerJoules);
_loc.AddFunction(culture, "UNITS", FormatUnits);
_loc.AddFunction(culture, "TOSTRING", args => FormatToString(culture, args));
_loc.AddFunction(culture, "LOC", FormatLoc);
_loc.AddFunction(culture, "NATURALFIXED", FormatNaturalFixed);
_loc.AddFunction(culture, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(culture, "PLAYTIME", FormatPlaytime);
_loc.AddFunction(culture, "MANY", FormatMany); // TODO: Temporary fix for MANY() fluent errors. Remove after resolve errors.
/*
* The following language functions are specific to the english localization. When working on your own
@@ -51,16 +40,6 @@ namespace Content.Shared.Localizations
_loc.LoadCulture(cultureEn);
_loc.SetFallbackCluture(cultureEn); // I don't think there's any reason to change the fallback culture.
//CP14 Functions
_loc.AddFunction(cultureEn, "MAKEPLURAL", FormatMakePlural);
_loc.AddFunction(cultureEn, "MANY", FormatMany);
_loc.AddFunction(cultureEn, "NATURALFIXED", FormatNaturalFixed);
_loc.AddFunction(cultureEn, "LOC", FormatLoc);
_loc.AddFunction(cultureEn, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(cultureEn, "POWERJOULES", FormatPowerJoules);
_loc.AddFunction(cultureEn, "TOSTRING", args => FormatToString(cultureEn, args));
//CP14 Functions end
_cfg.OnValueChanged(CCVars.Language, OnCultureUpdate, true);
}
@@ -69,6 +48,19 @@ namespace Content.Shared.Localizations
var culture = new CultureInfo(value);
if (!_loc.HasCulture(culture))
_loc.LoadCulture(culture);
_loc.AddFunction(culture, "PRESSURE", FormatPressure);
_loc.AddFunction(culture, "POWERWATTS", FormatPowerWatts);
_loc.AddFunction(culture, "POWERJOULES", FormatPowerJoules);
_loc.AddFunction(culture, "UNITS", FormatUnits);
_loc.AddFunction(culture, "TOSTRING", args => FormatToString(culture, args));
_loc.AddFunction(culture, "LOC", FormatLoc);
_loc.AddFunction(culture, "NATURALFIXED", FormatNaturalFixed);
_loc.AddFunction(culture, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(culture, "PLAYTIME", FormatPlaytime);
_loc.AddFunction(culture, "MANY", FormatMany); // TODO: Temporary fix for MANY() fluent errors. Remove after resolve errors.
_loc.DefaultCulture = culture;
_loc.ReloadLocalizations();
}