an http based roguelike rpg about jelqing
Commit 9683736a2c5e
tarball13 files changed+116-116
@@ -23,7 +23,7 @@ pub const RUPTURE_LINE: i32 = 90;
2323
pub const RING_RUPTURE_LINE: i32 = 80;2424
pub const PREMATURE_EQ: i32 = 95;2525
pub const EQ_WOBBLE: i32 = 3;26
-pub const LOCKER_CHILL: i32 = 8;26
+pub const CHANGING_ROOM_CHILL: i32 = 8;2727
2828
pub const WARMUP_EQ: i32 = 25;2929
pub const SHOWER_EQ: i32 = 35;@@ -48,7 +48,7 @@ pub const RUPTURE_IN_BAND: u32 = 250;
4848
pub const RUPTURE_WARM: u32 = 25;4949
pub const RUPTURE_HOT: u32 = 10;5050
pub const RUPTURE_PREMATURE: u32 = 3;51
-pub const ZIPPER: u32 = 200;51
+pub const ZIP: u32 = 200;5252
pub const DEGLOVING: u32 = 60;5353
pub const DEGLOVING_INTENSITY: i32 = 8;5454
pub const WINDOW: u32 = 60;@@ -64,5 +64,5 @@ pub const HOTEL_STRESS: u32 = 3;
6464
pub const VIRAL_ERRAND: u32 = 2;6565
6666
/// Visits are (suspicion + 1) in N per turn.67
-pub const MOM_VISIT: u32 = 16;67
+pub const MUM_VISIT: u32 = 16;6868
pub const WANDERER_VISIT: u32 = 32;@@ -27,7 +27,7 @@ impl Run {
2727
let intake = Problem::new(2828
StatusCode::UNAUTHORIZED,2929
"intake",30
- "The clinic requires authorization.",30
+ "The clinic requires authorisation.",3131
);3232
let Some(authorization) = authorization else {3333
return Err(intake.header(header::WWW_AUTHENTICATE, "Bearer realm=\"clinic\""));@@ -3,7 +3,7 @@ use serde_json::{Value, json};
33
44
use super::{55
Cause, Elder, Floor, FloorState, Item, Outcome, Run,6
- balance::{FLOOR_ALLOWANCE, FLOOR_TURNS, STARTING_EQ, ZIPPER},6
+ balance::{FLOOR_ALLOWANCE, FLOOR_TURNS, STARTING_EQ, ZIP},77
round2,88
};99
use crate::problem::Problem;@@ -18,7 +18,7 @@ impl Run {
1818
self.warmed_up = false;1919
self.eq = STARTING_EQ;2020
self.suspicion = 0;21
- self.mom = None;21
+ self.mum = None;2222
if paid {2323
self.cash += FLOOR_ALLOWANCE;2424
}@@ -54,8 +54,8 @@ impl Run {
5454
}5555
_ => {}5656
}57
- if self.chance(ZIPPER) {58
- return Err(self.end(Cause::Zipper));57
+ if self.chance(ZIP) {58
+ return Err(self.end(Cause::Zip));5959
}6060
let reverted = self.here.temp_length;6161
self.next_floor(true);@@ -81,7 +81,7 @@ impl Run {
8181
"exit": { "href": self.path("/floor"), "method": "POST" },8282
});8383
match self.floor {84
- Floor::LockerRoom => {84
+ Floor::ChangingRoom => {8585
view["others"] = json!([8686
{ "name": "Greg", "self_reported_length": 9.5 },8787
{ "name": "Dmitri", "self_reported_length": 8.75 },@@ -126,7 +126,7 @@ impl Run {
126126
self.items.grant(Item::DoorLock);127127
Ok(self.found(Item::DoorLock, "A door lock. It works once."))128128
}129
- Floor::LockerRoom => {129
+ Floor::ChangingRoom => {130130
self.shame += 3;131131
Err(Problem::new(132132
StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS,@@ -134,7 +134,7 @@ impl Run {
134134
"That locker belongs to Greg. The server cannot serve this request for legal reasons.",135135
))136136
}137
- Floor::Grandmas if first => {137
+ Floor::Nans if first => {138138
self.items.grant(Item::Cage);139139
self.shame += 5;140140
Ok(self.found(@@ -142,7 +142,7 @@ impl Run {
142142
"A small box. Inside was a cage. It is now on. The key is not in the box.",143143
))144144
}145
- Floor::Grandmas if self.items.cage => {145
+ Floor::Nans if self.items.cage => {146146
self.items.grant(Item::CageKey);147147
Ok(Outcome::json(148148
StatusCode::OK,@@ -49,7 +49,7 @@ impl Run {
4949
.header(header::LOCATION, self.path("/footage")),5050
));5151
}52
- if self.floor == Floor::LockerRoom && self.chance(FRIEND) {52
+ if self.floor == Floor::ChangingRoom && self.chance(FRIEND) {5353
self.shame += 1;5454
return Err(Problem::new(5555
StatusCode::USE_PROXY,@@ -95,7 +95,7 @@ impl Run {
9595
Ok(ControlFlow::Continue(()))9696
}9797
98
- /// The enemies suspicion summons on floors without Mom.98
+ /// The enemies suspicion summons on floors without Mum.9999
pub(super) fn floor_enemy(&mut self) -> Result<(), Problem> {100100
let visits = u32::from(self.suspicion) + 1;101101
let wanders_in = matches!(self.floor, Floor::Bathroom | Floor::Hotel)@@ -111,14 +111,14 @@ impl Run {
111111
self.items.door_locks -= 1;112112
return Ok(());113113
}114
- self.here.roommate_told = true;114
+ self.here.flatmate_told = true;115115
Err(Problem::new(116116
StatusCode::CONFLICT,117
- "roommate",118
- "The roommate needs the bathroom. He will mention this to people.",117
+ "flatmate",118
+ "The flatmate needs the bathroom. He will mention this to people.",119119
))120120
}121
- Floor::LockerRoom => {121
+ Floor::ChangingRoom => {122122
self.suspicion = 0;123123
self.shame += 5;124124
self.touch();@@ -11,20 +11,20 @@ use super::{
1111
use crate::problem::Problem;1212
1313
const EXCUSES: [&str; 3] = ["changing", "homework", "pulled a muscle"];14
-const THANKSGIVING_EXCUSES: [&str; 3] = ["on a call", "folding laundry", "praying"];14
+const CHRISTMAS_EXCUSES: [&str; 3] = ["on a call", "wrapping presents", "folding the washing"];1515
const TRUTHS: [&str; 3] = ["the truth", "truth", "honesty"];1616
const TRUE_WHEN_PULLED: &str = "pulled a muscle";1717
1818
const BEDROOM_ERRANDS: [&str; 4] = [19
- "She has brought laundry.",19
+ "She has brought your washing.",2020
"She wants to know if you have eaten.",2121
"She needs the wifi password.",2222
"She would like to talk about your future.",2323
];24
-const THANKSGIVING_ERRANDS: [&str; 4] = [25
- "Grandma would like to see you.",26
- "Dinner is in ten minutes.",27
- "She needs help with the folding table.",24
+const CHRISTMAS_ERRANDS: [&str; 4] = [25
+ "Nan would like to see you.",26
+ "Christmas dinner is in ten minutes.",27
+ "The King's speech is about to start.",2828
"An uncle has asked where you went.",2929
];3030
@@ -55,12 +55,12 @@ fn spoken(authorization: &str) -> String {
5555
5656
impl Run {5757
pub fn excuses(&self) -> Vec<&'static str> {58
- if self.floor.number() < Floor::Grandmas.number() {58
+ if self.floor.number() < Floor::Nans.number() {5959
return EXCUSES.to_vec();6060
}6161
EXCUSES6262
.into_iter()63
- .chain(THANKSGIVING_EXCUSES)63
+ .chain(CHRISTMAS_EXCUSES)6464
.filter(|e| !self.heard.iter().any(|h| h == e))6565
.collect()6666
}@@ -72,20 +72,20 @@ impl Run {
7272
if self.filmed_at.is_some() && self.chance(VIRAL_ERRAND) {7373
return "A neighbour has sent her something.";7474
}75
- let errands = if self.floor == Floor::Grandmas {76
- THANKSGIVING_ERRANDS75
+ let errands = if self.floor == Floor::Nans {76
+ CHRISTMAS_ERRANDS7777
} else {7878
BEDROOM_ERRANDS7979
};8080
errands[self.rng.random_range(0..errands.len())]8181
}8282
83
- /// Mom answers every request on the run until she has been given something she believes.83
+ /// Mum answers every request on the run until she has been given something she believes.8484
pub fn answer_door(&mut self, authorization: Option<&str>) -> Result<(), Problem> {85
- let Some((errand, nonce)) = self.mom.as_ref().map(|v| (v.errand, v.nonce.clone())) else {85
+ let Some((errand, nonce)) = self.mum.as_ref().map(|v| (v.errand, v.nonce.clone())) else {8686
return Ok(());8787
};88
- let digest = self.floor == Floor::Grandmas;88
+ let digest = self.floor == Floor::Nans;8989
let challenge_value = if digest {9090
format!("Digest realm=\"household\", nonce=\"{nonce}\"")9191
} else {@@ -110,23 +110,23 @@ impl Run {
110110
return Ok(());111111
}112112
if parse_credentials(authorization, "basic").is_some() {113
- return Err(self.mom_strike(challenge(Problem::new(113
+ return Err(self.mum_strike(challenge(Problem::new(114114
StatusCode::UNAUTHORIZED,115115
"basic",116
- "Mom does not accept Basic authentication. Nobody should.",116
+ "Mum does not accept Basic authentication. Nobody should.",117117
))));118118
}119119
120120
let excuse = if digest {121121
let Some(params) = digest_params(authorization) else {122
- return Err(self.mom_strike(challenge(Problem::new(122
+ return Err(self.mum_strike(challenge(Problem::new(123123
StatusCode::UNAUTHORIZED,124124
"digest-required",125
- "Mom has started using Digest authentication.",125
+ "Mum has started using Digest authentication.",126126
))));127127
};128128
if params.get("nonce") != Some(&nonce) {129
- return Err(self.mom_strike(challenge(Problem::new(129
+ return Err(self.mum_strike(challenge(Problem::new(130130
StatusCode::UNAUTHORIZED,131131
"stale-nonce",132132
"That was a different conversation.",@@ -148,10 +148,10 @@ impl Run {
148148
let true_now = self.conditions.pulled_muscle && excuse == TRUE_WHEN_PULLED;149149
if digest && self.heard.contains(&excuse) && !true_now {150150
self.shame += 3;151
- return Err(self.mom_strike(challenge(Problem::new(151
+ return Err(self.mum_strike(challenge(Problem::new(152152
StatusCode::UNAUTHORIZED,153153
"excuse-replayed",154
- "Mom has heard that one before. She would have preferred the truth.",154
+ "Mum has heard that one before. She would have preferred the truth.",155155
))));156156
}157157
if true_now || self.excuses().contains(&excuse.as_str()) {@@ -161,20 +161,20 @@ impl Run {
161161
}162162
self.shame += 3;163163
let detail = if digest {164
- "Mom has not heard that one before. She does not believe it. She would have preferred the truth."164
+ "Mum has not heard that one before. She does not believe it. She would have preferred the truth."165165
} else {166
- "Mom has not heard that one before. She does not believe it."166
+ "Mum has not heard that one before. She does not believe it."167167
};168
- Err(self.mom_strike(challenge(Problem::new(168
+ Err(self.mum_strike(challenge(Problem::new(169169
StatusCode::UNAUTHORIZED,170170
"excuse-rejected",171171
detail,172172
))))173173
}174174
175
- fn mom_strike(&mut self, problem: Problem) -> Problem {175
+ fn mum_strike(&mut self, problem: Problem) -> Problem {176176
self.touch();177
- let Some(visit) = &mut self.mom else {177
+ let Some(visit) = &mut self.mum else {178178
return problem;179179
};180180
visit.strikes += 1;@@ -185,7 +185,7 @@ impl Run {
185185
}186186
187187
fn leave_door(&mut self) {188
- self.mom = None;188
+ self.mum = None;189189
self.suspicion = 0;190190
self.touch();191191
}@@ -83,8 +83,8 @@ impl Item {
8383
}8484
Self::IcePack => "Lowers EQ by 40. Use technique=ice.",8585
Self::Ruler => "Measures honestly. The length resource now carries a Content-Length.",86
- Self::DoorLock => "Keeps the roommate out once.",87
- Self::DndSign => "Works on housekeeping. Mom does not read signs.",86
+ Self::DoorLock => "Keeps the flatmate out once.",87
+ Self::DndSign => "Works on housekeeping. Mum does not read signs.",8888
Self::Blinds => "The neighbour has a good camera. The blinds are better.",8989
Self::Pump => "A pump.",9090
Self::PumpPro => "Use technique=pump. Gains are temporary.",@@ -18,7 +18,7 @@ pub use forum::{ELDER_LAST_MODIFIED, FORUM_THREAD, forum_thread};
1818
pub use items::{Item, Items};1919
pub use outcome::{Outcome, Payload};2020
pub use state::{21
- Cause, Clinic, Conditions, Elder, Ending, Floor, FloorState, Grip, MomVisit, Observer, Story,21
+ Cause, Clinic, Conditions, Elder, Ending, Floor, FloorState, Grip, MumVisit, Observer, Story,2222
};2323
pub use techniques::{LUBRICANTS, Lube, Technique};2424
@@ -39,7 +39,7 @@ use balance::{
3939
use state::Pending;4040
4141
pub struct Run {42
- /// The private id in the run's URL. Knowing it is the only authorization a run has.42
+ /// The private id in the run's URL. Knowing it is the only authorisation a run has.4343
pub id: String,4444
pub public_id: String,4545
etag_salt: u64,@@ -63,7 +63,7 @@ pub struct Run {
6363
pub warmed_up: bool,6464
pub put_applied: bool,6565
pub story: Story,66
- pub mom: Option<MomVisit>,66
+ pub mum: Option<MumVisit>,6767
pub heard: Vec<String>,6868
pub elder: Elder,6969
pub clinic: Clinic,@@ -147,7 +147,7 @@ impl Run {
147147
warmed_up: false,148148
put_applied: false,149149
story: Story::Unopened,150
- mom: None,150
+ mum: None,151151
heard: Vec::new(),152152
elder: Elder::Unverified { strikes: 0 },153153
clinic: Clinic::default(),@@ -287,7 +287,7 @@ impl Run {
287287
self.refractory_until = Some(now + self.refractory);288288
}289289
290
- fn realize(&mut self) {290
+ fn realise(&mut self) {291291
let (due, waiting): (Vec<_>, Vec<_>) = std::mem::take(&mut self.pending)292292
.into_iter()293293
.partition(|p| p.due <= self.turn);@@ -7,8 +7,8 @@ use crate::problem::Problem;
77
pub enum Floor {88
Bedroom = 1,99
Bathroom = 2,10
- LockerRoom = 3,11
- Grandmas = 4,10
+ ChangingRoom = 3,11
+ Nans = 4,1212
Hotel = 5,1313
Forum = 6,1414
Clinic = 7,@@ -22,9 +22,9 @@ impl Floor {
2222
pub fn next(self) -> Option<Self> {2323
match self {2424
Self::Bedroom => Some(Self::Bathroom),25
- Self::Bathroom => Some(Self::LockerRoom),26
- Self::LockerRoom => Some(Self::Grandmas),27
- Self::Grandmas => Some(Self::Hotel),25
+ Self::Bathroom => Some(Self::ChangingRoom),26
+ Self::ChangingRoom => Some(Self::Nans),27
+ Self::Nans => Some(Self::Hotel),2828
Self::Hotel => Some(Self::Forum),2929
Self::Forum => Some(Self::Clinic),3030
Self::Clinic => None,@@ -35,8 +35,8 @@ impl Floor {
3535
match self {3636
Self::Bedroom => "the bedroom",3737
Self::Bathroom => "the shared bathroom",38
- Self::LockerRoom => "the gym locker room",39
- Self::Grandmas => "grandma's house for Thanksgiving",38
+ Self::ChangingRoom => "the gym changing room",39
+ Self::Nans => "Nan's house at Christmas",4040
Self::Hotel => "a business trip hotel",4141
Self::Forum => "the forum",4242
Self::Clinic => "the urologist's office",@@ -46,12 +46,12 @@ impl Floor {
4646
pub fn note(self) -> &'static str {4747
match self {4848
Self::Bedroom => "The door does not lock. The cat is present.",49
- Self::Bathroom => "The water is hot. The roommate showers at eight.",50
- Self::LockerRoom => {49
+ Self::Bathroom => "The water is hot. The flatmate showers at eight.",50
+ Self::ChangingRoom => {5151
"It is cold. Discretion is advised. Everyone here is lying. Pump-Bro is by the lockers."5252
}53
- Self::Grandmas => {54
- "The walls are thin. Mom is here, and she has been reading about Digest authentication."53
+ Self::Nans => {54
+ "The walls are thin. Mum is here, and she has been reading about Digest authentication."5555
}5656
Self::Hotel => {5757
"The wifi requires agreement. Housekeeping does not knock. Pump-Bro is in the lobby."@@ -64,22 +64,22 @@ impl Floor {
6464
pub fn observer(self) -> Option<Observer> {6565
match self {6666
Self::Bedroom => Some(Observer::Cat),67
- Self::LockerRoom => Some(Observer::Greg),68
- Self::Grandmas => Some(Observer::Grandma),67
+ Self::ChangingRoom => Some(Observer::Greg),68
+ Self::Nans => Some(Observer::Nan),6969
_ => None,7070
}7171
}7272
73
- pub fn has_mom(self) -> bool {74
- matches!(self, Self::Bedroom | Self::Grandmas)73
+ pub fn has_mum(self) -> bool {74
+ matches!(self, Self::Bedroom | Self::Nans)7575
}7676
7777
pub fn has_window(self) -> bool {78
- matches!(self, Self::Bedroom | Self::Grandmas | Self::Hotel)78
+ matches!(self, Self::Bedroom | Self::Nans | Self::Hotel)7979
}8080
8181
pub fn shop_open(self) -> bool {82
- matches!(self, Self::LockerRoom | Self::Hotel)82
+ matches!(self, Self::ChangingRoom | Self::Hotel)8383
}8484
8585
pub fn timed(self) -> bool {@@ -91,7 +91,7 @@ impl Floor {
9191
pub enum Observer {9292
Cat,9393
Greg,94
- Grandma,94
+ Nan,9595
}9696
9797
impl Observer {@@ -99,7 +99,7 @@ impl Observer {
9999
match self {100100
Self::Cat => "cat",101101
Self::Greg => "greg",102
- Self::Grandma => "grandma",102
+ Self::Nan => "nan",103103
}104104
}105105
}@@ -136,7 +136,7 @@ pub struct FloorState {
136136
pub temp_length: f64,137137
pub teapot: bool,138138
pub towel_stolen: bool,139
- pub roommate_told: bool,139
+ pub flatmate_told: bool,140140
pub wifi_accepted: bool,141141
}142142
@@ -147,7 +147,7 @@ pub struct Conditions {
147147
pub priapism_turns: u8,148148
}149149
150
-pub struct MomVisit {150
+pub struct MumVisit {151151
pub errand: &'static str,152152
pub nonce: String,153153
pub strikes: u8,@@ -181,7 +181,7 @@ pub enum Cause {
181181
Caught,182182
Banned,183183
Degloved,184
- Zipper,184
+ Zip,185185
Abandoned,186186
}187187
@@ -192,7 +192,7 @@ impl Cause {
192192
Self::Caught => "caught",193193
Self::Banned => "banned",194194
Self::Degloved => "degloved",195
- Self::Zipper => "zipper",195
+ Self::Zip => "zip",196196
Self::Abandoned => "abandoned",197197
}198198
}@@ -206,14 +206,14 @@ impl Cause {
206206
"A vessel has exceeded its rated pressure. The run has ended."207207
}208208
Self::Caught => {209
- "Mom has seen enough. The run has ended. Nobody will mention it at dinner."209
+ "Mum has seen enough. The run has ended. Nobody will mention it at dinner."210210
}211211
Self::Banned => "Your account has been banned. The forum can tell. The run has ended.",212212
Self::Degloved => {213213
"The outer layer has been removed in one piece. It will not be returning. The run has ended."214214
}215
- Self::Zipper => {216
- "The request conflicts with the current state of the zipper. The run has ended."215
+ Self::Zip => {216
+ "The request conflicts with the current state of the zip. The run has ended."217217
}218218
Self::Abandoned => "The run was abandoned.",219219
}@@ -224,7 +224,7 @@ impl Cause {
224224
Self::Ruptured { .. } => StatusCode::INTERNAL_SERVER_ERROR,225225
Self::Caught | Self::Degloved | Self::Abandoned => StatusCode::GONE,226226
Self::Banned => StatusCode::FORBIDDEN,227
- Self::Zipper => StatusCode::CONFLICT,227
+ Self::Zip => StatusCode::CONFLICT,228228
}229229
}230230
@@ -7,13 +7,13 @@ use serde_json::json;
77
use super::{88
Floor, Grip, LUBRICANTS, Lube, Outcome, Payload, Run, Story, Technique,99
balance::{10
- BAND_BONUS, BRANCH_TURN, CAT_TAKES_TOWEL, DANGER_EQ, EQ_BAND, EQ_WOBBLE, EXTENDER_GAIN,11
- HOT_EQ, LOCKER_CHILL, OBSERVED, PRIAPISM_EQ, PRIAPISM_TURNS, PULLED_MUSCLE,10
+ BAND_BONUS, BRANCH_TURN, CAT_TAKES_TOWEL, CHANGING_ROOM_CHILL, DANGER_EQ, EQ_BAND,11
+ EQ_WOBBLE, EXTENDER_GAIN, HOT_EQ, OBSERVED, PRIAPISM_EQ, PRIAPISM_TURNS, PULLED_MUSCLE,1212
PULLED_MUSCLE_INTENSITY, RING_PRIAPISM, RING_RUPTURE_LINE, RUPTURE_LINE, STORAGE_GIRTH,1313
SUSPICION_LIMIT,1414
},1515
not_extended, round3,16
- state::{MomVisit, Observer, Pending},16
+ state::{MumVisit, Observer, Pending},1717
techniques::{LubeRule, Profile, Training, Utility},1818
};1919
use crate::{headers::SERVER_TIMING, problem::Problem};@@ -284,7 +284,7 @@ impl Run {
284284
self.touch();285285
self.turn += 1;286286
self.here.turns += 1;287
- self.realize();287
+ self.realise();288288
if self.items.extender {289289
self.length += EXTENDER_GAIN;290290
}@@ -292,8 +292,8 @@ impl Run {
292292
if self.stamina <= 0 {293293
self.exhaust(now);294294
}295
- let chill = if self.floor == Floor::LockerRoom {296
- LOCKER_CHILL295
+ let chill = if self.floor == Floor::ChangingRoom {296
+ CHANGING_ROOM_CHILL297297
} else {298298
0299299
};@@ -301,17 +301,17 @@ impl Run {
301301
self.eq = (self.eq + intensity * 2 - 6 - chill + wobble).clamp(0, 100);302302
303303
let mut suspicion = intensity / 5 + i32::from(lube == Some(Lube::Vaseline));304
- if matches!(self.floor, Floor::LockerRoom | Floor::Grandmas) {304
+ if matches!(self.floor, Floor::ChangingRoom | Floor::Nans) {305305
suspicion *= 2;306306
}307
- if self.floor == Floor::Grandmas && lube == Some(Lube::CoconutOil) {307
+ if self.floor == Floor::Nans && lube == Some(Lube::CoconutOil) {308308
suspicion += 2;309309
}310310
let was_below = self.suspicion < SUSPICION_LIMIT;311311
self.suspicion =312312
u8::try_from((i32::from(self.suspicion) + suspicion).min(i32::from(SUSPICION_LIMIT)))313313
.unwrap_or(SUSPICION_LIMIT);314
- self.maybe_summon_mom(was_below);314
+ self.maybe_summon_mum(was_below);315315
316316
if let Some(observer) = self.floor.observer()317317
&& self.chance(OBSERVED)@@ -341,16 +341,16 @@ impl Run {
341341
}342342
}343343
344
- fn maybe_summon_mom(&mut self, was_below: bool) {345
- if !self.floor.has_mom() || self.mom.is_some() {344
+ fn maybe_summon_mum(&mut self, was_below: bool) {345
+ if !self.floor.has_mum() || self.mum.is_some() {346346
return;347347
}348348
let summoned = was_below && self.suspicion == SUSPICION_LIMIT;349349
let visits = u32::from(self.suspicion) + 1;350
- if summoned || self.rng.random_ratio(visits, super::balance::MOM_VISIT) {350
+ if summoned || self.rng.random_ratio(visits, super::balance::MUM_VISIT) {351351
let errand = self.errand(summoned);352352
let nonce = self.fresh_nonce();353
- self.mom = Some(MomVisit {353
+ self.mum = Some(MumVisit {354354
errand,355355
nonce,356356
strikes: 0,@@ -509,13 +509,13 @@ impl Run {
509509
510510
fn gossip(&mut self, mut outcome: Outcome) -> Outcome {511511
let reportable = matches!(outcome.status.as_u16(), 200 | 202 | 206);512
- if !self.here.roommate_told || !reportable {512
+ if !self.here.flatmate_told || !reportable {513513
return outcome;514514
}515
- self.here.roommate_told = false;515
+ self.here.flatmate_told = false;516516
outcome.status = StatusCode::ALREADY_REPORTED;517517
if let Payload::Json(body) = &mut outcome.payload {518
- body["detail"] = json!("The roommate has already told everyone.");518
+ body["detail"] = json!("The flatmate has already told everyone.");519519
}520520
outcome521521
}@@ -33,7 +33,7 @@ impl Run {
3333
let (boost, detail) = if self.floor == Floor::Bathroom {3434
(3535
SHOWER_EQ,36
- "Warmed up. The shower is hot. The roommate's will not be.",36
+ "Warmed up. The shower is hot. The flatmate's will not be.",3737
)3838
} else if self.here.towel_stolen {3939
(TOWELLESS_EQ, "Warmed up, poorly. The cat has the towel.")@@ -158,9 +158,9 @@ pub fn finish(run: &mut Run, ctx: &Ctx, secret: &Secret, mut response: Response)
158158
if let Some(observer) = run.observed {159159
stats.push((X_OBSERVED_BY, observer.name().into()));160160
}161
- if run.mom.is_some() {162
- stats.push((header::VIA, "1.1 mom".into()));163
- stats.push((header::VARY, "Mom".into()));161
+ if run.mum.is_some() {162
+ stats.push((header::VIA, "1.1 mum".into()));163
+ stats.push((header::VARY, "Mum".into()));164164
}165165
// RFC 9111 obsoleted Warning, which is why nobody heeds it.166166
if run.conditions.pulled_muscle {@@ -11,7 +11,7 @@ use tower::ServiceExt;
1111
1212
use crate::{1313
AppState, Config,14
- game::{Floor, MomVisit, Run},14
+ game::{Floor, MumVisit, Run},1515
router,1616
};1717
@@ -78,8 +78,8 @@ fn app() -> Router {
7878
crate::app(Config::default())7979
}8080
81
-fn mom_at_the_door(run: &mut Run) {82
- run.mom = Some(MomVisit {81
+fn mum_at_the_door(run: &mut Run) {82
+ run.mum = Some(MumVisit {8383
errand: "She heard a noise.",8484
nonce: "abc".into(),8585
strikes: 0,@@ -296,11 +296,11 @@ async fn the_true_ending_is_not_modified() {
296296
}297297
298298
#[tokio::test]299
-async fn mom_accepts_a_known_excuse() {300
- let app = seeded_with(Floor::Bedroom, mom_at_the_door);299
+async fn mum_accepts_a_known_excuse() {300
+ let app = seeded_with(Floor::Bedroom, mum_at_the_door);301301
let response = send(&app, "GET", "/runs/cafebabe", &[], "").await;302302
assert_eq!(response.status(), StatusCode::UNAUTHORIZED);303
- assert_eq!(header(&response, "via"), "1.1 mom");303
+ assert_eq!(header(&response, "via"), "1.1 mum");304304
let response = send(305305
&app,306306
"GET",@@ -313,8 +313,8 @@ async fn mom_accepts_a_known_excuse() {
313313
}314314
315315
#[tokio::test]316
-async fn mom_runs_out_of_patience() {317
- let app = seeded_with(Floor::Bedroom, mom_at_the_door);316
+async fn mum_runs_out_of_patience() {317
+ let app = seeded_with(Floor::Bedroom, mum_at_the_door);318318
let lie = [("authorization", "Excuse \"it is for science\"")];319319
for _ in 0..2 {320320
let response = send(&app, "GET", "/runs/cafebabe", &lie, "").await;@@ -329,9 +329,9 @@ async fn mom_runs_out_of_patience() {
329329
}330330
331331
#[tokio::test]332
-async fn mom_remembers_excuses_by_thanksgiving() {333
- let app = seeded_with(Floor::Grandmas, |run| {334
- mom_at_the_door(run);332
+async fn mum_remembers_excuses_by_christmas() {333
+ let app = seeded_with(Floor::Nans, |run| {334
+ mum_at_the_door(run);335335
run.heard.push("homework".into());336336
});337337
let basic = send(@@ -365,7 +365,7 @@ async fn mom_remembers_excuses_by_thanksgiving() {
365365
"/runs/cafebabe",366366
&[(367367
"authorization",368
- "Digest username=\"praying\", nonce=\"abc\"",368
+ "Digest username=\"wrapping presents\", nonce=\"abc\"",369369
)],370370
"",371371
)@@ -375,8 +375,8 @@ async fn mom_remembers_excuses_by_thanksgiving() {
375375
376376
#[tokio::test]377377
async fn a_pulled_muscle_is_a_true_excuse() {378
- let app = seeded_with(Floor::Grandmas, |run| {379
- mom_at_the_door(run);378
+ let app = seeded_with(Floor::Nans, |run| {379
+ mum_at_the_door(run);380380
run.conditions.pulled_muscle = true;381381
run.heard.push("pulled a muscle".into());382382
});@@ -404,7 +404,7 @@ async fn floors_end_when_they_end() {
404404
let next = send(&app, "POST", "/runs/cafebabe/floor", &[], "").await;405405
assert!(406406
next.status() == StatusCode::SEE_OTHER || next.status() == StatusCode::CONFLICT,407
- "either the floor changed or the zipper did"407
+ "either the floor changed or the zip did"408408
);409409
}410410
@@ -414,7 +414,7 @@ async fn pump_bro_upsells() {
414414
let response = send(&closed, "GET", "/runs/cafebabe/shop", &[], "").await;415415
assert_eq!(response.status(), StatusCode::NOT_FOUND);416416
417
- let app = seeded_with(Floor::LockerRoom, |_| {});417
+ let app = seeded_with(Floor::ChangingRoom, |_| {});418418
let pump = send(&app, "POST", "/runs/cafebabe/shop/pump", &[], "").await;419419
assert_eq!(pump.status(), StatusCode::UPGRADE_REQUIRED);420420
assert_eq!(header(&pump, "upgrade"), "pump-pro/2.0");@@ -426,7 +426,7 @@ async fn pump_bro_upsells() {
426426
427427
#[tokio::test]428428
async fn only_the_key_opens_the_cage() {429
- let app = seeded_with(Floor::LockerRoom, |run| run.items.cage = true);429
+ let app = seeded_with(Floor::ChangingRoom, |run| run.items.cage = true);430430
send(&app, "POST", "/runs/cafebabe/shop/ice-pack", &[], "").await;431431
let still = send(432432
&app,@@ -48,7 +48,7 @@ pre, li, p, td, label { overflow-wrap: anywhere; }
4848
const REL = "https://jelq.dev/rels/";4949
const METHODS = ["JELQ", "GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"];5050
const TECHNIQUES = ["warmup", "wet", "dry", "stretch", "uli", "edge", "pump", "ice", "supplement"];51
-const DEATHS = ["vascular-event", "caught", "banned", "degloved", "zipper", "run-ended"];51
+const DEATHS = ["vascular-event", "caught", "banned", "degloved", "zip", "run-ended"];5252
const STATS = [5353
["x-floor", "Floor"],5454
["x-self-reported-length", "Self-reported length"],