Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/sprites/structures/crafter.aseprite
Git LFS file not shown
4 changes: 2 additions & 2 deletions assets/sprites/structures/harvester.aseprite
Git LFS file not shown
3 changes: 0 additions & 3 deletions assets/sprites/structures/harvester_default.png

This file was deleted.

3 changes: 3 additions & 0 deletions assets/sprites/structures/harvester_fauna.aseprite
Git LFS file not shown
3 changes: 0 additions & 3 deletions assets/sprites/structures/harvester_fauna.png

This file was deleted.

3 changes: 3 additions & 0 deletions assets/sprites/structures/harvester_flora.aseprite
Git LFS file not shown
3 changes: 0 additions & 3 deletions assets/sprites/structures/harvester_flora.png

This file was deleted.

3 changes: 3 additions & 0 deletions assets/sprites/structures/harvester_minerale.aseprite
Git LFS file not shown
3 changes: 0 additions & 3 deletions assets/sprites/structures/harvester_minerale.png

This file was deleted.

4 changes: 2 additions & 2 deletions assets/tiles/grass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/gameplay/world/construction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
world::{
demolition::Demolished,
tilemap::{
TILE_SIZE, TileClicked,
TileClicked,
coord::{Coord, translation_to_coord},
},
},
Expand Down Expand Up @@ -81,7 +81,10 @@ fn spawn_preview(
Name::new("Construction Preview"),
ConstructionPreview,
Coord(IVec2::ZERO),
Sprite::from_color(Color::WHITE.with_alpha(0.5), TILE_SIZE),
Sprite {
color: Color::WHITE.with_alpha(0.5),
..default()
},
YSortSprite,
ZIndexSprite(10),
))
Expand All @@ -95,7 +98,7 @@ fn spawn_preview(
);

commands.entity(id).insert((
Anchor(Vec2::new(0.0, -0.25)),
Anchor(Vec2::new(0.0, -0.33)),
AseAnimation {
aseprite: asset_server.load(sprite_path),
animation: Animation::tag("work"),
Expand Down Expand Up @@ -170,7 +173,7 @@ fn construct(
.spawn((
Name::new(structure.name.clone()),
Coord(IVec2::new(tile_click.0.x, tile_click.0.y)),
Anchor(Vec2::new(0.0, -0.25)),
Anchor(Vec2::new(0.0, -0.33)),
Sprite::default(),
AseAnimation {
aseprite: asset_server
Expand Down
4 changes: 2 additions & 2 deletions src/gameplay/world/tilemap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub mod chunk;
pub mod coord;

pub const CHUNK_SIZE: UVec2 = UVec2 { x: 16, y: 16 };
pub const TILE_SIZE: Vec2 = Vec2 { x: 256.0, y: 128.0 };
pub const TILE_OFFSET: Vec2 = Vec2 { x: 128.0, y: 64.0 };
pub const TILE_SIZE: Vec2 = Vec2 { x: 512.0, y: 256.0 };
pub const TILE_OFFSET: Vec2 = Vec2 { x: 256.0, y: 128.0 };

pub fn plugin(app: &mut App) {
app.add_plugins((chunk::plugin, coord::plugin));
Expand Down