Spawnables now contain configuration for CollectAction outcomes

This commit is contained in:
hz
2025-06-08 21:46:01 -05:00
parent 22eb487aaa
commit 2ed8aaffc6
6 changed files with 42 additions and 4 deletions
+7
View File
@@ -0,0 +1,7 @@
namespace GameAuthApi.Models;
public class CollectOutcome
{
public string Result { get; set; }
public int SuccessRate { get; set; }
}
+5
View File
@@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace GameAuthApi.Models;
public class CreateSpawnableRequest
@@ -7,4 +9,7 @@ public class CreateSpawnableRequest
// Action players must perform to collect the item
public string CollectAction { get; set; }
// Possible outcomes of collecting the item
public List<CollectOutcome> CollectResults { get; set; } = [];
}
+4
View File
@@ -1,5 +1,6 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.Collections.Generic;
namespace GameAuthApi.Models;
@@ -14,4 +15,7 @@ public class Spawnable
// Action required by the player to collect this spawnable item
public string CollectAction { get; set; }
// Possible outcomes of collecting this item
public List<CollectOutcome> CollectResults { get; set; } = [];
}