Skip to content

Commit

Permalink
Adjust 1-bit colors
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 10, 2023
1 parent 8973547 commit 4d5e4e5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
Binary file modified assets/image/entity/1-bit/Clothing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/entity/1-bit/Creatures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/entity/1-bit/Food.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/entity/1-bit/Gems-Jewels-and-Money.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/entity/1-bit/People.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/entity/1-bit/Tools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 8 additions & 11 deletions src/state/editor_screen/scene_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Plugin for SceneViewPlugin {

#[derive(Component, Reflect, Default)]
pub struct SceneView {
pub spawns_per_click: usize,
pub spawns_per_click: f64,
}

pub fn spawn_scene_view(commands: &mut Commands) -> Entity {
Expand Down Expand Up @@ -64,16 +64,13 @@ fn click_spawn(
.origin
.truncate();

for _ in 0..scene_view_query
.get(listener.target)
.unwrap()
.spawns_per_click
{
events.send(SpawnEvent {
position: world_pos,
count: 1.0,
});
}
events.send(SpawnEvent {
position: world_pos,
count: scene_view_query
.get(listener.target)
.unwrap()
.spawns_per_click,
});
}

#[derive(Resource, Reflect, Default)]
Expand Down
6 changes: 3 additions & 3 deletions src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ generate_upgrade_list!(
install: Some(
world.register_system(|mut scene_view_query: Query<&mut SceneView>| {
for mut scene_view in &mut scene_view_query {
scene_view.spawns_per_click += 1;
scene_view.spawns_per_click += 1.0;
}
}),
),
Expand All @@ -584,15 +584,15 @@ generate_upgrade_list!(

Coffee: Upgrade {
name: "Coffee".to_string(),
desc: "Doubles the number of entities spawned per click.".to_string(),
desc: "Quadruples the number of entities spawned per click.".to_string(),
tech_debt: 1.0,
base_cost: 25.0,
weight: 1.0,
remaining: 3,
install: Some(
world.register_system(|mut scene_view_query: Query<&mut SceneView>| {
for mut scene_view in &mut scene_view_query {
scene_view.spawns_per_click *= 2;
scene_view.spawns_per_click *= 4.0;
}
}),
),
Expand Down

0 comments on commit 4d5e4e5

Please sign in to comment.