From ab1793044910e6aa992cd7854d3fa8381cc07365 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 16 Feb 2024 18:24:10 -0800 Subject: [PATCH] Added outfit cost --- content/outfits.toml | 3 +++ crates/content/src/part/outfit.rs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/content/outfits.toml b/content/outfits.toml index d321f57..0f63888 100644 --- a/content/outfits.toml +++ b/content/outfits.toml @@ -1,6 +1,7 @@ [outfit."plasma engines"] name = "Plasma Engines" thumbnail = "icon::engine" +cost = 30 desc = """ This is the smallest of the plasma propulsion systems produced by @@ -21,6 +22,7 @@ steering.power = 20 [outfit."shield generator"] thumbnail = "icon::shield" name = "Shield Generator" +cost = 10 desc = """ This is the standard shield generator for fighters and interceptors, @@ -40,6 +42,7 @@ shield.delay = 2.0 [outfit."blaster"] thumbnail = "icon::blaster" name = "Blaster" +cost = 20 desc = """ Although not the most accurate or damaging of weapons, the Energy Blaster is popular because it diff --git a/crates/content/src/part/outfit.rs b/crates/content/src/part/outfit.rs index e43fc32..ad665fc 100644 --- a/crates/content/src/part/outfit.rs +++ b/crates/content/src/part/outfit.rs @@ -24,6 +24,7 @@ pub(crate) mod syntax { pub thumbnail: ContentIndex, pub name: String, pub desc: String, + pub cost: u32, pub engine: Option, pub steering: Option, pub space: outfitspace::syntax::OutfitSpace, @@ -140,6 +141,9 @@ pub struct Outfit { /// This outfit's thumbnail pub thumbnail: Arc, + /// The cost of this outfit, in credits + pub cost: u32, + /// How much space this outfit requires pub space: OutfitSpace, @@ -324,6 +328,7 @@ impl crate::Build for Outfit { let mut o = Self { index: ContentIndex::new(&outfit_name), display_name: outfit.name, + cost: outfit.cost, thumbnail, gun, desc: outfit.desc,