pub struct AddResourceCommand {
pub player_id: PlayerID,
pub resource: u8,
pub amount: f32,
}
Expand description
Add resources to a player’s stockpile.
Typically used for cheats.
Fields§
§player_id: PlayerID
The player this command applies to.
resource: u8
The resource to add.
amount: f32
The amount to add to this resource. May be negative for subtracting.
Implementations§
Trait Implementations§
Source§impl Clone for AddResourceCommand
impl Clone for AddResourceCommand
Source§fn clone(&self) -> AddResourceCommand
fn clone(&self) -> AddResourceCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AddResourceCommand
impl Debug for AddResourceCommand
Source§impl Default for AddResourceCommand
impl Default for AddResourceCommand
Source§fn default() -> AddResourceCommand
fn default() -> AddResourceCommand
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AddResourceCommand
impl RefUnwindSafe for AddResourceCommand
impl Send for AddResourceCommand
impl Sync for AddResourceCommand
impl Unpin for AddResourceCommand
impl UnwindSafe for AddResourceCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more