Linted class

This commit is contained in:
Chomp
2025-01-24 09:51:43 +00:00
parent b9f073f99e
commit ac2c4a2129
+6 -9
View File
@@ -11,22 +11,18 @@ public class OpenZoneService(
DatabaseService _databaseService,
LocalisationService _localisationService,
ConfigServer _configServer
)
)
{
protected LocationConfig _locationConfig = _configServer.GetConfig<LocationConfig>();
/// <summary>
/// Add open zone to specified map
/// Add open zone to specified map
/// </summary>
/// <param name="locationId">map location (e.g. factory4_day)</param>
/// <param name="zoneToAdd">zone to add</param>
public void AddZoneToMap(string locationId, string zoneToAdd)
{
var location = _locationConfig.OpenZones[locationId];
if (location is null)
{
_locationConfig.OpenZones[locationId] = [];
}
_locationConfig.OpenZones.TryAdd(locationId, []);
if (!_locationConfig.OpenZones[locationId].Contains(zoneToAdd))
{
@@ -35,12 +31,13 @@ public class OpenZoneService(
}
/// <summary>
/// Add open zones to all maps found in config/location.json to db
/// Add open zones to all maps found in config/location.json to db
/// </summary>
public void ApplyZoneChangesToAllMaps()
{
var dbLocations = _databaseService.GetLocations().GetDictionary();
foreach (var mapKvP in _locationConfig.OpenZones) {
foreach (var mapKvP in _locationConfig.OpenZones)
{
if (!dbLocations.ContainsKey(mapKvP.Key))
{
_logger.Error(_localisationService.GetText("openzone-unable_to_find_map", mapKvP));