Class ScanningGadget
Represents a scanning gadget.
public class ScanningGadget : Gadget
- Inheritance
-
ScanningGadget
- Inherited Members
- Extension Methods
Constructors
ScanningGadget(ICustomPrefab)
Constructs a scanning gadget.
public ScanningGadget(ICustomPrefab prefab)
Parameters
prefabICustomPrefab- The custom prefab to operate on.
ScanningGadget(ICustomPrefab, TechType, int)
Constructs a scanning gadget.
public ScanningGadget(ICustomPrefab prefab, TechType requiredForUnlock, int fragmentsToScan = 1)
Parameters
prefabICustomPrefab- The custom prefab to operate on.
requiredForUnlockTechType- The blueprint that must first be unlocked to unlock this item.
fragmentsToScanint- The amount of RequiredForUnlock that must be scanned to unlock this item.
Properties
AnalysisTech
Additional logic on what will happen when this item is unlocked.
public KnownTech.AnalysisTech AnalysisTech { get; set; }
Property Value
- KnownTech.AnalysisTech
CategoryForPda
The category within the group in the PDA blueprints where this item appears.
public TechCategory CategoryForPda { get; set; }
Property Value
- TechCategory
CompoundTechsForUnlock
Multiple blueprints that must first be scanned or picked up to unlocked this item.
public List<TechType> CompoundTechsForUnlock { get; set; }
Property Value
- List<TechType>
EncyclopediaEntryData
Adds an encyclopedia entry for this item in the PDA.
public PDAEncyclopedia.EntryData EncyclopediaEntryData { get; set; }
Property Value
- PDAEncyclopedia.EntryData
FragmentsToScan
Amount of RequiredForUnlock that must be scanned to unlock this item.
public int FragmentsToScan { get; set; }
Property Value
GroupForPda
The main group in the PDA blueprints where this item appears.
public TechGroup GroupForPda { get; set; }
Property Value
- TechGroup
RequiredForUnlock
The blueprint that must first be scanned or picked up to unlocked this item.
public required TechType RequiredForUnlock { get; set; }
Property Value
- TechType
ScannerEntryData
Additional logic on how the Scanner tool will interact with this item.
public PDAScanner.EntryData ScannerEntryData { get; set; }
Property Value
- PDAScanner.EntryData
Methods
Build()
Where the data actually gets registered to the game.
This is called after prefab register and PostRegisters in Register().
This is called after prefab register and PostRegisters in Register().
protected override void Build()
SetBuildable(bool)
Classifies this item as buildable via the habitat builder.
public ScanningGadget SetBuildable(bool isBuildable = true)
Parameters
isBuildablebool- Should this item be buildable?
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.
WithAnalysisTech(Sprite, List<StoryGoal>, FMODAsset, string)
Adds additional info on what should happen when this item is unlocked.
public ScanningGadget WithAnalysisTech(Sprite popupSprite, List<StoryGoal> storyGoalsToTrigger = null, FMODAsset unlockSound = null, string unlockMessage = "NotificationBlueprintUnlocked")
Parameters
popupSpriteSprite- The sprite that should popup on unlock.
storyGoalsToTriggerList<StoryGoal>- The story goals that should be triggered on unlock.
unlockSoundFMODAsset- The sound that will be played on unlock.
unlockMessagestring- Message which should be shown on unlock.
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.
WithCompoundTechsForUnlock(List<TechType>)
Adds multiple blueprints that must first be scanned or picked up to unlocked this item.
public ScanningGadget WithCompoundTechsForUnlock(List<TechType> compoundTechs)
Parameters
compoundTechsList<TechType>- The compound blueprints.
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.
WithEncyclopediaEntry(string, Sprite, Texture2D, FMODAsset)
Adds an encyclopedia entry for this item in the PDA.
public ScanningGadget WithEncyclopediaEntry(string path, Sprite popupSprite, Texture2D encyImage = null, FMODAsset encyAudio = null)
Parameters
pathstring- The path this entry will appear in.
popupSpriteSprite- The sprite that will popup once this entry is unlocked.
encyImageTexture2D- The entry image that will appear in the encyclopedia entry
encyAudioFMODAsset- The audio that can be played in the entry.
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.
WithPdaGroupCategory(TechGroup, TechCategory)
Adds this item into a blueprint category to appear in.
public ScanningGadget WithPdaGroupCategory(TechGroup group, TechCategory category)
Parameters
groupTechGroup- The main group in the PDA blueprints where this item appears
categoryTechCategory- The category within the group in the PDA blueprints where this item appears.
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.
Remarks
If the specified
group is a tech group that is present in the uGUI_BuilderMenu.groups list, this item will automatically
become buildable. To avoid this, or make this item a buildable manually, use the SetBuildable(bool) method.WithScannerEntry(float, bool, string, bool)
Adds additional info on how the Scanner tool should treat this item when scanning it.
public ScanningGadget WithScannerEntry(float scanTime, bool isFragment = false, string encyKey = null, bool destroyAfterScan = false)
Parameters
scanTimefloat- The amount of seconds it takes to scan this item.
isFragmentbool- Is this a fragment?
encyKeystring- The encyclopedia key to unlock once the scanning is completed.
destroyAfterScanbool- Should this object be destroyed after a successful scan?
Returns
- ScanningGadget
- A reference to this instance after the operation has completed.