Table of Contents

Class ScanningGadget

Namespace
Nautilus.Assets.Gadgets
Assembly
Nautilus.dll
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

prefab ICustomPrefab
The custom prefab to operate on.

ScanningGadget(ICustomPrefab, TechType, int)

Constructs a scanning gadget.
public ScanningGadget(ICustomPrefab prefab, TechType requiredForUnlock, int fragmentsToScan = 1)

Parameters

prefab ICustomPrefab
The custom prefab to operate on.
requiredForUnlock TechType
The blueprint that must first be unlocked to unlock this item.
fragmentsToScan int
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

int

GroupForPda

The main group in the PDA blueprints where this item appears.
public TechGroup GroupForPda { get; set; }

Property Value

TechGroup

IsBuildable

Classifies this item as buildable via the habitat builder.
public bool IsBuildable { get; }

Property Value

bool

IsHardLocked

Marks this item as hard locked.
public bool IsHardLocked { get; }

Property Value

bool

PdaSortPosition

Whether the blueprint is inserted before or appended after the PdaSortTarget in the PDA.
public ScanningGadget.SortPosition PdaSortPosition { get; set; }

Property Value

ScanningGadget.SortPosition

PdaSortTarget

It will be added/inserted next to this item or at the end/beginning if not found.
public TechType PdaSortTarget { get; set; }

Property Value

TechType

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().
protected override void Build()

SetBuildable(bool)

Classifies this item as buildable via the habitat builder.
public ScanningGadget SetBuildable(bool isBuildable = true)

Parameters

isBuildable bool
Should this item be buildable?

Returns

ScanningGadget
A reference to this instance after the operation has completed.

SetHardLocked(bool)

Makes this item hard locked. Hard locked items are not unlocked by default even in creative and can't be unlocked using the `unlockall` command.
public ScanningGadget SetHardLocked(bool isHardLocked = true)

Parameters

isHardLocked bool
Should this item be hard locked?

Returns

ScanningGadget
A reference to this instance after the operation has completed.

WithAnalysisTech(Sprite, FMODAsset, string)

Adds additional info on what should happen when this item is unlocked.
public ScanningGadget WithAnalysisTech(Sprite popupSprite, FMODAsset unlockSound = null, string unlockMessage = null)

Parameters

popupSprite Sprite
The sprite that should popup on unlock.
unlockSound FMODAsset
The sound that will be played on unlock.
unlockMessage string
Message which should be shown on unlock.

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, FMODAsset unlockSound = null, string unlockMessage = null)

Parameters

popupSprite Sprite
The sprite that should popup on unlock.
storyGoalsToTrigger List<StoryGoal>
The story goals that should be triggered on unlock.
unlockSound FMODAsset
The sound that will be played on unlock.
unlockMessage string
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

compoundTechs List<TechType>
The compound blueprints.

Returns

ScanningGadget
A reference to this instance after the operation has completed.

WithEncyclopediaEntry(string, Sprite, Texture2D, FMODAsset, FMODAsset)

Adds an encyclopedia entry for this item in the PDA. This method does not ask for display text, for that you must use the LanguageHandler.

The encyclopedia entry's key will be set as the TechType string.

The language keys for this ency are as as follows: "Ency_{TechType}" (title) and "EncyDesc_{TechType}" (description), i.e. "Ency_Peeper".

public ScanningGadget WithEncyclopediaEntry(string path, Sprite popupSprite, Texture2D encyImage = null, FMODAsset unlockSound = null, FMODAsset encyAudio = null)

Parameters

path string
The path this entry will appear in.
popupSprite Sprite
The sprite that will pop up on the side of the screen once this entry is unlocked.
encyImage Texture2D
The entry image that will appear in the encyclopedia entry
unlockSound FMODAsset
The audio that is played when this sound is unlocked. Typical values are UnlockBasic and UnlockBasic. If unassigned, will have a default value of UnlockBasic.
encyAudio FMODAsset
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

group TechGroup
The main group in the PDA blueprints where this item appears.
category TechCategory
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.

WithPdaGroupCategoryAfter(TechGroup, TechCategory, TechType)

Adds this item into a blueprint category to appear in.
public ScanningGadget WithPdaGroupCategoryAfter(TechGroup group, TechCategory category, TechType target = TechType.None)

Parameters

group TechGroup
The main group in the PDA blueprints where this item appears.
category TechCategory
The category within the group in the PDA blueprints where this item appears.
target TechType
It will be added after this target item or at the end if not found.

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.

WithPdaGroupCategoryBefore(TechGroup, TechCategory, TechType)

Adds this item into a blueprint category to appear in.
public ScanningGadget WithPdaGroupCategoryBefore(TechGroup group, TechCategory category, TechType target = TechType.None)

Parameters

group TechGroup
The main group in the PDA blueprints where this item appears.
category TechCategory
The category within the group in the PDA blueprints where this item appears.
target TechType
It will be inserted before this target item or at the beginning if not found.

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.
[Obsolete("Deprecated; Use WithScannerEntry(TechType, float, bool, string, bool) overload instead.")]
public ScanningGadget WithScannerEntry(float scanTime, bool isFragment = false, string encyKey = null, bool destroyAfterScan = false)

Parameters

scanTime float
The amount of seconds it takes to scan this item.
isFragment bool
Is this a fragment?
encyKey string
The encyclopedia key to unlock once the scanning is completed.
destroyAfterScan bool
Should this object be destroyed after a successful scan?

Returns

ScanningGadget
A reference to this instance after the operation has completed.

Remarks

This overload overrides the PDAScanner entry data for the RequiredForUnlock's entry.

WithScannerEntry(TechType, float, bool, string, bool)

Adds additional info on how the Scanner tool should treat this item when scanning it.
public ScanningGadget WithScannerEntry(TechType blueprint, float scanTime, bool isFragment = false, string encyKey = null, bool destroyAfterScan = false)

Parameters

blueprint TechType
The blueprint that gets unlocked once this item is scanned.
scanTime float
The amount of seconds it takes to scan this item.
isFragment bool
Is this a fragment?
encyKey string
The encyclopedia key to unlock once the scanning is completed.
destroyAfterScan bool
Should this object be destroyed after a successful scan?

Returns

ScanningGadget
A reference to this instance after the operation has completed.
  翻译: