Class KnownTechHandler
A handler class for configuring custom unlocking conditions for item blueprints.
public static class KnownTechHandler
- Inheritance
-
KnownTechHandler
- Inherited Members
Methods
AddRequirementForUnlock(TechType, TechType)
Unlocks the
blueprint when the requirement tech type is unlocked.public static void AddRequirementForUnlock(TechType blueprint, TechType requirement)
Parameters
blueprintTechType- The blueprint to unlock.
requirementTechType- The tech type that will unlock the specified blueprint once unlocked.
RemoveAllCurrentAnalysisTechEntry(TechType)
Allows you to remove all unlock entries from a TechType to be able to disable or change it to a new unlock.
public static void RemoveAllCurrentAnalysisTechEntry(TechType targetTechType)
Parameters
targetTechTypeTechType- Target TechType to remove the unlocks for.
Remarks
The unlock entry for analysis techs for the specified
To also target unlock entry removal for the specified tech type's analysis tech entry, use RemoveAnalysisTechEntryFromSpecific(TechType, List<TechType>) instead.
targetTechType will not be removed. I.E: This method will not remove self-unlocks.To also target unlock entry removal for the specified tech type's analysis tech entry, use RemoveAnalysisTechEntryFromSpecific(TechType, List<TechType>) instead.
- See Also
-
RemoveAnalysisTechEntry(TechType)
RemoveAnalysisTechEntryFromSpecific(TechType, List<TechType>)
Allows you to remove unlock entries for a TechType from specific entries.
public static void RemoveAnalysisTechEntryFromSpecific(TechType targetTechType, List<TechType> techTypes)
Parameters
targetTechTypeTechType- Target TechType to remove the unlocks for.
techTypesList<TechType>- List of TechType to remove the targetTechType from.
- See Also
RemoveDefaultUnlock(TechType)
Allows you to remove a TechType from being unlocked by default.
public static void RemoveDefaultUnlock(TechType techType)
Parameters
techTypeTechType
SetAnalysisTechEntry(AnalysisTech)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in KnownTech.AnalysisTech.unlockTechTypes will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(KnownTech.AnalysisTech analysisTech)
Parameters
analysisTechKnownTech.AnalysisTech- The analysis tech entry to add.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, FMODAsset)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, FMODAsset unlockSound)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSoundFMODAsset- The sound that plays when you unlock the blueprint.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, FMODAsset, Sprite)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, FMODAsset unlockSound, Sprite unlockSprite)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSoundFMODAsset- The sound that plays when you unlock the blueprint. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSpriteSprite- The sprite that shows up when you unlock the blueprint.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, FMODAsset, Sprite, List<StoryGoal>)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, FMODAsset unlockSound, Sprite unlockSprite, List<StoryGoal> storyGoals)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSoundFMODAsset- The sound that plays when you unlock the blueprint.
unlockSpriteSprite- The sprite that shows up when you unlock the blueprint.
storyGoalsList<StoryGoal>- The story goals that will be triggered when you unlock the blueprint.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, string)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, string unlockMessage)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessagestring- The message that shows up on the right when the blueprint is unlocked. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, string, FMODAsset)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, string unlockMessage, FMODAsset unlockSound)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessagestring- The message that shows up on the right when the blueprint is unlocked. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSoundFMODAsset- The sound that plays when you unlock the blueprint. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, string, Sprite)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an existing AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, string unlockMessage, Sprite unlockSprite)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessagestring- The message that shows up on the right when the blueprint is unlocked. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSpriteSprite- The sprite that shows up when you unlock the blueprint.
SetAnalysisTechEntry(TechType, IEnumerable<TechType>, Sprite)
Allows you to define which TechTypes are unlocked when a certain TechType is unlocked, i.e., "analysed".
If there is already an exisitng AnalysisTech entry for a TechType, all the TechTypes in "techTypesToUnlock" will be
added to the existing AnalysisTech entry unlocks.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetAnalysisTechEntry(TechType techTypeToBeAnalysed, IEnumerable<TechType> techTypesToUnlock, Sprite unlockSprite)
Parameters
techTypeToBeAnalysedTechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlockIEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSpriteSprite- The sprite that shows up when you unlock the blueprint.
SetCompoundUnlock(TechType, List<TechType>)
Allows you to set up a custom Compound Unlock requiring multiple techtypes to be unlocked before 1 is.
***Note: This will not remove any original unlock and if you need to do so you should use RemoveAllCurrentAnalysisTechEntry(TechType) before calling this method.
public static void SetCompoundUnlock(TechType techType, List<TechType> compoundTechsForUnlock)
Parameters
techTypeTechTypecompoundTechsForUnlockList<TechType>
SetHardLocked(TechType)
Makes the specified tech type hard locked. Hard locking means that the tech type will not be unlocked via the unlockall command and will not be unlocked by default
in creative.
public static void SetHardLocked(TechType techType)
Parameters
techTypeTechType- The tech type to set as hard locked.
Remarks
Calling this method will remove the specified item from being unlocked at start.
- See Also
UnlockOnStart(TechType)
Allows you to unlock a TechType on game start.
public static void UnlockOnStart(TechType techType)
Parameters
techTypeTechType- The TechType to unlock at start.