1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use std::ops::{Deref, DerefMut};

use super::Entity;

/// An instance of a fishing hook
pub struct FishingHook {
    entity: Entity,
    /// The id of the hooked entity
    pub hooked_entity: Option<i32>,
    /// Whether it is currently catchable or not
    pub is_catchable: bool,
}
impl Deref for FishingHook {
    type Target = Entity;

    fn deref(&self) -> &Self::Target {
        &self.entity
    }
}
impl DerefMut for FishingHook {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.entity
    }
}
impl Default for FishingHook {
    fn default() -> Self {
        Self {
            entity: Entity::default(),
            hooked_entity: None,
            is_catchable: false,
        }
    }
}