diff --git a/docs/de.po b/docs/de.po index da5dd8d71..bb20ef7eb 100644 --- a/docs/de.po +++ b/docs/de.po @@ -1,22 +1,22 @@ # -*- coding: UTF-8 -*- -# matthes +# matthes , 2006-2008. # PeterW # Sven2 -# Günther Brammer , 2010. # Armin Burgmeier , 2010. +# Günther Brammer , 2009, 2010. # msgid "" msgstr "" "Project-Id-Version: OpenClonk documentation\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-09-09 17:09+0200\n" -"PO-Revision-Date: 2010-08-31 23:44+0200\n" -"Last-Translator: Armin Burgmeier \n" +"POT-Creation-Date: 2010-11-24 22:24+0100\n" +"PO-Revision-Date: 2010-11-24 22:17+0100\n" +"Last-Translator: Günther Brammer \n" "Language-Team: German <>\n" +"Language: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: German\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: sdk/content.xml.in:5(title) @@ -78,7 +78,6 @@ msgstr "DefCore" #: sdk/script/fn/C4D_Parallax.xml:9(subcat) #: sdk/script/fn/C4D_Object.xml:9(subcat) #: sdk/script/fn/C4D_Living.xml:9(subcat) -#: sdk/script/fn/C4D_Knowledge.xml:9(subcat) #: sdk/script/fn/C4D_Goal.xml:9(subcat) #: sdk/script/fn/C4D_Background.xml:9(subcat) #: sdk/script/fn/C4D_All.xml:9(subcat) @@ -254,10 +253,7 @@ msgid "Data Types" msgstr "Datentypen" #: sdk/content.xml.in:149(emlink) -#: sdk/script/fn/VarN.xml:8(category) -#: sdk/script/fn/LocalN.xml:8(category) #: sdk/script/fn/IsRef.xml:8(category) -#: sdk/script/fn/GlobalN.xml:8(category) #: sdk/script/fn/GetType.xml:8(category) #: sdk/script/fn/C4V_String.xml:8(category) #: sdk/script/fn/C4V_Int.xml:8(category) @@ -715,7 +711,6 @@ msgid "8l" msgstr "8l" #: sdk/script/operatoren.xml:178(col) -#: sdk/script/fn/C4D_Knowledge.xml:16(emlink) msgid "&" msgstr "&" @@ -833,8 +828,6 @@ msgstr "vermindert den Wert der vorangestellten Variable um den nachgestellten W #: sdk/script/operatoren.xml:248(col) #: sdk/script/fn/SetPlrMagic.xml:33(emlink) #: sdk/script/fn/SetPlrMagic.xml:34(emlink) -#: sdk/script/fn/LocalN.xml:24(emlink) -#: sdk/script/fn/LocalN.xml:29(emlink) msgid "=" msgstr "=" @@ -1483,7 +1476,6 @@ msgstr "Entfernt alle Objekte." #: sdk/script/fn/OCF_Available.xml:8(category) #: sdk/script/fn/OCF_AttractLightning.xml:8(category) #: sdk/script/fn/OCF_Alive.xml:8(category) -#: sdk/script/fn/NoContainer.xml:8(category) #: sdk/script/fn/MakeCrewMember.xml:8(category) #: sdk/script/fn/Kill.xml:8(category) #: sdk/script/fn/Jump.xml:8(category) @@ -1621,7 +1613,6 @@ msgstr "Entfernt alle Objekte." #: sdk/script/fn/C4D_Parallax.xml:8(category) #: sdk/script/fn/C4D_Object.xml:8(category) #: sdk/script/fn/C4D_Living.xml:8(category) -#: sdk/script/fn/C4D_Knowledge.xml:8(category) #: sdk/script/fn/C4D_Goal.xml:8(category) #: sdk/script/fn/C4D_Background.xml:8(category) #: sdk/script/fn/C4D_All.xml:8(category) @@ -1629,7 +1620,6 @@ msgstr "Entfernt alle Objekte." #: sdk/script/fn/BlastObjects.xml:8(category) #: sdk/script/fn/AttachMesh.xml:8(category) #: sdk/script/fn/AppendCommand.xml:8(category) -#: sdk/script/fn/AnyContainer.xml:8(category) #: sdk/script/fn/AddVertex.xml:8(category) #: sdk/script/fn/AddMenuItem.xml:8(category) #: sdk/script/fn/AddCommand.xml:8(category) @@ -1809,19 +1799,6 @@ msgstr "Liefert die Anzahl feststeckender Vertices von *obj" msgid "Removes obj if one if its vertices is stuck." msgstr "Entfernt obj wenn einer seiner Vertices feststeckt" -#: sdk/script/fn/VarN.xml:16(desc) -#: sdk/script/fn/LocalN.xml:16(desc) -msgid "Name of the variable to which a reference is to be returned." -msgstr "Name der Variablen, zu der eine Referenz zurückgegeben werden soll" - -#: sdk/script/fn/VarN.xml:20(desc) -msgid "Returns a reference to a function local variable. This reference can be used for reading or writing." -msgstr "Gibt eine Referenz auf eine funktionslokale Variable zurück. Diese Referenz kann zum Lesen und Schreiben benutzt werden." - -#: sdk/script/fn/VarN.xml:25(text) -msgid "Sets a randomly chosen thread local variable to a random value." -msgstr "Setzt eine zufällige, threadlokale Variable auf einen zufälligen Wert." - #: sdk/script/fn/VIS_Owner.xml:9(subcat) #: sdk/script/fn/VIS_None.xml:9(subcat) #: sdk/script/fn/VIS_Local.xml:9(subcat) @@ -1905,7 +1882,6 @@ msgstr "Konstante für /. Das Objekt ist für de #: sdk/script/fn/C4D_Parallax.xml:13(remark) #: sdk/script/fn/C4D_Object.xml:13(remark) #: sdk/script/fn/C4D_Living.xml:13(remark) -#: sdk/script/fn/C4D_Knowledge.xml:13(remark) #: sdk/script/fn/C4D_Goal.xml:13(remark) #: sdk/script/fn/C4D_Background.xml:13(remark) #: sdk/script/fn/C4D_All.xml:13(remark) @@ -2433,7 +2409,6 @@ msgstr "Spielt einen Applaus-Sound bei der ersten, gefundenen Holzhütte in halb #: sdk/script/fn/Sort_Func.xml:9(subcat) #: sdk/script/fn/Sort_Distance.xml:9(subcat) #: sdk/script/fn/ObjectCount.xml:9(subcat) -#: sdk/script/fn/NoContainer.xml:9(subcat) #: sdk/script/fn/Find_Owner.xml:9(subcat) #: sdk/script/fn/Find_Or.xml:9(subcat) #: sdk/script/fn/Find_OCF.xml:9(subcat) @@ -2458,7 +2433,6 @@ msgstr "Spielt einen Applaus-Sound bei der ersten, gefundenen Holzhütte in halb #: sdk/script/fn/FindObject.xml:9(subcat) #: sdk/script/fn/FindContents.xml:9(subcat) #: sdk/script/fn/FindBase.xml:9(subcat) -#: sdk/script/fn/AnyContainer.xml:9(subcat) msgid "Search" msgstr "Suche" @@ -3601,7 +3575,6 @@ msgstr "Fügt einen Zauber der Liste der verfügbaren Zauber eines Spielers hinz #: sdk/script/fn/SetPlrMagic.xml:33(emlink) #: sdk/script/fn/SetPlrMagic.xml:34(emlink) -#: sdk/script/fn/LocalN.xml:23(emlink) #: sdk/script/fn/FinishCommand.xml:33(emlink) msgid "var" msgstr "var" @@ -6373,14 +6346,6 @@ msgstr "Object character flag: Blitzanziehendes Objekt. Dieses Flag wird durch d msgid "Object character flag: live living being." msgstr "Object character flag: Lebendes Lebewesen." -#: sdk/script/fn/NoContainer.xml:13(desc) -msgid "Constant for FindObject: search uncontained objects." -msgstr "Konstante für FindObject: Suche außerhalb aller Objekte." - -#: sdk/script/fn/NoContainer.xml:17(text) -msgid "Incinerates all combustible objects which are not contained." -msgstr "Zündet alle brennbaren Objekte an, die nirgends enthalten sind." - #: sdk/script/fn/NO_OWNER.xml:11(desc) msgid "Player number: no player. This constant can be used to indicate 'no ownership' in cases such as or ." msgstr "Spielernummer: Kein Spieler. Diese Konstante kann als Besitzerangabe für diverse Funktionen wie verwendet werden, um einen neutralen Spieler anzugeben." @@ -6514,41 +6479,6 @@ msgstr "Gibt einen Text im Messageboard am unteren Bildschirmrand aus. Die Param msgid "Welcomes a player." msgstr "Begrüßt den Spieler" -#: sdk/script/fn/LocalN.xml:20(desc) -msgid "Returns a reference to an object local variable. This reference can be used for reading or writing this variable." -msgstr "Gibt eine Referenz auf eine Objektlokale Variable zurück. Diese Referenz kann zum Lesen und Schreiben benutzt werden." - -#: sdk/script/fn/LocalN.xml:25(text) -msgid "Makes the basement of a magic tower explode." -msgstr "Lässt ein Fundament eines Zauberturms explodieren." - -#: sdk/script/fn/LocalN.xml:28(emlink) -msgid "Initialize" -msgstr "Initialize" - -#: sdk/script/fn/LocalN.xml:29(emlink) -msgid "local" -msgstr "local" - -#: sdk/script/fn/LocalN.xml:29(emlink) -msgid "TRE1" -msgstr "TRE1" - -#: sdk/script/fn/LocalN.xml:31(emlink) -#: sdk/script/GetXXVal.xml:30(col) -#: sdk/definition/index.xml:12(emlink) -#: sdk/definition/defcore.xml:6(title) -msgid "DefCore.txt" -msgstr "DefCore.txt" - -#: sdk/script/fn/LocalN.xml:36(text) -msgid "The object carries a tree around with it." -msgstr "Das Objekt trägt einen Baum mit sich herum." - -#: sdk/script/fn/LocalN.xml:40(emlink) -msgid "named variables" -msgstr "benannte Variablen" - #: sdk/script/fn/LaunchVolcano.xml:16(desc) #: sdk/script/fn/LaunchLightning.xml:17(desc) #: sdk/script/fn/LaunchEarthquake.xml:16(desc) @@ -6789,14 +6719,6 @@ msgstr "Objekt dessen Inhalt gestohlen werden soll." msgid "Removes all contents from obj and gives it to the calling object." msgstr "Entfernt sämtlichen Inhalt von *obj, und gibt diesen dem aufrufenden Objekt." -#: sdk/script/fn/GlobalN.xml:16(desc) -msgid "Name of a global variable." -msgstr "Name einer globalen Variable." - -#: sdk/script/fn/GlobalN.xml:20(desc) -msgid "Returns the value of the global variable of name text. Through GlobalN(\"Name\")=Value you can also set the value of a global variable." -msgstr "Liefert den Inhalt der globalen Variable mit dem Namen text. Per GlobalN(\"Name\")=Wert; kann der Wert einer benannten globalen Variable gesetzt werden." - #: sdk/script/fn/GetYDir.xml:17(desc) #: sdk/script/fn/GetXDir.xml:17(desc) msgid "Precision with which to retrieve the speed. Default value is 10." @@ -10354,14 +10276,6 @@ msgstr "Objektkategorie: Lebewesen." msgid "Returns the first type of living beings which can be built by player 1 - usually none." msgstr "Liefert das erste Lebewesen zurück, das der 1. Spieler bauen kann, also normalerweise 0." -#: sdk/script/fn/C4D_Knowledge.xml:12(desc) -msgid "Object category: construction plan." -msgstr "Objektkategorie: Bauplan." - -#: sdk/script/fn/C4D_Knowledge.xml:17(text) -msgid "Using bitwise AND you can check whether two objects correspond in at least one category." -msgstr "Mit einem bitweisen And kann man überprüfen, ob zwei Kategorien in mindestens einer Kategorie übereinstimmen." - #: sdk/script/fn/C4D_Goal.xml:12(desc) msgid "Object category: game goal." msgstr "Objektkategorie: Spielziele" @@ -10544,14 +10458,6 @@ msgstr "Fügt ein Kommando der Kommandoliste des aufrufenden Objekts am Ende hin msgid "Gives the clonk the command to go to the first found base and then throw the first carried object at the base." msgstr "Gibt dem Clonk den Befehl, zuerst zu der ersten (gefundenen) Basis zu laufen, und dann das erste Objekt, das er trägt, auf diese zu werfen.
" -#: sdk/script/fn/AnyContainer.xml:13(desc) -msgid "Passed to / so only contained objects are found." -msgstr "Wird an / übergeben, damit nur Objekte gefunden werden, die in einem anderen Objekt enthalten sind" - -#: sdk/script/fn/AnyContainer.xml:17(text) -msgid "Hits a hiding wipf." -msgstr "Schlägt einen sich versteckenden Wipf." - #: sdk/script/fn/Anim_YDir.xml:16(desc) #: sdk/script/fn/Anim_Y.xml:21(desc) #: sdk/script/fn/Anim_XDir.xml:16(desc) @@ -10986,7 +10892,7 @@ msgid "Contents of Variable" msgstr "Variableninhalt" #: sdk/script/Typechecks.xml:16(col) -#: sdk/definition/category.xml:86(h) +#: sdk/definition/category.xml:74(h) msgid "Example" msgstr "Beispiel" @@ -11446,8 +11352,8 @@ msgid "Variables are placeholders for values stored in a script. A variable stor msgstr "Variablen dienen innerhalb von Scripts zur Speicherung von Daten. Es gibt bestimmte Datentypen, die Variablen annehmen können." #: sdk/script/NamedVar.xml:10(text) -msgid "There are three different scopes in which a variable can be declared. Variables are not visible outside their declared scope." -msgstr "Außerdem kann eine Variable einen von drei Gültigkeitsbereiche haben. Die Variable ist außerhalb ihres Gültigkeitsbereiches nicht sichtbar." +msgid "There are three different scopes in which a variable can be declared." +msgstr "Außerdem kann eine Variable einen von drei Gültigkeitsbereiche haben." #: sdk/script/NamedVar.xml:14(col) msgid "Keyword" @@ -11486,34 +11392,34 @@ msgid "The variable's scope, followed by the variable's name." msgstr "Als erstes wird der Gültigkeitbereich angegeben. Danach muss der Name einer benannten Variable folgen." #: sdk/script/NamedVar.xml:38(text) -msgid "Optionally, you can assign a value to the variable directly at declaration time. However, this is possible for function local (var) variables only. Without initialization variables always start with nil." -msgstr "Optional kann der Variable auch gleich ein Wert zugewiesen werden. Dies ist aber nur für funktionslokale (var) Variablen erlaubt. Ohne Initialisierung beginnt die Variable mit nil." +msgid "Optionally, you can assign a value to the variable directly at declaration time. However, this is not possible for global variables. Without initialization variables always start with nil." +msgstr "Optional kann der Variable auch gleich ein Wert zugewiesen werden. Dies funktioniert allerdings nicht für globale Variablen. Ohne Initialisierung enthält die Variable anfangs nil." #: sdk/script/NamedVar.xml:39(text) msgid "Additional variable declarations may follow, separated by comma. The declaration must always be ended with a semicolon." msgstr "Weitere Deklarationen können, mit Kommata getrennt, folgen. Die Deklaration muss immer mit einem \";\" beendet werden." -#: sdk/script/NamedVar.xml:70(h) +#: sdk/script/NamedVar.xml:69(h) msgid "Addendum:" msgstr "Ergänzungen:" -#: sdk/script/NamedVar.xml:73(li) +#: sdk/script/NamedVar.xml:72(li) msgid "Object local variable declarations are also valid in #appendto or #include script extensions." msgstr "Definitionen objektlokaler Variablen werden sowohl bei #appendto also auch bei #include mit übernommen." -#: sdk/script/NamedVar.xml:74(li) -msgid "Using the functions (), (), and () you can access variables indirectly. Using () you can specifically access local variables in other objects." -msgstr "Mittels der Funktionen (), (), und () kann indirekt auf Variablen zugegriffen werden. Mittels () kann speziell auch auf lokale Variablen in anderen Objekten zugreifen." +#: sdk/script/NamedVar.xml:73(li) +msgid "Using the obj.foo or obj[\"foo\"] notation one can access local variables in other objects." +msgstr "Mit obj.foo oder obj[\"foo\"] kann auf lokale Variablen anderer Objekte zugegriffen werden." -#: sdk/script/NamedVar.xml:75(li) +#: sdk/script/NamedVar.xml:74(li) msgid "If two variables of the same name but differing scope are valid at the same time, then the variable of the smaller scope will be used, meaning for example an object local variable will \"cover up\" a global variable within its own scope." msgstr "Sind an einer Stelle zwei Variablen desselben Namens sichtbar, so bezeichnet der Name im Script jeweils die Variable mit dem kleineren Geltungsbereich. Das heißt z.B., dass eine objektlokale Variable eine globale Variable \"verdeckt\"." -#: sdk/script/NamedVar.xml:76(li) -msgid "If the same variable is declared multiply, then still the variable will exist only once and no error is thrown. Multiple initializations are considered regular assignments and executed in order, respectively." -msgstr "Wird eine Variable mehrfach deklariert, so existiert die Variable nachher trotzdem nur einmal und es wird kein Fehler ausgegeben. Initialisierungen gelten als Zuweisungen und werden wie eine entsprechende Anweisung ggf. auch mehrfach ausgeführt." +#: sdk/script/NamedVar.xml:75(li) +msgid "If the same variable is declared multiple times, the variable will still exist only once and no error is thrown. Multiple initializations are considered regular assignments and executed in order, respectively." +msgstr "Wird eine Variable mehrfach deklariert, so existiert die Variable trotzdem nur einmal und es wird kein Fehler ausgegeben. Initialisierungen gelten als Zuweisungen und werden wie eine entsprechende Anweisung gegebenenfalls auch mehrfach ausgeführt." -#: sdk/script/NamedVar.xml:77(li) +#: sdk/script/NamedVar.xml:76(li) msgid "A static variable may also be used in object scripts (see example). If a static variable of the same name is defined in another script, the name will refer to the same variable." msgstr "Eine static-Variable darf auch in Objektscripten verwendet werden (siehe Beispiel). Wird eine static-Variable mit gleichem Namen in einem anderen Script definiert, so bezeichnen beide auch dieselbe Variable." @@ -11566,6 +11472,12 @@ msgstr "Datei" msgid "GetDefCoreVal" msgstr "GetDefCoreVal" +#: sdk/script/GetXXVal.xml:30(col) +#: sdk/definition/index.xml:12(emlink) +#: sdk/definition/defcore.xml:6(title) +msgid "DefCore.txt" +msgstr "DefCore.txt" + #: sdk/script/GetXXVal.xml:33(col) msgid "GetActMapVal" msgstr "GetActMapVal" @@ -17861,82 +17773,62 @@ msgid "Environmental control object." msgstr "Umweltsteuerungsobjekt." #: sdk/definition/category.xml:45(col) -msgid "C4D_TradeLiving" -msgstr "C4D_TradeLiving" - -#: sdk/definition/category.xml:46(col) -msgid "A living being that can be sold at the home base." -msgstr "Verkaufbares Lebewesen." - -#: sdk/definition/category.xml:49(col) -msgid "C4D_Magic" -msgstr "C4D_Magic" - -#: sdk/definition/category.xml:50(col) -msgid "A magic spell." -msgstr "Zauber." - -#: sdk/definition/category.xml:54(col) -msgid "Reserved, used internally." -msgstr "Reserviert; wird intern benutzt." - -#: sdk/definition/category.xml:57(col) msgid "C4D_Rule" msgstr "C4D_Rule" -#: sdk/definition/category.xml:58(col) +#: sdk/definition/category.xml:46(col) msgid "Rule control object." msgstr "Spielregel." -#: sdk/definition/category.xml:61(col) +#: sdk/definition/category.xml:49(col) msgid "C4D_Background" msgstr "C4D_Background" -#: sdk/definition/category.xml:62(col) +#: sdk/definition/category.xml:50(col) msgid "Object is behind the landscape." msgstr "Objekt ist hinter der Landschaft." -#: sdk/definition/category.xml:65(col) +#: sdk/definition/category.xml:53(col) msgid "C4D_Parallax" msgstr "C4D_Parallax" -#: sdk/definition/category.xml:66(col) +#: sdk/definition/category.xml:54(col) msgid "Object moves parallax according to Local 0 and 1. For more information see ." msgstr "Objekt bewegt sich parallax nach Local 0 und 1. Für mehr Informationen siehe ." -#: sdk/definition/category.xml:69(col) +#: sdk/definition/category.xml:57(col) msgid "C4D_MouseSelect" msgstr "C4D_MouseSelect" -#: sdk/definition/category.xml:70(col) +#: sdk/definition/category.xml:58(col) msgid "Object can be clicked with the mouse, causing a MouseSelection(int player) callback in the object." msgstr "Objekt mit der Maus anwählbar, MouseSelection(int player)-Callback im Objekt." -#: sdk/definition/category.xml:73(col) +#: sdk/definition/category.xml:61(col) msgid "C4D_Foreground" msgstr "C4D_Foreground" -#: sdk/definition/category.xml:74(col) +#: sdk/definition/category.xml:62(col) msgid "Object is always in the foreground, even before global particles." msgstr "Objekt ist im Vordergrund, also vor globalen Partikeln." -#: sdk/definition/category.xml:77(col) +#: sdk/definition/category.xml:65(col) msgid "C4D_MouseIgnore" msgstr "C4D_MouseIgnore" -#: sdk/definition/category.xml:78(col) +#: sdk/definition/category.xml:66(col) msgid "Object cannot be selected with the mouse." msgstr "Objekt ist nicht mit der Maus anwählbar." -#: sdk/definition/category.xml:81(col) +#: sdk/definition/category.xml:69(col) msgid "C4D_IgnoreFoW" msgstr "C4D_IgnoreFoW" -#: sdk/definition/category.xml:82(col) +#: sdk/definition/category.xml:70(col) msgid "Object is drawn above fog of war. Useful for creating status displays or gui elements using objects. From CR." msgstr "Objekt wird auch dann gezeichnet, wenn es eigentlich vom Kriegsnebel bedeckt ist. Nützlich beispielsweise für Statusanzeigen und Kontrollelemente. Ab CR." -#: sdk/definition/category.xml:91(text) +#: sdk/definition/category.xml:79(text) msgid "Category for a rule." msgstr "Kategorie für eine Regel." @@ -18468,6 +18360,78 @@ msgstr "c4group.exe (Windows) c4group (Linux) c4group (Mac)" msgid "This command line program is used for processing group files. A list of command line options is available by starting the program without parameters via command line (not by double clicking)." msgstr "Dieses Kommandozeilen-Programm dient zum Bearbeiten von Gruppendateien. Es kann nicht per Doppelklick, sondern nur per Kommandozeile (Eingabeaufforderung) gestartet werden. Auskunft über alle verfügbaren Kommandozeilenparameter erhält man, indem man das Programm ohne weitere Parameter über die Kommandozeile startet." +#~ msgid "Constant for FindObject: search uncontained objects." +#~ msgstr "Konstante für FindObject: Suche außerhalb aller Objekte." + +#~ msgid "Incinerates all combustible objects which are not contained." +#~ msgstr "Zündet alle brennbaren Objekte an, die nirgends enthalten sind." + +#~ msgid "Passed to / so only contained objects are found." +#~ msgstr "Wird an / übergeben, damit nur Objekte gefunden werden, die in einem anderen Objekt enthalten sind" + +#~ msgid "Hits a hiding wipf." +#~ msgstr "Schlägt einen sich versteckenden Wipf." + +#~ msgid "Name of the variable to which a reference is to be returned." +#~ msgstr "Name der Variablen, zu der eine Referenz zurückgegeben werden soll" + +#~ msgid "Returns a reference to a function local variable. This reference can be used for reading or writing." +#~ msgstr "Gibt eine Referenz auf eine funktionslokale Variable zurück. Diese Referenz kann zum Lesen und Schreiben benutzt werden." + +#~ msgid "Sets a randomly chosen thread local variable to a random value." +#~ msgstr "Setzt eine zufällige, threadlokale Variable auf einen zufälligen Wert." + +#~ msgid "Returns a reference to an object local variable. This reference can be used for reading or writing this variable." +#~ msgstr "Gibt eine Referenz auf eine Objektlokale Variable zurück. Diese Referenz kann zum Lesen und Schreiben benutzt werden." + +#~ msgid "Makes the basement of a magic tower explode." +#~ msgstr "Lässt ein Fundament eines Zauberturms explodieren." + +#~ msgid "Initialize" +#~ msgstr "Initialize" + +#~ msgid "local" +#~ msgstr "local" + +#~ msgid "TRE1" +#~ msgstr "TRE1" + +#~ msgid "The object carries a tree around with it." +#~ msgstr "Das Objekt trägt einen Baum mit sich herum." + +#~ msgid "named variables" +#~ msgstr "benannte Variablen" + +#~ msgid "Name of a global variable." +#~ msgstr "Name einer globalen Variable." + +#~ msgid "Returns the value of the global variable of name text. Through GlobalN(\"Name\")=Value you can also set the value of a global variable." +#~ msgstr "Liefert den Inhalt der globalen Variable mit dem Namen text. Per GlobalN(\"Name\")=Wert; kann der Wert einer benannten globalen Variable gesetzt werden." + +#~ msgid "Object category: construction plan." +#~ msgstr "Objektkategorie: Bauplan." + +#~ msgid "Using bitwise AND you can check whether two objects correspond in at least one category." +#~ msgstr "Mit einem bitweisen And kann man überprüfen, ob zwei Kategorien in mindestens einer Kategorie übereinstimmen." + +#~ msgid "Using the functions (), (), and () you can access variables indirectly. Using () you can specifically access local variables in other objects." +#~ msgstr "Mittels der Funktionen (), (), und () kann indirekt auf Variablen zugegriffen werden. Mittels () kann speziell auch auf lokale Variablen in anderen Objekten zugreifen." + +#~ msgid "C4D_TradeLiving" +#~ msgstr "C4D_TradeLiving" + +#~ msgid "A living being that can be sold at the home base." +#~ msgstr "Verkaufbares Lebewesen." + +#~ msgid "C4D_Magic" +#~ msgstr "C4D_Magic" + +#~ msgid "A magic spell." +#~ msgstr "Zauber." + +#~ msgid "Reserved, used internally." +#~ msgstr "Reserviert; wird intern benutzt." + #~ msgid "CreateObject(Clonk)" #~ msgstr "CreateObject(Clonk)" diff --git a/docs/sdk/script/NamedVar.xml b/docs/sdk/script/NamedVar.xml index 32a834e0e..979e19751 100644 --- a/docs/sdk/script/NamedVar.xml +++ b/docs/sdk/script/NamedVar.xml @@ -7,7 +7,7 @@ Variables Variables are placeholders for values stored in a script. A variable stores a value in one of several data types. - There are three different scopes in which a variable can be declared. Variables are not visible outside their declared scope. + There are three different scopes in which a variable can be declared. @@ -35,16 +35,15 @@ Variables are declared using the following syntax: { var / local / static } name [= expr] [, name [= expr] ... ]; The variable's scope, followed by the variable's name. - Optionally, you can assign a value to the variable directly at declaration time. However, this is possible for function local (var) variables only. Without initialization variables always start with nil. + Optionally, you can assign a value to the variable directly at declaration time. However, this is not possible for global variables. Without initialization variables always start with nil. Additional variable declarations may follow, separated by comma. The declaration must always be ended with a semicolon. Example: static object_count; -local time_to_live; +local time_to_live = 100; protected func Initialize() { object_count++; - time_to_live = 100; } protected func Destruction() @@ -60,7 +59,7 @@ protected func Timer() return(); } - var obj = FindObject(Clonk, 0, 0, -1, -1); + var obj = FindObject(Find_ID(Clonk), Sort_Distance()); if(ObjectDistance(obj) < 20) DoDamage(-10, obj); @@ -71,12 +70,13 @@ protected func Timer()
  • Object local variable declarations are also valid in #appendto or #include script extensions.
  • -
  • Using the functions VarN(), LocalN(), and GlobalN() you can access variables indirectly. Using LocalN() you can specifically access local variables in other objects.
  • +
  • Using the obj.foo or obj["foo"] notation one can access local variables in other objects.
  • If two variables of the same name but differing scope are valid at the same time, then the variable of the smaller scope will be used, meaning for example an object local variable will "cover up" a global variable within its own scope.
  • -
  • If the same variable is declared multiply, then still the variable will exist only once and no error is thrown. Multiple initializations are considered regular assignments and executed in order, respectively.
  • +
  • If the same variable is declared multiple times, the variable will still exist only once and no error is thrown. Multiple initializations are considered regular assignments and executed in order, respectively.
  • A static variable may also be used in object scripts (see example). If a static variable of the same name is defined in another script, the name will refer to the same variable.
PeterWher-long ago + Günther2010 diff --git a/docs/sdk/script/fn/AnyContainer.xml b/docs/sdk/script/fn/AnyContainer.xml deleted file mode 100644 index 881235437..000000000 --- a/docs/sdk/script/fn/AnyContainer.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - AnyContainer - Objects - Search - 4.6.5.0 CP - - int - Passed to FindObject/FindObjectOwner so only contained objects are found. - - - Punch(FindObject(WIPF, 0, 0, 0, 0, 0, 0, 0, AnyContainer()), 5); - Hits a hiding wipf. - - - - Find_AnyContainer - FindObject - - - jwk2002-04 - diff --git a/docs/sdk/script/fn/BlastObjects.xml b/docs/sdk/script/fn/BlastObjects.xml index 311c33bb8..78263acfe 100644 --- a/docs/sdk/script/fn/BlastObjects.xml +++ b/docs/sdk/script/fn/BlastObjects.xml @@ -46,8 +46,6 @@ Explode - NoContainer - AnyContainer jwk2002-04 diff --git a/docs/sdk/script/fn/GlobalN.xml b/docs/sdk/script/fn/GlobalN.xml deleted file mode 100644 index 6821a982a..000000000 --- a/docs/sdk/script/fn/GlobalN.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - GlobalN - Variables - 4.9.1.0 GWE - - & - - - string - text - Name of a global variable. - - - - Returns the value of the global variable of name text. Through GlobalN("Name")=Value you can also set the value of a global variable. - Global - - Cucaracha2002-05 - diff --git a/docs/sdk/script/fn/LocalN.xml b/docs/sdk/script/fn/LocalN.xml deleted file mode 100644 index 9c6580828..000000000 --- a/docs/sdk/script/fn/LocalN.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - LocalN - Variables - 4.9.1.0 GWE - - & - - - string - name - Name of the variable to which a reference is to be returned. - - - - Returns a reference to an object local variable. This reference can be used for reading or writing this variable. - - - var obj; -if (obj = FindObject(WTWR)->LocalN("basement")) obj->Explode(20); - Makes the basement of a magic tower explode. - - - func Initialize () { - local Baum = CreateObject (TRE1); -} -//Mit Timer=1 in der DefCore.txt jeden Frame aufgerufen -func TimerCall () { - LocalN("Baum")->SetPosition (GetX (), GetY (), ); -} - - The object carries a tree around with it. - - - - named variables - Local - IsRef - VarN - GlobalN - - - Günther2002-11 - diff --git a/docs/sdk/script/fn/NoContainer.xml b/docs/sdk/script/fn/NoContainer.xml deleted file mode 100644 index ec1426d0b..000000000 --- a/docs/sdk/script/fn/NoContainer.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - NoContainer - Objects - Search - 4.6.5.0 CP - - int - Constant for FindObject: search uncontained objects. - - - var obj; while (obj=FindObject(0, 0,0,0,0, OCF_Inflammable(), 0,0, NoContainer(), obj)) Incinerate(obj); - Incinerates all combustible objects which are not contained. - - - - Find_NoContainer - FindObject - ObjectCount - OCF_NotContained - - - Sven22002-08 - diff --git a/docs/sdk/script/fn/OCF_NotContained.xml b/docs/sdk/script/fn/OCF_NotContained.xml index a48c183ad..42d02bc29 100644 --- a/docs/sdk/script/fn/OCF_NotContained.xml +++ b/docs/sdk/script/fn/OCF_NotContained.xml @@ -15,7 +15,7 @@ GetOCF FindObject - NoContainer + Find_NoContainer Object character flags diff --git a/docs/sdk/script/fn/VarN.xml b/docs/sdk/script/fn/VarN.xml deleted file mode 100644 index 495f1b336..000000000 --- a/docs/sdk/script/fn/VarN.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - VarN - Variables - 4.9.1.0 GWE - - & - - - string - name - Name of the variable to which a reference is to be returned. - - - - Returns a reference to a function local variable. This reference can be used for reading or writing. - - - var v0,v1,v2,v3,v4,v5,v6; -VarN(Format("V%d", Random(7))) = Random(100); - Sets a randomly chosen thread local variable to a random value. - - - - IsRef - LocalN - GlobalN - - - Sven22002-04 - diff --git a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Club.c4d/Script.c b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Club.c4d/Script.c index e0ec2cafe..037a71790 100644 --- a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Club.c4d/Script.c +++ b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Club.c4d/Script.c @@ -36,7 +36,7 @@ local fAiming; public func ControlUseStart(object clonk, int x, int y) { // cooldown? - if(!CanStrikeWithWeapon(clonk)) return 1; + if(!CanStrikeWithWeapon(clonk)) return true; // if the clonk doesn't have an action where he can use it's hands do nothing if(!clonk->HasHandAction()) @@ -73,7 +73,7 @@ public func FinishedAiming(object clonk, int angle) // since the Clonk internal callback is only once, we cannot use it // .. - AddEffect("DuringClubShoot", clonk, 1, 1, this, nil, angle); + AddEffect("DuringClubShootControl", clonk, 1, 1, this, nil, angle); // aaaand, a cooldown AddEffect("ClubWeaponCooldown", clonk, 1, 5, this); @@ -98,19 +98,28 @@ public func DuringShoot(object clonk, int angle) // DoStrike(clonk, angle); } -func FxDuringClubShootStart(target, effect_number, temp, p1) +func FxDuringClubShootControlStart(target, effect_number, temp, p1) { if(temp) return; EffectVar(0, target, effect_number)=p1; } -func FxDuringClubShootTimer(target, effect_number, effect_time) +func FxDuringClubShootControlTimer(target, effect_number, effect_time) { if(effect_time > 16) return -1; if(!this) return -1; this->DoStrike(target, EffectVar(0, target, effect_number)); } +// you are not going to be hit by objects you fling away +func FxDuringClubShootControlQueryCatchBlow(object target, int num, object obj) +{ + DoStrike(); + var en=Format("CannotBeHitTwiceBy%d", this->ObjectNumber()); + if(GetEffect(en, obj)) return true; + return false; +} + func DoStrike(clonk, angle) { var x=Sin(angle, 7); @@ -127,7 +136,7 @@ func DoStrike(clonk, angle) { var damage=5*1000; var f=ApplyShieldFactor(clonk, obj, damage); - ApplyWeaponBash(obj, 200, angle); + ApplyWeaponBash(obj, 400, angle); obj->DoEnergy(-damage, true, FX_Call_EngGetPunched, clonk->GetOwner()); } else @@ -135,10 +144,10 @@ func DoStrike(clonk, angle) var div=100; if(obj->GetContact(-1)) div*=10; - // mass factor + // mass/size factor var fac1=10000/Max(2, obj->GetMass()); var fac2=BoundBy(10-Abs(obj->GetDefCoreVal("Width", "DefCore")-obj->GetDefCoreVal("Height", "DefCore")), 1, 10); - var speed=(2000 * fac1 * fac2) / 10 / 1000; + var speed=(3000 * fac1 * fac2) / 10 / 1000; obj->SetXDir((obj->GetXDir(100) + Sin(angle, speed)) / 2, div); obj->SetYDir((obj->GetYDir(100) - Cos(angle, speed)) / 2, div); } diff --git a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Shield.c4d/Script.c b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Shield.c4d/Script.c index 9523a4162..5d0941df9 100644 --- a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Shield.c4d/Script.c +++ b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Shield.c4d/Script.c @@ -14,7 +14,7 @@ local solid_mask_helper; public func ControlUseStart(object clonk, int x, int y) { // may only be used while walking - if(!clonk->IsWalking() || !CanStrikeWithWeapon(clonk)) + if(!clonk->HasHandAction() || !clonk->IsWalking() || !CanStrikeWithWeapon(clonk)) { AddEffect("IntShieldSuspend", clonk, 1, 5, this); } diff --git a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Sword.c4d/Script.c b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Sword.c4d/Script.c index 673cbfb32..cb2db22e3 100644 --- a/planet/Objects.c4d/Items.c4d/Weapons.c4d/Sword.c4d/Script.c +++ b/planet/Objects.c4d/Items.c4d/Weapons.c4d/Sword.c4d/Script.c @@ -27,7 +27,13 @@ local magic_number; local carry_bone; public func ControlUseStart(object clonk, int x, int y) { + // cooldown? if(!CanStrikeWithWeapon(clonk)) return true; + + // if the clonk doesn't have an action where he can use it's hands do nothing + if(!clonk->HasHandAction()) + return true; + var slow=GetEffect("SwordStrikeSlow", clonk); var arm = "R"; diff --git a/planet/Objects.c4d/Libraries.c4d/ClonkControl.c4d/Script.c b/planet/Objects.c4d/Libraries.c4d/ClonkControl.c4d/Script.c index 78cc0f4a8..ae5f813eb 100644 --- a/planet/Objects.c4d/Libraries.c4d/ClonkControl.c4d/Script.c +++ b/planet/Objects.c4d/Libraries.c4d/ClonkControl.c4d/Script.c @@ -305,6 +305,8 @@ protected func RejectCollect(id objid, object obj) return _inherited(objid,obj,...); } +public func GetUsedObject() { return using; } + /* ################################################# */ // The using-command hast to be canceled if the clonk is entered into diff --git a/planet/Objects.c4d/Libraries.c4d/Goal.c4d/Script.c b/planet/Objects.c4d/Libraries.c4d/Goal.c4d/Script.c index 2e3aea86a..41ed74b2a 100644 --- a/planet/Objects.c4d/Libraries.c4d/Goal.c4d/Script.c +++ b/planet/Objects.c4d/Libraries.c4d/Goal.c4d/Script.c @@ -100,8 +100,8 @@ global func AllGoalsFulfilled() { // Goals fulfilled: Set mission password(s) for (var goal in FindObjects(Find_Category(C4D_Goal))) - if (goal->LocalN("mission_password")) - GainMissionAccess(goal->LocalN("mission_password")); + if (goal.mission_password) + GainMissionAccess(goal.mission_password); // Custom scenario goal evaluation? if (GameCall("OnGoalsFulfilled")) return true; // We're done. Play some sound and schedule game over call diff --git a/planet/System.c4g/LanguageDE.txt b/planet/System.c4g/LanguageDE.txt index bddcbd33e..9c08ed488 100644 --- a/planet/System.c4g/LanguageDE.txt +++ b/planet/System.c4g/LanguageDE.txt @@ -565,7 +565,7 @@ IDS_ERR_GFX_REGISTERMAIN=Fehler beim Laden der Grafikdatei IDS_ERR_INITFONTS=Fehler bei der Schriftinitialisierung IDS_ERR_INSUFFICIENTPARAMETERS=/%s: fehlende Parameter IDS_ERR_INVALIDCHANNELNAME=Kein gültiger Chat-Kanal. -IDS_ERR_CHANNELNOTALLOWED=Kann nur Chat-Kanäle betreten, die mit #clonk beginnen. +IDS_ERR_CHANNELNOTALLOWED=Kann nur Chat-Kanäle mit "clonk" im Namen und einem # am Anfang betreten. IDS_ERR_INVALIDID= Definition %s nicht geladen: Ungültige ID IDS_ERR_INVALIDNICKNAME2=/%s: unzulässiger Kurzname IDS_ERR_INVALIDNICKNAME=Unzulässiger Kurzname. @@ -621,6 +621,7 @@ IDS_ERR_SWITCHRES=Fehler beim Ändern der Bildschirmauflösung: %s IDS_ERR_TIMER=Fehler beim System-Timer IDS_ERR_TITLE=Fehler IDS_ERR_UNKNOWNCMD=Unbekannter Befehl: "%s" - Befehl /help für eine Liste gültiger Befehle +IDS_ERR_HELPCMD=Grundlegende Befehle im IRC-Chat:|/join [Chatraum] - Neuen Chatraum betreten|/part - Diesen Chatraum verlassen|/notice [Benutzer] [Nachricht] - Sende eine Nachricht an den Benutzer|/query [Benutzer] - Öffne ein neues Chatfenster für einen privaten Dialog mit dem Benutzer|/msg [Benutzer] [Nachricht] - Dasselbe wie /query, nur dass bereits die erste Nachrich geschickt wird|/nick [Neuer Spitzname] - Wähle einen neuen Spitznamen|/quit - Chat ganz verlassen|/raw - Raw-Kommando senden IDS_ERR_USERCANCEL=Benutzerabbruch IDS_ERR_WARNINGYOUWERETRYINGTOSEN=ACHTUNG: Du hast versucht, Deinen persönlichen WebCode an eine unbekannte Person zu versenden. Dieser Code darf unter keinen Umständen an andere Personen weiter gegeben werden, da diese damit Deine persönliche Online-Konten stehlen könnten.||Clonk-Administratoren würden Dich nie nach Deinem WebCode oder anderen Passwörtern fragen. IDS_ERR_WRITENEWTITLE=Fehler beim Speichern des neuen Titels in Datei "%s": %s diff --git a/planet/System.c4g/LanguageUS.txt b/planet/System.c4g/LanguageUS.txt index 4563364b9..deda60c5c 100644 --- a/planet/System.c4g/LanguageUS.txt +++ b/planet/System.c4g/LanguageUS.txt @@ -565,7 +565,7 @@ IDS_ERR_GFX_REGISTERMAIN=Could not register main graphic groups IDS_ERR_INITFONTS=Error initializing fonts IDS_ERR_INSUFFICIENTPARAMETERS=/%s: insufficient parameters IDS_ERR_INVALIDCHANNELNAME=Invalid channel name. -IDS_ERR_CHANNELNOTALLOWED=Can only join channels beginning with #clonk. +IDS_ERR_CHANNELNOTALLOWED=Can only join channels with "clonk" in it's name and a # in front. IDS_ERR_INVALIDID= Definition %s not loaded: Invalid ID IDS_ERR_INVALIDNICKNAME2=/%s: invalid nick name IDS_ERR_INVALIDNICKNAME=Invalid nickname. @@ -621,6 +621,7 @@ IDS_ERR_SWITCHRES=Error switching resolution: %s IDS_ERR_TIMER=System timer error. IDS_ERR_TITLE=Error IDS_ERR_UNKNOWNCMD=Unknown command: "%s" - type /help to get a list of valid commands +IDS_ERR_HELPCMD=Basic commands in the IRC-chat:|/join [channel] - Enter a new chat room|/part - Leave this chat room|/notice [user] [message] - Send a message to the user|/query [user] - Open a new chat window to chat for chatting with the user|/msg [user] [message] - The same as /query, only that the first message is already sent|/nick [new nick name] - Choose a new nick name|/quit - Exit the chat|/raw - Send a raw command IDS_ERR_USERCANCEL=User abort IDS_ERR_WARNINGYOUWERETRYINGTOSEN=WARNING: you were trying to send your secret WebCode to a stranger on the internet. You should NEVER give your WebCode to anyone, because they could use it to steal your online accounts!||Clonk administrators will never ask you for any passwords or your WebCode. IDS_ERR_WRITENEWTITLE=Error writing new title for file "%s": %s diff --git a/planet/Tests.c4f/FrozenFortress.c4s/DescUS.rtf b/planet/Tests.c4f/FrozenFortress.c4s/DescUS.rtf index e862da524..2d8fe9ead 100644 Binary files a/planet/Tests.c4f/FrozenFortress.c4s/DescUS.rtf and b/planet/Tests.c4f/FrozenFortress.c4s/DescUS.rtf differ diff --git a/planet/Tests.c4f/FrozenFortress.c4s/Map.bmp b/planet/Tests.c4f/FrozenFortress.c4s/Map.bmp index badbe2d38..880bedd66 100644 Binary files a/planet/Tests.c4f/FrozenFortress.c4s/Map.bmp and b/planet/Tests.c4f/FrozenFortress.c4s/Map.bmp differ diff --git a/planet/Tests.c4f/FrozenFortress.c4s/Script.c b/planet/Tests.c4f/FrozenFortress.c4s/Script.c index f06e3c2a9..6ed0072a0 100644 --- a/planet/Tests.c4f/FrozenFortress.c4s/Script.c +++ b/planet/Tests.c4f/FrozenFortress.c4s/Script.c @@ -39,20 +39,17 @@ protected func Initialize() // Chests with weapons. var chest; chest = CreateObject(Chest, 60, 220, NO_OWNER); - AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,false); + AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,false); chest = CreateObject(Chest, 150, 370, NO_OWNER); - AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,true); - AddEffect("FillBaseSpecialIce", chest, 100, 36,nil,nil); + AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,true); chest = CreateObject(Chest, LandscapeWidth() - 60, 220, NO_OWNER); - AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,false); + AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,false); chest = CreateObject(Chest, LandscapeWidth() - 150, 370, NO_OWNER); - AddEffect("FillBaseChest", chest, 100, 6 * 36,nil,nil,true); - AddEffect("FillBaseSpecialIce", chest, 100, 36,nil,nil); + AddEffect("FillBaseChest", chest, 100, 7 * 36,nil,nil,true); chest = CreateObject(Chest, LandscapeWidth()/2, 320, NO_OWNER); AddEffect("FillOtherChest", chest, 100, 5 * 36); - AddEffect("FillBaseSpecialIce", chest, 100, 28,nil,nil); AddEffect("SnowyWinter", nil, 100, 1); Sound("WindLoop.ogg",true,20,nil,+1); @@ -118,8 +115,8 @@ global func FxSnowyWinterTimer(object target, int num, int time) { if(time%1200 == 100 ) { - var add=RandomX(-3,3); - EffectVar(0, target, num)=BoundBy(EffectVar(0, target, num)+add,1,6); + var add=RandomX(-1,1); + EffectVar(0, target, num)=BoundBy(EffectVar(0, target, num)+add,1,4); } for(var i=0; i<(EffectVar(0, target, num)); i++) { @@ -173,7 +170,7 @@ protected func OnPlayerRelaunch(int plr) return; } -func RelaunchWeaponList() { return [Musket, Sword, Javelin, FrostboltScroll]; } +func RelaunchWeaponList() { return [Musket, Sword, Javelin, FrostboltScroll, Shovel]; } /*-- Chest filler effects --*/ @@ -193,28 +190,37 @@ global func FxFillBaseChestStart(object target, int num, int temporary, bool sup } global func FxFillBaseChestTimer(object target, int num) { - if(EffectVar(0, target, num)) - var w_list = [Firestone, Dynamite, Shovel, Loam, Ropeladder]; - else - var w_list = [Bow, Shield, Sword, Javelin, Musket, FrostboltScroll]; - if (target->ContentsCount() < 7) - target->CreateChestContents(w_list[Random(GetLength(w_list))]); - return 1; -} - - -global func FxFillBaseSpecialIceTimer(object target, int num, int time) -{ - EffectVar(1, target, num)++; - if(EffectVar(0, target, num)) return 1; - if(EffectVar(1, target, num) < (30)) return 1; + var maxcount = []; - EffectVar(0, target, num)=CreateObject(HardeningScroll); - EffectVar(0, target, num)->Enter(target); - EffectVar(1, target, num)= -30; + if(EffectVar(0, target, num)) + { + var w_list = [Firestone, Dynamite, Shovel, Loam, Ropeladder]; + var maxcount = [2,2,1,2,1]; + } + else + { + var w_list = [Bow, Shield, Sword, Javelin, Musket, FrostboltScroll]; + var maxcount = [1,2,1,1,1,2]; + } + + var contents; + for(var i=0; iGetLength(w_list); i++) + contents+=target->ContentsCount(w_list[i]); + if(contents > 5) return 1; + + for(var i=0; i<2 ; i++) + { + var r = Random(GetLength(w_list)); + if (target->ContentsCount(w_list[r]) < maxcount[r]) + { + target->CreateChestContents(w_list[r]); + i=3; + } + } return 1; } + global func FxFillOtherChestStart(object target, int num, int temporary) { if (temporary) @@ -227,9 +233,24 @@ global func FxFillOtherChestStart(object target, int num, int temporary) global func FxFillOtherChestTimer(object target) { - var w_list = [Sword, Javelin, Dynamite, WindScroll, FrostboltScroll ]; - if (target->ContentsCount() < 6) - target->CreateChestContents(w_list[Random(GetLength(w_list))]); + + var w_list = [Sword, Javelin, Dynamite, WindScroll, FrostboltScroll, Loam, HardeningScroll, PowderKeg]; + var maxcount = [1,1,3,1,2,1,1,1]; + + var contents; + for(var i=0; iGetLength(w_list); i++) + contents+=target->ContentsCount(w_list[i]); + if(contents > 5) return 1; + + for(var i=0; i<2 ; i++) + { + var r = Random(GetLength(w_list)); + if (target->ContentsCount(w_list[r]) < maxcount[r]) + { + target->CreateChestContents(w_list[r]); + i=3; + } + } return 1; } diff --git a/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/Script.c b/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/Script.c index e0c83e4bf..53f57dcb8 100644 --- a/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/Script.c +++ b/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/Script.c @@ -45,6 +45,7 @@ public func FxFrostboltTimer(pTarget, iEffectNumber, iEffectTime) ) { CreateObject(Dynamite,x,y,EffectVar(0,pTarget,iEffectNumber))->BlueExplode(); + CreateObject(Star,x,y,-1)->Sound("glass.ogg"); for(var i=0; i<=60;i++) { var r=Random(10)+Random(18); diff --git a/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/glass.ogg b/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/glass.ogg new file mode 100644 index 000000000..da2267e70 Binary files /dev/null and b/planet/Tests.c4f/FrozenFortress.c4s/Scrolls.c4d/FrostboltScroll.c4d/glass.ogg differ diff --git a/src/C4Game.cpp b/src/C4Game.cpp index 3fba68826..7ff2d5d02 100644 --- a/src/C4Game.cpp +++ b/src/C4Game.cpp @@ -1247,7 +1247,7 @@ C4Object* C4Game::FindObject(C4ID id, // ActionTarget if (!pActionTarget || (pActionDef && ((cObj->Action.Target==pActionTarget) || (cObj->Action.Target2==pActionTarget)) )) // Container - if ( !pContainer || (cObj->Contained == pContainer) || ((reinterpret_cast(pContainer)==NO_CONTAINER) && !cObj->Contained) || ((reinterpret_cast(pContainer)==ANY_CONTAINER) && cObj->Contained) ) + if ( !pContainer || (cObj->Contained == pContainer)) // Owner if ((iOwner==ANY_OWNER) || (cObj->Owner==iOwner)) // Area diff --git a/src/control/C4Control.cpp b/src/control/C4Control.cpp index d2df2f3e5..52a134093 100644 --- a/src/control/C4Control.cpp +++ b/src/control/C4Control.cpp @@ -839,7 +839,7 @@ void C4ControlJoinPlayer::Strip() StdBuf NewPlrData; if (!NewPlrData.LoadFromFile(PlayerFilename.getData())) { EraseFile(PlayerFilename.getData()); return; } - PlrData = NewPlrData; + PlrData = std::move(NewPlrData); // Done EraseFile(PlayerFilename.getData()); } diff --git a/src/editor/C4PropertyDlg.cpp b/src/editor/C4PropertyDlg.cpp index 12733b12b..c236f8701 100644 --- a/src/editor/C4PropertyDlg.cpp +++ b/src/editor/C4PropertyDlg.cpp @@ -172,14 +172,6 @@ bool C4PropertyDlg::Update(C4ObjectList &rSelection) return Update(); } -bool IsObjectPointer(int iValue) -{ - for (C4ObjectLink *cLnk=::Objects.First; cLnk; cLnk=cLnk->Next) - if (cLnk->Obj == (C4Object*) iValue) - return true; - return false; -} - bool C4PropertyDlg::Update() { if (!Active) return false; diff --git a/src/game/object/C4Object.h b/src/game/object/C4Object.h index 53dd1bf48..517700632 100644 --- a/src/game/object/C4Object.h +++ b/src/game/object/C4Object.h @@ -77,9 +77,6 @@ const int32_t MagicPhysicalFactor=1000; -#define ANY_CONTAINER (123) -#define NO_CONTAINER (124) - class C4SolidMask; class C4Command; class C4MaterialList; diff --git a/src/game/script/C4Script.cpp b/src/game/script/C4Script.cpp index 5e87df013..e17a24d5a 100644 --- a/src/game/script/C4Script.cpp +++ b/src/game/script/C4Script.cpp @@ -2907,11 +2907,6 @@ static long FnSetTransferZone(C4AulObjectContext *cthr, long iX, long iY, long i return Game.TransferZones.Set(iX,iY,iWdt,iHgt,cthr->Obj); } -static C4Value FnEqual_C4V(C4AulContext *cthr, C4Value * Val1, C4Value * Val2) -{ - return C4VBool(Val1->GetData()==Val2->GetData()); -} - static long FnAbs(C4AulContext *cthr, long iVal) { return Abs(iVal); @@ -3326,10 +3321,9 @@ static C4Value FnGetType(C4AulContext *cthr, C4Value* Value) return C4VInt(Value->GetType()); } -static C4Value FnCreateArray(C4AulContext *cthr, C4Value *pPars) +static C4ValueArray * FnCreateArray(C4AulContext *cthr, int iSize) { - PAR(int, iSize); - return C4VArray(new C4ValueArray(iSize)); + return new C4ValueArray(iSize); } static C4Value FnGetLength(C4AulContext *cthr, C4Value *pPars) @@ -3974,48 +3968,6 @@ static bool FnLocateFunc(C4AulContext *cthr, C4String *funcname, C4Object *pObj, return true; } -static C4Value FnVarN(C4AulContext *cthr, C4Value *strName_C4V) -{ - const char *strName = FnStringPar(strName_C4V->getStr()); - - if (!cthr->Caller) return C4VNull; - - // find variable - int32_t iID = cthr->Caller->Func->VarNamed.GetItemNr(strName); - if (iID < 0) - return C4VNull; - - // return variable value - return cthr->Caller->Vars[iID]; -} - -static C4Value FnLocalN(C4AulContext* cthr, C4Value* strName_C4V) -{ - if (!cthr->Obj) - throw new NeedObjectContext("LocalN"); - - C4String * key = strName_C4V->getStr(); - if (!key) return C4VNull; - - // get variable - C4Value r; - cthr->Obj->GetPropertyVal(key, &r); - return r; -} - -static C4Value FnGlobalN(C4AulContext* cthr, C4Value* strName_C4V) -{ - const char* strName = FnStringPar(strName_C4V->getStr()); - - // find variable - C4Value* pVarN = ::ScriptEngine.GlobalNamed.GetItem(strName); - - if (!pVarN) return C4Value(); - - // return variable value - return *pVarN; -} - static bool FnSetSkyAdjust(C4AulContext* cthr, long dwAdjust, long dwBackClr) { // set adjust @@ -4044,9 +3996,6 @@ static long FnGetMatAdjust(C4AulContext* cthr) return ::Landscape.GetModulation(); } -static long FnAnyContainer(C4AulContext*) { return ANY_CONTAINER; } -static long FnNoContainer(C4AulContext*) { return NO_CONTAINER; } - static long FnGetTime(C4AulContext *) { // check network, record, etc @@ -6086,8 +6035,6 @@ void InitFunctionMap(C4AulScriptEngine *pEngine) AddFunc(pEngine, "AddVertex", FnAddVertex); AddFunc(pEngine, "RemoveVertex", FnRemoveVertex); AddFunc(pEngine, "SetContactDensity", FnSetContactDensity, false); - AddFunc(pEngine, "AnyContainer", FnAnyContainer); - AddFunc(pEngine, "NoContainer", FnNoContainer); AddFunc(pEngine, "GetController", FnGetController); AddFunc(pEngine, "SetController", FnSetController); AddFunc(pEngine, "GetKiller", FnGetKiller); @@ -6124,6 +6071,7 @@ void InitFunctionMap(C4AulScriptEngine *pEngine) AddFunc(pEngine, "SetYDir", FnSetYDir); AddFunc(pEngine, "SetR", FnSetR); AddFunc(pEngine, "SetOwner", FnSetOwner); + AddFunc(pEngine, "CreateArray", FnCreateArray); AddFunc(pEngine, "CreatePropList", FnCreatePropList); AddFunc(pEngine, "CreateObject", FnCreateObject); AddFunc(pEngine, "MakeCrewMember", FnMakeCrewMember); @@ -6749,7 +6697,6 @@ C4ScriptConstDef C4ScriptConstMap[]= C4ScriptFnDef C4ScriptFnMap[]= { - { "Equal", 1 ,C4V_Any ,{ C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnEqual_C4V , 0 }, { "SetProperty", 1 ,C4V_Any ,{ C4V_String ,C4V_Any ,C4V_PropList,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnSetProperty_C4V , 0 }, { "GetProperty", 1 ,C4V_Any ,{ C4V_String ,C4V_PropList,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnGetProperty_C4V , 0 }, { "PlayerObjectCommand", 1 ,C4V_Bool ,{ C4V_Int ,C4V_String ,C4V_C4Object,C4V_Any ,C4V_Int ,C4V_C4Object,C4V_Any ,C4V_Int ,C4V_Any ,C4V_Any} ,0 , FnPlayerObjectCommand }, @@ -6782,7 +6729,6 @@ C4ScriptFnDef C4ScriptFnMap[]= { "GetType", 1 ,C4V_Int ,{ C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnGetType, 0 }, - { "CreateArray", 1 ,C4V_Array ,{ C4V_Int ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,0, FnCreateArray }, { "GetLength", 1 ,C4V_Int ,{ C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,0, FnGetLength }, { "GetIndexOf", 1 ,C4V_Int ,{ C4V_Any ,C4V_Array ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,0, FnGetIndexOf }, @@ -6808,10 +6754,6 @@ C4ScriptFnDef C4ScriptFnMap[]= { "eval", 1 ,C4V_Any ,{ C4V_String ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnEval, 0 }, - { "VarN", 1 ,C4V_Any ,{ C4V_String ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnVarN, 0 }, - { "LocalN", 1 ,C4V_Any ,{ C4V_String ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnLocalN, 0 }, - { "GlobalN", 1 ,C4V_Any ,{ C4V_String ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,MkFnC4V FnGlobalN, 0 }, - { NULL, 0 ,C4V_Any ,{ C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any ,C4V_Any} ,0, 0 } }; diff --git a/src/gui/C4ChatDlg.cpp b/src/gui/C4ChatDlg.cpp index baa6f2087..bb622e492 100644 --- a/src/gui/C4ChatDlg.cpp +++ b/src/gui/C4ChatDlg.cpp @@ -836,9 +836,14 @@ bool C4ChatControl::ProcessInput(const char *szInput, ChatSheet *pChatSheet) // command? if (*szInput == '/' && !SEqual2NoCase(szInput + 1, "me ")) { - StdStrBuf sCommand, sParam("");; sCommand.Copy(szInput+1); + StdStrBuf sCommand, sParam(""); sCommand.Copy(szInput+1); sCommand.SplitAtChar(' ', &sParam); - if (SEqualNoCase(sCommand.getData(), "quit")) + if (SEqualNoCase(sCommand.getData(), "help")) + { + pChatSheet->DoError(LoadResStr("IDS_ERR_HELPCMD")); + fResult = false; + } + else if (SEqualNoCase(sCommand.getData(), "quit")) { // query disconnect from IRC server fIRCSuccess = pIRCClient->Quit(sParam.getData()); @@ -900,7 +905,11 @@ bool C4ChatControl::ProcessInput(const char *szInput, ChatSheet *pChatSheet) if (!sParam.getLength()) pChatSheet->DoError(FormatString(LoadResStr("IDS_ERR_INSUFFICIENTPARAMETERS"), sCommand.getData()).getData()); else + { + StdStrBuf sMsg; + sParam.SplitAtChar(' ', &sMsg); OpenQuery(sParam.getData(), true, NULL); + } } else if (SEqualNoCase(sCommand.getData(), "nick")) { diff --git a/src/lib/StdCompiler.h b/src/lib/StdCompiler.h index 5a0121dc4..98f3206e4 100644 --- a/src/lib/StdCompiler.h +++ b/src/lib/StdCompiler.h @@ -492,7 +492,7 @@ public: // Input typedef StdBuf InT; - void setInput(InT RREF In) { Buf = In; } + void setInput(InT RREF In) { Buf = std::move(In); } // Properties virtual bool isCompiler() { return true; } diff --git a/src/network/C4Network2IRC.cpp b/src/network/C4Network2IRC.cpp index 8eee85bf3..8e0a775cf 100644 --- a/src/network/C4Network2IRC.cpp +++ b/src/network/C4Network2IRC.cpp @@ -380,7 +380,7 @@ bool C4Network2IRCClient::Join(const char *szChannel) { // Newbie limitation: can only join channels beginning with #clonk if (!Config.IRC.AllowAllChannels) - if (!SEqual2NoCase(szChannel, "#clonk") && !SEqual2NoCase(szChannel, "#openclonk")) + if (!SWildcardMatchEx(szChannel, "#*clonk*")) { const char* message = LoadResStr("IDS_ERR_CHANNELNOTALLOWED"); PushMessage(MSG_Status, "", "", message); diff --git a/tools/install/header.bmp b/tools/install/header.bmp index bfb7021be..fce7ee02a 100644 Binary files a/tools/install/header.bmp and b/tools/install/header.bmp differ diff --git a/tools/install/welcome.bmp b/tools/install/welcome.bmp index 803a8a90a..8fccf8aaf 100644 Binary files a/tools/install/welcome.bmp and b/tools/install/welcome.bmp differ