From 1fef0e9b2cf9012120e50f87cf091f824759bb4b Mon Sep 17 00:00:00 2001 From: Dregu Date: Fri, 3 Nov 2023 00:32:01 +0200 Subject: [PATCH] docs --- docs/game_data/spel2.lua | 5 ++++- docs/src/includes/_globals.md | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 7660c5c4d..047fb6ce4 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -438,10 +438,13 @@ function god(g) end ---@param g boolean ---@return nil function god_companions(g) end ----Set the zoom level used in levels and shops. 13.5 is the default. +---Set the zoom level used in levels and shops. 13.5 is the default, or 12.5 for shops. See zoom_reset. ---@param level number ---@return nil function zoom(level) end +---Reset the default zoom levels for all areas and sets current zoom level to 13.5. +---@return nil +function zoom_reset() end ---Pause/unpause the game. ---This is just short for `state.pause == 32`, but that produces an audio bug ---I suggest `state.pause == 2`, but that won't run any callback, `state.pause == 16` will do the same but [set_global_interval](https://spelunky-fyi.github.io/overlunky/#set_global_interval) will still work diff --git a/docs/src/includes/_globals.md b/docs/src/includes/_globals.md index 877be95c6..a7c66e789 100644 --- a/docs/src/includes/_globals.md +++ b/docs/src/includes/_globals.md @@ -2727,7 +2727,16 @@ Enables or disables the default position based camp camera bounds, to set them m #### nil zoom(float level) -Set the zoom level used in levels and shops. 13.5 is the default. +Set the zoom level used in levels and shops. 13.5 is the default, or 12.5 for shops. See zoom_reset. + +### zoom_reset + + +> Search script examples for [zoom_reset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=zoom_reset) + +#### nil zoom_reset() + +Reset the default zoom levels for all areas and sets current zoom level to 13.5. ## Room functions