Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 5, 2023
1 parent b03d0b5 commit ad636e1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ pub struct Upgrade {
pub name: String,
pub description: String,

// How many lines of code this upgrade costs at 1x cost scaling
pub base_cost: f64,
// The relative odds of this upgrade being offered
pub weight: f32,
// How many more copies of this upgrade can be enabled
pub remaining: usize,

pub enable: Option<SystemId>,
Expand Down Expand Up @@ -70,18 +73,15 @@ pub enum UpgradeKind {
}

fn load_upgrade_list(mut upgrade_types: ResMut<UpgradeList>) {
upgrade_types.0.extend([
// ClickToSpawn
Upgrade {
name: "TouchOfLifePlugin".to_string(),
description: "Spawns 1 entity wherever you click in the scene view.".to_string(),
upgrade_types.0.extend([Upgrade {
name: "TouchOfLifePlugin".to_string(),
description: "Spawns 1 entity wherever you click in the scene view.".to_string(),

base_cost: 10.0,
weight: 1.0,
remaining: 1,
base_cost: 10.0,
weight: 1.0,
remaining: 1,

enable: None,
update: None,
},
]);
enable: None,
update: None,
}]);
}

0 comments on commit ad636e1

Please sign in to comment.