# Where are the Inputs?

### Where is the input reference?

{% hint style="info" %}
There are TWO input reference in this package and it is located below:

* **GeneratorItem** script has an input for interacting with objects with the raycast
* **GeneratorInventory** script has an input for opening and closing the inventory
  {% endhint %}

### Changing the Input:

#### GeneratorInventory:&#x20;

```csharp
void Update()
{
    if (Input.GetKeyDown(openInventoryKey) && hasJerrycan)
    {
         isInventoryOpen = !isInventoryOpen;
         genUIManager.ShowInventory(isInventoryOpen);
    }
}
```

#### GeneratorItem:

```csharp
private void Update()
{
    RumbleGenerator();
    GeneratorFuelBurnLogic();

    if(isLooking) 
    {
         if (Input.GetKeyDown(interactKey))
         {
             keyHoldTime = Time.time;
             StartCoroutine(CheckForLongPress());
         }

         if (Input.GetKeyUp(interactKey))
         {
             if (isFilling)
             {
                 StopWaterPour();  // Stop the sound when you stop pouring fuel
             }

             if (!isFilling)
             {
                 // If the key was released before the delay, perform the normal interaction
                 ObjectInteraction();
              }
              isFilling = false; // reset the flag when the key is released
            }
       }
}

IEnumerator CheckForLongPress()
{
    // Wait for the delay
    yield return new WaitForSeconds(keyHoldDelay);

    //If the key is still being held down after the delay, start filling the generator
    while (Input.GetKey(interactKey))
    {
        isFilling = true;
        GeneratorFillingLogic();
         yield return null;  // This makes the coroutine wait for the next frame before continuing
     }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://speedtutoruk.gitbook.io/generator-system-doc/support/where-are-the-inputs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
