forked from Mirrors/openclonk
make time object more editor friendly
parent
a935a9d4ac
commit
0aba4f88fc
|
@ -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
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -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;
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
Loading…
Reference in New Issue