Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
InvItem (int[] idArray) | |
The default Constructor. More... | |
InvItem (int _id) | |
A Constructor in which the id is explicitly set. More... | |
InvItem (InvItem assetItem) | |
A Constructor that sets all its values by copying another InvItem. More... | |
void | ShowGUI (string apiPrefix) |
void | RebuildProperties () |
bool | ReferencesAsset (ActionListAsset actionListAsset) |
int | GetNumItemReferences (int _itemID) |
int | UpdateItemReferences (int oldItemID, int newItemID) |
void | Upgrade () |
bool | DoesHaveInventoryInteraction (InvItem invItem) |
Checks if the item has an InvInteraction combine interaction for a specific InvItem. More... | |
string | GetLabel (int languageNumber) |
Gets the item's display name. More... | |
void | RunUseInteraction (int iconID=-1) |
Runs one of the item's 'Use' interactions. More... | |
void | RunExamineInteraction () |
void | CombineWithSelf () |
void | CombineWithItem (int otherItemID) |
Combines the item with another. More... | |
void | CombineWithItem (InvItem otherItem) |
Combines the item with another. More... | |
void | Select () |
void | ShowInteractionMenus () |
void | ShowInteractionMenu (Menu menu, bool includeInventoryItems) |
Turns on a specific Menu, linking any Interaction icons in it to the Inventory item. The Menu doesn't need to have an appearType of AppearType.OnInteraction. More... | |
InvVar | GetProperty (int ID) |
Gets a property of the inventory item. More... | |
override string | ToString () |
string | GetTranslatableString (int index) |
Gets the text to be translated, given its index. More... | |
int | GetTranslationID (int index) |
Gets the translation ID of a given text index. More... | |
AC_TextType | GetTranslationType (int index) |
Gets the translation type of a given text index. More... | |
void | UpdateTranslatableString (int index, string updatedText) |
int | GetNumTranslatables () |
Gets the maximum number of possible translatable texts. More... | |
bool | HasExistingTranslation (int index) |
Checks if a given text index has already been assigned a unique translation ID. More... | |
void | SetTranslationID (int index, int _lineID) |
Sets the translation ID of a given text index More... | |
string | GetOwner (int index) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More... | |
bool | OwnerIsPlayer (int index) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More... | |
bool | CanTranslate (int index) |
Checks if a given text index can and should be translated. More... | |
Public Attributes | |
string | label |
int | id |
string | altLabel |
bool | carryOnStart |
bool | carryOnStartNotDefault |
List< int > | carryOnStartIDs = new List<int>() |
List< InvVar > | vars = new List<InvVar>() |
bool | canCarryMultiple |
int | count |
bool | canBeLowerCase = false |
int | maxCount = 999 |
ItemStackingMode | itemStackingMode = ItemStackingMode.All |
Texture | tex |
Texture | activeTex |
Texture | selectedTex |
GameObject | linkedPrefab |
CursorIcon | cursorIcon = new CursorIcon () |
int | lineID = -1 |
int | useIconID = 0 |
int | binID |
bool | overrideUseSyntax = false |
HotspotPrefix | hotspotPrefix1 = new HotspotPrefix ("Use") |
HotspotPrefix | hotspotPrefix2 = new HotspotPrefix ("on") |
ActionListAsset | useActionList |
ActionListAsset | lookActionList |
List< InvInteraction > | interactions = new List<InvInteraction>() |
List< InvCombineInteraction > | combineInteractions = new List<InvCombineInteraction>() |
ActionListAsset | unhandledActionList |
ActionListAsset | unhandledGiveActionList |
ActionListAsset | unhandledCombineActionList |
bool | showInFilter |
Properties | |
string | EditorLabel [get] |
A data class for an Inventory item. Items are stored in InventoryManager, and referenced in InvInstance classes when added to the Player's inventory at runtime.
AC.InvItem.InvItem | ( | int[] | idArray | ) |
The default Constructor.
idArray | An array of already-used ID numbers, so that a unique ID number can be assigned |
AC.InvItem.InvItem | ( | int | _id | ) |
A Constructor in which the id is explicitly set.
_id | The ID number to assign |
AC.InvItem.InvItem | ( | InvItem | assetItem | ) |
bool AC.InvItem.CanTranslate | ( | int | index | ) |
Checks if a given text index can and should be translated.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.InvItem.CombineWithItem | ( | int | otherItemID | ) |
Combines the item with another.
otherItemID | The ID number of the inventory item to combine with |
void AC.InvItem.CombineWithItem | ( | InvItem | otherItem | ) |
Combines the item with another.
otherItem | The inventory item to combine with |
void AC.InvItem.CombineWithSelf | ( | ) |
Combines the item with itself. This is normally only available when combining items via Hotspot-based InventoryBox elements, but this allows it to be enforced.
bool AC.InvItem.DoesHaveInventoryInteraction | ( | InvItem | invItem | ) |
Checks if the item has an InvInteraction combine interaction for a specific InvItem.
invItem | The InvITem to check for |
string AC.InvItem.GetLabel | ( | int | languageNumber | ) |
Gets the item's display name.
languageNumber | The index of the current language, as set in SpeechManager |
int AC.InvItem.GetNumTranslatables | ( | ) |
Gets the maximum number of possible translatable texts.
Implements AC.ITranslatable.
string AC.InvItem.GetOwner | ( | int | index | ) |
Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.
index | The index of the translatable text |
Implements AC.ITranslatable.
InvVar AC.InvItem.GetProperty | ( | int | ID | ) |
Gets a property of the inventory item.
ID | The ID number of the property to get |
multiplyByItemCount | If True, then the property's integer/float value will be multipled by the item's count |
string AC.InvItem.GetTranslatableString | ( | int | index | ) |
Gets the text to be translated, given its index.
index | The index of the translatable text |
Implements AC.ITranslatable.
int AC.InvItem.GetTranslationID | ( | int | index | ) |
Gets the translation ID of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
AC_TextType AC.InvItem.GetTranslationType | ( | int | index | ) |
Gets the translation type of a given text index.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.InvItem.HasExistingTranslation | ( | int | index | ) |
Checks if a given text index has already been assigned a unique translation ID.
index | The index of the translatable text |
Implements AC.ITranslatable.
bool AC.InvItem.OwnerIsPlayer | ( | int | index | ) |
Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.
index | The index of the translatable text |
Implements AC.ITranslatable.
void AC.InvItem.RunExamineInteraction | ( | ) |
Runs the item's 'Examine' interaction, if one is defined.
void AC.InvItem.RunUseInteraction | ( | int | iconID = -1 | ) |
Runs one of the item's 'Use' interactions.
iconID | The ID number of the CursorIcon associated with the use interaction. If no number is supplied, the default use interaction will be run. |
void AC.InvItem.Select | ( | ) |
Selects the item.
void AC.InvItem.SetTranslationID | ( | int | index, |
int | lineID | ||
) |
Sets the translation ID of a given text index
index | The index of the translatable text |
lineID | The new translation ID to assign the translatable text |
Implements AC.ITranslatable.
void AC.InvItem.ShowInteractionMenu | ( | Menu | menu, |
bool | includeInventoryItems | ||
) |
Turns on a specific Menu, linking any Interaction icons in it to the Inventory item. The Menu doesn't need to have an appearType of AppearType.OnInteraction.
menu | The Menu to turn on |
includeInventoryItems | If True, and supported, then other inventory items associcated with the item's interactions will be included as well |
void AC.InvItem.ShowInteractionMenus | ( | ) |
Shows any Menus with appearType = AppearType.OnInteraction, connected to a the InvItem.
void AC.InvItem.Upgrade | ( | ) |
Upgrades the item from a previous version of AC
Texture AC.InvItem.activeTex |
The item's 'highlighted' graphic
string AC.InvItem.altLabel |
The item's in-game name, if not label
int AC.InvItem.binID |
The ID number of the item's InvBin category, as defined in InventoryManager
bool AC.InvItem.canBeLowerCase = false |
If True, the item's label will be lower-cased when placed in the middle of a Hotspot label if it is not at the start.
bool AC.InvItem.canCarryMultiple |
If True, then multiple instances of the item can be carried at once
bool AC.InvItem.carryOnStart |
If True, the Player carries the item when the game begins
List<int> AC.InvItem.carryOnStartIDs = new List<int>() |
The ID numbers of the Player prefabs that carry the item when the game begins, if carryOnStartNotDefault = True
bool AC.InvItem.carryOnStartNotDefault |
If True, then a Player prefab that is not the default carries the item when the game begins (if playerSwitching = PlayerSwitching.Allow in SettingsManager)
List<InvCombineInteraction> AC.InvItem.combineInteractions = new List<InvCombineInteraction>() |
A list of all "Combine" interactions associated witht the item
int AC.InvItem.count |
The number of instances being carried, if canCarryMultiple = True
CursorIcon AC.InvItem.cursorIcon = new CursorIcon () |
A CursorIcon instance that, if assigned, will be used in place of the 'tex' Texture when the item is selected on the cursor
HotspotPrefix AC.InvItem.hotspotPrefix1 = new HotspotPrefix ("Use") |
The "Use" in "Use X on Y", if overrideUseSyntax = True
HotspotPrefix AC.InvItem.hotspotPrefix2 = new HotspotPrefix ("on") |
The "on" on "Use X on Y", if overrideUseSyntax = True
int AC.InvItem.id |
A unique identifier
List<InvInteraction> AC.InvItem.interactions = new List<InvInteraction>() |
A List of all "Use" interactions associated with the item
ItemStackingMode AC.InvItem.itemStackingMode = ItemStackingMode.All |
How to select items when multiple are in a given slot
string AC.InvItem.label |
The item's Editor name
int AC.InvItem.lineID = -1 |
The translation ID number of the item's name, as generated by SpeechManager
GameObject AC.InvItem.linkedPrefab |
A GameObject that can be associated with the item, for the creation of e.g. 3D inventory items (through scripting only)
ActionListAsset AC.InvItem.lookActionList |
The ActionListAsset to run when the item is examined, if multiple interactions are disallowed
int AC.InvItem.maxCount = 999 |
The maximum amount that can be held in a single slot
bool AC.InvItem.overrideUseSyntax = false |
If True, then the item has its own "Use X on Y" syntax when selected
Texture AC.InvItem.selectedTex |
The item's 'selected' graphic (if SettingsManager's selectInventoryDisplay = SelectInventoryDisplay.ShowSelectedGraphic)
Texture AC.InvItem.tex |
The item's main graphic
ActionListAsset AC.InvItem.unhandledActionList |
The ActionListAsset to run when using the item on a Hotspot is unhandled
ActionListAsset AC.InvItem.unhandledCombineActionList |
The ActionListAsset to run when using the item on another InvItem is unhandled
ActionListAsset AC.InvItem.unhandledGiveActionList |
The ActionListAsset to run when giving the item to an NPC is unhandled
ActionListAsset AC.InvItem.useActionList |
The ActionListAsset to run when the item is used, if multiple interactions are disallowed
int AC.InvItem.useIconID = 0 |
The ID number of the CursorIcon (in CursorManager's cursorIcons List) to show when hovering over the item if appropriate