UNPKG

rock-mod

Version:

Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.

34 lines (33 loc) 936 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RageWorldManager = void 0; class RageWorldManager { get time() { return mp.world.time; } get weather() { return mp.world.weather; } setTimeHour(value) { mp.world.time.hour = RageWorldManager._normalizeHours(value); } setTimeMinute(value) { mp.world.time.minute = RageWorldManager._normalizeMinutes(value); } setTimeSecond(value) { mp.world.time.second = RageWorldManager._normalizeSeconds(value); } setWeather(value) { mp.world.weather = value; } static _normalizeHours(hours) { return ((hours % 24) + 24) % 24; } static _normalizeMinutes(minutes) { return ((minutes % 60) + 60) % 60; } static _normalizeSeconds(seconds) { return ((seconds % 60) + 60) % 60; } } exports.RageWorldManager = RageWorldManager;