atagen

jelq

public

an http based roguelike rpg about jelqing

Star0
Watch0
72cdd1267600b80b912d1e1225c422211b490326
1
ssh://brewery@pls.lobotomise.me:33/atagen/jelq.git
src/game/notice.rsRust54 lines2.3 KB
1
use super::Floor;
2
3
/// Something that happened alongside the turn, which rides on the response as a `Warning`.
4
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
5
pub enum Notice {
6
    BrotherTriedTheDoor,
7
    GymStaffLeaveIt,
8
    HousekeepingReadTheSign,
9
    StopRaidingTheKitchen,
10
    StopRaidingTheFridge,
11
    KevIsTheBar,
12
    DrawerJammed,
13
    DrawerComesLoose,
14
    ThreadHasReplies,
15
    Reflection,
16
    MumAtTheDoor(&'static str),
17
    MumSatisfied(&'static str),
18
    ColdStart,
19
    RunningLong(Floor),
20
    LastTurn,
21
    SkinGivingWay,
22
    BurnSoothed,
23
}
24
25
impl Notice {
26
    pub fn text(self) -> &'static str {
27
        match self {
28
            Self::BrotherTriedTheDoor => "your brother tried the door",
29
            Self::GymStaffLeaveIt => "the gym staff have seen worse, and they leave it there",
30
            Self::HousekeepingReadTheSign => "housekeeping read the sign",
31
            Self::StopRaidingTheKitchen => "Stop raiding the kitchen.",
32
            Self::StopRaidingTheFridge => "Stop raiding the fridge.",
33
            Self::KevIsTheBar => "Kev is 8 inches, he says. Nobody asked you, which is worse.",
34
            Self::DrawerJammed => "The drawer has jammed.",
35
            Self::DrawerComesLoose => "The drawer comes loose. That took a while.",
36
            Self::ThreadHasReplies => "Somewhere, a forum thread from 2009 still has replies.",
37
            Self::Reflection => "the count reached ten, and then the reflection started",
38
            Self::MumAtTheDoor(arrival) => arrival,
39
            Self::MumSatisfied(parting) => parting,
40
            Self::ColdStart => "Cold start. The server has noted this.",
41
            Self::RunningLong(floor) => match floor {
42
                Floor::Bedroom => "Mum is coming up the stairs.",
43
                Floor::Bathroom => "Your brother has gone to get Mum.",
44
                Floor::ChangingRoom => "The gym closes in ten minutes.",
45
                Floor::Nans => "Dinner is nearly ready. Somebody has been sent to find you.",
46
                Floor::Hotel => "Checkout was at eleven. Housekeeping has a master key.",
47
                Floor::Forum | Floor::Clinic => "The floor is running long.",
48
            },
49
            Self::LastTurn => "This is the last turn on this floor. Leave now or be found.",
50
            Self::SkinGivingWay => "the skin is giving way",
51
            Self::BurnSoothed => "the lotion has soothed the friction burn",
52
        }
53
    }
54
}