|
Post by bees123 on Dec 22, 2020 16:20:16 GMT -5
Hi,
I'm trying to inject interactions to different objects, got this working for the most part but I can't find the Object ID for the Phone menu. I know it's possible since I've been using the XML Injector for the moment, but removing that dependency would be very useful
My current code works for injecting to all Sims using the ID 14965 so I know it's not a code issue
|
|
|
Post by bees123 on Dec 22, 2020 21:47:44 GMT -5
Couldn't find the phone ID but found the function to add phone affordances when Sims are added instead of when Instances are loaded, putting it here for future reference and if anyone's looking for it:
@inject_to(sims.sim.Sim, 'on_add') def bees123_injectPhoneInteractions(original, self): original(self) sa_list = [] affordance_manager = services.affordance_manager() for sa_id in phoneAffordances: tuning_class = affordance_manager.get(sa_id) if not tuning_class is None: sa_list.append(tuning_class) self._phone_affordances = self._phone_affordances + tuple(sa_list)
|
|
|
Post by pixaratv on Jan 3, 2021 8:36:13 GMT -5
Hi, I'm trying to inject interactions to different objects, got this working for the most part but I can't find the Object ID for the Phone menu. I know it's possible since I've been using the XML Injector for the moment, but removing that dependency would be very useful My current code works for injecting to all Sims using the ID 14965 so I know it's not a code issue That is because phones are not exactly objects. They are props and phone interactions are running via selfinteractions. You need to inject the interaction to Sims (not to an object).
|
|
|
Post by bees123 on Jan 5, 2021 10:39:00 GMT -5
Ah that makes sense, thank you!
|
|