Skip to content

Commit

Permalink
Remove obsolete usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Aug 8, 2024
1 parent 9df15e5 commit 59ebba7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion lang/Jailbreak.English/SpecialDay/GunDayLocale.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.SpecialDay;

namespace Jailbreak.English.SpecialDay;
Expand Down
1 change: 0 additions & 1 deletion lang/Jailbreak.English/SpecialDay/SDLocale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Jailbreak.Formatting.Core;
using Jailbreak.Formatting.Logistics;
using Jailbreak.Formatting.Objects;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.SpecialDay;

namespace Jailbreak.English.SpecialDay;
Expand Down
1 change: 0 additions & 1 deletion lang/Jailbreak.English/SpecialDay/SoloDayLocale.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.SpecialDay;
using Jailbreak.Public.Utils;

Expand Down
1 change: 0 additions & 1 deletion lang/Jailbreak.English/SpecialDay/SpeedrunDayLocale.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.SpecialDay;

namespace Jailbreak.English.SpecialDay;
Expand Down
1 change: 0 additions & 1 deletion lang/Jailbreak.English/SpecialDay/TeamDayLocale.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using CounterStrikeSharp.API.Modules.Utils;
using Jailbreak.Formatting.Base;
using Jailbreak.Formatting.Views;
using Jailbreak.Formatting.Views.SpecialDay;
using Jailbreak.Public.Utils;

Expand Down
14 changes: 6 additions & 8 deletions mod/Jailbreak.Debug/Subcommands/DebugZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void OnCommand(CCSPlayerController? executor,
specifiedType = success;
}

string? map = Server.MapName;
string map = Server.MapName;
switch (info.GetArg(1).ToLower()) {
case "finish":
case "done":
Expand Down Expand Up @@ -77,7 +77,7 @@ public override void OnCommand(CCSPlayerController? executor,
var zoneCount = 0;
foreach (var type in Enum.GetValues<ZoneType>()) {
if (specifiedType != null && type != specifiedType) continue;
var displayZones = zoneManager.GetZones(Server.MapName, type)
var displayZones = zoneManager.GetZones(map, type)
.GetAwaiter()
.GetResult();
foreach (var z in displayZones) z.Draw(plugin, type.GetColor(), 120);
Expand All @@ -102,7 +102,6 @@ public override void OnCommand(CCSPlayerController? executor,
case "delete":
var toDelete = getUniqueZone(executor, specifiedType);
if (toDelete == null) return;
map = Server.MapName;
Server.NextFrameAsync(async () => {
await zoneManager.DeleteZone(toDelete.Value.Item1.Id, map);
Server.NextFrame(() => {
Expand All @@ -116,9 +115,8 @@ public override void OnCommand(CCSPlayerController? executor,
if (innerPair == null) return;
var innerZone = innerPair.Value.Item1;
innerZone.AddPoint(position);
map = Server.MapName;
Server.NextFrameAsync(async () => {
await zoneManager.DeleteZone(innerZone.Id);
await zoneManager.DeleteZone(innerZone.Id, map);
await zoneManager.PushZoneWithID(innerZone, innerPair.Value.Item2,
map);
Server.NextFrame(() => {
Expand Down Expand Up @@ -159,7 +157,7 @@ await zoneManager.PushZoneWithID(innerZone, innerPair.Value.Item2,
return;
}

var toList = zoneManager.GetZones(Server.MapName, specifiedType.Value)
var toList = zoneManager.GetZones(map, specifiedType.Value)
.GetAwaiter()
.GetResult();
foreach (var listZone in toList)
Expand All @@ -169,7 +167,7 @@ await zoneManager.PushZoneWithID(innerZone, innerPair.Value.Item2,
case "cleanup":
// Cleanup auto-generated zones
// Remove spawns that are inside of any DO NOT TELEPORT zones
var spawns = zoneManager.GetZones(Server.MapName, ZoneType.SPAWN_AUTO)
var spawns = zoneManager.GetZones(map, ZoneType.SPAWN_AUTO)
.GetAwaiter()
.GetResult();
if (spawns.Count == 0) {
Expand All @@ -193,7 +191,7 @@ await zoneManager.PushZoneWithID(innerZone, innerPair.Value.Item2,
+ " auto-generated zones");
Server.NextFrameAsync(async () => {
foreach (var z in toRemove)
await zoneManager.DeleteZone(z.Id, Server.MapName);
await zoneManager.DeleteZone(z.Id, map);
});
return;
}
Expand Down

0 comments on commit 59ebba7

Please sign in to comment.