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.
- Listed in Items, inventory and logic
- Inherits or implements
ScriptableObject - Derived types
PickupDockSettings.Create - Nested types
Create - Documented in Docks
Constructors
| Member | What it is |
|---|---|
PickupDockSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
42 private and internal fields
| Member | What it is |
|---|---|
private bool allowAdditionalDocks | Backing field for AllowAdditionalDocks. |
private bool allowContainerInteraction | Backing field for AllowContainerInteraction. |
private bool allowPhysicalJoints | Backing field for AllowPhysicalJoints. |
private bool allowsCrafting | Backing field for AllowsCrafting. |
private float dockedScaleMultiplier | Backing field for DockedScaleMultiplier. |
private List<PickupTag> excludedTags | Backing field for ExcludedTags. |
private float hapticOnHover | Backing field for HapticOnHover. |
private AnimationCurve hapticPassThrough | Backing field for HapticPassThrough. |
private bool haveInteractorMemory | Backing field for HaveInteractorMemory. |
private AnimationCurve hoverOff | Backing field for HoverOff. |
private AnimationCurve hoverOn | Backing field for HoverOn. |
private List<Item> includedItems | Backing field for IncludedItems. |
private List<PickupTag> includedTags | Backing field for IncludedTags. |
private bool isAcceptingTransientPickups | Backing field for IsAcceptingTransientPickups. |
private bool isActiveInEquipmentMode | Backing field for IsActiveInEquipmentMode. |
private bool isAllowingCraftedItems | Backing field for IsAllowingCraftedItems. |
private bool isAllowingCumbersomeItems | Backing field for IsAllowingCumbersomeItems. |
private List<PickupTag> isAllowingFireFromTags | Items with any of these tags may keep burning while docked. Read by IsAllowingFireForPickup. |
private bool isAllowingGlowingItems | Backing field for IsAllowingGlowingItems. |
private bool isAllowingSubDocking | Backing field for IsAllowingSubDocking. |
private bool isDockingAutomatic | Backing field for IsDockingAutomatic. |
private bool isGrabbable | Backing field for IsGrabbable. |
private bool isHandDockingAllowed | Backing field for IsHandDockingAllowed. |
private bool isLengthBasedPositioning | Backing field for IsLengthBasedPositioning. |
private bool isMultiStackingAllowed | Backing field for IsMultiStackingAllowed. |
private bool isPhysicalTriggersOnly | Backing field for IsPhysicalTriggersOnly. |
private bool isPlayingAddedToSound | Backing field for IsPlayingAddedToSound. |
private bool isPlayingHoverOverSound | Backing field for IsPlayingHoverOverSound. |
private bool isPlayingRemovedFromSound | Backing field for IsPlayingRemovedFromSound. |
private bool isSnapping | Backing field for IsSnapping. True by default; the tooltip says scaling into place is never used. |
private bool isStackingDisabled | Backing field for IsStackingDisabled. |
private bool isStackingEnforced | Backing field for IsStackingEnforced. |
private bool isTintingWithValue | Backing field for IsTintingWithValue. |
private LayerMask maintainPhysicalLayers | Backing field for MaintainPhysicalLayers: colliders on these layers stay on while docked. |
private int maxContainedStacks | Backing field for MaxContainedStacks. 1 by default. |
private int maximumCraftingSize | Backing field for MaximumCraftingSize. -1 by default. |
private int minimumCraftingSize | Backing field for MinimumCraftingSize. -1 by default. |
private List<PickupTag> physicalTags | Items with any of these tags stay physical (colliders on) while docked. Read by IsPhysical. |
private float scaleDuration | Backing field for ScaleDuration. |
private List<PickupTag> scalingTags | Backing field for ScalingTags. |
private int subDockPriority | Backing field for SubDockPriority. |
private PickupDockVisualSettings visualSettings | Backing field for VisualSettings. |
Properties
| Member | What 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
| Member | What 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:
QuickDrawTrigger.validDocks, QuickDrawTrigger.ValidDocks, Item.GetPositioning, Item.CustomDockPositioning.CustomDockPositioning, Item.CustomDockPositioning.dockType, Item.CustomDockPositioning.Type, PickupDock.settings, PickupDock.Settings, IRespawnShrineSettings.ResourceType, RespawnShrineData.resourceType, RespawnShrineData.ResourceType, RespawnShrineFuelDisplay.SpawnFuelItem, RespawnShrineFuelDisplay.UpdateDisplay, CommonPrefabs.pouchDockSettings, CommonPrefabs.PouchDockSettings, DockObjectTask.possibleDocks, DockObjectTask.targetDocksHash, DockObjectTaskArgument.DockObjectTaskArgument, DockObjectTaskArgument.DockSettings, GrabPoint.enabledFromDocks, GrabPoint.EnabledFromDocks, PickupDockedFilter.onlyFor, StorageStatParameters.pickupDockSettings, StorageStatParameters.WeightMultiplierDockSettings.