✅ Verified in-game β€” deeper pass: re-confirmed all five functions; clarified that Query* are engine "what action string?" dispatchers returning "MakeUpright"/"SuperUse", while SuperUse/Use/MakeUpright are empty engine-called hook stubs; fixed misleading Notes

Bench

Module: bench.lua

Overview

The Bench module is a thin action-dispatch script for a bench prop. The two Query* functions are called by the engine to ask β€œwhat named action should this input map to?” and return an action-name string; the three action functions (SuperUse, Use, MakeUpright) are the hooks the engine then calls β€” all three are empty stubs here, so the actual behaviour is engine-side (or intentionally a no-op).

Inheritance

  • Inherits from: none β€” base/utility module
  • Imports: none

Instance pattern

This is a stateless manager/utility module with no per-instance tables or fields.

Functions

QueryRepair(intVal)

Engine dispatcher: returns the name of the repair action to run. Returns the string "MakeUpright" when intVal == 1, otherwise "" (no action). The returned name is the function the engine will call.

QueryActiveUse(intVal)

Engine dispatcher: returns the name of the β€œactive use” action. Returns "SuperUse" when intVal == 1, otherwise "". Again the return value is a function name, not the behaviour itself.

SuperUse(floatval, aiguid)

Placeholder function for handling the β€œSuperUse” action. Currently does nothing.

Use(aiguid, floatval)

Placeholder function for handling general use actions. Currently does nothing.

MakeUpright(objectguid, aiguid)

Placeholder function for making an object upright. Currently does nothing.

Events

This module does not listen to or fire any engine events.

Notes for modders

  • The Query* β†’ action-name β†’ action-function indirection is the reusable lever here: change what QueryRepair/QueryActiveUse return (or the intVal they gate on) to remap which action fires, and fill in the matching SuperUse/Use/MakeUpright body to give it behaviour. The names returned by the Query* functions must match the action functions the engine then calls.
  • All three action functions are currently empty β€” this bench prop does nothing scripted out of the box, so there is no existing behaviour to preserve if you override them.

Back to top

This site uses Just the Docs, a documentation theme for Jekyll.