summaryrefslogtreecommitdiff
path: root/src/world.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-12-01 16:46:22 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-12-01 16:46:22 +0100
commit322480fdb86f329dc05ae1683c1f15ca48fa709d (patch)
tree16221906e37abec604ed1908718359cda94dabf5 /src/world.c
parent38fc92cfaeb65c23570ade8a449a412915fe825c (diff)
close #38
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c
index 84a4c3c..7ff0e19 100644
--- a/src/world.c
+++ b/src/world.c
@@ -1159,6 +1159,7 @@ static void world_update_employee_happiness(world* world, employee* emp) {
world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, get_world_location_by_id(world, emp->original_location_id));
end_contract_with_employee(world, emp);
+ world->simulation_speed = 0;
}
}
@@ -1240,6 +1241,7 @@ static void end_contract_with_random_employee(world* world)
snprintf(error_msg, MAX_EVENT_MESSAGE_LENGTH, "%s quit their job. Their routes need a new assignee!", emp->name);
world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, get_world_location_by_id(world, emp->original_location_id));
end_contract_with_employee(world, emp);
+ world->simulation_speed = 0;
}
static void end_contract_with_random_job(world* world)
@@ -1464,7 +1466,7 @@ static void world_age_employee(world* world)
snprintf(error_msg, MAX_EVENT_MESSAGE_LENGTH, "%s retired at age %d. Their routes need a new assignee!", em->name, RETIREMENT_AGE);
world_report_event(world, error_msg, EVENT_TYPE_EMPLOYEE_QUIT, location);
end_contract_with_employee(world, em);
-
+ world->simulation_speed = 0;
x--;
}
}