Skip to main content

FB2CareerManager

Overview

  • Manages the career (job) system.

Metadata

FieldValue
Kindsystem
EnvironmentB2 - Simulation
Categorysystems
ExtendsFB2ManagerBase
Requirerequire('Systems.B2CareerManager')

Properties (1)

NameTypeDescription
SiteCareerMaptable<FB1EntityId, FB1CareerInfoDataList>Index derived from the set of Career entities. Excluded from save serialization; rebuilt from the EntityManager via RebuildSiteCareerMap right after PostRestore.

Functions (24)

FunctionParametersReturnsDescription
CheckCareerJoinCondition (static)InTargetEntityId: FB1EntityId, InCareerDtId: string, InCareerTableRow: FB1CareerTableRow, InJobId: stringbooleanChecks the Career application condition: runs the RankConditionId script.
CreateCareerDataSelf: FB2CareerManager, SiteEntityId: FB1EntityId, CareerDtId: string-Creates Career Data.
FindAllCareersByTypeSelf: FB2CareerManager, CareerType: EB1CareerType-Finds and returns All Careers By Type.
FindCareerDataBySiteIdByTypeSelf: FB2CareerManager, SiteEntityId: FB1EntityId, CareerType: EB1CareerType-Finds and returns Career Data By Site Id By Type.
FindCareerDataBySiteIdForCharacterSelf: FB2CareerManager, SiteEntityId: FB1EntityId, CharacterEntityId: FB1EntityId-Finds and returns Career Data By Site Id For Character.
FindCareerListByDtIdSelf: FB2CareerManager, CareerDtId: string-Finds and returns Career List By Dt Id.
FindCareerListBySiteIdSelf: FB2CareerManager, SiteEntityId: FB1EntityId-Finds and returns Career List By Site Id.
ForceLeaveNonRecruitableCareersInCharacterEntityId: FB1EntityId, InLeaveReason: EB1CareerLeaveReason-Force-resigns the character from all currently held Careers whose job is bRecruitable=false (protects system-NPC seats when entering a ResidenceFamily).
Get--
GetCareerUIDataAllOutInfos: FB1CareerUIInfo[]booleanReturns Career UIData All.
GetCareerUIDataByTargetInTargetEntityId: FB1EntityId, OutInfos: FB1CareerUIInfo[], InFilterCareerType: EB1CareerTypebooleanReturns Career UIData By Target.
GetType-EB2ManagerTypeReturns Type.
HandleInterviewerBecameInvalidInInterviewerEntityId: FB1EntityId-Handles pending interviews when an interviewer becomes invalid due to death/resignation (called from B2Character.cpp on death).
IsTickable-booleanReturns whether Tickable.
OnDeathCharacterInEntityId: FB1EntityId-On character death/destruction, resigns from all Careers the character belongs to (including releasing seats).
RequestJoinCareerByCareerSelf: FB2CareerManager, CharacterEntityId: FB1EntityId, Career: FB2CareerBase, JobDtId: string, JoinReason: EB1CareerJoinReason-Requests Join Career By Career.
RequestJoinCareerByCareerWithRankSelf: FB2CareerManager, CharacterEntityId: FB1EntityId, Career: FB2CareerBase, JobDtId: string, StartRank: integer, JoinReason: EB1CareerJoinReason-Requests Join Career By Career With Rank.
RequestJoinCareerByEntityInCharacterEntityId: FB1EntityId, InCareerEntityId: FB1EntityId, InJobDtId: string, InJoinReason: EB1CareerJoinReasonEB1CareerJoinResultRequests Join Career By Entity.
RequestJoinCareerByEntityWithRankInCharacterEntityId: FB1EntityId, InCareerEntityId: FB1EntityId, InJobDtId: string, InStartRank: integer, InJoinReason: EB1CareerJoinReasonEB1CareerJoinResultRequests Join Career By Entity With Rank.
RequestLeaveCareerByEntityInCharacterEntityId: FB1EntityId, InCareerEntityId: FB1EntityId, InLeaveReason: EB1CareerLeaveReasonbooleanRequests Leave Career By Entity.
RequestLeaveCareerByTypeInCharacterEntityId: FB1EntityId, InCareerType: EB1CareerType, InLeaveReason: EB1CareerLeaveReasonbooleanRequests Leave Career By Type.
RequestSchoolTransferInCharacterEntityId: FB1EntityId, bToFakeSchool: booleanbooleanRequests a school transfer. bToFakeSchool: true = live school to rabbit-hole, false = rabbit-hole to live school.
ResolveCareer--Migrates Company/Job to Career (called from RestoreNewGame).
TryPromoteCareerInCharacterEntityId: FB1EntityId, InCareerType: EB1CareerType, bForceImmediate: booleanboolean

Override points (7)

Implement these in Lua as FB2CareerManager.Override_Name = function(...) end.

FunctionParametersReturnsDescription
Override_CheckCareerJoinCondition (static)InTargetEntityId: FB1EntityId, InCareerDtId: string, InCareerTableRow: FB1CareerTableRow, InJobId: stringbooleanChecks the Career application condition: runs the RankConditionId script.
Override_ForceLeaveNonRecruitableCareersInCharacterEntityId: FB1EntityId, InLeaveReason: EB1CareerLeaveReason-Force-resigns the character from all currently held Careers whose job is bRecruitable=false (protects system-NPC seats when entering a ResidenceFamily).
Override_HandleInterviewerBecameInvalidInInterviewerEntityId: FB1EntityId-Handles pending interviews when an interviewer becomes invalid due to death/resignation (called from B2Character.cpp on death).
Override_OnDeathCharacterInEntityId: FB1EntityId-On character death/destruction, resigns from all Careers the character belongs to (including releasing seats).
Override_RequestSchoolTransferInCharacterEntityId: FB1EntityId, bToFakeSchool: booleanbooleanRequests a school transfer. bToFakeSchool: true = live school to rabbit-hole, false = rabbit-hole to live school.
Override_ResolveCareer--Migrates Company/Job to Career (called from RestoreNewGame).
Override_TryPromoteCareerInCharacterEntityId: FB1EntityId, InCareerType: EB1CareerType, bForceImmediate: booleanboolean