Archived
add debug weather channel test function
This commit is contained in:
1 parent
cd5acdb07f
commit
116bcb7908
1 file changed
+47
-1
+47
-1
@@ -1,5 +1,5 @@
|
|||||||
---@diagnostic disable: param-type-mismatch
|
---@diagnostic disable: param-type-mismatch
|
||||||
require("AEBSMisc.AEBSMisc_Options")
|
require("AEBSMisc/AEBSMisc_Options")
|
||||||
|
|
||||||
--- Forecast types accepted by WeatherChannel.GetForecastString, named
|
--- Forecast types accepted by WeatherChannel.GetForecastString, named
|
||||||
--- so call sites don't have to carry the vanilla magic numbers.
|
--- so call sites don't have to carry the vanilla magic numbers.
|
||||||
@@ -315,3 +315,49 @@ function WeatherChannel.FillBroadcast(_gametime, _bc)
|
|||||||
|
|
||||||
WeatherChannel.AddFuzz(c, _bc);
|
WeatherChannel.AddFuzz(c, _bc);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Vanilla override: identical structure to the original debug broadcast
|
||||||
|
--- (forces 3 days of forecasts, every AEBS_random_* variant, extremes, and an
|
||||||
|
--- outro), with an added forced AddWaterNotice call alongside AddPowerNotice.
|
||||||
|
--- Runs instead of FillBroadcast when WeatherChannel.debugTestAll is true.
|
||||||
|
--- @param _gametime GameTime
|
||||||
|
--- @param _bc RadioBroadCast
|
||||||
|
function WeatherChannel.TestAll(_gametime, _bc)
|
||||||
|
local clim = getClimateManager();
|
||||||
|
local forecaster = clim:getClimateForecaster();
|
||||||
|
|
||||||
|
local c = { r = 1.0, g = 1.0, b = 1.0 };
|
||||||
|
_bc:AddRadioLine(RadioLine.new(getText("AEBS_Intro"), c.r, c.g, c.b));
|
||||||
|
WeatherChannel.AddPowerNotice(c, _bc, true);
|
||||||
|
WeatherChannel.AddWaterNotice(c, _bc, true);
|
||||||
|
|
||||||
|
local forecast = forecaster:getForecast();
|
||||||
|
WeatherChannel.AddForecast(c, _bc, forecast, getText("AEBS_Pre_today"), true);
|
||||||
|
|
||||||
|
forecast = forecaster:getForecast(1);
|
||||||
|
WeatherChannel.AddForecast(c, _bc, forecast, getText("AEBS_Pre_tomorrow"), true);
|
||||||
|
|
||||||
|
forecast = forecaster:getForecast(2);
|
||||||
|
WeatherChannel.AddForecast(c, _bc, forecast, getText("AEBS_Pre_dayafter"), true);
|
||||||
|
|
||||||
|
WeatherChannel.AddExtremesForecasting(c, _bc, 3, 20);
|
||||||
|
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 0);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 500);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 1000);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 1500);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9000);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9001);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9002);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9003);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9004);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9005);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9006);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9007);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9008);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9009);
|
||||||
|
WeatherChannel.GetRandomString(c, _bc, 100, 9010);
|
||||||
|
|
||||||
|
_bc:AddRadioLine(RadioLine.new(getText("AEBS_Choppah"), c.r, c.g, c.b));
|
||||||
|
WeatherChannel.AddFuzz(c, _bc, 6);
|
||||||
|
end
|
||||||
Reference in new issue
Block a user