Implemented a property that will allow a spawnable to be acted on a variable number of times before being consumed.
This commit is contained in:
@@ -5,4 +5,7 @@ public class CreateItemRequest
|
||||
public string LocationId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
// Optional number of uses before the item is removed.
|
||||
public int UsesRemaining { get; set; } = 0;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,7 @@ public class CreateSpawnableRequest
|
||||
|
||||
// Should the spawnable be removed after a successful action?
|
||||
public bool ConsumeOnSuccess { get; set; } = false;
|
||||
|
||||
// Number of successful actions allowed before it disappears (0 for unlimited)
|
||||
public int Uses { get; set; } = 0;
|
||||
}
|
||||
|
||||
@@ -4,4 +4,7 @@ public class UpdateItemRequest
|
||||
{
|
||||
public string LocationId { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
// Adjust remaining uses for the item
|
||||
public int UsesRemaining { get; set; } = 0;
|
||||
}
|
||||
|
||||
@@ -11,4 +11,7 @@ public class UpdateSpawnableRequest
|
||||
|
||||
// Should the spawnable be removed after a successful action?
|
||||
public bool ConsumeOnSuccess { get; set; } = false;
|
||||
|
||||
// Number of successful actions allowed before it disappears (0 for unlimited)
|
||||
public int Uses { get; set; } = 0;
|
||||
}
|
||||
|
||||
@@ -13,4 +13,7 @@ public class Item
|
||||
public string LocationId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
// Remaining uses before this item disappears. 0 means unlimited.
|
||||
public int UsesRemaining { get; set; } = 0;
|
||||
}
|
||||
|
||||
@@ -21,4 +21,8 @@ public class Spawnable
|
||||
|
||||
// If true, the spawnable item is removed after a successful action
|
||||
public bool ConsumeOnSuccess { get; set; } = false;
|
||||
|
||||
// Number of times this spawnable can be successfully acted upon
|
||||
// before it is removed. A value of 0 means unlimited uses.
|
||||
public int Uses { get; set; } = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user