♻️ refactor: remove redundant brackets and indents

main
_ 2021-10-29 11:48:20 -05:00
parent cfc5785995
commit d4847f2239
1 changed files with 84 additions and 94 deletions

View File

@ -329,15 +329,14 @@ impl State {
output
}
Look (item_name) => {
match item_name {
Look (item_name) => match item_name {
ItemName::Door => {
self.room_1.detected_keypad = true;
just (line_response ("You examine the DOOR. It is firmly locked, and you don't have any lock-picking tools. On the DOOR is an electronic KEYPAD."))
},
ItemName::EmergencyExit => {
just (line_response ("The EMERGENCY EXIT reads, \"Emergency exit. Push bar to open. Alarm will sound. Door will unlock in 10 seconds.\". The EMERGENCY EXIT is period-accurate for an American Wal-Mart c. 2020 C.E."))
},
ItemName::EmergencyExit => just (line_response (
"The EMERGENCY EXIT reads, \"Emergency exit. Push bar to open. Alarm will sound. Door will unlock in 10 seconds.\". The EMERGENCY EXIT is period-accurate for an American Wal-Mart c. 2020 C.E."
)),
ItemName::Keypad => {
require_detection! (self.room_1.detected_keypad);
@ -369,13 +368,9 @@ impl State {
self.room_1.detected_note = true;
just (line_response ("You look at the TABLE. Your instincts tell you that it is period-accurate. Upon the TABLE sits a NOTE."))
},
_ => {
just (undetected_item ())
_ => just (undetected_item ()),
},
}
},
Use (item_name) => {
match item_name {
Use (item_name) => match item_name {
ItemName::Door => {
let mut output = vec! [
line_response ("You can't USE the DOOR, it is locked."),
@ -388,8 +383,7 @@ impl State {
output
},
ItemName::EmergencyExit => {
vec! [
ItemName::EmergencyExit => vec! [
line_response ("You push on the emergency exit. An alarm starts sounding. Your ADVENTURE GAME ENTHUSIAST friend is going to be very mad at you."),
Response::Sleep (5000),
line_response ("The alarm is still sounding. You are getting embarrassed, but you have committed to this path of action."),
@ -397,8 +391,7 @@ impl State {
line_response ("The emergency exit unlocks, and you walk out of the game. Bye."),
Response::JokeEnding,
Response::Quit,
]
},
],
ItemName::Keypad => {
require_detection! (self.room_1.detected_keypad);
@ -417,13 +410,10 @@ impl State {
just (line_response ("You can't think of any way to USE the NOTE that would be better than LOOKing at it to read it."))
},
ItemName::Table => {
just (line_response ("You can't think of any way to USE the TABLE that would be better than LOOKing at it."))
},
_ => {
just (undetected_item ())
},
}
ItemName::Table => just (line_response (
"You can't think of any way to USE the TABLE that would be better than LOOKing at it."
)),
_ => just (undetected_item ()),
},
}
}