Skip to content

Commit

Permalink
More better texts
Browse files Browse the repository at this point in the history
  • Loading branch information
rewin123 committed Dec 10, 2023
1 parent 48f2046 commit aa52940
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/debug_diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn setup_alive_sheep_counter(
let mut text_style = TextStyle::default();
text_style.font_size = FONT_SIZE;
let sheep_counter = commands
.spawn(TextBundle::from_section("Alive sheeps: ", text_style))
.spawn(TextBundle::from_section("Sheep alive: ", text_style))
.insert(SheepAliveDebugCounter)
.id();

Expand All @@ -135,7 +135,7 @@ pub fn alive_sheep_counter(
let alive_sheep_count = sheeps.iter().count();
for mut text in &mut query {
text.sections[0].value = format!(
"Alive sheeps: {}/{}",
"Sheep alive: {}/{}",
alive_sheep_count, start_sheep_count.0
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/finish_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ fn setup_finish_screen(mut commands: Commands, score: Res<Score>, fail: Option<R
})).with_children(|parent| {
let text = if let Some(fail) = fail {
match fail.as_ref() {
FailReason::SheepDied => format!("Uh-oh. \nWhat bad luck, half the sheep have been eaten, try again :( \nIf you escape from the vampire."),
FailReason::TaskFailed(reason) => format!("Uh-oh. \nYou failed the task, try again :(\nReason: {} \nIf you escape from the vampire.", reason),
FailReason::SheepDied => format!("Uh-oh. \nWhat a bad dog. Half your sheep have been eaten, you fleay mutt. Await your punishment. \nIf you're alive afterwards, give it a decent try."),
FailReason::TaskFailed(reason) => format!("Uh-oh. Bad dog. \nYou failed, filthy mutt. \nReason: {} \nPrepare to be punished.", reason),
}
} else {
format!("Congratulations! \nYou survived your workday! \nYou did well, the vampire is waiting for you tomorrow.")
format!("Good dog! \nYou get to live another day. \nYou did well enough. Your master will be waiting for you tomorrow.")
};

parent.spawn(TextBundle::from_section(
Expand Down
4 changes: 2 additions & 2 deletions src/global_task/sheep_escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn check_wave_finish(

if sheep_wave_status.start_count - alived_sheep > loose_limit {
commands.insert_resource(FailReason::TaskFailed(
"Half of the runaway sheep were eaten :(".to_string(),
"Half the runway flock has been eaten. That's giving bad dog, don't you think?".to_string(),
));
game_state.set(GameState::Finish);
global_task.set(GlobalTask::None);
Expand All @@ -85,7 +85,7 @@ fn check_wave_finish(
}
} else if next_wave.0.is_some() {
for mut t in info_texts.iter_mut() {
t.sections[0].value = "The sheep are worried, wait for it".to_string();
t.sections[0].value = "Your flock is getting restless, wait for it".to_string();
}
} else if sheep_wave_status.start_count != 0 {
for mut t in info_texts.iter_mut() {
Expand Down
6 changes: 3 additions & 3 deletions src/global_task/torch_blinking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fn update_delight_system(
if status.time_for_mission < 0.0 {
gamestate.set(GameState::Finish);
commands.insert_resource(FailReason::TaskFailed(format!(
"Not all the torches were lit. You should be better at waking up ancient vampires."
"Not enough torches lit. Seems like your master needed a good shove."
)));
return;
}
Expand All @@ -156,14 +156,14 @@ fn update_delight_system(
if status.start_sheep_count - lived_sheep_count > status.max_dead_sheep {
gamestate.set(GameState::Finish);
commands.insert_resource(FailReason::TaskFailed(format!(
"Too many sheep was eaten. You should be better at waking up ancient vampires."
"Too many of your flock got eaten. Seems like your master needed a good shove."
)));
return;
}
}

if let Ok(mut text) = texts.get_single_mut() {
text.sections[0].value = format!("The torches are going out! Urgently wake up the shepherd to light the torches! {} / {} torches lit\n{:.0} seconds left. Dont let to eat more then {}", ok_torches, status.torches_to_lit.len(), status.time_for_mission, status.max_dead_sheep);
text.sections[0].value = format!("The torches are going out! Wake up the shepherd so he can light them! {} / {} torches lit\n{:.0} seconds left. Dont let to eat more then {}", ok_torches, status.torches_to_lit.len(), status.time_for_mission, status.max_dead_sheep);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/sheep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ pub fn update_scared_sheeps(
}
if count > 0 {
let mean_nearest_sheep = mean_nearest_sheep / (count as f32);
if (mean_nearest_sheep - dog_transform.translation).length() < dog_dpos.length() * 0.5 {
if (mean_nearest_sheep - dog_transform.translation).length() < dog_dpos.length() * 0.8 {
walk.0 = dir * speed_amount;
scare.last_vel = walk.0;
} else {
Expand Down

0 comments on commit aa52940

Please sign in to comment.