Added outfit cost

master
Mark 2024-02-16 18:24:10 -08:00
parent 1f2ba92bea
commit ab17930449
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
[outfit."plasma engines"] [outfit."plasma engines"]
name = "Plasma Engines" name = "Plasma Engines"
thumbnail = "icon::engine" thumbnail = "icon::engine"
cost = 30
desc = """ desc = """
This is the smallest of the plasma propulsion systems produced by This is the smallest of the plasma propulsion systems produced by
@ -21,6 +22,7 @@ steering.power = 20
[outfit."shield generator"] [outfit."shield generator"]
thumbnail = "icon::shield" thumbnail = "icon::shield"
name = "Shield Generator" name = "Shield Generator"
cost = 10
desc = """ desc = """
This is the standard shield generator for fighters and interceptors, This is the standard shield generator for fighters and interceptors,
@ -40,6 +42,7 @@ shield.delay = 2.0
[outfit."blaster"] [outfit."blaster"]
thumbnail = "icon::blaster" thumbnail = "icon::blaster"
name = "Blaster" name = "Blaster"
cost = 20
desc = """ desc = """
Although not the most accurate or damaging of weapons, the Energy Blaster is popular because it Although not the most accurate or damaging of weapons, the Energy Blaster is popular because it

View File

@ -24,6 +24,7 @@ pub(crate) mod syntax {
pub thumbnail: ContentIndex, pub thumbnail: ContentIndex,
pub name: String, pub name: String,
pub desc: String, pub desc: String,
pub cost: u32,
pub engine: Option<Engine>, pub engine: Option<Engine>,
pub steering: Option<Steering>, pub steering: Option<Steering>,
pub space: outfitspace::syntax::OutfitSpace, pub space: outfitspace::syntax::OutfitSpace,
@ -140,6 +141,9 @@ pub struct Outfit {
/// This outfit's thumbnail /// This outfit's thumbnail
pub thumbnail: Arc<Sprite>, pub thumbnail: Arc<Sprite>,
/// The cost of this outfit, in credits
pub cost: u32,
/// How much space this outfit requires /// How much space this outfit requires
pub space: OutfitSpace, pub space: OutfitSpace,
@ -324,6 +328,7 @@ impl crate::Build for Outfit {
let mut o = Self { let mut o = Self {
index: ContentIndex::new(&outfit_name), index: ContentIndex::new(&outfit_name),
display_name: outfit.name, display_name: outfit.name,
cost: outfit.cost,
thumbnail, thumbnail,
gun, gun,
desc: outfit.desc, desc: outfit.desc,