diff --git a/planet/Objects.ocd/Environment.ocd/Time.ocd/DefCore.txt b/planet/Objects.ocd/Environment.ocd/Time.ocd/DefCore.txt index 44fed5dff..93a3eb6d7 100644 --- a/planet/Objects.ocd/Environment.ocd/Time.ocd/DefCore.txt +++ b/planet/Objects.ocd/Environment.ocd/Time.ocd/DefCore.txt @@ -3,3 +3,6 @@ id=Time Version=8,0 Category=C4D_StaticBack|C4D_Environment Picture=0,0,128,128 +Width=32 +Height=32 +Offset=-16,-16 \ No newline at end of file diff --git a/planet/Objects.ocd/Environment.ocd/Time.ocd/Graphics.png b/planet/Objects.ocd/Environment.ocd/Time.ocd/Graphics.4.png similarity index 100% rename from planet/Objects.ocd/Environment.ocd/Time.ocd/Graphics.png rename to planet/Objects.ocd/Environment.ocd/Time.ocd/Graphics.4.png diff --git a/planet/Objects.ocd/Environment.ocd/Time.ocd/Script.c b/planet/Objects.ocd/Environment.ocd/Time.ocd/Script.c index c375a1f69..37fed7e73 100644 --- a/planet/Objects.ocd/Environment.ocd/Time.ocd/Script.c +++ b/planet/Objects.ocd/Environment.ocd/Time.ocd/Script.c @@ -220,13 +220,26 @@ protected func Initialize() daycolour_global = [255, 255, 255]; // Set the time to midday (12:00). - SetTime(12*60); + SetTime(12 * 60); // Add effect that controls time cycle. SetCycleSpeed(30); AddEffect("IntTimeCycle", this, 100, 10, this); } +public func Destruction() +{ + // Only if last object. + if (ObjectCount(Find_ID(Time)) > 1) + return; + // Remove celestial objects. + RemoveAll(Find_Func("IsCelestial")); + // Reset sky shading and ambience. + SetTime(12 * 60); + DoSkyShade(); + return; +} + // Cycles through day and night. protected func FxIntTimeCycleTimer(object target, proplist effect) { @@ -411,3 +424,6 @@ public func Definition(def) /*-- Properties --*/ local Name = "Time"; +local Description = "$Description$"; +local Visibility = VIS_Editor; +local EditorPlacementLimit = 1; diff --git a/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblDE.txt b/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblDE.txt index dbbfb86ff..55fdbc9b7 100644 --- a/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblDE.txt +++ b/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblDE.txt @@ -1,4 +1,5 @@ Time=Zeit +Description=Controls the time of the day and corresponding night time effects. TimeHelp=Aktuelle Tageszeit in Minuten seit Mitternacht. CycleSpeed=Tagesgeschwindigkeit CycleSpeedHelp=Geschwindigkeit des Tag-/Nachtrhythmus in Sekunden pro Tick. Standard 30. \ No newline at end of file diff --git a/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblUS.txt b/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblUS.txt index 8edcc55d3..0ac97df88 100644 --- a/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblUS.txt +++ b/planet/Objects.ocd/Environment.ocd/Time.ocd/StringTblUS.txt @@ -1,4 +1,5 @@ Time=Time +Description=Controls the time of the day and corresponding night time effects. TimeHelp=Current time of the day in minutes since midnight. CycleSpeed=Daily cycle speed CycleSpeedHelp=Speed of the day/night cycle in seconds per tick. Default 30. \ No newline at end of file