tweaking building logic
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user