- Feb 27, 2020
- 341
- 1,610
Awww shit what happened lol. I play all 3 versions of Sims on rotation. Sims 4 pisses me the fuck OFF on the daily so when I need a break I play either 3 or 2. Lemme know if you need any help & a midget riding a goatfuck this shit i'm OUT! guess who's moving back to the sims 3 until further notice?![]()
More scripting stuff I figured out today. Not the best method I guess but this bit of code allows me to assign jobs to sims.
Python:
def assign_job(potential_key: int, sim_info: SimInfo):
sim = sim_info.get_sim_instance()
if services.current_zone().is_zone_shutting_down:
return
try:
instance_manager = services.get_instance_manager(Types.SITUATION)
key = resources.get_resource_key(potential_key, Types.SITUATION)
situation_tuning = instance_manager.get(key)
if situation_tuning is None:
ld_notice(sim_info, "Assign Job", "Situation tuning error for {}!".format(sim_info.first_name))
return
job_type = situation_tuning
situation_manager = services.get_zone_situation_manager()
for situation in situation_manager.get_situations_sim_is_in(sim):
situation_manager.remove_sim_from_situation(sim, situation.id)
job_list = SituationGuestList(invite_only=True)
sit_info = SituationGuestInfo((sim.id), (job_type.default_job()), (RequestSpawningOption.CANNOT_SPAWN), (BouncerRequestPriority.EVENT_VIP), expectation_preference=True)
job_list.add_guest_info(sit_info)
situation_manager.create_situation(job_type, job_list, user_facing=False)
except BaseException as e:
error_trap(e)
pass
Code:
situation_Career_Detective_Patrol: Main file you use the key for.
situationJob_Detective_PatrolPlayer
role_Career_Detective_Patrol_Player