tweaking building logic

This commit is contained in:
hz
2026-05-18 21:21:34 -05:00
parent 984a82bf48
commit 973eda5b44
4 changed files with 94 additions and 9 deletions
+2 -1
View File
@@ -43,7 +43,8 @@ unclaimed visible location consumes one completed Scout.
Buildings are stored on location records. The first building type is `LogCamp`,
which can be built on controlled Forest territory, takes 60 seconds to build,
and adds 5 wood per minute to the owning player's resource generation after it
finishes.
finishes. Each location has one building slot; a building under construction
occupies that slot.
Timer settings are stored in the MongoDB `GameSettings` collection and are
seeded on first read:
@@ -137,7 +137,7 @@ public class LocationService
if (!string.IsNullOrWhiteSpace(location.BuildingType))
{
throw new InvalidOperationException("This location already has a building.");
throw new InvalidOperationException("This location already has a building or construction in progress.");
}
if (!string.Equals(location.Terrain, "Forest", StringComparison.OrdinalIgnoreCase))
@@ -166,7 +166,7 @@ public class LocationService
if (updated is null)
{
throw new InvalidOperationException("This location already has a building.");
throw new InvalidOperationException("This location already has a building or construction in progress.");
}
return updated;