forked from Mirrors/openclonk
Add invisibility EditorProp to all object
Also localize some property names.console-destruction
parent
5a149b3b8a
commit
692ff39c0e
|
@ -5,13 +5,7 @@ local Name = "EditorBase";
|
|||
// Do not create
|
||||
public func Construction() { RemoveObject(); }
|
||||
|
||||
// Basic properties of all objects
|
||||
local EditorProps = {
|
||||
Invincibility = { Type = "has_effect", Effect = "IntInvincible", Set = "SetInvincibility" },
|
||||
PlayerColor = { Type = "color", AsyncGet = "GetColor", Set = "SetColor" },
|
||||
Name = { Type = "string", AsyncGet = "GetName", Set = "SetName" },
|
||||
CustomInitializationScript = { Type = "string", Name = "$CustomInitialization$", EditorHelp = "$CustomInitializationHelp$" }
|
||||
};
|
||||
local EditorProps;
|
||||
local Plane = 1;
|
||||
|
||||
local CountedID, IDList, AnyDef, IDSet, PlayerNumber, TeamID, PlayerMask;
|
||||
|
@ -19,6 +13,15 @@ local CountedID, IDList, AnyDef, IDSet, PlayerNumber, TeamID, PlayerMask;
|
|||
local DefinitionPriority=100; // Call this definition early to allow EditorProp initialization
|
||||
func Definition(def)
|
||||
{
|
||||
// Basic properties of all objects
|
||||
def.EditorProps = {
|
||||
Invincibility = { Name = "$Invincibility$", EditorHelp = "$InVincibilityHelp$", Type = "has_effect", Effect = "IntInvincible", Set = "SetInvincibility" },
|
||||
Visibility = { Type = "enum", Name = "$Visibility$", EditorHelp = "$VisibilityHelp$", Options = [ { Name="$Unknown$", Value=-1 }, { Name="$Visible$", Value=VIS_All }, { Name="$Invisible$", Value=VIS_None }, { Name="$EditorVisible$", Value=VIS_Editor } ] },
|
||||
PlayerColor = { Name="$PlayerColor$", EditorHelp="$PlayerColorHelp$", Type = "color", AsyncGet = "GetColor", Set = "SetColor" },
|
||||
ClrModulation = { Name="$ClrModulation$", EditorHelp="$ClrModulationHelp$", Type = "color", AsyncGet = "GetClrModulation", Set = "SetClrModulation" },
|
||||
Name = { Name="$Name$", Type = "string", AsyncGet = "GetName", Set = "SetName" },
|
||||
CustomInitializationScript = { Type = "string", Name = "$CustomInitialization$", EditorHelp = "$CustomInitializationHelp$" }
|
||||
};
|
||||
// Property delegate types
|
||||
CountedID = { Type = "proplist", Display = "{{count}}x{{id}}", DefaultValue = { count=1, id=nil }, Name = "$IDListEntry$", EditorProps = {
|
||||
count = { Type = "int", Min = 1 },
|
||||
|
|
|
@ -6,4 +6,17 @@ Team=Teamnummer
|
|||
Entry=%s Eintrag
|
||||
PlayerMask=Spieler
|
||||
CustomInitialization=Initialisierungsscript
|
||||
CustomInitializationHelp=Script das zur Objektinitialisierung am Spielstart ausgefuehrt wird. Kann benutzt werden, um Modifikationen zu speichern, die normalerweise nicht im Szenario gespeichert werden (z.B. DrawTransform).
|
||||
CustomInitializationHelp=Script das zur Objektinitialisierung am Spielstart ausgefuehrt wird. Kann benutzt werden, um Modifikationen zu speichern, die normalerweise nicht im Szenario gespeichert werden (z.B. DrawTransform).
|
||||
VisibilityHelp=Macht ein Objekt sichtbar oder unsichtbar. Unsichtbare Objekte koennen im Editor 'blind' oder in der Objektliste angeklickt werden.
|
||||
Visibility=Sichtbarkeit
|
||||
Visible=Sichtbar
|
||||
Invisible=Unsichtbar
|
||||
Invincibility=Unverwundbar
|
||||
InVincibilityHelp=Wenn aktiviert, kann das Objekt nicht beschaedigt oder getoetet werden. Sinnvoll zum Beispiel fuer wichtige Clonks, Tore, etc.
|
||||
PlayerColor=Spielerfarbe
|
||||
PlayerColorHelp=Farbe fuer Bereiche, die normalerweise nach dem Spieler eingefaerbt werden.
|
||||
ClrModulation=Farbmodulation
|
||||
ClrModulationHelp=Faktor um den das Objekt verdunkelt wird.
|
||||
Name=Name
|
||||
Unknown=Unbekannt
|
||||
EditorVisible=Nur im Editor
|
||||
|
|
|
@ -6,4 +6,17 @@ Team=Team number
|
|||
Entry=%s entry
|
||||
PlayerMask=Players
|
||||
CustomInitialization=Initialization script
|
||||
CustomInitializationHelp=Script to be executed for this object on scenario initialization. Can be used to apply modifications normally not stored as properties such as DrawTransform.
|
||||
CustomInitializationHelp=Script to be executed for this object on scenario initialization. Can be used to apply modifications normally not stored as properties such as DrawTransform.
|
||||
VisibilityHelp=Makes an object visible or invisible. Invisible objects can be clicked 'blindly' in the editor or simply selected in the object list.
|
||||
Visibility=Visibility
|
||||
Visible=Visible
|
||||
Invisible=Invisible
|
||||
Invincibility=Invincible
|
||||
InVincibilityHelp=Object cannot be damaged or harmed if activated. Use this for important clonks, gates, etc.
|
||||
PlayerColor=Player color
|
||||
PlayerColorHelp=Color for areas which are normally shown in player color.
|
||||
ClrModulation=Color modulation
|
||||
ClrModulationHelp=Factor by which an object is darkened.
|
||||
Name=Name
|
||||
Unknown=Unknown
|
||||
EditorVisible=Only in editor
|
||||
|
|
Loading…
Reference in New Issue