Skip to content

Commit

Permalink
Update skewer after adding sim (#89)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
TitanNano and github-actions[bot] authored Jun 12, 2024
1 parent badd5e8 commit 6fc382b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/control_any_sim/services/selection_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 6fc382b

Please sign in to comment.