Keeping logic within microservice boundaries
Deploy Promiscuity Auth API / deploy (push) Successful in 45s
Deploy Promiscuity Character API / deploy (push) Successful in 57s
Deploy Promiscuity Inventory API / deploy (push) Successful in 45s
Deploy Promiscuity Locations API / deploy (push) Successful in 58s
k8s smoke test / test (push) Successful in 8s
Deploy Promiscuity Auth API / deploy (push) Successful in 45s
Deploy Promiscuity Character API / deploy (push) Successful in 57s
Deploy Promiscuity Inventory API / deploy (push) Successful in 45s
Deploy Promiscuity Locations API / deploy (push) Successful in 58s
k8s smoke test / test (push) Successful in 8s
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
[BsonIgnoreExtraElements]
|
||||
public class BiomeDefinition
|
||||
{
|
||||
[BsonId]
|
||||
[BsonElement("biomeKey")]
|
||||
public string BiomeKey { get; set; } = string.Empty;
|
||||
|
||||
[BsonElement("continuationWeight")]
|
||||
public double ContinuationWeight { get; set; }
|
||||
|
||||
[BsonElement("transitionWeights")]
|
||||
public List<BiomeTransitionWeight> TransitionWeights { get; set; } = [];
|
||||
|
||||
[BsonElement("objectSpawnRules")]
|
||||
public List<BiomeObjectSpawnRule> ObjectSpawnRules { get; set; } = [];
|
||||
|
||||
[BsonElement("updatedUtc")]
|
||||
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class BiomeObjectSpawnRule
|
||||
{
|
||||
[BsonElement("resultType")]
|
||||
public string ResultType { get; set; } = "none";
|
||||
|
||||
[BsonElement("itemKey")]
|
||||
[BsonIgnoreIfNull]
|
||||
public string? ItemKey { get; set; }
|
||||
|
||||
[BsonElement("objectKey")]
|
||||
[BsonIgnoreIfNull]
|
||||
public string? ObjectKey { get; set; }
|
||||
|
||||
[BsonElement("displayName")]
|
||||
[BsonIgnoreIfNull]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
[BsonElement("remainingQuantity")]
|
||||
public int RemainingQuantity { get; set; }
|
||||
|
||||
[BsonElement("gatherQuantity")]
|
||||
public int GatherQuantity { get; set; } = 1;
|
||||
|
||||
[BsonElement("weight")]
|
||||
public double Weight { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class BiomeTransitionWeight
|
||||
{
|
||||
[BsonElement("targetBiomeKey")]
|
||||
public string TargetBiomeKey { get; set; } = string.Empty;
|
||||
|
||||
[BsonElement("weight")]
|
||||
public double Weight { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class InternalVisibleLocationsRequest
|
||||
{
|
||||
public int X { get; set; }
|
||||
|
||||
public int Y { get; set; }
|
||||
|
||||
public int Radius { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class UpsertBiomeDefinitionRequest
|
||||
{
|
||||
public double ContinuationWeight { get; set; }
|
||||
|
||||
public List<BiomeTransitionWeight> TransitionWeights { get; set; } = [];
|
||||
|
||||
public List<BiomeObjectSpawnRule> ObjectSpawnRules { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class VisibleLocationObjectResponse
|
||||
{
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
public string ObjectType { get; set; } = string.Empty;
|
||||
|
||||
public string ObjectKey { get; set; } = string.Empty;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public VisibleLocationObjectStateResponse State { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class VisibleLocationObjectStateResponse
|
||||
{
|
||||
public string ItemKey { get; set; } = string.Empty;
|
||||
|
||||
public int RemainingQuantity { get; set; }
|
||||
|
||||
public int GatherQuantity { get; set; } = 1;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class VisibleLocationResponse
|
||||
{
|
||||
public string? Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public Coord Coord { get; set; } = new();
|
||||
|
||||
public string BiomeKey { get; set; } = "plains";
|
||||
|
||||
public VisibleLocationObjectResponse? LocationObject { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace LocationsApi.Models;
|
||||
|
||||
public class VisibleLocationWindowResponse
|
||||
{
|
||||
public int GeneratedCount { get; set; }
|
||||
|
||||
public List<VisibleLocationResponse> Locations { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user