Mild refactor

This commit is contained in:
Franklin 2023-11-12 00:51:15 -04:00
parent cdf1d573cf
commit bc90efbbc4
13 changed files with 26 additions and 15 deletions

View File

@ -1,6 +1,6 @@
use bevy::prelude::*;
use crate::comps::core::any_inventory::AnyInventory;
use crate::comps::core::inventory::any_inventory::AnyInventory;
#[derive(Event)]
pub struct LootContainerEvent(pub AnyInventory);

View File

@ -1 +1,2 @@
pub mod loot_container;
pub mod loot_container;
pub mod pickup_item;

View File

@ -0,0 +1,4 @@
use bevy::prelude::*;
#[derive(Event)]
pub struct PickupItemEvent();

View File

@ -1,6 +1,8 @@
use bevy::ecs::component::SparseStorage;
use super::{item::Item, inventory_item::InventoryItem, grid::UGrid};
use crate::comps::core::{items::item::Item, grid::UGrid};
use super::inventory_item::InventoryItem;
#[allow(unused)]
#[derive(Clone)]

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use bevy::ecs::component::SparseStorage;
use super::{item::Item, grid::UGrid};
use crate::comps::core::{grid::UGrid, items::item::Item};
#[derive(Clone)]

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use bevy::{prelude::*, ecs::component::SparseStorage};
use super::item::Item;
use crate::comps::core::items::item::Item;
/// # ItemInventory
/// Specifically made to hold single items such as Guns, Pieces of armor.

View File

@ -0,0 +1,4 @@
pub mod any_inventory;
pub mod inventory_item;
pub mod item_inventory;
pub mod player_inventory;

View File

@ -1,6 +1,8 @@
use bevy::prelude::*;
use super::{item_inventory::ItemInventory, any_inventory::AnyInventory, grid::UGrid};
use crate::comps::core::grid::UGrid;
use super::{item_inventory::ItemInventory, any_inventory::AnyInventory};
#[derive(Component)]
pub struct PlayerInventory {

View File

@ -1,6 +1,7 @@
use bevy::prelude::*;
use super::grid::UGrid;
use crate::comps::core::grid::UGrid;
#[allow(unused)]
pub enum ItemType {

View File

@ -0,0 +1 @@
pub mod item;

View File

@ -2,8 +2,7 @@ use std::fmt::Display;
use bevy::prelude::Component;
use crate::comps::core::any_inventory::AnyInventory;
use crate::comps::core::inventory::any_inventory::AnyInventory;
#[allow(unused)]
#[derive(Component)]

View File

@ -1,9 +1,6 @@
pub mod controller;
pub mod markers;
pub mod any_inventory;
pub mod item;
pub mod grid;
pub mod inventory_item;
pub mod events;
pub mod item_inventory;
pub mod player_inventory;
pub mod inventory;
pub mod items;

View File

@ -1,7 +1,7 @@
use bevy::prelude::*;
use bevy_rapier3d::prelude::*;
use crate::comps::core::{any_inventory::AnyInventory, markers::interactable::Interactable, grid::UGrid};
use crate::comps::core::{markers::interactable::Interactable, grid::UGrid, inventory::any_inventory::AnyInventory};
pub fn spawn_obstacles(
mut commands: Commands,