game
Game files as the engine sees them, .pak archives included.
Functions
game.read_file
game.read_file(path) -> string| Name | Type | Description |
|---|---|---|
| path | string | Relative to the game, like "sound/weapons/ak47-1.wav". |
Whole file as a string.
Returns nil, err when missing
Absolute paths and .. are refused.
game.list
game.list([dir]) -> string[]| Name | Type | Description |
|---|---|---|
| diroptional | string | Default the game root. |
Names in a game folder, sorted. Folders end in /.
Merges every search folder and pak0.pak to pak9.pak; a name shows once.