From d9b5c8f293ba93699a612238d594a33f33084820 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Mon, 13 Nov 2023 20:18:25 -0800 Subject: [PATCH] Add support for Winter Deer Isle. --- files/mods/1891132304/cfggameplay.json | 6 +++ files/mods/1891132304/init.c | 67 ++++++++++++++++++++++++++ files/mods/1891132304/xml.env | 3 ++ files/mods/@WinterDeerIsle | 1 + 4 files changed, 77 insertions(+) create mode 100644 files/mods/1891132304/cfggameplay.json create mode 100644 files/mods/1891132304/init.c create mode 100644 files/mods/1891132304/xml.env create mode 120000 files/mods/@WinterDeerIsle diff --git a/files/mods/1891132304/cfggameplay.json b/files/mods/1891132304/cfggameplay.json new file mode 100644 index 0000000..5583ea2 --- /dev/null +++ b/files/mods/1891132304/cfggameplay.json @@ -0,0 +1,6 @@ +{ + "WorldsData":{ + "environmentMinTemps": [-25.0, -20.0, -21.0, -14.0, -7.0, -4.0, -2.0, 2.0, -3.0, -7.0, -15.0, -20.0], + "environmentMaxTemps": [-8.0, -8.0, -3.0, 0.0, 2.0, 5.0, 7.0, 11.0, 8.0, 5.0, 2.0, -3.0] + } +} diff --git a/files/mods/1891132304/init.c b/files/mods/1891132304/init.c new file mode 100644 index 0000000..edc4e3a --- /dev/null +++ b/files/mods/1891132304/init.c @@ -0,0 +1,67 @@ +--- init.c 2023-11-11 00:41:20.472220009 +0000 ++++ init.c.new 2023-11-11 00:42:32.432098018 +0000 +@@ -1,47 +1,19 @@ + void main() + { +- //INIT WEATHER BEFORE ECONOMY INIT------------------------ +- //Weather weather = g_Game.GetWeather(); +- //weather.MissionWeather(false); // false = use weather controller from Weather.c +- //weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0); +- //weather.GetRain().Set( 0, 0, 1); +- //weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0); +- +- //INIT ECONOMY-------------------------------------- +- Hive ce = CreateHive(); +- if ( ce ) +- ce.InitOffline(); +- +- //DATE RESET AFTER ECONOMY INIT------------------------- ++ CreateHive(); ++ GetHive().InitOffline(); + int year, month, day, hour, minute; +- int reset_month = 9, reset_day = 20; +- +- GetGame().GetWorld().GetDate(year, month, day, hour, minute); ++ GetGame().GetWorld().GetDate( year, month, day, hour, minute ); + +- if ((month == reset_month) && (day < reset_day)) ++ //Change here the dates for whatever months you desire ++ if ( month < 12 ) + { +- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); ++ year = 2011; ++ month = 12; ++ day = 25; ++ GetGame().GetWorld().SetDate( year, month, day, hour, minute ); + } +- else +- { +- if ((month == reset_month + 1) && (day > reset_day)) +- { +- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); +- } +- else +- { +- if ((month < reset_month) || (month > reset_month + 1)) +- { +- GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute); +- } +- } +- } +- +- //CEApi TestHive = GetCEApi(); +- //TestHive.ExportProxyProto(); +- //TestHive.ExportProxyData( "8096 0 8096", 16384 ); +- //TestHive.ExportClusterData() ; +-} ++} + + class CustomMission: MissionServer + { +@@ -108,4 +80,4 @@ + Mission CreateCustomMission(string path) + { + return new CustomMission(); +-} +\ No newline at end of file ++} diff --git a/files/mods/1891132304/xml.env b/files/mods/1891132304/xml.env new file mode 100644 index 0000000..2874aad --- /dev/null +++ b/files/mods/1891132304/xml.env @@ -0,0 +1,3 @@ +INIT=local +CFGGAMEPLAY=local +CFGWEATHER=https://pastebin.com/raw/t2CUHdMn \ No newline at end of file diff --git a/files/mods/@WinterDeerIsle b/files/mods/@WinterDeerIsle new file mode 120000 index 0000000..a340bff --- /dev/null +++ b/files/mods/@WinterDeerIsle @@ -0,0 +1 @@ +1891132304 \ No newline at end of file