Skip to main content

PickupDockSettings

A class in Root.Township, Alta.Inventory.

Asset with the rules and feel of a PickupDock: which items it accepts, stacking, physics while docked, crafting limits, hover animation, haptics and sounds. Shared by many docks.

Constructors​

MemberWhat it is
PickupDockSettings()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

42 private and internal fields
MemberWhat it is
private bool allowAdditionalDocksBacking field for AllowAdditionalDocks.
private bool allowContainerInteractionBacking field for AllowContainerInteraction.
private bool allowPhysicalJointsBacking field for AllowPhysicalJoints.
private bool allowsCraftingBacking field for AllowsCrafting.
private float dockedScaleMultiplierBacking field for DockedScaleMultiplier.
private List<PickupTag> excludedTagsBacking field for ExcludedTags.
private float hapticOnHoverBacking field for HapticOnHover.
private AnimationCurve hapticPassThroughBacking field for HapticPassThrough.
private bool haveInteractorMemoryBacking field for HaveInteractorMemory.
private AnimationCurve hoverOffBacking field for HoverOff.
private AnimationCurve hoverOnBacking field for HoverOn.
private List<Item> includedItemsBacking field for IncludedItems.
private List<PickupTag> includedTagsBacking field for IncludedTags.
private bool isAcceptingTransientPickupsBacking field for IsAcceptingTransientPickups.
private bool isActiveInEquipmentModeBacking field for IsActiveInEquipmentMode.
private bool isAllowingCraftedItemsBacking field for IsAllowingCraftedItems.
private bool isAllowingCumbersomeItemsBacking field for IsAllowingCumbersomeItems.
private List<PickupTag> isAllowingFireFromTagsItems with any of these tags may keep burning while docked. Read by IsAllowingFireForPickup.
private bool isAllowingGlowingItemsBacking field for IsAllowingGlowingItems.
private bool isAllowingSubDockingBacking field for IsAllowingSubDocking.
private bool isDockingAutomaticBacking field for IsDockingAutomatic.
private bool isGrabbableBacking field for IsGrabbable.
private bool isHandDockingAllowedBacking field for IsHandDockingAllowed.
private bool isLengthBasedPositioningBacking field for IsLengthBasedPositioning.
private bool isMultiStackingAllowedBacking field for IsMultiStackingAllowed.
private bool isPhysicalTriggersOnlyBacking field for IsPhysicalTriggersOnly.
private bool isPlayingAddedToSoundBacking field for IsPlayingAddedToSound.
private bool isPlayingHoverOverSoundBacking field for IsPlayingHoverOverSound.
private bool isPlayingRemovedFromSoundBacking field for IsPlayingRemovedFromSound.
private bool isSnappingBacking field for IsSnapping. True by default; the tooltip says scaling into place is never used.
private bool isStackingDisabledBacking field for IsStackingDisabled.
private bool isStackingEnforcedBacking field for IsStackingEnforced.
private bool isTintingWithValueBacking field for IsTintingWithValue.
private LayerMask maintainPhysicalLayersBacking field for MaintainPhysicalLayers: colliders on these layers stay on while docked.
private int maxContainedStacksBacking field for MaxContainedStacks. 1 by default.
private int maximumCraftingSizeBacking field for MaximumCraftingSize. -1 by default.
private int minimumCraftingSizeBacking field for MinimumCraftingSize. -1 by default.
private List<PickupTag> physicalTagsItems with any of these tags stay physical (colliders on) while docked. Read by IsPhysical.
private float scaleDurationBacking field for ScaleDuration.
private List<PickupTag> scalingTagsBacking field for ScalingTags.
private int subDockPriorityBacking field for SubDockPriority.
private PickupDockVisualSettings visualSettingsBacking field for VisualSettings.

Properties​

MemberWhat it is
bool AllowAdditionalDocks { get; }When false, additional owned docks on a pickup in this dock turn off their pickup range.
bool AllowContainerInteraction { get; }Whether a container (such as a bag) docked here can still be opened and used.
bool AllowPhysicalJoints { get; }Whether physical items can be held in place with stabilising joints.
bool AllowsCrafting { get; }Whether a pickup docked here can be crafted with. Undocked pickups always can.
float DockedScaleMultiplier { get; }Extra scale applied to pickups that shrink into this dock.
List<PickupTag> ExcludedTags { get; }Items with any of these tags are refused, unless listed in IncludedItems.
float HapticOnHover { get; }Strength of the controller pulse when hovering over the dock (0 for none).
AnimationCurve HapticPassThrough { get; }Haptic curve played when a hand passes through the dock.
bool HaveInteractorMemory { get; }Remembers where each hand grabbed a docked item, so grabbing it again uses the same grip (if the player's setting allows it).
AnimationCurve HoverOff { get; }Scale curve for when a hand stops hovering.
AnimationCurve HoverOn { get; }Scale curve for when a hand starts hovering.
List<Item> IncludedItems { get; }Items always accepted, whatever their tags.
List<PickupTag> IncludedTags { get; }Items with any of these tags are accepted, unless they also have an excluded tag.
bool IsAcceptingTransientPickups { get; }Whether transient pickups can dock here, including from automatic dock areas.
bool IsActiveInEquipmentMode { get; }Whether the dock is active in equipment mode. Not read anywhere in this build.
bool IsAllowingCraftedItems { get; }Whether crafted items can dock here.
bool IsAllowingCumbersomeItems { get; }Whether cumbersome items are allowed. Not read anywhere in this build.
bool IsAllowingGlowingItems { get; }Keeps the lights of shrunken items on while docked.
bool IsAllowingSubDocking { get; }Lets a wrong item go into a dock on the already docked pickup instead, picking by SubDockPriority.
bool IsDockingAutomatic { get; }Docks a held item as soon as the local player's hand moves it over the dock.
bool IsGrabbable { get; }Whether hands can interact with the dock at all.
bool IsHandDockingAllowed { get; }When false, items can only be docked by code or physics, not by a hand.
bool IsLengthBasedPositioning { get; }Scales the docked position offset by the pickup's store scale modifier when not shrinking.
bool IsMultiStackingAllowed { get; }Allows different item types in the dock at once. Otherwise only more of the same stackable item.
bool IsPhysicalTriggersOnly { get; }Physical docked items keep their colliders only as triggers.
bool IsPlayingAddedToSound { get; }Plays the sound when an item is docked.
bool IsPlayingHoverOverSound { get; }Plays the sound when hovering an item over the dock.
bool IsPlayingRemovedFromSound { get; }Plays the sound when an item is taken out.
bool IsSnapping { get; }Snap items straight into place instead of scaling in. The tooltip says scaling is never used because it causes problems.
bool IsStackingDisabled { get; }Stops stacking more of the same item, and treats pouches as normal items.
bool IsStackingEnforced { get; }Refuses items that are not stackable.
bool IsTintingWithValue { get; }Tints the dock visuals with the docked item's current value.
LayerMask MaintainPhysicalLayers { get; }Layers of colliders that stay on while docked.
int MaxContainedStacks { get; }How many full stacks the dock holds. -1 for no limit.
int MaximumCraftingSize { get; }Largest item or crafting part size accepted. -1 for no limit.
int MinimumCraftingSize { get; }Smallest item or crafting part size accepted. -1 for no limit.
float ScaleDuration { get; }Seconds to scale in and out when scaling instead of snapping.
List<PickupTag> ScalingTags { get; }Items with these tags shrink into the dock (like a pouch or inventory slot).
int SubDockPriority { get; }Priority used to choose between sub-docks when sub-docking.
PickupDockVisualSettings VisualSettings { get; }Optional visual settings that change the dock's look with what it holds.

Methods​

MemberWhat it is
bool IsAllowingFireForPickup(Pickup pickup)True when the pickup has one of the tags allowed to keep burning while docked here.
bool IsPhysical(Item item)True when the item has one of the tags that keep it physical (colliders on) while docked.

Used in​

Members of other types that take, return or hold a PickupDockSettings: