mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
make minimum spawn amount higher than 0
This commit is contained in:
parent
f726d755b7
commit
8b2b931c17
@ -217,7 +217,10 @@ fn handle_spawn(server: &mut Server, entity: EcsEntity, args: String, action: &C
|
||||
|
||||
// Make sure the amount is either not provided or a valid value
|
||||
let opt_amount: Option<u32> = if let Some(amount) = opt_amount {
|
||||
amount.parse().ok()
|
||||
match amount.parse().ok() {
|
||||
Some(x) if x == 0 => None,
|
||||
x => x
|
||||
}
|
||||
} else {
|
||||
Some(1)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user