From 12f272480700b1a65b0b4be45caf3d506f4a8aa9 Mon Sep 17 00:00:00 2001 From: tofudeadeye <156576986+tofudeadeye@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:58:50 +1100 Subject: [PATCH] feat(native/graphics): Add ENABLE_MOON_CYCLE_OVERRIDE and DISABLE_MOON_CYCLE_OVERRIDE natives (#980) * feat(native/graphics): Add ENABLE_MOON_CYCLE_OVERRIDE and DISABLE_MOON_CYCLE_OVERRIDE natives. This commit renames existing natives '_RESET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH' and '_SET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH' to their more accurate name. * Update DisableMoonCycleOverride.md Remove parameters section since this has no parameters, only natives that have parameters need such. * Update EnableMoonCycleOverride.md '## Parameters' shouldn't be above the native description. --------- Co-authored-by: ammonia-cfx <38232208+4mmonium@users.noreply.github.com> --- GRAPHICS/DisableMoonCycleOverride.md | 18 ++++++++++ GRAPHICS/EnableMoonCycleOverride.md | 35 +++++++++++++++++++ .../ResetExtraTimecycleModifierStrength.md | 12 ------- GRAPHICS/SetExtraTimecycleModifierStrength.md | 14 -------- 4 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 GRAPHICS/DisableMoonCycleOverride.md create mode 100644 GRAPHICS/EnableMoonCycleOverride.md delete mode 100644 GRAPHICS/ResetExtraTimecycleModifierStrength.md delete mode 100644 GRAPHICS/SetExtraTimecycleModifierStrength.md diff --git a/GRAPHICS/DisableMoonCycleOverride.md b/GRAPHICS/DisableMoonCycleOverride.md new file mode 100644 index 000000000..ad79255fc --- /dev/null +++ b/GRAPHICS/DisableMoonCycleOverride.md @@ -0,0 +1,18 @@ +--- +ns: GRAPHICS +aliases: ["0x2BF72AD5B41AA739", "_RESET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH"] +--- + +## DISABLE_MOON_CYCLE_OVERRIDE + +```c +// 0x2BF72AD5B41AA739 +void DISABLE_MOON_CYCLE_OVERRIDE(); +``` + +Removes any custom moon cycle overrides that have been configured with [ENABLE_MOON_CYCLE_OVERRIDE](#_0x2C328AF17210F009) + +## Examples +```lua +DisableMoonCycleOverride() +``` diff --git a/GRAPHICS/EnableMoonCycleOverride.md b/GRAPHICS/EnableMoonCycleOverride.md new file mode 100644 index 000000000..64a45f964 --- /dev/null +++ b/GRAPHICS/EnableMoonCycleOverride.md @@ -0,0 +1,35 @@ +--- +ns: GRAPHICS +aliases: ["0x2C328AF17210F009", "_SET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH"] +--- + +## ENABLE_MOON_CYCLE_OVERRIDE + +```c +// 0x2C328AF17210F009 +void ENABLE_MOON_CYCLE_OVERRIDE(float phase); +``` + +Enable a custom moon cycle, allowing control of which lunar phase the moon is in. + +Valid values are from `0.0` to `1.0`, with `0.5` representing a full moon. + +| Value | Lunar Phase | +| :---: | :-------------: | +| `0.1` | Waxing Crescent | +| `0.2` | First Quarter | +| `0.3` | Waxing Gibbous | +| `0.5` | Full Moon | +| `0.7` | Waning Gibbous | +| `0.8` | Third Quarter | +| `0.9` | Waning Crescent | + +The moon phase can be disabled with [DISABLE_MOON_CYCLE_OVERRIDE](#_0x2BF72AD5B41AA739) + +## Parameters +- **phase**: A value indicating the moon cycle. + +## Examples +```lua +EnableMoonCycleOverride(0.5) +``` diff --git a/GRAPHICS/ResetExtraTimecycleModifierStrength.md b/GRAPHICS/ResetExtraTimecycleModifierStrength.md deleted file mode 100644 index dc3360684..000000000 --- a/GRAPHICS/ResetExtraTimecycleModifierStrength.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -ns: GRAPHICS -aliases: ["0x2BF72AD5B41AA739"] ---- -## _RESET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH - -```c -// 0x2BF72AD5B41AA739 -void _RESET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH(); -``` - -Resets the extra timecycle modifier strength normally set with [`SetExtraTimecycleModifierStrength`](#_0x2C328AF17210F009) diff --git a/GRAPHICS/SetExtraTimecycleModifierStrength.md b/GRAPHICS/SetExtraTimecycleModifierStrength.md deleted file mode 100644 index 6e915d46e..000000000 --- a/GRAPHICS/SetExtraTimecycleModifierStrength.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -ns: GRAPHICS -aliases: ["0x2C328AF17210F009"] ---- -## _SET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH - -```c -// 0x2C328AF17210F009 -void _SET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH(float strength); -``` -The same as [`SetTimecycleModifierStrength`](#_0x82E7FFCD5B2326B3) but for the secondary tiemcycle modifier. - -## Parameters -* **strength**: