config
One config section as an object, so values read by short key.
Functions
config.weapon
config.weapon(weapon [, bot]) -> Section| Name | Type | Description |
|---|---|---|
| weapon | string | Like "ak47"; "current" is the weapon in hand. |
| botoptional | string | "rage" or "legit". Default "rage". |
A weapon's config section.
Returns nil for "current" without a gun
Half-Life has one weapon config; "current" gives it.
config.section
config.section(prefix) -> Section| Name | Type |
|---|---|
| prefix | string |
Any section, like "misc.automation" or "visuals.esp".
section[key]
section[key] / section[key] = valueSame as features.get / features.set on prefix .. "." .. key.
- Keys keep their dots: ak["aim.automatic.penetration.minimum_damage"].
- An unknown section or key is an error.
section:get
section:get(key) -> any| Name | Type |
|---|---|
| key | string |
Read a value.
section:set
section:set(key, value)| Name | Type |
|---|---|
| key | string |
| value | any |
Write a value.
section:keys
section:keys() -> string[]Every short key in the section.
section:name
section:name() -> stringThe prefix, like "rage.ak47".