Updating character location based on occupied tile
Deploy Promiscuity Auth API / deploy (push) Successful in 45s
Deploy Promiscuity Character API / deploy (push) Successful in 57s
Deploy Promiscuity Locations API / deploy (push) Successful in 44s
k8s smoke test / test (push) Successful in 7s

This commit is contained in:
2026-03-13 21:34:59 -05:00
parent 6ca0f306bb
commit e79f473ce4
8 changed files with 122 additions and 14 deletions
@@ -34,6 +34,14 @@ public class CharacterStore
public async Task<Character?> GetByIdAsync(string id) =>
await _col.Find(c => c.Id == id).FirstOrDefaultAsync();
public async Task<bool> UpdateCoordAsync(string id, Coord coord)
{
var filter = Builders<Character>.Filter.Eq(c => c.Id, id);
var update = Builders<Character>.Update.Set(c => c.Coord, coord);
var result = await _col.UpdateOneAsync(filter, update);
return result.ModifiedCount > 0 || result.MatchedCount > 0;
}
public Task<List<VisibleLocation>> GetVisibleLocationsAsync(Character character)
{
return GetVisibleLocationsInternalAsync(character, ensureGenerated: false);