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
blueprint
TechType- The blueprint to unlock.
requirement
TechType- 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
targetTechType
TechType- 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
targetTechType
TechType- Target TechType to remove the unlocks for.
techTypes
List<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
techType
TechType
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
analysisTech
KnownTech.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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSound
FMODAsset- 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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSound
FMODAsset- The sound that plays when you unlock the blueprint. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSprite
Sprite- 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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSound
FMODAsset- The sound that plays when you unlock the blueprint.
unlockSprite
Sprite- The sprite that shows up when you unlock the blueprint.
storyGoals
List<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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessage
string- 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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessage
string- The message that shows up on the right when the blueprint is unlocked. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSound
FMODAsset- 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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockMessage
string- The message that shows up on the right when the blueprint is unlocked. See KnownTechHandler.DefaultUnlockData for a list of some valid parameters.
unlockSprite
Sprite- 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
techTypeToBeAnalysed
TechType- This TechType is the criteria for all of the "unlock TechTypes"; when this TechType is unlocked, so are all the ones in that list
techTypesToUnlock
IEnumerable<TechType>- The TechTypes that will be unlocked when "techTypeToSet" is unlocked.
unlockSprite
Sprite- 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
techType
TechTypecompoundTechsForUnlock
List<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
techType
TechType- 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
techType
TechType- The TechType to unlock at start.