From 6fc382b1dcbe1e6fdae387ecbfd99c2abf8fe9cf Mon Sep 17 00:00:00 2001 From: Jovan Gerodetti Date: Wed, 12 Jun 2024 15:19:16 +0200 Subject: [PATCH] Update skewer after adding sim (#89) * Update skewer after adding sim * Update src/control_any_sim/services/selection_group.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/control_any_sim/services/selection_group.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/control_any_sim/services/selection_group.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/control_any_sim/services/selection_group.py b/src/control_any_sim/services/selection_group.py index 0276402..44a8afc 100644 --- a/src/control_any_sim/services/selection_group.py +++ b/src/control_any_sim/services/selection_group.py @@ -184,9 +184,16 @@ def make_sim_selectable(self: Self, sim_info: SimInfo) -> None: currently_active_sim: SimInfo = self.client.active_sim_info + # potentially load sims household here via the household_manager. + Logger.log( + f"added sim has household: {sim_info.household_id}, is none: {sim_info.household is None}", + ) + # force the game to update now selectable NPC tracker information self.client.set_active_sim_by_id(sim_info.id) self.client.set_active_sim_by_id(currently_active_sim.id) + # send update to skewer for good measure + self.client.send_selectable_sims_update() def remove_sim(self: Self, sim_info: SimInfo) -> None: """Remove a sim info from the skewer."""