rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
45 lines (44 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockWorldManager = void 0;
const world_1 = require("../../../shared/common/world");
class MockWorldManager {
_time;
_weather;
constructor() {
this._time = {
hour: 12,
minute: 0,
second: 0,
};
this._weather = world_1.WeatherTypeEnum.CLEAR;
}
get time() {
return this._time;
}
get weather() {
return this._weather;
}
setTimeHour(value) {
this._time.hour = MockWorldManager._normalizeHours(value);
}
setTimeMinute(value) {
this._time.minute = MockWorldManager._normalizeMinutes(value);
}
setTimeSecond(value) {
this._time.second = MockWorldManager._normalizeSeconds(value);
}
setWeather(value) {
this._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.MockWorldManager = MockWorldManager;