API ReferenceGE Extensionsflowgraphnodescareer
On Refueling
- **Name:** `On Refueling`
Overview
- Name:
On Refueling - Category:
repeat_instant - File:
lua/ge/extensions/flowgraph/nodes/career/onRefueling.lua - Pattern: Class-based (
C = {}, returns_flowgraph_createNode(C))
Description
Detects various events associated with the refueling process in career mode. Listens for transaction start/end, fuel filling completion, and payment events via hook callbacks.
Pin Schema
Output Pins
| Pin | Type | Description |
|---|---|---|
openedMenu | flow (impulse) | Fires once when the refueling menu is opened |
tankFilled | flow (impulse) | Fires once when a tank is completely filled |
currentlyFueling | flow | Active while fueling is in progress |
tankPercent | number | Filled percentage of the tank (0–1) |
paidPrice | flow (impulse) | Fires once when the player pays |
closedMenu | flow (impulse) | Fires once when the refueling menu is closed |
Behavior
work()resets all flow pins each frame, then applies queued flags from hook callbacks. Reads live fueling state fromcareer_modules_fuel.isCurrentlyFueling()and calculates aggregate tank percentage fromcareer_modules_fuel.getFuelData().- Hook callbacks (
onRefuelingStartTransaction,onRefuelingStopFueling,onPaidRefuelling,onRefuelingEndTransaction) set flags that are consumed on the nextwork()call. - Flags are cleared after each frame via
table.clear(self.flags).
Key APIs Used
career_modules_fuel.isCurrentlyFueling()career_modules_fuel.getFuelData()
Tags
#flowgraph #node #ge #career #refueling
Additional Exports
init()
-
name-string- (see source) -
description-string- (see source) -
color-any- (see source) -
icon-any- (see source) -
category-string- (see source) -
pinSchema-table- (see source) -
dependencies-table- (see source)
See Also
- Add To Inventory (Flowgraph Node) - Related reference
- Career Vehicle Select (Flowgraph Node) - Related reference
- Set Tutorial Step (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide