Kerbal Space Program
1.12.4
|
Public Member Functions | |
void | CreateFlightTooltip (AvailablePart ap) |
Creates the part tooltip of the available part in the slot More... | |
Part | CreatePartFromInventory (AvailablePart partInfo) |
Creates a part that will then be turned into a part icon by the inventory. More... | |
Part | CreatePartFromInventory (ProtoPartSnapshot protoPartSnapshot) |
Creates a part that will then be turned into a part icon by the inventory. More... | |
void | DestroyTooltip () |
bool | IsKerbalWithinRange (ModuleInventoryPart inventoryPart) |
void | OnInventoryPartHover (uint partId, Part p) |
Called only whe the cursor is holding a cargo part over a ModuleInventoryPart, in order to open and close PAWs. More... | |
void | PlayPartDroppedSFX () |
Play the Part Dropped sfx with this class audioSource More... | |
void | PlayPartSelectedSFX () |
Play the Part Selected sfx with this class audioSource More... | |
void | ResetInventoryCacheValues () |
Reset the inventory cache variables More... | |
void | ReturnHeldPart () |
Returns current held part to current inventorySlotClicked. More... | |
void | SetIconAsPart () |
Sets the part that is currently treated as Icon, to be picked by the EditorLogic. More... | |
void | SetPartAsIcon (Transform parent, Part part) |
Sets a part as an icon More... | |
void | ToggleCargoPartsLight (int counter) |
Receives counters from the created and destroyed Inventory grids. If there are none, the light is turned off, if at least one counter remains, the light stays on. More... | |
void | UpdateCurrentCargoPart () |
Updates the Current held cargo part if it is not null. More... | |
Public Attributes | |
List< string > | availableInventoryParts = new List<string>() |
List of all available cargo inventory parts. More... | |
EditorInventoryOnlyIcon | CurrentInventoryOnlyIcon |
the current inventory only icon More... | |
bool | currentPartIsAttachable |
Trie if the current held part implements ModuleCargoPart. More... | |
bool | currentPartSnapping |
True if a selected part is being used for placement. More... | |
bool | editorPartDroppedBlockSfx |
When true, blocks the Sfx from Editor Logic form playing while the logic calls "on_partDropped" event on the cargo part. More... | |
bool | editorPartPickedBlockSfx |
When true, blocks the Sfx from Editor Logic form playing while the logic calls "st_place" event on the cargo part. More... | |
bool | hoveredPartIsKerbal |
True if the cursor hovered part is a kerbal on eva. More... | |
float | iconHeight = 58 |
Part Icon Height - How many pixels should a part 1m x 1m x 1m More... | |
GameObject | InventoryOnlyIconPrefab |
When inventory parts that can't be placed are held, they appear as 2D icons instead of 3D parts. When that happens this prefab here is used More... | |
GameObject | inventoryTooltipPrefab |
Prefab for the right-click tooltip panel for inventory slots More... | |
bool | IsCursorOverAnyPAWOrCargoPane |
True if the cursor is hovering any Part Action Window More... | |
bool | isHeldPartOutOfActionWindows |
The current held part is outside of a Part Action Window More... | |
bool | isSetAsPart |
True if the current selected part is set as an icon already More... | |
Shader | noAmbientHue |
Used to make cargo parts set as icon in inventories to not be affected by the Ambient light hue. More... | |
Shader | noAmbientHueBumped |
Used to make cargo parts set as icon in inventories to not be affected by the Ambient light hue. For use with Bumped shaders. More... | |
float | partIconDepthDistance = 39 |
PartIcon Depth Distance More... | |
bool | referenceNextCreatedInventoryPAW = false |
The next created inventory paw should be cached as currentPawAutoOpened, then set to false so it works as a switch. More... | |
Sprite | slot_partItem_current |
The sprite for the part item slot when greyed out, when a part has been picked up and we need a visual reference from which slot it comes from More... | |
Sprite | slot_partItem_normal |
The sprite for the part item slot when normal More... | |
Static Public Attributes | |
static int | amountToStore = 0 |
static bool | heldPartIsStack = false |
Whether the part under the mouse is a stack of parts drawn from an inventory More... | |
static UIPartActionControllerInventory | Instance |
Singleton More... | |
static int | stackSize = 0 |
The amount of parts in the stack under the mouse More... | |
Properties | |
Part | CurrentCargoPart [get, set] |
Current selected cargo part. Either from a picked up part, or a recently created one. More... | |
uint | CurrentHoveredInventoryPart [get] |
The Part.persistentId of the currently hovered inventory part (otherwise zero). More... | |
ModuleInventoryPart | CurrentInventory [get, set] |
Cache for the Part's inventory More... | |
UIPartActionInventorySlot | CurrentInventorySlotClicked [get, set] |
Cache for current inventory slot clicked. More... | |
UIPartActionInventorySlot | CurrentInventorySlotEmptied [get, set] |
Cache for current inventory slot for which all stacked elements were pulled. More... | |
UIPartActionInventorySlot | CurrentInventorySlotHovered [get, set] |
Cache for current inventory slot hovered. More... | |
ModuleInventoryPart | CurrentInventorySlotHoveredModule [get] |
Cache for the inventory module of the slot being hovered More... | |
ModuleCargoPart | CurrentModuleCargoPart [get] |
References the picked up part ModuleCargoPart More... | |
UIPartActionWindow | CurrentPawAutoOpened [get, set] |
Cached Reference of the current PartActionWindow that opened automatically by hovering with a held cargo part. More... | |
Part | ExchangedCargoPart [get, set] |
Current selected cargo part that will be exchanged to another. Part that comes from toolbox or dropped. More... | |
|
inline |
Creates the part tooltip of the available part in the slot
ap | Null checks this parameter. Returns if null. |
|
inline |
Creates a part that will then be turned into a part icon by the inventory.
partInfo | Available part as a reference for instancing the part. |
|
inline |
Creates a part that will then be turned into a part icon by the inventory.
protoPartSnapshot |
|
inline |
|
inline |
|
inline |
Called only whe the cursor is holding a cargo part over a ModuleInventoryPart, in order to open and close PAWs.
partId | Inventory part persistent id. |
p | Inventory Part. |
|
inline |
Play the Part Dropped sfx with this class audioSource
|
inline |
Play the Part Selected sfx with this class audioSource
|
inline |
Reset the inventory cache variables
|
inline |
Returns current held part to current inventorySlotClicked.
|
inline |
Sets the part that is currently treated as Icon, to be picked by the EditorLogic.
part | Part reference for the Editor logic. |
|
inline |
Sets a part as an icon
parent | Slot button transform. |
part | Part to become an icon. |
|
inline |
Receives counters from the created and destroyed Inventory grids. If there are none, the light is turned off, if at least one counter remains, the light stays on.
|
inline |
Updates the Current held cargo part if it is not null.
|
static |
List<string> UIPartActionControllerInventory.availableInventoryParts = new List<string>() |
List of all available cargo inventory parts.
|
protected |
|
protected |
EditorInventoryOnlyIcon UIPartActionControllerInventory.CurrentInventoryOnlyIcon |
the current inventory only icon
|
protected |
|
protected |
|
protected |
bool UIPartActionControllerInventory.currentPartIsAttachable |
Trie if the current held part implements ModuleCargoPart.
bool UIPartActionControllerInventory.currentPartSnapping |
True if a selected part is being used for placement.
|
protected |
bool UIPartActionControllerInventory.editorPartDroppedBlockSfx |
When true, blocks the Sfx from Editor Logic form playing while the logic calls "on_partDropped" event on the cargo part.
bool UIPartActionControllerInventory.editorPartPickedBlockSfx |
When true, blocks the Sfx from Editor Logic form playing while the logic calls "st_place" event on the cargo part.
|
protected |
|
static |
Whether the part under the mouse is a stack of parts drawn from an inventory
bool UIPartActionControllerInventory.hoveredPartIsKerbal |
True if the cursor hovered part is a kerbal on eva.
float UIPartActionControllerInventory.iconHeight = 58 |
Part Icon Height - How many pixels should a part 1m x 1m x 1m
|
static |
Singleton
GameObject UIPartActionControllerInventory.InventoryOnlyIconPrefab |
When inventory parts that can't be placed are held, they appear as 2D icons instead of 3D parts. When that happens this prefab here is used
GameObject UIPartActionControllerInventory.inventoryTooltipPrefab |
Prefab for the right-click tooltip panel for inventory slots
bool UIPartActionControllerInventory.IsCursorOverAnyPAWOrCargoPane |
True if the cursor is hovering any Part Action Window
bool UIPartActionControllerInventory.isHeldPartOutOfActionWindows |
The current held part is outside of a Part Action Window
bool UIPartActionControllerInventory.isSetAsPart |
True if the current selected part is set as an icon already
Shader UIPartActionControllerInventory.noAmbientHue |
Used to make cargo parts set as icon in inventories to not be affected by the Ambient light hue.
Shader UIPartActionControllerInventory.noAmbientHueBumped |
Used to make cargo parts set as icon in inventories to not be affected by the Ambient light hue. For use with Bumped shaders.
float UIPartActionControllerInventory.partIconDepthDistance = 39 |
PartIcon Depth Distance
bool UIPartActionControllerInventory.referenceNextCreatedInventoryPAW = false |
The next created inventory paw should be cached as currentPawAutoOpened, then set to false so it works as a switch.
Sprite UIPartActionControllerInventory.slot_partItem_current |
The sprite for the part item slot when greyed out, when a part has been picked up and we need a visual reference from which slot it comes from
Sprite UIPartActionControllerInventory.slot_partItem_normal |
The sprite for the part item slot when normal
|
static |
The amount of parts in the stack under the mouse
|
getset |
Current selected cargo part. Either from a picked up part, or a recently created one.
|
get |
The Part.persistentId of the currently hovered inventory part (otherwise zero).
|
getset |
Cache for the Part's inventory
|
getset |
Cache for current inventory slot clicked.
|
getset |
Cache for current inventory slot for which all stacked elements were pulled.
|
getset |
Cache for current inventory slot hovered.
|
get |
Cache for the inventory module of the slot being hovered
|
get |
References the picked up part ModuleCargoPart
|
getset |
Cached Reference of the current PartActionWindow that opened automatically by hovering with a held cargo part.
|
getset |
Current selected cargo part that will be exchanged to another. Part that comes from toolbox or dropped.