Skip to content

Commit

Permalink
Merge pull request #69 from AdriLez/master
Browse files Browse the repository at this point in the history
Added missing parameter
  • Loading branch information
ImaginaryVillain committed May 29, 2022
2 parents 2f6eef0 + 437d54e commit 23073aa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
19 changes: 13 additions & 6 deletions CommunityLightingMZDemo/js/plugins/Community_Lighting_MZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Imported[Community.Lighting.name] = true;
* @type boolean
* @default false
*
* @param Lights Active Radius
* @parent ---Offset and Sizes---
* @desc The number of grid spaces away from the player that lights are turned on. (0 to not use this functionality)
* Default: 0
* @default 0
* @param Daynight Cycle
* @parent ---General Settings---
* @desc Should the brightness change over time
* @type boolean
* @default true
*
* @param Reset Lights
* @parent ---General Settings---
Expand Down Expand Up @@ -137,6 +137,12 @@ Imported[Community.Lighting.name] = true;
* @param ---Offset and Sizes---
* @default
*
* @param Lights Active Radius
* @parent ---Offset and Sizes---
* @desc The number of grid spaces away from the player that lights are turned on. (0 to not use this functionality)
* Default: 0
* @default 0
*
* @param Player radius
* @parent ---Offset and Sizes---
* @desc Adjust the light radius around the player
Expand Down Expand Up @@ -859,6 +865,7 @@ Imported[Community.Lighting.name] = true;
let dayNightSaveNight = Number(parameters["Save Night Switch"]) || 0;
let dayNightNoAutoshadow = eval(parameters["No Autoshadow During Night"]) || false;
let hideAutoShadow = false;
let brightnessOverTime = eval(parameters['Daynight Cycle']) || true;
let dayNightList = (function(dayNight, nightHours)
{
let result = [];
Expand Down Expand Up @@ -1800,7 +1807,7 @@ Imported[Community.Lighting.name] = true;

let daynightspeed = $gameVariables.GetDaynightSpeed();

if (daynightspeed > 0 && daynightspeed < 5000) {
if (daynightspeed > 0 && daynightspeed < 5000 && brightnessOverTime) {

let datenow = new Date();
let seconds = Math.floor(datenow.getTime() / 10);
Expand Down
19 changes: 13 additions & 6 deletions Community_Lighting_MZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Imported[Community.Lighting.name] = true;
* @type boolean
* @default false
*
* @param Lights Active Radius
* @parent ---Offset and Sizes---
* @desc The number of grid spaces away from the player that lights are turned on. (0 to not use this functionality)
* Default: 0
* @default 0
* @param Daynight Cycle
* @parent ---General Settings---
* @desc Should the brightness change over time
* @type boolean
* @default true
*
* @param Reset Lights
* @parent ---General Settings---
Expand Down Expand Up @@ -137,6 +137,12 @@ Imported[Community.Lighting.name] = true;
* @param ---Offset and Sizes---
* @default
*
* @param Lights Active Radius
* @parent ---Offset and Sizes---
* @desc The number of grid spaces away from the player that lights are turned on. (0 to not use this functionality)
* Default: 0
* @default 0
*
* @param Player radius
* @parent ---Offset and Sizes---
* @desc Adjust the light radius around the player
Expand Down Expand Up @@ -859,6 +865,7 @@ Imported[Community.Lighting.name] = true;
let dayNightSaveNight = Number(parameters["Save Night Switch"]) || 0;
let dayNightNoAutoshadow = eval(parameters["No Autoshadow During Night"]) || false;
let hideAutoShadow = false;
let brightnessOverTime = eval(parameters['Daynight Cycle']) || true;
let dayNightList = (function(dayNight, nightHours)
{
let result = [];
Expand Down Expand Up @@ -1800,7 +1807,7 @@ Imported[Community.Lighting.name] = true;

let daynightspeed = $gameVariables.GetDaynightSpeed();

if (daynightspeed > 0 && daynightspeed < 5000) {
if (daynightspeed > 0 && daynightspeed < 5000 && brightnessOverTime) {

let datenow = new Date();
let seconds = Math.floor(datenow.getTime() / 10);
Expand Down

0 comments on commit 23073aa

Please sign in to comment.