Browse Source

add mag colors

pbs
Andy Newjack 4 years ago
committed by jake
parent
commit
ff2ae85299
  1. 8
      src/entity/item/mag.rs
  2. 1
      src/login/character.rs
  3. 1
      src/ship/drops/rare_drop_table.rs

8
src/entity/item/mag.rs

@ -184,7 +184,7 @@ pub struct Mag {
pub synchro: u8,
pub iq: u8,
pub photon_blast: [Option<PhotonBlast>; 3],
// color
pub color: u8,
}
@ -197,10 +197,10 @@ impl Mag {
result[6..8].copy_from_slice(&self.pow.to_le_bytes());
result[8..10].copy_from_slice(&self.dex.to_le_bytes());
result[10..12].copy_from_slice(&self.mnd.to_le_bytes());
//result[12] = color
result[14] = self.photon_blast_count();
result[13] = self.iq;
result[12] = self.synchro;
result[13] = self.iq;
result[14] = self.photon_blast_count();
result[15] = self.color;
result
}

1
src/login/character.rs

@ -250,6 +250,7 @@ fn new_character<EG: EntityGateway>(entity_gateway: &mut EG, user: &UserAccountE
synchro: 20,
iq: 0,
photon_blast: [None; 3],
color: character.appearance.costume as u8,
}),
location: ItemLocation::Inventory {
character_id: character.id,

1
src/ship/drops/rare_drop_table.rs

@ -143,6 +143,7 @@ impl RareDropTable {
iq: 0,
synchro: 20,
photon_blast: [None; 3],
color: rng.gen_range(0, 18),
})
}
}

Loading…
Cancel
Save