1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
use crate::defines::{ReeFloat, ReeInt}; pub struct Attribute { pub id: ReeInt, pub max_attr_id: Option<ReeInt>, pub default_value: Option<ReeFloat>, pub high_is_good: bool, pub stackable: bool, } impl Attribute { pub fn new( id: ReeInt, max_attr_id: Option<ReeInt>, default_value: Option<ReeFloat>, high_is_good: bool, stackable: bool, ) -> Attribute { Attribute { id, max_attr_id, default_value, high_is_good, stackable, } } }