diff --git a/help/cbot/E/class.txt b/help/cbot/E/class.txt
index 942d7b0e..0e4ccc1a 100644
--- a/help/cbot/E/class.txt
+++ b/help/cbot/E/class.txt
@@ -1,72 +1,122 @@
\b;Instruction \c;class\n;
-This allows you to declare a class definition using following syntax:
+This keyword allows you to create a class definition by using the following syntax:
\c;
\s;public class ClassName
\s;{
\s; declarations;
\s;}
\n;
-Classes can only be \l;public\u cbot\public;, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class \c;MyClass\n; contains 4 fields (a, b, x and s) and one method (MyFunction).
+\t;All Classes Are Public
+Classes can be only \l;public\u cbot\public;. This means that they can be used by all bots in a mission.
+
+\b;Class Members
+Class members are fields (\l;variables\u cbot\var;) and methods (\l;functions\u cbot\function;).
+
+For example, the following class dubbed \c;MyClass\n; contains 4 fields (\c;a\n;, \c;b\n;, \c;x\n; and \c;s\n;) and one method (\c;MyFunction\n;).
\c;
\s;public class MyClass
\s;{
\s; int a, b;
\s; float x = 3.33;
\s; string s = "hello";
-\s; float MyFunction( float value )
+\s; float MyFunction(float value)
\s; {
-\s; return (value*x)-1;
+\s; return (value * x) - 1;
\s; }
\s;}
\n;
-As shown in this exemple the class members can be initialized (\c;x=3.33\n;). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters.
+\b;Accessing Class Members
+Class members can be accessed outside of the class definition by using the \c;.\n; operator. Example:
\c;
\s;public class MyClass
\s;{
+\s; int myField = 0;
+\s; int MyFunction()
+\s; {
+\s; return myField * 2;
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; MyClass myObject();
+\s; myObject.myField = 10;
+\s; message(myObject.MyFunction()); // 20
+\s; MyClass mySecondObject();
+\s; mySecondObject.myField = myObject.myField - 2;
+\s; message(mySecondObject.MyFunction()); // 16
+\s;}
+\n;
+Class members are \l;public\u cbot\public; by default, which means that they are accessible outside of the class definition. They can also be declared as \c;\l;private\u cbot\private;\n; or \c;\l;protected\u cbot\protected;\n;. Such members can only be accessed inside of the class definition.
+
+\t;Class Members Modifiers
+Fields and methods can also be declared as \c;\l;static\u cbot\static;\n;. Methods can be additionaly declared as \c;\l;synchronized\u cbot\synchro;\n;.
+
+\t;Member Initialization
+As shown in the previous example, the class members can be initialized in the class definition (\c;int x = 3.33;\n;).
+
+Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at \l;creation\u cbot\new; time of a class instance. Constructors can be \l;overloaded\u cbot\function;.
+
+Example:\c;
+\s;public class MyClass
+\s;{
\s; int a, b;
-\s; void MyClass( )
+\s; void MyClass()
\s; {
\s; a = 2; b = 3;
\s; }
-\s; void MyClass( int a, int b )
+\s; void MyClass(int a, int b)
\s; {
\s; this.a = a; this.b = b;
\s; }
\s;}
\n;
-In this example two constructors are declared for \c;MyClass\n;, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members \c;a\n; et \c;b\n; we must use the \c;\l;this\u cbot\this;.a\n; and \c;\l;this\u cbot\this;.b\n; to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters.
+
+\t;Using \c;\l;this\u cbot\this;\n;
+As the names of the parameters of the second constructor are the same as the names of the two members \c;a\n; and \c;b\n;, we must use the \c;\l;this\u cbot\this;\n; \l;reference\u cbot\pointer; to avoid confusion with the parameters' names.
+
+\b;Object Creation
+You can create objects of type \c;YourClass\n; using the \c;\l;new\u cbot\new;\n; keyword. Example:
\c;
-\s;void Test( )
+\s;extern void object::Test()
\s;{
-\s; MyClass item1(); // constr. w/o parameters
-\s; MyClass item2(4, 5); // constr. with 2 parameters
-\s; MyClass item3; // no constructor called,
-\s; // therefore item3 == null
+\s; MyClass object1(); // Call default constructor (without parameters)
+\s; MyClass object2(4, 5); // Call constructor with two int parameters
+\s; MyClass object3; // No constructor called, object3 == null
+\s; object3 = new MyClass(); // We call constructor now, object3 != null
\s;}
\n;
-You can also define a destructor. This must be a \c;void\n; fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone.
+
+\b;Object Destruction
+You can also define a destructor. This must be a \c;\l;void\u cbot\void;\n; fonction without parameters, which has the same name as the class but prefixed with the \c;~\n; character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:
\c;
\s;public class MyClass
\s;{
\s; static private int counter = 0; // instance counter
\s; void MyClass( )
\s; {
-\s; counter ++; // one instance more
+\s; counter++; // one instance more
\s; }
\s; void ~MyClass( )
\s; {
-\s; counter --; // one instance less
+\s; counter--; // one instance less
\s; }
\s;}
-\s;void Test()
+\s;extern void object::Test()
\s;{
-\s; MyClass item1( ); // counter = 1
-\s; MyClass item2( ); // counter = 2
-\s; item1 = null; // counter = 1
-\s;} // counter = 0
+\s; // counter == 0
+\s; MyClass item1( ); // counter == 1
+\s; MyClass item2( ); // counter == 2
+\s; item1 = null; // counter == 1
+\s;}
+\s;// counter == 0
\n;
-If you pass a class instance as parameter to a \l;function\u cbot\function;, the function only receives a \l;reference\u cbot\pointer; to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified.
+\b;Passing Objects to Functions
+Objects in CBOT are passed by \l;reference\u cbot\pointer;. This means that when an object is passed to a \l;function\u cbot\function;, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function.
+
+\b;Inheritance
+A class can inherit public and protected members of another class by using the \c;\l;extends\u cbot\extends;\n; keyword.
\t;See also
-\c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;static\u cbot\static;\n;, \c;\l;synchronized\u cbot\synchro;\n;, \c;\l;new\u cbot\new;\n;, \c;\l;reference\u cbot\pointer;\n;, \c;\l;this\u cbot\this;\n;
+\c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;protected\u cbot\protected;\n;, \c;\l;static\u cbot\static;\n;, \c;\l;synchronized\u cbot\synchro;\n;, \c;\l;new\u cbot\new;\n;, \c;\l;reference\u cbot\pointer;\n;, \c;\l;this\u cbot\this;\n;, \c;\l;super\u cbot\super;\n;, \c;\l;extends\u cbot\extends;\n;
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/extends.txt b/help/cbot/E/extends.txt
new file mode 100644
index 00000000..a0bedb13
--- /dev/null
+++ b/help/cbot/E/extends.txt
@@ -0,0 +1,107 @@
+\b;Keyword \c;extends\n;
+This keyword is used in a \c;\l;class\u cbot\class;\n; definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child.
+
+\t;Example
+\c;
+\s;public class Parent
+\s;{
+\s; void foo()
+\s; {
+\s; message("foo");
+\s; }
+\s;}
+\s;
+\s;public class Child extends Parent
+\s;{
+\s; void bar()
+\s; {
+\s; message("bar");
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; Child child();
+\s; child.foo(); // Will show "foo"
+\s; child.bar(); // Will show "bar"
+\s;}
+\n;
+
+\b;Inherited Members
+Only \c;\l;public\u cbot\public;\n; and \c;\l;protected\u cbot\protected;\n; members are inherited. \c;\l;private\u cbot\private;\n; members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods.
+
+Constructors and destructors are not inherited, however, they can be overriden.
+
+\b;Method Overriding
+Inherited methods can be overriden (redefined) in the child class definition. Example:
+\c;
+\s;public class Parent
+\s;{
+\s; void foo()
+\s; {
+\s; message("foo");
+\s; }
+\s;}
+\s;
+\s;public class Child extends Parent
+\s;{
+\s; void foo()
+\s; {
+\s; message("bar");
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; Child child();
+\s; child.foo(); // Will show "bar"
+\s;}
+\n;
+A parent's method can be called inside an overriden method by using the \c;\l;super\u cbot\super;\n; keyword.
+
+\b;Polymorphism
+\c;\l;Reference\u cbot\pointer;\n; of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members.
+
+\t;Example
+\c;
+\s;public class Parent
+\s;{
+\s; void foo()
+\s; {
+\s; message("foo");
+\s; }
+\s;}
+\s;
+\s;public class Child extends Parent
+\s;{
+\s; void foo()
+\s; {
+\s; message("bar");
+\s; }
+\s; void bar()
+\s; {
+\s; message("foo bar");
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; Parent people[2];
+\s; people[0] = new Parent();
+\s; people[1] = new Child();
+\s; for (int i = 0; i < 2; ++i)
+\s; {
+\s; people[i].foo();
+\s; }
+\s; //people[1].bar(); // Error
+\s; Child child = people[1];
+\s; child.bar(); // OK
+\s;}
+\n;
+
+\b;Multiple Inheritance
+A child cannot have multiple parents, however, a parent can have many children.
+
+\t;See also
+\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;protected\u cbot\protected;\n;, \c;\l;new\u cbot\new;\n;, \c;\l;reference\u cbot\pointer;\n;, \c;\l;this\u cbot\this;\n;, \c;\l;super\u cbot\super;\n;
+\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/open.txt b/help/cbot/E/open.txt
index 03b7f744..c32774a4 100644
--- a/help/cbot/E/open.txt
+++ b/help/cbot/E/open.txt
@@ -12,6 +12,7 @@ To open a file, proceed as follows:
\n;
\c;"r"\n; mode: open for reading.
\c;"w"\n; mode: open for writing.
+\c;"a"\n; mode: open for appending.
Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder.
diff --git a/help/cbot/E/openfile.txt b/help/cbot/E/openfile.txt
index 6e8d59e1..26c98509 100644
--- a/help/cbot/E/openfile.txt
+++ b/help/cbot/E/openfile.txt
@@ -1,10 +1,11 @@
\b;Instruction \c;openfile\n;
-\c;openfile();\n; opens an text file in the files/ folder. This is not a method of the \c;\l;file\u cbot\file;\n; class but openfile returne a \l;reference\u cbot\pointer; to a new instance of the file class. You must supply two parameters, the filename and the opening mode.
+\c;openfile();\n; opens an text file in the files/ folder. This is not a method of the \c;\l;file\u cbot\file;\n; class but openfile returns a \l;reference\u cbot\pointer; to a new instance of the file class. You must supply two parameters, the filename and the opening mode.
\c;
\s;file handle = openfile("filename", "r");
\n;
\c;"r"\n; mode: open for reading.
\c;"w"\n; mode: open for writing.
+\c;"w"\n; mode: open for appending.
\t;See also
diff --git a/help/cbot/E/private.txt b/help/cbot/E/private.txt
index 992d4dd6..c2d56b23 100644
--- a/help/cbot/E/private.txt
+++ b/help/cbot/E/private.txt
@@ -1,5 +1,7 @@
\b;Instruction \c;private\n; (for specialists)
-\l;Class\u cbot\class; members can be \l;public\u cbot\public; (by default) or private. A member can be declared private by putting \c;private\n; before the type declaration of the member. Private members are not accessible from outside the class definition.
+This is an access modifier for \l;class\u cbot\class; members. Private members are not accessible outside of the class definition.
+
+\t;Example
\c;
\s;public class MyClass
\s;{
@@ -15,5 +17,5 @@
\s;}
\n;
\t;See also
-\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n;
+\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n;, \c;\l;protected\u cbot\protected;\n;
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/protected.txt b/help/cbot/E/protected.txt
new file mode 100644
index 00000000..24f62522
--- /dev/null
+++ b/help/cbot/E/protected.txt
@@ -0,0 +1,28 @@
+\b;Keyword \c;protected\n;
+This is an access modifier for \l;class\u cbot\class; members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the \c;\l;extends\u cbot\extends;\n; keyword).
+
+\t;Example
+\c;
+\s;public class Parent
+\s;{
+\s; protected int field = 0;
+\s;}
+\s;
+\s;public class Child extends Parent
+\s;{
+\s; void Print()
+\s; {
+\s; message(field);
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; Child child();
+\s; child.Print(); // 0
+\s; //child.field = 1; // Error!
+\s;}
+\n;
+\t;See also
+\c;\l;class\u cbot\class;\n;, \c;\l;public\u cbot\public;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;extends\u cbot\extends;\n;
+\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/public.txt b/help/cbot/E/public.txt
index 72b69a84..3e9589b1 100644
--- a/help/cbot/E/public.txt
+++ b/help/cbot/E/public.txt
@@ -31,7 +31,7 @@ If you have declared a function \c;public\n;, you cannot define a function with
If a bot containing a \c;public\n; function is destroyed, the other bots that make use of this function will be stopped with an error.
\b;Instruction \c;public\n; for classes
-\l;Class\u cbot\class; members can be public (by default) or \l;privat\u cbot\private;. A member can be declared private by putting \c;private\n; before the member type. Private members are not accessible from outside the class definition.
+\c;public\n; is also an access modifier for \l;class\u cbot\class; members, which is the default one. Public members can be accessed from outside of the class definition.
\c;
\s;public class MyClass
\s;{
@@ -47,5 +47,5 @@ If a bot containing a \c;public\n; function is destroyed, the other bots that ma
\s;}
\n;
\t;See also
-\c;\l;class\u cbot\class;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;functions\u cbot\function;\n;
+\c;\l;class\u cbot\class;\n;, \c;\l;private\u cbot\private;\n;, \c;\l;protected\u cbot\protected;\n;, \c;\l;functions\u cbot\function;\n;
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/super.txt b/help/cbot/E/super.txt
new file mode 100644
index 00000000..a2f5b57e
--- /dev/null
+++ b/help/cbot/E/super.txt
@@ -0,0 +1,47 @@
+\b;Keyword \c;super\n;
+This keyword is similar to \c;\l;this\u cbot\this;\n;, however, it grants access to methods from the parent class (see the \c;\l;extends\u cbot\extends;\n; keyword), which is especially useful for method overriding.
+
+\t;Example
+\c;
+\s;public class Parent
+\s;{
+\s; protected int field;
+\s;
+\s; void Parent()
+\s; {
+\s; field = 0;
+\s; }
+\s;
+\s; void Print()
+\s; {
+\s; message("Parent's field: " + field);
+\s; }
+\s;}
+\s;
+\s;public class Child extends Parent
+\s;{
+\s; private int childsField;
+\s;
+\s; void Child()
+\s; {
+\s; super.Parent();
+\s; childsField = field + 1;
+\s; }
+\s;
+\s; void Print()
+\s; {
+\s; super.Print();
+\s; message("Child's field: " + childsField);
+\s; }
+\s;}
+\s;
+\s;extern void object::Test()
+\s;{
+\s; Child child();
+\s; child.Print(); // Will show both 0 and 1
+\s;}
+\n;
+
+\t;See also
+\c;\l;class\u cbot\class;\n;, \c;\l;this\u cbot\this;\n;
+\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/E/this.txt b/help/cbot/E/this.txt
index 29e50c34..0aba4748 100644
--- a/help/cbot/E/this.txt
+++ b/help/cbot/E/this.txt
@@ -50,5 +50,5 @@ However if a field name is hidden by a parameter declaration or a variable decla
\s;}
\n;
\t;See also
-\c;\l;class\u cbot\class;\n;
+\c;\l;class\u cbot\class;\n;, \c;\l;super\u cbot\super;\n;
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
diff --git a/help/cbot/po/cbot.pot b/help/cbot/po/cbot.pot
index 51043e4f..c43a6067 100644
--- a/help/cbot/po/cbot.pot
+++ b/help/cbot/po/cbot.pot
@@ -53,13 +53,13 @@ msgid "Time in seconds."
msgstr ""
#. type: \t; header
-#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:70 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:18 ../E/openfile.txt:10 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
+#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr ""
#. type: Plain text
-#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:11 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
+#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "Programming, types and categories."
msgstr ""
@@ -478,12 +478,6 @@ msgstr ""
msgid "Instruction class
"
msgstr ""
-#. type: Plain text
-#: ../E/class.txt:2
-#, no-wrap
-msgid "This allows you to declare a class definition using following syntax:"
-msgstr ""
-
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
@@ -494,115 +488,6 @@ msgid ""
"}"
msgstr ""
-#. type: Plain text
-#: ../E/class.txt:9
-#, no-wrap
-msgid "Classes can only be public, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class MyClass
contains 4 fields (a, b, x and s) and one method (MyFunction)."
-msgstr ""
-
-#. type: Source code
-#: ../E/class.txt:11
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-msgstr ""
-
-#. type: Plain text
-#: ../E/class.txt:22
-#, no-wrap
-msgid "As shown in this exemple the class members can be initialized (x=3.33
). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters."
-msgstr ""
-
-#. type: Source code
-#: ../E/class.txt:24
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-msgstr ""
-
-#. type: Plain text
-#: ../E/class.txt:37
-#, no-wrap
-msgid "In this example two constructors are declared for MyClass
, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members a
et b
we must use the this.a
and this.b
to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters."
-msgstr ""
-
-#. type: Source code
-#: ../E/class.txt:39
-#, no-wrap
-msgid ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // constr. w/o parameters\n"
-"\tMyClass item2(4, 5); // constr. with 2 parameters\n"
-"\tMyClass item3; // no constructor called,\n"
-" // therefore item3 == null\n"
-"}"
-msgstr ""
-
-#. type: Plain text
-#: ../E/class.txt:47
-#, no-wrap
-msgid "You can also define a destructor. This must be a void
fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone."
-msgstr ""
-
-#. type: Source code
-#: ../E/class.txt:49
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // instance counter\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // one instance more\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // one instance less\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // counter = 1\n"
-"\tMyClass item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-msgstr ""
-
-#. type: Plain text
-#: ../E/class.txt:68
-#, no-wrap
-msgid "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-msgstr ""
-
-#. type: Plain text
-#: ../E/class.txt:71
-#, no-wrap
-msgid ""
-"public
, private
, static
, synchronized
, new
, reference
, this
\n"
-"Programming, types and categories."
-msgstr ""
-
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
@@ -2419,21 +2304,13 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ../E/open.txt:13 ../E/openfile.txt:6
-#, no-wrap
-msgid ""
-"\"r\"
mode: open for reading.\n"
-"\"w\"
mode: open for writing."
-msgstr ""
-
-#. type: Plain text
-#: ../E/open.txt:16
+#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr ""
#. type: Plain text
-#: ../E/open.txt:19
+#: ../E/open.txt:20
#, no-wrap
msgid ""
"file
, close
, readln
, writeln
and eof
.\n"
@@ -2446,12 +2323,6 @@ msgstr ""
msgid "Instruction openfile
"
msgstr ""
-#. type: Plain text
-#: ../E/openfile.txt:2
-#, no-wrap
-msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returne a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
-msgstr ""
-
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
@@ -2681,14 +2552,8 @@ msgstr ""
msgid "Instruction private
(for specialists)"
msgstr ""
-#. type: Plain text
-#: ../E/private.txt:2
-#, no-wrap
-msgid "Class members can be public (by default) or private. A member can be declared private by putting private
before the type declaration of the member. Private members are not accessible from outside the class definition."
-msgstr ""
-
#. type: Source code
-#: ../E/private.txt:4
+#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
@@ -2705,14 +2570,6 @@ msgid ""
"}"
msgstr ""
-#. type: Plain text
-#: ../E/private.txt:18
-#, no-wrap
-msgid ""
-"class
, public
\n"
-"Programming, types and categories."
-msgstr ""
-
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
@@ -2804,12 +2661,6 @@ msgstr ""
msgid "Instruction public
for classes"
msgstr ""
-#. type: Plain text
-#: ../E/public.txt:34
-#, no-wrap
-msgid "Class members can be public (by default) or privat. A member can be declared private by putting private
before the member type. Private members are not accessible from outside the class definition."
-msgstr ""
-
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
@@ -2828,14 +2679,6 @@ msgid ""
"}"
msgstr ""
-#. type: Plain text
-#: ../E/public.txt:50
-#, no-wrap
-msgid ""
-"class
, private
, functions
\n"
-"Programming, types and categories."
-msgstr ""
-
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
@@ -4221,14 +4064,6 @@ msgid ""
"}"
msgstr ""
-#. type: Plain text
-#: ../E/this.txt:53
-#, no-wrap
-msgid ""
-"class
\n"
-"Programming, types and categories."
-msgstr ""
-
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
@@ -7282,7 +7117,7 @@ msgid "Firstly, the condition is valued and then the first result is returned if
msgstr ""
#. type: \t; header
-#: ../E/expr.txt:157
+#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
@@ -7548,3 +7383,600 @@ msgid ""
" Target1
Flying target\n"
" AlienNest
Alien Nest"
msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:10
+#, no-wrap
+msgid "Classes can be only public. This means that they can be used by all bots in a mission."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:12
+#, no-wrap
+msgid "Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:13
+#, no-wrap
+msgid "Class members are fields (variables) and methods (functions)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:15
+#, no-wrap
+msgid "For example, the following class dubbed MyClass
contains 4 fields (a
, b
, x
and s
) and one method (MyFunction
)."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:17
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tfloat x = 3.33;\n"
+"\tstring s = \"hello\";\n"
+"\tfloat MyFunction(float value)\n"
+"\t{\n"
+"\t\treturn (value * x) - 1;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:55
+#, no-wrap
+msgid "Member Initialization"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:60
+#, no-wrap
+msgid "Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:61
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tvoid MyClass()\n"
+"\t{\n"
+"\t\ta = 2; b = 3;\n"
+"\t}\n"
+"\tvoid MyClass(int a, int b)\n"
+"\t{\n"
+"\t\tthis.a = a; this.b = b;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:76
+#, no-wrap
+msgid "As the names of the parameters of the second constructor are the same as the names of the two members a
and b
, we must use the this
reference to avoid confusion with the parameters' names."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:78
+#, no-wrap
+msgid "Object Creation"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:79
+#, no-wrap
+msgid "You can create objects of type YourClass
using the new
keyword. Example:"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:90
+#, no-wrap
+msgid "Object Destruction"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:114
+#, no-wrap
+msgid "Passing Objects to Functions"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:115
+#, no-wrap
+msgid "Objects in CBOT are passed by reference. This means that when an object is passed to a function, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:117
+#, no-wrap
+msgid "Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:118
+#, no-wrap
+msgid "A class can inherit public and protected members of another class by using the extends
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:2
+#, no-wrap
+msgid "This keyword allows you to create a class definition by using the following syntax:"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:9
+#, no-wrap
+msgid "All Classes Are Public"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:52
+#, no-wrap
+msgid "Class Members Modifiers"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:75
+#, no-wrap
+msgid "Using this
"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:81
+#, no-wrap
+msgid ""
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass object1(); // Call default constructor (without parameters)\n"
+"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
+"\tMyClass object3; // No constructor called, object3 == null\n"
+"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:91
+#, no-wrap
+msgid "You can also define a destructor. This must be a void
fonction without parameters, which has the same name as the class but prefixed with the ~
character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:93
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tstatic private int counter = 0; // instance counter\n"
+"\tvoid MyClass( )\n"
+"\t{\n"
+"\t\tcounter++; // one instance more\n"
+"\t}\n"
+"\tvoid ~MyClass( )\n"
+"\t{\n"
+"\t\tcounter--; // one instance less\n"
+"\t}\n"
+"}\n"
+"extern void object::Test()\n"
+"{\n"
+"\t // counter == 0\n"
+"\tMyClass item1( ); // counter == 1\n"
+"\tMyClass item2( ); // counter == 2\n"
+"\titem1 = null; // counter == 1\n"
+"}\n"
+"// counter == 0"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:28
+#, no-wrap
+msgid "Accessing Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:29
+#, no-wrap
+msgid "Class members can be accessed outside of the class definition by using the .
operator. Example:"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:50
+#, no-wrap
+msgid "Class members are public by default, which means that they are accessible outside of the class definition. They can also be declared as private
or protected
. Such members can only be accessed inside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:53
+#, no-wrap
+msgid "Fields and methods can also be declared as static
. Methods can be additionaly declared as synchronized
."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:58
+#, no-wrap
+msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at creation time of a class instance. Constructors can be overloaded."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:31
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint myField = 0;\n"
+"\tint MyFunction()\n"
+"\t{\n"
+"\t\treturn myField * 2;\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass myObject();\n"
+"\tmyObject.myField = 10;\n"
+"\tmessage(myObject.MyFunction()); // 20\n"
+"\tMyClass mySecondObject();\n"
+"\tmySecondObject.myField = myObject.myField - 2;\n"
+"\tmessage(mySecondObject.MyFunction()); // 16\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:121
+#, no-wrap
+msgid ""
+"public
, private
, protected
, static
, synchronized
, new
, reference
, this
, super
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/protected.txt:1
+#, no-wrap
+msgid "Keyword protected
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the extends
keyword)."
+msgstr ""
+
+#. type: Source code
+#: ../E/protected.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field = 0;\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // 0\n"
+"\t//child.field = 1; // Error!\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Private members are not accessible outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:20
+#, no-wrap
+msgid ""
+"class
, public
, protected
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:34
+#, no-wrap
+msgid "public
is also an access modifier for class members, which is the default one. Public members can be accessed from outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:50
+#, no-wrap
+msgid ""
+"class
, private
, protected
, functions
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:27
+#, no-wrap
+msgid ""
+"class
, public
, private
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/super.txt:1
+#, no-wrap
+msgid "Keyword super
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:46
+#, no-wrap
+msgid ""
+"class
, this
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/this.txt:53
+#, no-wrap
+msgid ""
+"class
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:1
+#, no-wrap
+msgid "Keyword extends
"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:30
+#, no-wrap
+msgid "Inherited Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:31
+#, no-wrap
+msgid "Only public
and protected
members are inherited. private
members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:33
+#, no-wrap
+msgid "Constructors and destructors are not inherited, however, they can be overriden."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:35
+#, no-wrap
+msgid "Method Overriding"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:36
+#, no-wrap
+msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:38
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:62
+#, no-wrap
+msgid "Polymorphism"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:63
+#, no-wrap
+msgid "Reference
of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:67
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"foo bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tParent people[2];\n"
+"\tpeople[0] = new Parent();\n"
+"\tpeople[1] = new Child();\n"
+"\tfor (int i = 0; i < 2; ++i)\n"
+"\t{\n"
+"\t\tpeople[i].foo();\n"
+"\t}\n"
+"\t//people[1].bar(); // Error\n"
+"\tChild child = people[1];\n"
+"\tchild.bar(); // OK\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:102
+#, no-wrap
+msgid "Multiple Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:103
+#, no-wrap
+msgid "A child cannot have multiple parents, however, a parent can have many children."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:106
+#, no-wrap
+msgid ""
+"class
, public
, private
, protected
, new
, reference
, this
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:2
+#, no-wrap
+msgid "This keyword is similar to this
, however, it grants access to methods from the parent class (see the extends
keyword), which is especially useful for method overriding."
+msgstr ""
+
+#. type: Source code
+#: ../E/super.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field;\n"
+"\t\n"
+"\tvoid Parent()\n"
+"\t{\n"
+"\t\tfield = 0;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(\"Parent's field: \" + field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tprivate int childsField;\n"
+"\t\n"
+"\tvoid Child()\n"
+"\t{\n"
+"\t\tsuper.Parent();\n"
+"\t\tchildsField = field + 1;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tsuper.Print();\n"
+"\t\tmessage(\"Child's field: \" + childsField);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // Will show both 0 and 1\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:2
+#, no-wrap
+msgid "This keyword is used in a class
definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"foo\"\n"
+"\tchild.bar(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:60
+#, no-wrap
+msgid "A parent's method can be called inside an overriden method by using the super
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:56
+#, no-wrap
+msgid "As shown in the previous example, the class members can be initialized in the class definition (int x = 3.33;)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/open.txt:13
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"a\"
mode: open for appending."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:2
+#, no-wrap
+msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returns a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:6
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"w\"
mode: open for appending."
+msgstr ""
diff --git a/help/cbot/po/de.po b/help/cbot/po/de.po
index 1a3e0530..ce543adb 100644
--- a/help/cbot/po/de.po
+++ b/help/cbot/po/de.po
@@ -53,13 +53,13 @@ msgid "Time in seconds."
msgstr "Zeit in Sekunden."
#. type: \t; header
-#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:70 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:18 ../E/openfile.txt:10 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
+#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr "Siehe auch"
#. type: Plain text
-#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:11 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
+#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "Programming, types and categories."
msgstr "Die CBOT-Sprache, Variablentypen und Kategorien."
@@ -528,12 +528,6 @@ msgstr "Die CBOT-Sprache und die Variablentypen."
msgid "Instruction class
"
msgstr "Anweisung class
"
-#. type: Plain text
-#: ../E/class.txt:2
-#, no-wrap
-msgid "This allows you to declare a class definition using following syntax:"
-msgstr "Mit dieser Anweisung können Sie eine Klasse deklarieren. Benutzen Sie folgende Syntax:"
-
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
@@ -548,164 +542,6 @@ msgstr ""
"\tDeklarationen;\n"
"}"
-#. type: Plain text
-#: ../E/class.txt:9
-#, no-wrap
-msgid "Classes can only be public, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class MyClass
contains 4 fields (a, b, x and s) and one method (MyFunction)."
-msgstr "Klassen können nur public (öffentlich) definiert werden, das heißt, dass sie von allen Robotern der Mission benutzt werden können. Alle Glieder sind ebenfalls public, können also von außerhalb der Klasse benutzt werden. Glieder einer Klasse können Variablen oder Methoden (Funktionen) sein. Im folgenden Beispiel enthält die Klasse MeineKlasse
vier Instanzvariablen (a, b, x und s) und eine Methode (MeineFunktion):"
-
-#. type: Source code
-#: ../E/class.txt:11
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MeineKlasse\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MeineFunktion( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:22
-#, no-wrap
-msgid "As shown in this exemple the class members can be initialized (x=3.33
). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters."
-msgstr "Wie in diesem Beispiel gezeigt wird, können die Variablen einer Klasse initialisiert werden (z.B. x=3.33
). Sie können auch einen Constructor definieren, das heißt eine Methode, die denselben Namen hat wie die Klasse. Diese Methode wird automatisch aufgerufen, wenn eine neue Instanz der Klasse erstellt wird. Sie können auch mehr als eine Methode mit demselben Namen, aber mit verschiedenen Parametern definieren:"
-
-#. type: Source code
-#: ../E/class.txt:24
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MeineKlasse\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MeineKlasse ( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MeineKlasse( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:37
-#, no-wrap
-msgid "In this example two constructors are declared for MyClass
, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members a
et b
we must use the this.a
and this.b
to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters."
-msgstr "In diesem Beispiel wurden für MeineKlasse
zwei Constructor-Methoden deklariert, eine ohne Parameter, und eine mit zwei Parametern. Da die Namen der Parameter der zweiten Methode dieselben Namen haben wie die Namen der zwei Instanzvariablen a
und b
, muss für eine Referenz auf die Instanzvariablen this.a
und this.b
geschrieben werden, um einer Verwechslung vorzubeugen. Einfacher wäre es natürlich, den Parametern andere Namen zu geben."
-
-#. type: Source code
-#: ../E/class.txt:39
-#, no-wrap
-msgid ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // constr. w/o parameters\n"
-"\tMyClass item2(4, 5); // constr. with 2 parameters\n"
-"\tMyClass item3; // no constructor called,\n"
-" // therefore item3 == null\n"
-"}"
-msgstr ""
-"void Test( )\n"
-"{\n"
-"\tMeineKlasse item1(); // Constr. ohne Parameter\n"
-"\tMeineKlasse item2(4, 5); // Constr. mit 2 Parametern\n"
-"\tMeineKlasse item3; // kein Constr. aufgerufen,\n"
-" // deshalb item3 == null\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:47
-#, no-wrap
-msgid "You can also define a destructor. This must be a void
fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone."
-msgstr "Sie können auch einen Destructor deklarieren. Die ist eine void
-Funktion ohne Parameter, die denselben Namen wie die Klasse hat, der aber ein \"~\"-Zeichen vorangestellt wird. Dieser Destructor wird aufgerufen, sobald sich keine Variable mehr auf diese Instanz bezieht."
-
-#. type: Source code
-#: ../E/class.txt:49
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // instance counter\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // one instance more\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // one instance less\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // counter = 1\n"
-"\tMyClass item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-msgstr ""
-"public class MeineKlasse\n"
-"{\n"
-"\tstatic private int counter = 0;// Zähler f. Instanzen\n"
-"\tvoid MeineKlasse( )\n"
-"\t{\n"
-"\t\tcounter ++; // eine Instanz mehr\n"
-"\t}\n"
-"\tvoid ~MeineKlasse( )\n"
-"\t{\n"
-"\t\tcounter --; // eine Instanz weniger\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMeineKlasse item1( ); // counter = 1\n"
-"\tMeineKlasse item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-
-#. type: Plain text
-#: ../E/class.txt:68
-#, no-wrap
-msgid "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-msgstr "Wenn Sie eine Klasseninstanz als Parameter an eine Funktion übergeben, erhält die Funktion nur einen Zeiger auf die Instanz. Wenn Sie also die der Funktion übergebene Instanz verändern, wird die Instanz selber verändert."
-
-#. type: Plain text
-#: ../E/class.txt:71
-#, no-wrap
-msgid ""
-"public
, private
, static
, synchronized
, new
, reference
, this
\n"
-"Programming, types and categories."
-msgstr ""
-"public
, private
, static
, synchronized
, new
, Zeiger
und this
.\n"
-"Die CBOT-Sprache, Variablentypen und Kategorien."
-
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
@@ -2778,23 +2614,13 @@ msgstr ""
"\thandle.close();"
#. type: Plain text
-#: ../E/open.txt:13 ../E/openfile.txt:6
-#, no-wrap
-msgid ""
-"\"r\"
mode: open for reading.\n"
-"\"w\"
mode: open for writing."
-msgstr ""
-"\"r\"
Modus: öffnet die Datei im Lesemodus.\n"
-"\"w\"
Modus: öffnet die Datei im Schreibmodus."
-
-#. type: Plain text
-#: ../E/open.txt:16
+#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr "Dateien können nur geöffnet werden, wenn sie sich im Ordner \\files\\ befinden, der sich im Ordner befindet, in dem Colobot installiert wurde. Dateien in anderen Ordnern können mit diesem Befehl nicht geöffnet werden."
#. type: Plain text
-#: ../E/open.txt:19
+#: ../E/open.txt:20
#, no-wrap
msgid ""
"file
, close
, readln
, writeln
and eof
.\n"
@@ -2809,12 +2635,6 @@ msgstr ""
msgid "Instruction openfile
"
msgstr "Anweisung openfile
"
-#. type: Plain text
-#: ../E/openfile.txt:2
-#, no-wrap
-msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returne a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
-msgstr "openfile(); öffnet eine Textdatei im Ordner \\file\\. Dies ist nicht eine Methode der Klasse file
, gibt aber einen Zeiger zu einer neuen Instanz der file-Klasse zurück. Die Anweisung erhält zwei Parameter, den Dateinamen und den Öffnungsmodus."
-
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
@@ -3098,14 +2918,8 @@ msgstr ""
msgid "Instruction private
(for specialists)"
msgstr "Anweisung private
(für Spezialisten)"
-#. type: Plain text
-#: ../E/private.txt:2
-#, no-wrap
-msgid "Class members can be public (by default) or private. A member can be declared private by putting private
before the type declaration of the member. Private members are not accessible from outside the class definition."
-msgstr "Mitglieder einer Klasse können public (= öffentlich, Standardwert) oder privat sein. Um ein Mitglied als privat zu deklarieren, schreiben Sie private
vor der Deklaration der Mitglieds. Private Mitglieder sind von außerhalb der Klassendefinition nicht sichtbar."
-
#. type: Source code
-#: ../E/private.txt:4
+#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
@@ -3134,16 +2948,6 @@ msgstr ""
"\tmessage( item.position ); // dies ist ein Fehler\n"
"}"
-#. type: Plain text
-#: ../E/private.txt:18
-#, no-wrap
-msgid ""
-"class
, public
\n"
-"Programming, types and categories."
-msgstr ""
-"Klassen
, public
.\n"
-"Die CBOT-Sprache, Variablentypen und Kategorien."
-
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
@@ -3248,12 +3052,6 @@ msgstr "Wenn ein Roboter mit einer als public
deklarierten Funktion
msgid "Instruction public
for classes"
msgstr "Anweisung public
für Variablen"
-#. type: Plain text
-#: ../E/public.txt:34
-#, no-wrap
-msgid "Class members can be public (by default) or privat. A member can be declared private by putting private
before the member type. Private members are not accessible from outside the class definition."
-msgstr "Glieder von Klassen können als public (Standard) oder privat deklariert werden. Private Glieder sind von außerhalb der Klassendefinition nicht sichtbar."
-
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
@@ -3284,16 +3082,6 @@ msgstr ""
"\tmessage( item.position ); // dies ist ein Fehler\n"
"}"
-#. type: Plain text
-#: ../E/public.txt:50
-#, no-wrap
-msgid ""
-"class
, private
, functions
\n"
-"Programming, types and categories."
-msgstr ""
-"Klassen
, private
, Funktionen
\n"
-"Die CBOT-Sprache, Variablentypen und Kategorien."
-
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
@@ -4862,16 +4650,6 @@ msgstr ""
"\t}\n"
"}"
-#. type: Plain text
-#: ../E/this.txt:53
-#, no-wrap
-msgid ""
-"class
\n"
-"Programming, types and categories."
-msgstr ""
-"Klassen
\n"
-"Die CBOT-Sprache, Variablentypen und Kategorien."
-
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
@@ -8040,7 +7818,7 @@ msgid "Firstly, the condition is valued and then the first result is returned if
msgstr ""
#. type: \t; header
-#: ../E/expr.txt:157
+#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
@@ -8306,3 +8084,600 @@ msgid ""
" Target1
Flying target\n"
" AlienNest
Alien Nest"
msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:10
+#, no-wrap
+msgid "Classes can be only public. This means that they can be used by all bots in a mission."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:12
+#, no-wrap
+msgid "Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:13
+#, no-wrap
+msgid "Class members are fields (variables) and methods (functions)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:15
+#, no-wrap
+msgid "For example, the following class dubbed MyClass
contains 4 fields (a
, b
, x
and s
) and one method (MyFunction
)."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:17
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tfloat x = 3.33;\n"
+"\tstring s = \"hello\";\n"
+"\tfloat MyFunction(float value)\n"
+"\t{\n"
+"\t\treturn (value * x) - 1;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:55
+#, no-wrap
+msgid "Member Initialization"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:60
+#, no-wrap
+msgid "Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:61
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tvoid MyClass()\n"
+"\t{\n"
+"\t\ta = 2; b = 3;\n"
+"\t}\n"
+"\tvoid MyClass(int a, int b)\n"
+"\t{\n"
+"\t\tthis.a = a; this.b = b;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:76
+#, no-wrap
+msgid "As the names of the parameters of the second constructor are the same as the names of the two members a
and b
, we must use the this
reference to avoid confusion with the parameters' names."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:78
+#, no-wrap
+msgid "Object Creation"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:79
+#, no-wrap
+msgid "You can create objects of type YourClass
using the new
keyword. Example:"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:90
+#, no-wrap
+msgid "Object Destruction"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:114
+#, no-wrap
+msgid "Passing Objects to Functions"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:115
+#, no-wrap
+msgid "Objects in CBOT are passed by reference. This means that when an object is passed to a function, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:117
+#, no-wrap
+msgid "Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:118
+#, no-wrap
+msgid "A class can inherit public and protected members of another class by using the extends
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:2
+#, no-wrap
+msgid "This keyword allows you to create a class definition by using the following syntax:"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:9
+#, no-wrap
+msgid "All Classes Are Public"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:52
+#, no-wrap
+msgid "Class Members Modifiers"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:75
+#, no-wrap
+msgid "Using this
"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:81
+#, no-wrap
+msgid ""
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass object1(); // Call default constructor (without parameters)\n"
+"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
+"\tMyClass object3; // No constructor called, object3 == null\n"
+"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:91
+#, no-wrap
+msgid "You can also define a destructor. This must be a void
fonction without parameters, which has the same name as the class but prefixed with the ~
character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:93
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tstatic private int counter = 0; // instance counter\n"
+"\tvoid MyClass( )\n"
+"\t{\n"
+"\t\tcounter++; // one instance more\n"
+"\t}\n"
+"\tvoid ~MyClass( )\n"
+"\t{\n"
+"\t\tcounter--; // one instance less\n"
+"\t}\n"
+"}\n"
+"extern void object::Test()\n"
+"{\n"
+"\t // counter == 0\n"
+"\tMyClass item1( ); // counter == 1\n"
+"\tMyClass item2( ); // counter == 2\n"
+"\titem1 = null; // counter == 1\n"
+"}\n"
+"// counter == 0"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:28
+#, no-wrap
+msgid "Accessing Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:29
+#, no-wrap
+msgid "Class members can be accessed outside of the class definition by using the .
operator. Example:"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:50
+#, no-wrap
+msgid "Class members are public by default, which means that they are accessible outside of the class definition. They can also be declared as private
or protected
. Such members can only be accessed inside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:53
+#, no-wrap
+msgid "Fields and methods can also be declared as static
. Methods can be additionaly declared as synchronized
."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:58
+#, no-wrap
+msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at creation time of a class instance. Constructors can be overloaded."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:31
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint myField = 0;\n"
+"\tint MyFunction()\n"
+"\t{\n"
+"\t\treturn myField * 2;\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass myObject();\n"
+"\tmyObject.myField = 10;\n"
+"\tmessage(myObject.MyFunction()); // 20\n"
+"\tMyClass mySecondObject();\n"
+"\tmySecondObject.myField = myObject.myField - 2;\n"
+"\tmessage(mySecondObject.MyFunction()); // 16\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:121
+#, no-wrap
+msgid ""
+"public
, private
, protected
, static
, synchronized
, new
, reference
, this
, super
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/protected.txt:1
+#, no-wrap
+msgid "Keyword protected
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the extends
keyword)."
+msgstr ""
+
+#. type: Source code
+#: ../E/protected.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field = 0;\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // 0\n"
+"\t//child.field = 1; // Error!\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Private members are not accessible outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:20
+#, no-wrap
+msgid ""
+"class
, public
, protected
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:34
+#, no-wrap
+msgid "public
is also an access modifier for class members, which is the default one. Public members can be accessed from outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:50
+#, no-wrap
+msgid ""
+"class
, private
, protected
, functions
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:27
+#, no-wrap
+msgid ""
+"class
, public
, private
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/super.txt:1
+#, no-wrap
+msgid "Keyword super
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:46
+#, no-wrap
+msgid ""
+"class
, this
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/this.txt:53
+#, no-wrap
+msgid ""
+"class
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:1
+#, no-wrap
+msgid "Keyword extends
"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:30
+#, no-wrap
+msgid "Inherited Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:31
+#, no-wrap
+msgid "Only public
and protected
members are inherited. private
members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:33
+#, no-wrap
+msgid "Constructors and destructors are not inherited, however, they can be overriden."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:35
+#, no-wrap
+msgid "Method Overriding"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:36
+#, no-wrap
+msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:38
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:62
+#, no-wrap
+msgid "Polymorphism"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:63
+#, no-wrap
+msgid "Reference
of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:67
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"foo bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tParent people[2];\n"
+"\tpeople[0] = new Parent();\n"
+"\tpeople[1] = new Child();\n"
+"\tfor (int i = 0; i < 2; ++i)\n"
+"\t{\n"
+"\t\tpeople[i].foo();\n"
+"\t}\n"
+"\t//people[1].bar(); // Error\n"
+"\tChild child = people[1];\n"
+"\tchild.bar(); // OK\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:102
+#, no-wrap
+msgid "Multiple Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:103
+#, no-wrap
+msgid "A child cannot have multiple parents, however, a parent can have many children."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:106
+#, no-wrap
+msgid ""
+"class
, public
, private
, protected
, new
, reference
, this
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:2
+#, no-wrap
+msgid "This keyword is similar to this
, however, it grants access to methods from the parent class (see the extends
keyword), which is especially useful for method overriding."
+msgstr ""
+
+#. type: Source code
+#: ../E/super.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field;\n"
+"\t\n"
+"\tvoid Parent()\n"
+"\t{\n"
+"\t\tfield = 0;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(\"Parent's field: \" + field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tprivate int childsField;\n"
+"\t\n"
+"\tvoid Child()\n"
+"\t{\n"
+"\t\tsuper.Parent();\n"
+"\t\tchildsField = field + 1;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tsuper.Print();\n"
+"\t\tmessage(\"Child's field: \" + childsField);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // Will show both 0 and 1\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:2
+#, no-wrap
+msgid "This keyword is used in a class
definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"foo\"\n"
+"\tchild.bar(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:60
+#, no-wrap
+msgid "A parent's method can be called inside an overriden method by using the super
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:56
+#, no-wrap
+msgid "As shown in the previous example, the class members can be initialized in the class definition (int x = 3.33;)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/open.txt:13
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"a\"
mode: open for appending."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:2
+#, no-wrap
+msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returns a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:6
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"w\"
mode: open for appending."
+msgstr ""
diff --git a/help/cbot/po/fr.po b/help/cbot/po/fr.po
index 58a5159a..2e56f179 100644
--- a/help/cbot/po/fr.po
+++ b/help/cbot/po/fr.po
@@ -52,13 +52,13 @@ msgid "Time in seconds."
msgstr "Temps en secondes."
#. type: \t; header
-#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:70 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:18 ../E/openfile.txt:10 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
+#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr "Voir aussi"
#. type: Plain text
-#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:11 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
+#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "Programming, types and categories."
msgstr "Programmation, types et catégories."
@@ -581,12 +581,6 @@ msgstr "Programmation et types."
msgid "Instruction class
"
msgstr "Instruction class
(pour spécialistes)"
-#. type: Plain text
-#: ../E/class.txt:2
-#, no-wrap
-msgid "This allows you to declare a class definition using following syntax:"
-msgstr "La syntaxe pour déclarer une classe est la suivante:"
-
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
@@ -601,162 +595,6 @@ msgstr ""
"\tdéclarations;\n"
"}"
-#. type: Plain text
-#: ../E/class.txt:9
-#, no-wrap
-msgid "Classes can only be public, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class MyClass
contains 4 fields (a, b, x and s) and one method (MyFunction)."
-msgstr "La classe est d'office publique (disponible partout). Les membres de la classe sont également publiques (disponible à tous). Les déclarations peuvent être des déclarations de champs ou des déclarations de méthodes (avec le bloc d'exécution). Une classe peut contenir des variables et des fonctions. Mais dans la terminologie des langages orientés objets, on les appelle \"champs\" et \"méthodes\". Le terme \"membre\" désigne un champ ou une méthode."
-
-#. type: Source code
-#: ../E/class.txt:11
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MaClasse\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MaPrimitive( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:22
-#, no-wrap
-msgid "As shown in this exemple the class members can be initialized (x=3.33
). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters."
-msgstr ""
-"Comme le montre cet exemple, il est possible d'initialiser la valeur des champs par défaut (x=3.33
), ce qui rend le constructeur inutile. Toutefois, il est possible de définir un constructeur, en créant une méthode (de type void
) ayant le même nom que la classe.\n"
-"Il est également possible de définir plusieurs méthodes ayant le même nom, mais avec des paramètres différents (ce qui est aussi valable pour les fonctions)."
-
-#. type: Source code
-#: ../E/class.txt:24
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MaClasse\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MaClasse( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MaClasse( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:37
-#, no-wrap
-msgid "In this example two constructors are declared for MyClass
, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members a
et b
we must use the this.a
and this.b
to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters."
-msgstr ""
-"Cet exemple déclare deux constructeurs pour MaClasse
, l'un sans paramètre, l'autre avec deux paramètres. Comme les paramètres ont été nommés avec le même nom que les éléments a
et b
, il est nécessaire d'utiliser this.a
et this.b
pour accéder aux éléments de l'instance (une solution plus simple consiste à donner des noms différents pour les paramètres).\n"
-"Les constructeurs sont appelés automatiquement à la définition d'une instance de la classe."
-
-#. type: Source code
-#: ../E/class.txt:39
-#, no-wrap
-msgid ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // constr. w/o parameters\n"
-"\tMyClass item2(4, 5); // constr. with 2 parameters\n"
-"\tMyClass item3; // no constructor called,\n"
-" // therefore item3 == null\n"
-"}"
-msgstr ""
-"void Test( )\n"
-"{\n"
-"\tMaClasse item1(); // constr. sans paramètre\n"
-"\tMaClasse item2(4, 5); // constr. avec 2 paramètres\n"
-"\tMaClasse item3; // pas de constructeur,\n"
-" // item3 == null\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:47
-#, no-wrap
-msgid "You can also define a destructor. This must be a void
fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone."
-msgstr "Un destructeur peut être également défini. C'est une méthode void
sans paramètre ayant le nom de la classe précédé du caractère \"tilde\" ~. Le destructeur est appelé dès qu'il n'y a plus aucune référence vers une instance donnée."
-
-#. type: Source code
-#: ../E/class.txt:49
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // instance counter\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // one instance more\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // one instance less\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // counter = 1\n"
-"\tMyClass item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-msgstr ""
-"public class MaClasse\n"
-"{\n"
-"\tstatic private int compteur = 0;\n"
-"\tvoid MaClasse( ) { compteur ++ ); // compte\n"
-"\tvoid ~MaClasse( ) { compteur -- }; // décompte\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMaClasse item1( ); // compteur = 1\n"
-"\tMaClasse item2( ); // compteur = 2\n"
-"\titem1 = null; // compteur = 1\n"
-"} // compteur = 0"
-
-#. type: Plain text
-#: ../E/class.txt:68
-#, no-wrap
-msgid "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-msgstr "Lorsqu'on donne l'instance d'une classe comme paramètre d'une fonction, c'est toujours la référence qui est passée."
-
-#. type: Plain text
-#: ../E/class.txt:71
-#, no-wrap
-msgid ""
-"public
, private
, static
, synchronized
, new
, reference
, this
\n"
-"Programming, types and categories."
-msgstr ""
-"public
, private
, static
, synchronized
, new
, pointer
\n"
-"Programmation, types et catégories."
-
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
@@ -2822,23 +2660,13 @@ msgstr ""
"\thandle.close();"
#. type: Plain text
-#: ../E/open.txt:13 ../E/openfile.txt:6
-#, no-wrap
-msgid ""
-"\"r\"
mode: open for reading.\n"
-"\"w\"
mode: open for writing."
-msgstr ""
-"Le mode \"r\"
permet d'ouvrir le fichier en lecture (read).\n"
-"Le mode \"w\"
permet d'ouvrir le fichier en écriture (write)."
-
-#. type: Plain text
-#: ../E/open.txt:16
+#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr "Les fichiers ne peuvent être créés et ouverts que dans le dossier files/, situé là où Colobot a été installé. Il n'est pas possible de créer ou ouvrir des fichiers situés ailleurs que dans ce dossier files/."
#. type: Plain text
-#: ../E/open.txt:19
+#: ../E/open.txt:20
#, no-wrap
msgid ""
"file
, close
, readln
, writeln
and eof
.\n"
@@ -2853,12 +2681,6 @@ msgstr ""
msgid "Instruction openfile
"
msgstr "Instruction openfile
"
-#. type: Plain text
-#: ../E/openfile.txt:2
-#, no-wrap
-msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returne a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
-msgstr "L'instruction openfile(); ouvre un fichier de texte dans le dossier files/. Elle ne fait pas partie de la classe file
mais retourne une référence à une instance de cette classe avec le fichier ouvert. Cette fonction demande deux paramètres: le nom du fichier et le mode d'ouverture."
-
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
@@ -3136,14 +2958,8 @@ msgstr "Programmation, types et ca
msgid "Instruction private
(for specialists)"
msgstr "Instruction private
(pour spécialistes)"
-#. type: Plain text
-#: ../E/private.txt:2
-#, no-wrap
-msgid "Class members can be public (by default) or private. A member can be declared private by putting private
before the type declaration of the member. Private members are not accessible from outside the class definition."
-msgstr "Les éléments déclarés dans une classe peuvent être publics (par défaut) ou privés. Un élément est privé en plaçant private
devant le type de l'élément. Dès lors, ces éléments ne seront plus accessibles depuis l'extérieur de la définition de la classe elle-même."
-
#. type: Source code
-#: ../E/private.txt:4
+#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
@@ -3172,16 +2988,6 @@ msgstr ""
"\tmessage( item.position ); // erreur élément non accessible\n"
"}"
-#. type: Plain text
-#: ../E/private.txt:18
-#, no-wrap
-msgid ""
-"class
, public
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, public
\n"
-"Programmation, types et catégories."
-
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
@@ -3286,12 +3092,6 @@ msgstr "Si le robot qui contenait la fonction déclarée public
est
msgid "Instruction public
for classes"
msgstr "Instruction public
pour les classes"
-#. type: Plain text
-#: ../E/public.txt:34
-#, no-wrap
-msgid "Class members can be public (by default) or privat. A member can be declared private by putting private
before the member type. Private members are not accessible from outside the class definition."
-msgstr "Les éléments déclarés dans une classe peuvent être publics (par défaut) ou privés. Un élément est privé en plaçant private
devant le type de l'élément. Dès lors, ces éléments ne seront plus accessibles depuis l'extérieur de la définition de la classe elle-même."
-
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
@@ -3322,16 +3122,6 @@ msgstr ""
"\tmessage( item.position ); // erreur\n"
"}"
-#. type: Plain text
-#: ../E/public.txt:50
-#, no-wrap
-msgid ""
-"class
, private
, functions
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, private
\n"
-"Programmation, types et catégories."
-
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
@@ -4915,14 +4705,6 @@ msgstr ""
"\t}\n"
"}"
-#. type: Plain text
-#: ../E/this.txt:53
-#, no-wrap
-msgid ""
-"class
\n"
-"Programming, types and categories."
-msgstr "Programmation, types et catégories."
-
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
@@ -8030,7 +7812,7 @@ msgid "Firstly, the condition is valued and then the first result is returned if
msgstr ""
#. type: \t; header
-#: ../E/expr.txt:157
+#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
@@ -8303,3 +8085,600 @@ msgid ""
" Target1
Flying target\n"
" AlienNest
Alien Nest"
msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:10
+#, no-wrap
+msgid "Classes can be only public. This means that they can be used by all bots in a mission."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:12
+#, no-wrap
+msgid "Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:13
+#, no-wrap
+msgid "Class members are fields (variables) and methods (functions)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:15
+#, no-wrap
+msgid "For example, the following class dubbed MyClass
contains 4 fields (a
, b
, x
and s
) and one method (MyFunction
)."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:17
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tfloat x = 3.33;\n"
+"\tstring s = \"hello\";\n"
+"\tfloat MyFunction(float value)\n"
+"\t{\n"
+"\t\treturn (value * x) - 1;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:55
+#, no-wrap
+msgid "Member Initialization"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:60
+#, no-wrap
+msgid "Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:61
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tvoid MyClass()\n"
+"\t{\n"
+"\t\ta = 2; b = 3;\n"
+"\t}\n"
+"\tvoid MyClass(int a, int b)\n"
+"\t{\n"
+"\t\tthis.a = a; this.b = b;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:76
+#, no-wrap
+msgid "As the names of the parameters of the second constructor are the same as the names of the two members a
and b
, we must use the this
reference to avoid confusion with the parameters' names."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:78
+#, no-wrap
+msgid "Object Creation"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:79
+#, no-wrap
+msgid "You can create objects of type YourClass
using the new
keyword. Example:"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:90
+#, no-wrap
+msgid "Object Destruction"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:114
+#, no-wrap
+msgid "Passing Objects to Functions"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:115
+#, no-wrap
+msgid "Objects in CBOT are passed by reference. This means that when an object is passed to a function, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:117
+#, no-wrap
+msgid "Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:118
+#, no-wrap
+msgid "A class can inherit public and protected members of another class by using the extends
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:2
+#, no-wrap
+msgid "This keyword allows you to create a class definition by using the following syntax:"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:9
+#, no-wrap
+msgid "All Classes Are Public"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:52
+#, no-wrap
+msgid "Class Members Modifiers"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:75
+#, no-wrap
+msgid "Using this
"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:81
+#, no-wrap
+msgid ""
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass object1(); // Call default constructor (without parameters)\n"
+"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
+"\tMyClass object3; // No constructor called, object3 == null\n"
+"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:91
+#, no-wrap
+msgid "You can also define a destructor. This must be a void
fonction without parameters, which has the same name as the class but prefixed with the ~
character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:93
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tstatic private int counter = 0; // instance counter\n"
+"\tvoid MyClass( )\n"
+"\t{\n"
+"\t\tcounter++; // one instance more\n"
+"\t}\n"
+"\tvoid ~MyClass( )\n"
+"\t{\n"
+"\t\tcounter--; // one instance less\n"
+"\t}\n"
+"}\n"
+"extern void object::Test()\n"
+"{\n"
+"\t // counter == 0\n"
+"\tMyClass item1( ); // counter == 1\n"
+"\tMyClass item2( ); // counter == 2\n"
+"\titem1 = null; // counter == 1\n"
+"}\n"
+"// counter == 0"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:28
+#, no-wrap
+msgid "Accessing Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:29
+#, no-wrap
+msgid "Class members can be accessed outside of the class definition by using the .
operator. Example:"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:50
+#, no-wrap
+msgid "Class members are public by default, which means that they are accessible outside of the class definition. They can also be declared as private
or protected
. Such members can only be accessed inside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:53
+#, no-wrap
+msgid "Fields and methods can also be declared as static
. Methods can be additionaly declared as synchronized
."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:58
+#, no-wrap
+msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at creation time of a class instance. Constructors can be overloaded."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:31
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint myField = 0;\n"
+"\tint MyFunction()\n"
+"\t{\n"
+"\t\treturn myField * 2;\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass myObject();\n"
+"\tmyObject.myField = 10;\n"
+"\tmessage(myObject.MyFunction()); // 20\n"
+"\tMyClass mySecondObject();\n"
+"\tmySecondObject.myField = myObject.myField - 2;\n"
+"\tmessage(mySecondObject.MyFunction()); // 16\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:121
+#, no-wrap
+msgid ""
+"public
, private
, protected
, static
, synchronized
, new
, reference
, this
, super
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/protected.txt:1
+#, no-wrap
+msgid "Keyword protected
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the extends
keyword)."
+msgstr ""
+
+#. type: Source code
+#: ../E/protected.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field = 0;\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // 0\n"
+"\t//child.field = 1; // Error!\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Private members are not accessible outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:20
+#, no-wrap
+msgid ""
+"class
, public
, protected
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:34
+#, no-wrap
+msgid "public
is also an access modifier for class members, which is the default one. Public members can be accessed from outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:50
+#, no-wrap
+msgid ""
+"class
, private
, protected
, functions
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:27
+#, no-wrap
+msgid ""
+"class
, public
, private
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/super.txt:1
+#, no-wrap
+msgid "Keyword super
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:46
+#, no-wrap
+msgid ""
+"class
, this
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/this.txt:53
+#, no-wrap
+msgid ""
+"class
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:1
+#, no-wrap
+msgid "Keyword extends
"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:30
+#, no-wrap
+msgid "Inherited Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:31
+#, no-wrap
+msgid "Only public
and protected
members are inherited. private
members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:33
+#, no-wrap
+msgid "Constructors and destructors are not inherited, however, they can be overriden."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:35
+#, no-wrap
+msgid "Method Overriding"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:36
+#, no-wrap
+msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:38
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:62
+#, no-wrap
+msgid "Polymorphism"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:63
+#, no-wrap
+msgid "Reference
of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:67
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"foo bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tParent people[2];\n"
+"\tpeople[0] = new Parent();\n"
+"\tpeople[1] = new Child();\n"
+"\tfor (int i = 0; i < 2; ++i)\n"
+"\t{\n"
+"\t\tpeople[i].foo();\n"
+"\t}\n"
+"\t//people[1].bar(); // Error\n"
+"\tChild child = people[1];\n"
+"\tchild.bar(); // OK\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:102
+#, no-wrap
+msgid "Multiple Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:103
+#, no-wrap
+msgid "A child cannot have multiple parents, however, a parent can have many children."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:106
+#, no-wrap
+msgid ""
+"class
, public
, private
, protected
, new
, reference
, this
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:2
+#, no-wrap
+msgid "This keyword is similar to this
, however, it grants access to methods from the parent class (see the extends
keyword), which is especially useful for method overriding."
+msgstr ""
+
+#. type: Source code
+#: ../E/super.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field;\n"
+"\t\n"
+"\tvoid Parent()\n"
+"\t{\n"
+"\t\tfield = 0;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(\"Parent's field: \" + field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tprivate int childsField;\n"
+"\t\n"
+"\tvoid Child()\n"
+"\t{\n"
+"\t\tsuper.Parent();\n"
+"\t\tchildsField = field + 1;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tsuper.Print();\n"
+"\t\tmessage(\"Child's field: \" + childsField);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // Will show both 0 and 1\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:2
+#, no-wrap
+msgid "This keyword is used in a class
definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"foo\"\n"
+"\tchild.bar(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:60
+#, no-wrap
+msgid "A parent's method can be called inside an overriden method by using the super
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:56
+#, no-wrap
+msgid "As shown in the previous example, the class members can be initialized in the class definition (int x = 3.33;)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/open.txt:13
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"a\"
mode: open for appending."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:2
+#, no-wrap
+msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returns a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:6
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"w\"
mode: open for appending."
+msgstr ""
diff --git a/help/cbot/po/pl.po b/help/cbot/po/pl.po
index 5a8d1301..397faff8 100644
--- a/help/cbot/po/pl.po
+++ b/help/cbot/po/pl.po
@@ -53,13 +53,13 @@ msgid "Time in seconds."
msgstr "Czas w sekundach."
#. type: \t; header
-#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:70 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:18 ../E/openfile.txt:10 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
+#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr "Zobacz również"
#. type: Plain text
-#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:11 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
+#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "Programming, types and categories."
msgstr "Programowanie, typy i kategorie."
@@ -580,12 +580,6 @@ msgstr "Język CBOT i zmienne."
msgid "Instruction class
"
msgstr "Instrukcja class
"
-#. type: Plain text
-#: ../E/class.txt:2
-#, no-wrap
-msgid "This allows you to declare a class definition using following syntax:"
-msgstr "Pozwala na zadeklarowanie definicji klasy, przy użyciu następującej składni:"
-
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
@@ -600,164 +594,6 @@ msgstr ""
"\tdeklaracje;\n"
"}"
-#. type: Plain text
-#: ../E/class.txt:9
-#, no-wrap
-msgid "Classes can only be public, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class MyClass
contains 4 fields (a, b, x and s) and one method (MyFunction)."
-msgstr "Klasy mogą być tylko typu public (publiczne), a więc mogą być używane podczas misji przez wszystkie roboty. Elementy klasy również są publiczne, dostępne spoza klasy. Do klasy mogą należeć pola lub funkcje (zwane również metodami), na przykład następująca klasa MojaKlasa
zawiera 4 pola (a, b, x oraz s) i jedną metodę (MojaFunkcja)."
-
-#. type: Source code
-#: ../E/class.txt:11
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MojaKlasa\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"Cześć\";\n"
-"\tfloat MojaFunkcja( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:22
-#, no-wrap
-msgid "As shown in this exemple the class members can be initialized (x=3.33
). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters."
-msgstr "Jak pokazano na tym przykładzie, elementy klasy mogą być inicjalizowane (x=3.33
). Można też zdefiniować konstruktor, który jest specjalną metodą o nazwie takiej samej jak nazwa klasy. Metoda ta jest wywoływana automatycznie podczas tworzenia instancji klasy. Możliwe jest również zadeklarowanie więcej niż jednej metody o tej samej nazwie ale o innych parametrach."
-
-#. type: Source code
-#: ../E/class.txt:24
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MojaKlasa\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MojaKlasa( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MojaKlasa( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:37
-#, no-wrap
-msgid "In this example two constructors are declared for MyClass
, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members a
et b
we must use the this.a
and this.b
to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters."
-msgstr "W tym przykładzie zadeklarowano dwa konstruktory dla klasy MojaKlasa
, jeden bez parametrów, drugi z dwoma parametrami. Jako że nazwy parametrów drugiego konstruktora są takie same jak nazwy dwóch pól klasy a
et b
konieczne jest użycie this.a
i this.b
w celu rozróżnienia parametrów. Inne, prostsze rozwiązanie, to nadanie różnych nazw parametrom."
-
-#. type: Source code
-#: ../E/class.txt:39
-#, no-wrap
-msgid ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // constr. w/o parameters\n"
-"\tMyClass item2(4, 5); // constr. with 2 parameters\n"
-"\tMyClass item3; // no constructor called,\n"
-" // therefore item3 == null\n"
-"}"
-msgstr ""
-"void Test( )\n"
-"{\n"
-"\tMojaKlasa element1(); // konstruktor bez parametrów\n"
-"\tMojaKlasa element2(4, 5); // konstruktor z 2 parametrami\n"
-"\tMojaKlasa element3; // konstruktor nie jest wywoływany,\n"
-" // więc item3 == null\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:47
-#, no-wrap
-msgid "You can also define a destructor. This must be a void
fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone."
-msgstr "Można też zdefinować destruktor. Musi to być funkcja void
bez parametrów o takiej samej nazwie jak nazwa klasy, poprzedzona znakiem ~. Destruktor jest wywoływany automatycznie gdy nie ma już żadnych odwołań do instancji klasy."
-
-#. type: Source code
-#: ../E/class.txt:49
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // instance counter\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // one instance more\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // one instance less\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // counter = 1\n"
-"\tMyClass item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-msgstr ""
-"public class MojaKlasa\n"
-"{\n"
-"\tstatic private int licznik = 0; // licznik instancji\n"
-"\tvoid MojaKlasa( )\n"
-"\t{\n"
-"\t\tlicznik ++; // jedna instancja więcej\n"
-"\t}\n"
-"\tvoid ~MojaKlasa( )\n"
-"\t{\n"
-"\t\tlicznik --; // jedna instancja mniej\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMojaKlasa element1( ); // licznik = 1\n"
-"\tMojaKlasa element2( ); // licznik = 2\n"
-"\telement1 = null; // licznik = 1\n"
-"} // licznik = 0"
-
-#. type: Plain text
-#: ../E/class.txt:68
-#, no-wrap
-msgid "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-msgstr "W przypadku przekazywania instancji klasy jako parametru funkcji, otrzymuje ona tylko wskaźnik do instancji. Oznacza to, że jeśli zostanie zmodyfikowana instancja wewnątrz funkcji, w rzeczywistości zostanie zmodyfikowana instancja przekazana funkcji."
-
-#. type: Plain text
-#: ../E/class.txt:71
-#, no-wrap
-msgid ""
-"public
, private
, static
, synchronized
, new
, reference
, this
\n"
-"Programming, types and categories."
-msgstr ""
-"public
, private
, static
, synchronized
, new
, wskaźnik
, this
\n"
-"Programowanie, typy i kategorie."
-
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
@@ -2823,23 +2659,13 @@ msgstr ""
"\thandle.close();"
#. type: Plain text
-#: ../E/open.txt:13 ../E/openfile.txt:6
-#, no-wrap
-msgid ""
-"\"r\"
mode: open for reading.\n"
-"\"w\"
mode: open for writing."
-msgstr ""
-"\"r\"
tryb: otwarty do odczytu.\n"
-"\"w\"
tryb: otwarty do zapisu."
-
-#. type: Plain text
-#: ../E/open.txt:16
+#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr "Pliki mogą być tworzone tylko w folderze files/ znajdującym się w folderze, w którym została zainstalowana gra Colobot. Nie jest możliwe tworzenie ani otwieranie plików znajdujących się w innych folderach."
#. type: Plain text
-#: ../E/open.txt:19
+#: ../E/open.txt:20
#, no-wrap
msgid ""
"file
, close
, readln
, writeln
and eof
.\n"
@@ -2854,12 +2680,6 @@ msgstr ""
msgid "Instruction openfile
"
msgstr "Instrukcja openfile
"
-#. type: Plain text
-#: ../E/openfile.txt:2
-#, no-wrap
-msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returne a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
-msgstr "Instrukcja openfile(); otwiera plik tekstowy w folderze files/. Nie jest to metoda klasy file
ale zwraca ona wskaźnik do nowej instancji klasy file. Należy określić dwa parametry, nazwę pliku i tryb otwarcia."
-
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
@@ -3144,14 +2964,8 @@ msgstr ""
msgid "Instruction private
(for specialists)"
msgstr "Instrukcja private
(dla specjalistów)"
-#. type: Plain text
-#: ../E/private.txt:2
-#, no-wrap
-msgid "Class members can be public (by default) or private. A member can be declared private by putting private
before the type declaration of the member. Private members are not accessible from outside the class definition."
-msgstr "Elementy klasy mogą być publiczne (domyślnie) lub prywatne. Aby zadeklarować element jako prywatny, należy umieścić instrukcję private
przed deklaracją jego typu. Elementy prywatne nie są widoczne poza definicją klasy."
-
#. type: Source code
-#: ../E/private.txt:4
+#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
@@ -3180,16 +2994,6 @@ msgstr ""
"\tmessage( item.position ); // powoduje błąd\n"
"}"
-#. type: Plain text
-#: ../E/private.txt:18
-#, no-wrap
-msgid ""
-"class
, public
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, public
\n"
-"Programowanie, typy i kategorie."
-
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
@@ -3294,12 +3098,6 @@ msgstr "Jeśli robot zawierający funkcję zadeklarowaną jako publicpublic
for classes"
msgstr "Instrukcja public
dla klas"
-#. type: Plain text
-#: ../E/public.txt:34
-#, no-wrap
-msgid "Class members can be public (by default) or privat. A member can be declared private by putting private
before the member type. Private members are not accessible from outside the class definition."
-msgstr "Elementy klasy mogą być publiczne (domyślnie) lub prywatne. Aby zadeklarować element jako prywatny, należy umieścić instrukcję private
przed deklaracją jego typu. Elementy prywatne nie są dostępne poza definicją klasy."
-
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
@@ -3330,16 +3128,6 @@ msgstr ""
"\tmessage( item.position ); // powoduje błąd\n"
"}"
-#. type: Plain text
-#: ../E/public.txt:50
-#, no-wrap
-msgid ""
-"class
, private
, functions
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, private
, funkcje
\n"
-"Programowanie, typy i kategorie."
-
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
@@ -4922,16 +4710,6 @@ msgstr ""
"\t}\n"
"}"
-#. type: Plain text
-#: ../E/this.txt:53
-#, no-wrap
-msgid ""
-"class
\n"
-"Programming, types and categories."
-msgstr ""
-"class
\n"
-"Programowanie, typy i kategorie."
-
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
@@ -8206,7 +7984,7 @@ msgid "Firstly, the condition is valued and then the first result is returned if
msgstr ""
#. type: \t; header
-#: ../E/expr.txt:157
+#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
@@ -8472,3 +8250,600 @@ msgid ""
" Target1
Flying target\n"
" AlienNest
Alien Nest"
msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:10
+#, no-wrap
+msgid "Classes can be only public. This means that they can be used by all bots in a mission."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:12
+#, no-wrap
+msgid "Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:13
+#, no-wrap
+msgid "Class members are fields (variables) and methods (functions)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:15
+#, no-wrap
+msgid "For example, the following class dubbed MyClass
contains 4 fields (a
, b
, x
and s
) and one method (MyFunction
)."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:17
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tfloat x = 3.33;\n"
+"\tstring s = \"hello\";\n"
+"\tfloat MyFunction(float value)\n"
+"\t{\n"
+"\t\treturn (value * x) - 1;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:55
+#, no-wrap
+msgid "Member Initialization"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:60
+#, no-wrap
+msgid "Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:61
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tvoid MyClass()\n"
+"\t{\n"
+"\t\ta = 2; b = 3;\n"
+"\t}\n"
+"\tvoid MyClass(int a, int b)\n"
+"\t{\n"
+"\t\tthis.a = a; this.b = b;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:76
+#, no-wrap
+msgid "As the names of the parameters of the second constructor are the same as the names of the two members a
and b
, we must use the this
reference to avoid confusion with the parameters' names."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:78
+#, no-wrap
+msgid "Object Creation"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:79
+#, no-wrap
+msgid "You can create objects of type YourClass
using the new
keyword. Example:"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:90
+#, no-wrap
+msgid "Object Destruction"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:114
+#, no-wrap
+msgid "Passing Objects to Functions"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:115
+#, no-wrap
+msgid "Objects in CBOT are passed by reference. This means that when an object is passed to a function, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:117
+#, no-wrap
+msgid "Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:118
+#, no-wrap
+msgid "A class can inherit public and protected members of another class by using the extends
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:2
+#, no-wrap
+msgid "This keyword allows you to create a class definition by using the following syntax:"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:9
+#, no-wrap
+msgid "All Classes Are Public"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:52
+#, no-wrap
+msgid "Class Members Modifiers"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:75
+#, no-wrap
+msgid "Using this
"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:81
+#, no-wrap
+msgid ""
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass object1(); // Call default constructor (without parameters)\n"
+"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
+"\tMyClass object3; // No constructor called, object3 == null\n"
+"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:91
+#, no-wrap
+msgid "You can also define a destructor. This must be a void
fonction without parameters, which has the same name as the class but prefixed with the ~
character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:93
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tstatic private int counter = 0; // instance counter\n"
+"\tvoid MyClass( )\n"
+"\t{\n"
+"\t\tcounter++; // one instance more\n"
+"\t}\n"
+"\tvoid ~MyClass( )\n"
+"\t{\n"
+"\t\tcounter--; // one instance less\n"
+"\t}\n"
+"}\n"
+"extern void object::Test()\n"
+"{\n"
+"\t // counter == 0\n"
+"\tMyClass item1( ); // counter == 1\n"
+"\tMyClass item2( ); // counter == 2\n"
+"\titem1 = null; // counter == 1\n"
+"}\n"
+"// counter == 0"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:28
+#, no-wrap
+msgid "Accessing Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:29
+#, no-wrap
+msgid "Class members can be accessed outside of the class definition by using the .
operator. Example:"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:50
+#, no-wrap
+msgid "Class members are public by default, which means that they are accessible outside of the class definition. They can also be declared as private
or protected
. Such members can only be accessed inside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:53
+#, no-wrap
+msgid "Fields and methods can also be declared as static
. Methods can be additionaly declared as synchronized
."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:58
+#, no-wrap
+msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at creation time of a class instance. Constructors can be overloaded."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:31
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint myField = 0;\n"
+"\tint MyFunction()\n"
+"\t{\n"
+"\t\treturn myField * 2;\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass myObject();\n"
+"\tmyObject.myField = 10;\n"
+"\tmessage(myObject.MyFunction()); // 20\n"
+"\tMyClass mySecondObject();\n"
+"\tmySecondObject.myField = myObject.myField - 2;\n"
+"\tmessage(mySecondObject.MyFunction()); // 16\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:121
+#, no-wrap
+msgid ""
+"public
, private
, protected
, static
, synchronized
, new
, reference
, this
, super
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/protected.txt:1
+#, no-wrap
+msgid "Keyword protected
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the extends
keyword)."
+msgstr ""
+
+#. type: Source code
+#: ../E/protected.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field = 0;\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // 0\n"
+"\t//child.field = 1; // Error!\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Private members are not accessible outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:20
+#, no-wrap
+msgid ""
+"class
, public
, protected
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:34
+#, no-wrap
+msgid "public
is also an access modifier for class members, which is the default one. Public members can be accessed from outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:50
+#, no-wrap
+msgid ""
+"class
, private
, protected
, functions
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:27
+#, no-wrap
+msgid ""
+"class
, public
, private
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/super.txt:1
+#, no-wrap
+msgid "Keyword super
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:46
+#, no-wrap
+msgid ""
+"class
, this
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/this.txt:53
+#, no-wrap
+msgid ""
+"class
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:1
+#, no-wrap
+msgid "Keyword extends
"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:30
+#, no-wrap
+msgid "Inherited Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:31
+#, no-wrap
+msgid "Only public
and protected
members are inherited. private
members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:33
+#, no-wrap
+msgid "Constructors and destructors are not inherited, however, they can be overriden."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:35
+#, no-wrap
+msgid "Method Overriding"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:36
+#, no-wrap
+msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:38
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:62
+#, no-wrap
+msgid "Polymorphism"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:63
+#, no-wrap
+msgid "Reference
of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:67
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"foo bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tParent people[2];\n"
+"\tpeople[0] = new Parent();\n"
+"\tpeople[1] = new Child();\n"
+"\tfor (int i = 0; i < 2; ++i)\n"
+"\t{\n"
+"\t\tpeople[i].foo();\n"
+"\t}\n"
+"\t//people[1].bar(); // Error\n"
+"\tChild child = people[1];\n"
+"\tchild.bar(); // OK\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:102
+#, no-wrap
+msgid "Multiple Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:103
+#, no-wrap
+msgid "A child cannot have multiple parents, however, a parent can have many children."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:106
+#, no-wrap
+msgid ""
+"class
, public
, private
, protected
, new
, reference
, this
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:2
+#, no-wrap
+msgid "This keyword is similar to this
, however, it grants access to methods from the parent class (see the extends
keyword), which is especially useful for method overriding."
+msgstr ""
+
+#. type: Source code
+#: ../E/super.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field;\n"
+"\t\n"
+"\tvoid Parent()\n"
+"\t{\n"
+"\t\tfield = 0;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(\"Parent's field: \" + field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tprivate int childsField;\n"
+"\t\n"
+"\tvoid Child()\n"
+"\t{\n"
+"\t\tsuper.Parent();\n"
+"\t\tchildsField = field + 1;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tsuper.Print();\n"
+"\t\tmessage(\"Child's field: \" + childsField);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // Will show both 0 and 1\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:2
+#, no-wrap
+msgid "This keyword is used in a class
definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"foo\"\n"
+"\tchild.bar(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:60
+#, no-wrap
+msgid "A parent's method can be called inside an overriden method by using the super
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:56
+#, no-wrap
+msgid "As shown in the previous example, the class members can be initialized in the class definition (int x = 3.33;)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/open.txt:13
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"a\"
mode: open for appending."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:2
+#, no-wrap
+msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returns a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:6
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"w\"
mode: open for appending."
+msgstr ""
diff --git a/help/cbot/po/ru.po b/help/cbot/po/ru.po
index 2c97e50a..e108ef5c 100644
--- a/help/cbot/po/ru.po
+++ b/help/cbot/po/ru.po
@@ -53,13 +53,13 @@ msgid "Time in seconds."
msgstr ""
#. type: \t; header
-#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:70 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:18 ../E/openfile.txt:10 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:17 ../E/produce.txt:30 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
+#: ../E/abstime.txt:10 ../E/acos.txt:11 ../E/aim.txt:23 ../E/array.txt:41 ../E/asin.txt:11 ../E/atan.txt:11 ../E/atan2.txt:16 ../E/bloc.txt:48 ../E/bool.txt:4 ../E/break.txt:24 ../E/build.txt:27 ../E/buildingenabled.txt:22 ../E/busy.txt:14 ../E/canbuild.txt:22 ../E/canresearch.txt:14 ../E/category.txt:109 ../E/ceil.txt:12 ../E/class.txt:120 ../E/close.txt:6 ../E/cond.txt:4 ../E/continue.txt:24 ../E/cos.txt:11 ../E/deletef.txt:9 ../E/delinfo.txt:13 ../E/destroy.txt:15 ../E/detect.txt:27 ../E/direct.txt:13 ../E/dist.txt:29 ../E/dist2d.txt:13 ../E/do.txt:27 ../E/drop.txt:28 ../E/eof.txt:13 ../E/errmode.txt:32 ../E/expr.txt:197 ../E/extends.txt:105 ../E/extern.txt:29 ../E/factory.txt:21 ../E/false.txt:4 ../E/file.txt:16 ../E/fire.txt:30 ../E/flatgrnd.txt:16 ../E/flatspace.txt:25 ../E/float.txt:24 ../E/floor.txt:12 ../E/for.txt:51 ../E/function.txt:129 ../E/goto.txt:34 ../E/grab.txt:28 ../E/if.txt:39 ../E/int.txt:18 ../E/jet.txt:14 ../E/message.txt:24 ../E/motor.txt:38 ../E/move.txt:21 ../E/nan.txt:14 ../E/new.txt:20 ../E/null.txt:4 ../E/object.txt:79 ../E/open.txt:19 ../E/openfile.txt:11 ../E/pencolor.txt:14 ../E/pendown.txt:17 ../E/penup.txt:11 ../E/penwidth.txt:14 ../E/point.txt:35 ../E/pointer.txt:51 ../E/pow.txt:14 ../E/private.txt:19 ../E/produce.txt:30 ../E/protected.txt:26 ../E/public.txt:49 ../E/radar.txt:80 ../E/radarall.txt:19 ../E/rand.txt:8 ../E/readln.txt:18 ../E/receive.txt:16 ../E/recycle.txt:12 ../E/research.txt:18 ../E/researched.txt:14 ../E/researches.txt:27 ../E/retobj.txt:13 ../E/return.txt:29 ../E/round.txt:12 ../E/search.txt:25 ../E/send.txt:17 ../E/shield.txt:18 ../E/sin.txt:11 ../E/sizeof.txt:21 ../E/sniff.txt:16 ../E/space.txt:22 ../E/sqrt.txt:11 ../E/static.txt:20 ../E/strfind.txt:18 ../E/string.txt:32 ../E/strleft.txt:14 ../E/strlen.txt:12 ../E/strlower.txt:10 ../E/strmid.txt:18 ../E/strright.txt:14 ../E/strupper.txt:10 ../E/strval.txt:17 ../E/super.txt:45 ../E/switch.txt:70 ../E/synchro.txt:23 ../E/takeoff.txt:15 ../E/tan.txt:11 ../E/term.txt:30 ../E/testinfo.txt:16 ../E/this.txt:52 ../E/thump.txt:12 ../E/topo.txt:13 ../E/true.txt:4 ../E/trunc.txt:12 ../E/turn.txt:32 ../E/type.txt:32 ../E/var.txt:66 ../E/void.txt:10 ../E/wait.txt:21 ../E/while.txt:46 ../E/writeln.txt:19
#, no-wrap
msgid "See also"
msgstr "См. также"
#. type: Plain text
-#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:11 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
+#: ../E/abstime.txt:11 ../E/aim.txt:24 ../E/array.txt:42 ../E/bool.txt:5 ../E/break.txt:25 ../E/busy.txt:15 ../E/cond.txt:5 ../E/continue.txt:25 ../E/deletef.txt:10 ../E/destroy.txt:16 ../E/detect.txt:28 ../E/direct.txt:14 ../E/dist.txt:30 ../E/dist2d.txt:14 ../E/drop.txt:29 ../E/errmode.txt:33 ../E/expr.txt:198 ../E/extern.txt:30 ../E/false.txt:5 ../E/fire.txt:31 ../E/flatgrnd.txt:17 ../E/flatspace.txt:26 ../E/float.txt:25 ../E/for.txt:52 ../E/function.txt:130 ../E/goto.txt:35 ../E/grab.txt:29 ../E/if.txt:40 ../E/int.txt:19 ../E/jet.txt:15 ../E/message.txt:25 ../E/move.txt:22 ../E/nan.txt:15 ../E/object.txt:80 ../E/openfile.txt:12 ../E/pencolor.txt:15 ../E/pendown.txt:18 ../E/penup.txt:12 ../E/penwidth.txt:15 ../E/point.txt:36 ../E/produce.txt:31 ../E/recycle.txt:13 ../E/retobj.txt:14 ../E/return.txt:30 ../E/search.txt:26 ../E/shield.txt:19 ../E/sizeof.txt:22 ../E/sniff.txt:17 ../E/space.txt:23 ../E/string.txt:33 ../E/switch.txt:71 ../E/takeoff.txt:16 ../E/term.txt:31 ../E/thump.txt:13 ../E/topo.txt:14 ../E/true.txt:5 ../E/turn.txt:33 ../E/type.txt:33 ../E/var.txt:67 ../E/void.txt:11 ../E/wait.txt:22
#, no-wrap
msgid "Programming, types and categories."
msgstr "Программирование, типы и категории."
@@ -579,12 +579,6 @@ msgstr "Язык CBOT и Переменные."
msgid "Instruction class
"
msgstr "Инструкция class
"
-#. type: Plain text
-#: ../E/class.txt:2
-#, no-wrap
-msgid "This allows you to declare a class definition using following syntax:"
-msgstr "Синтаксис:"
-
#. type: Source code
#: ../E/class.txt:4
#, no-wrap
@@ -599,164 +593,6 @@ msgstr ""
"\tdeclarations;\n"
"}"
-#. type: Plain text
-#: ../E/class.txt:9
-#, no-wrap
-msgid "Classes can only be public, that is they can be used from all bots in a mission. Class members are also public, that is they are accessible from outside the class. Class members can be fields or functions (also called methods), for example the followin class MyClass
contains 4 fields (a, b, x and s) and one method (MyFunction)."
-msgstr "Классы должны быть общедоступными, таким образом они могут быть исползованы всеми ботами в любой миссии. Члены класса также должны быть общедоступными, тоесть должны быть доступны за пределами класса. Членами класса могут быть ячейки и функции (по-другому методы), например следующий класс MyClass
содержит 4 ячейки (a, b, x и s) и один метод (MyFunction)."
-
-#. type: Source code
-#: ../E/class.txt:11
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tfloat x = 3.33;\n"
-"\tstring s = \"hello\";\n"
-"\tfloat MyFunction( float value )\n"
-"\t{\n"
-"\t\treturn (value*x)-1;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:22
-#, no-wrap
-msgid "As shown in this exemple the class members can be initialized (x=3.33
). You can also define a constructor which is a special method having the same name as the class name. This method will be called automatically at creation time of a class instance. You can also declare more than one method with the same name but different parameters."
-msgstr "ак показано в данном примере члены класса могут быть инициализированы (x=3.33
). Вы можете также определить конструктор, который представляет собой специальный метод, имеющий то же имя, как и имя класса. Этот метод будет вызван автоматически в момент создания экземпляра класса. Вы можете также объявить более одного метода с тем же именем, но с разными параметрами."
-
-#. type: Source code
-#: ../E/class.txt:24
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-msgstr ""
-"public class MyClass\n"
-"{\n"
-"\tint a, b;\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\ta = 2; b = 3;\n"
-"\t}\n"
-"\tvoid MyClass( int a, int b )\n"
-"\t{\n"
-"\t\tthis.a = a; this.b = b;\n"
-"\t}\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:37
-#, no-wrap
-msgid "In this example two constructors are declared for MyClass
, one without parameters and the other one with two parameters. As the names of the parameters of the second constructor are the same as the names of the two members a
et b
we must use the this.a
and this.b
to avoid confusion with the parameters. Another more simpler solution would be to give different names to the parameters."
-msgstr "В этом примере два конструктора были объявлены как MyClass
, один без параметров и второй с двумя параметрами. Поскольку имена параметров второго конструктора такие же, как и имена двух членов a
и b
мы должны использовать this.a
и this.b
чтобы избежать путаницы с параметрами. Наболее простым решением было бы дать разные имена параметрам."
-
-#. type: Source code
-#: ../E/class.txt:39
-#, no-wrap
-msgid ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // constr. w/o parameters\n"
-"\tMyClass item2(4, 5); // constr. with 2 parameters\n"
-"\tMyClass item3; // no constructor called,\n"
-" // therefore item3 == null\n"
-"}"
-msgstr ""
-"void Test( )\n"
-"{\n"
-"\tMyClass item1(); // конструктор без параметров\n"
-"\tMyClass item2(4, 5); // конструктор с двумя параметрами\n"
-"\tMyClass item3; // нет вызова конструктора,\n"
-" // поэтому item3 == null\n"
-"}"
-
-#. type: Plain text
-#: ../E/class.txt:47
-#, no-wrap
-msgid "You can also define a destructor. This must be a void
fonction without parameters that has the same name as the class name but prefixed by the ~ character. The destructor is called automatically as soon as the class instance is no more referenced by anyone."
-msgstr "Вы также можете определить деструктор. Это должна быть пустая(void)
функция без параметров, имеющая то же имя, что и класс, но с первиксом ~. Деструктор вызывается автоматически, как только класс уже больше никому не понадобится."
-
-#. type: Source code
-#: ../E/class.txt:49
-#, no-wrap
-msgid ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // instance counter\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // one instance more\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // one instance less\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // counter = 1\n"
-"\tMyClass item2( ); // counter = 2\n"
-"\titem1 = null; // counter = 1\n"
-"} // counter = 0"
-msgstr ""
-"public class MyClass\n"
-"{\n"
-"\tstatic private int counter = 0; // инициализируем счетчик\n"
-"\tvoid MyClass( )\n"
-"\t{\n"
-"\t\tcounter ++; // увеличиваем\n"
-"\t}\n"
-"\tvoid ~MyClass( )\n"
-"\t{\n"
-"\t\tcounter --; // уменьшаем\n"
-"\t}\n"
-"}\n"
-"void Test()\n"
-"{\n"
-"\tMyClass item1( ); // счетчик = 1\n"
-"\tMyClass item2( ); // счетчик = 2\n"
-"\titem1 = null; // счетчик = 1\n"
-"} // счетчик = 0"
-
-#. type: Plain text
-#: ../E/class.txt:68
-#, no-wrap
-msgid "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-msgstr "If you pass a class instance as parameter to a function, the function only receives a reference to the instance. That means if you modify the instance in the function, the instance that has been passed to the function will be actuallay modified."
-
-#. type: Plain text
-#: ../E/class.txt:71
-#, no-wrap
-msgid ""
-"public
, private
, static
, synchronized
, new
, reference
, this
\n"
-"Programming, types and categories."
-msgstr ""
-"Общедоступное
, приватное
, статичное
, синхронизированное
, новое
, ссылка
, это
\n"
-"Язык CBOT и Переменные и категории."
-
#. type: \b; header
#: ../E/close.txt:1
#, no-wrap
@@ -2812,23 +2648,13 @@ msgstr ""
"\thandle.close();"
#. type: Plain text
-#: ../E/open.txt:13 ../E/openfile.txt:6
-#, no-wrap
-msgid ""
-"\"r\"
mode: open for reading.\n"
-"\"w\"
mode: open for writing."
-msgstr ""
-"\"r\"
mode: открыть для чтения.\n"
-"\"w\"
mode: открыть для записи."
-
-#. type: Plain text
-#: ../E/open.txt:16
+#: ../E/open.txt:17
#, no-wrap
msgid "Files can only be created and opened in the files/ folder which is located in the folder where Colobot has been installed. You cannot not create or open files that are located elsewhere than in the files/ folder."
msgstr "Файлы могут находиться только в папке с установленной игрой."
#. type: Plain text
-#: ../E/open.txt:19
+#: ../E/open.txt:20
#, no-wrap
msgid ""
"file
, close
, readln
, writeln
and eof
.\n"
@@ -2843,12 +2669,6 @@ msgstr ""
msgid "Instruction openfile
"
msgstr "Инструкция openfile
"
-#. type: Plain text
-#: ../E/openfile.txt:2
-#, no-wrap
-msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returne a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
-msgstr "openfile(); открывает файл. Это не метод класса file
, однако openfile возвращает ссылку для нового экземпляра класса. Вы должны указать два параметра - имя файла и режим открытия."
-
#. type: Source code
#: ../E/openfile.txt:4
#, no-wrap
@@ -3131,14 +2951,8 @@ msgstr ""
msgid "Instruction private
(for specialists)"
msgstr "Инструкция private
(for specialists)"
-#. type: Plain text
-#: ../E/private.txt:2
-#, no-wrap
-msgid "Class members can be public (by default) or private. A member can be declared private by putting private
before the type declaration of the member. Private members are not accessible from outside the class definition."
-msgstr "Члены класса могут быть общедоступны (по-умолчанию) или личными. Член может быть объявлен частным, если поставить private
до объявления элемента. Личные(локальные) члены не доступны извне для других классов."
-
#. type: Source code
-#: ../E/private.txt:4
+#: ../E/private.txt:6
#, no-wrap
msgid ""
"public class MyClass\n"
@@ -3167,16 +2981,6 @@ msgstr ""
"\tmessage( item.position ); // это ошибка\n"
"}"
-#. type: Plain text
-#: ../E/private.txt:18
-#, no-wrap
-msgid ""
-"class
, public
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, public
\n"
-"Программирование, типы и категории."
-
#. type: \b; header
#: ../E/public.txt:1
#, no-wrap
@@ -3281,12 +3085,6 @@ msgstr "Если бот, содержащий общедоступную
msgid "Instruction public
for classes"
msgstr "Инструкция public
для классов"
-#. type: Plain text
-#: ../E/public.txt:34
-#, no-wrap
-msgid "Class members can be public (by default) or privat. A member can be declared private by putting private
before the member type. Private members are not accessible from outside the class definition."
-msgstr "Член класса может быть общедоступен (по-умолчанию) или быть личным. Член может быть объявлен локальным с помощью private
, написав это перед самим членом. Закрытые члены будут недоступны извне для других классов."
-
#. type: Source code
#: ../E/public.txt:36
#, no-wrap
@@ -3317,16 +3115,6 @@ msgstr ""
"\tmessage( item.position ); // это ошибка\n"
"}"
-#. type: Plain text
-#: ../E/public.txt:50
-#, no-wrap
-msgid ""
-"class
, private
, functions
\n"
-"Programming, types and categories."
-msgstr ""
-"class
, private
, functions
\n"
-"Программирование, типы и категории."
-
#. type: \b; header
#: ../E/radar.txt:1
#, no-wrap
@@ -4907,16 +4695,6 @@ msgstr ""
"\t}\n"
"}"
-#. type: Plain text
-#: ../E/this.txt:53
-#, no-wrap
-msgid ""
-"class
\n"
-"Programming, types and categories."
-msgstr ""
-"class
\n"
-"Программирование, |l:типы\\u cbot и категории."
-
#. type: \b; header
#: ../E/thump.txt:1
#, no-wrap
@@ -8019,7 +7797,7 @@ msgid "Firstly, the condition is valued and then the first result is returned if
msgstr ""
#. type: \t; header
-#: ../E/expr.txt:157
+#: ../E/expr.txt:157 ../E/extends.txt:4 ../E/extends.txt:65 ../E/private.txt:4 ../E/protected.txt:4 ../E/super.txt:4
#, no-wrap
msgid "Example"
msgstr ""
@@ -8285,3 +8063,600 @@ msgid ""
" Target1
Flying target\n"
" AlienNest
Alien Nest"
msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:10
+#, no-wrap
+msgid "Classes can be only public. This means that they can be used by all bots in a mission."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:12
+#, no-wrap
+msgid "Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:13
+#, no-wrap
+msgid "Class members are fields (variables) and methods (functions)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:15
+#, no-wrap
+msgid "For example, the following class dubbed MyClass
contains 4 fields (a
, b
, x
and s
) and one method (MyFunction
)."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:17
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tfloat x = 3.33;\n"
+"\tstring s = \"hello\";\n"
+"\tfloat MyFunction(float value)\n"
+"\t{\n"
+"\t\treturn (value * x) - 1;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:55
+#, no-wrap
+msgid "Member Initialization"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:60
+#, no-wrap
+msgid "Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:61
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint a, b;\n"
+"\tvoid MyClass()\n"
+"\t{\n"
+"\t\ta = 2; b = 3;\n"
+"\t}\n"
+"\tvoid MyClass(int a, int b)\n"
+"\t{\n"
+"\t\tthis.a = a; this.b = b;\n"
+"\t}\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:76
+#, no-wrap
+msgid "As the names of the parameters of the second constructor are the same as the names of the two members a
and b
, we must use the this
reference to avoid confusion with the parameters' names."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:78
+#, no-wrap
+msgid "Object Creation"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:79
+#, no-wrap
+msgid "You can create objects of type YourClass
using the new
keyword. Example:"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:90
+#, no-wrap
+msgid "Object Destruction"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:114
+#, no-wrap
+msgid "Passing Objects to Functions"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:115
+#, no-wrap
+msgid "Objects in CBOT are passed by reference. This means that when an object is passed to a function, the function receives a copy of a pointer to the instance, not a copy of the object, so any modifications on the object will be visible outside of the function."
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:117
+#, no-wrap
+msgid "Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:118
+#, no-wrap
+msgid "A class can inherit public and protected members of another class by using the extends
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:2
+#, no-wrap
+msgid "This keyword allows you to create a class definition by using the following syntax:"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:9
+#, no-wrap
+msgid "All Classes Are Public"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:52
+#, no-wrap
+msgid "Class Members Modifiers"
+msgstr ""
+
+#. type: \t; header
+#: ../E/class.txt:75
+#, no-wrap
+msgid "Using this
"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:81
+#, no-wrap
+msgid ""
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass object1(); // Call default constructor (without parameters)\n"
+"\tMyClass object2(4, 5); // Call constructor with two int parameters\n"
+"\tMyClass object3; // No constructor called, object3 == null\n"
+"\tobject3 = new MyClass(); // We call constructor now, object3 != null\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:91
+#, no-wrap
+msgid "You can also define a destructor. This must be a void
fonction without parameters, which has the same name as the class but prefixed with the ~
character. The destructor is called automatically as soon as the class instance is no more referenced by anyone. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:93
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tstatic private int counter = 0; // instance counter\n"
+"\tvoid MyClass( )\n"
+"\t{\n"
+"\t\tcounter++; // one instance more\n"
+"\t}\n"
+"\tvoid ~MyClass( )\n"
+"\t{\n"
+"\t\tcounter--; // one instance less\n"
+"\t}\n"
+"}\n"
+"extern void object::Test()\n"
+"{\n"
+"\t // counter == 0\n"
+"\tMyClass item1( ); // counter == 1\n"
+"\tMyClass item2( ); // counter == 2\n"
+"\titem1 = null; // counter == 1\n"
+"}\n"
+"// counter == 0"
+msgstr ""
+
+#. type: \b; header
+#: ../E/class.txt:28
+#, no-wrap
+msgid "Accessing Class Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:29
+#, no-wrap
+msgid "Class members can be accessed outside of the class definition by using the .
operator. Example:"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:50
+#, no-wrap
+msgid "Class members are public by default, which means that they are accessible outside of the class definition. They can also be declared as private
or protected
. Such members can only be accessed inside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:53
+#, no-wrap
+msgid "Fields and methods can also be declared as static
. Methods can be additionaly declared as synchronized
."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:58
+#, no-wrap
+msgid "Another way of initiliazing fields is by defining a constructor which is a special method having the same name as the class. This method will be called automatically at creation time of a class instance. Constructors can be overloaded."
+msgstr ""
+
+#. type: Source code
+#: ../E/class.txt:31
+#, no-wrap
+msgid ""
+"public class MyClass\n"
+"{\n"
+"\tint myField = 0;\n"
+"\tint MyFunction()\n"
+"\t{\n"
+"\t\treturn myField * 2;\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tMyClass myObject();\n"
+"\tmyObject.myField = 10;\n"
+"\tmessage(myObject.MyFunction()); // 20\n"
+"\tMyClass mySecondObject();\n"
+"\tmySecondObject.myField = myObject.myField - 2;\n"
+"\tmessage(mySecondObject.MyFunction()); // 16\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:121
+#, no-wrap
+msgid ""
+"public
, private
, protected
, static
, synchronized
, new
, reference
, this
, super
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/protected.txt:1
+#, no-wrap
+msgid "Keyword protected
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Protected class members can be accessed in a child class, but they can't be accessed outside of classes definitions being part of the same inheritance tree (see the extends
keyword)."
+msgstr ""
+
+#. type: Source code
+#: ../E/protected.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field = 0;\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // 0\n"
+"\t//child.field = 1; // Error!\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:2
+#, no-wrap
+msgid "This is an access modifier for class members. Private members are not accessible outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/private.txt:20
+#, no-wrap
+msgid ""
+"class
, public
, protected
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:34
+#, no-wrap
+msgid "public
is also an access modifier for class members, which is the default one. Public members can be accessed from outside of the class definition."
+msgstr ""
+
+#. type: Plain text
+#: ../E/public.txt:50
+#, no-wrap
+msgid ""
+"class
, private
, protected
, functions
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/protected.txt:27
+#, no-wrap
+msgid ""
+"class
, public
, private
, extends
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/super.txt:1
+#, no-wrap
+msgid "Keyword super
"
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:46
+#, no-wrap
+msgid ""
+"class
, this
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/this.txt:53
+#, no-wrap
+msgid ""
+"class
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:1
+#, no-wrap
+msgid "Keyword extends
"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:30
+#, no-wrap
+msgid "Inherited Members"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:31
+#, no-wrap
+msgid "Only public
and protected
members are inherited. private
members are directly inaccessible even for a child, although they can be accessed indirectly through inherited methods."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:33
+#, no-wrap
+msgid "Constructors and destructors are not inherited, however, they can be overriden."
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:35
+#, no-wrap
+msgid "Method Overriding"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:36
+#, no-wrap
+msgid "Inherited methods can be overriden (redefined) in the child class definition. Example:"
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:38
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:62
+#, no-wrap
+msgid "Polymorphism"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:63
+#, no-wrap
+msgid "Reference
of type Parent can point to an object of type Child. However, such a pointer can't be used to access a child member. In order to access a child member, it must be assured that the Parent reference really points to a Child object. If that's the case, it can be safely copied to a pointer of type Child, which has access to the child members."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:67
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"foo bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tParent people[2];\n"
+"\tpeople[0] = new Parent();\n"
+"\tpeople[1] = new Child();\n"
+"\tfor (int i = 0; i < 2; ++i)\n"
+"\t{\n"
+"\t\tpeople[i].foo();\n"
+"\t}\n"
+"\t//people[1].bar(); // Error\n"
+"\tChild child = people[1];\n"
+"\tchild.bar(); // OK\n"
+"}"
+msgstr ""
+
+#. type: \b; header
+#: ../E/extends.txt:102
+#, no-wrap
+msgid "Multiple Inheritance"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:103
+#, no-wrap
+msgid "A child cannot have multiple parents, however, a parent can have many children."
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:106
+#, no-wrap
+msgid ""
+"class
, public
, private
, protected
, new
, reference
, this
, super
\n"
+"Programming, types and categories."
+msgstr ""
+
+#. type: Plain text
+#: ../E/super.txt:2
+#, no-wrap
+msgid "This keyword is similar to this
, however, it grants access to methods from the parent class (see the extends
keyword), which is especially useful for method overriding."
+msgstr ""
+
+#. type: Source code
+#: ../E/super.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tprotected int field;\n"
+"\t\n"
+"\tvoid Parent()\n"
+"\t{\n"
+"\t\tfield = 0;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tmessage(\"Parent's field: \" + field);\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tprivate int childsField;\n"
+"\t\n"
+"\tvoid Child()\n"
+"\t{\n"
+"\t\tsuper.Parent();\n"
+"\t\tchildsField = field + 1;\n"
+"\t}\n"
+"\t\n"
+"\tvoid Print()\n"
+"\t{\n"
+"\t\tsuper.Print();\n"
+"\t\tmessage(\"Child's field: \" + childsField);\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.Print(); // Will show both 0 and 1\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:2
+#, no-wrap
+msgid "This keyword is used in a class
definition when we want the class to inherit members from another class. The class which is extended we usually call a parent or base, the extending class we call a child."
+msgstr ""
+
+#. type: Source code
+#: ../E/extends.txt:6
+#, no-wrap
+msgid ""
+"public class Parent\n"
+"{\n"
+"\tvoid foo()\n"
+"\t{\n"
+"\t\tmessage(\"foo\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"public class Child extends Parent\n"
+"{\n"
+"\tvoid bar()\n"
+"\t{\n"
+"\t\tmessage(\"bar\");\n"
+"\t}\n"
+"}\n"
+"\n"
+"extern void object::Test()\n"
+"{\n"
+"\tChild child();\n"
+"\tchild.foo(); // Will show \"foo\"\n"
+"\tchild.bar(); // Will show \"bar\"\n"
+"}"
+msgstr ""
+
+#. type: Plain text
+#: ../E/extends.txt:60
+#, no-wrap
+msgid "A parent's method can be called inside an overriden method by using the super
keyword."
+msgstr ""
+
+#. type: Plain text
+#: ../E/class.txt:56
+#, no-wrap
+msgid "As shown in the previous example, the class members can be initialized in the class definition (int x = 3.33;)."
+msgstr ""
+
+#. type: Plain text
+#: ../E/open.txt:13
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"a\"
mode: open for appending."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:2
+#, no-wrap
+msgid "openfile(); opens an text file in the files/ folder. This is not a method of the file
class but openfile returns a reference to a new instance of the file class. You must supply two parameters, the filename and the opening mode."
+msgstr ""
+
+#. type: Plain text
+#: ../E/openfile.txt:6
+#, no-wrap
+msgid ""
+"\"r\"
mode: open for reading.\n"
+"\"w\"
mode: open for writing.\n"
+"\"w\"
mode: open for appending."
+msgstr ""
diff --git a/help/generic/E/cbot.txt b/help/generic/E/cbot.txt
index 509dcba6..9e2455be 100644
--- a/help/generic/E/cbot.txt
+++ b/help/generic/E/cbot.txt
@@ -84,12 +84,15 @@ Constants like \l;categories\u cbot\category; are displayed like that: \const;co
\t;Specific instructions for classes:
\c;\l;class\u cbot\class; \n;Class declararion
-\c;\l;public\u cbot\public; \n;Declares a public function
+\c;\l;public\u cbot\public; \n;Declares a public class member
\c;\l;private\u cbot\private; \n;Declares a private class member
+\c;\l;protected\u cbot\protected; \n;Declares a protected class member
\c;\l;static\u cbot\static; \n;Declares a static class member
\c;\l;synchronized\u cbot\synchro; \n;Prevents simultaneous execution
\c;\l;new\u cbot\new; \n;Creates a new instance
\c;\l;this\u cbot\this; \n;Reference to the current instance
+\c;\l;extends\u cbot\extends; \n;Extends a class
+\c;\l;super\u cbot\super; \n;Grants access to the parent class
\t;Specific instructions for strings:
\c;\l;strlen\u cbot\strlen; \n;Gets string length
diff --git a/help/generic/po/de.po b/help/generic/po/de.po
index 27ebced9..c8c92f91 100644
--- a/help/generic/po/de.po
+++ b/help/generic/po/de.po
@@ -124,34 +124,14 @@ msgstr ""
msgid "Specific instructions for classes:"
msgstr "Befehle für die Verwaltung von Klassen:"
-#. type: Plain text
-#: ../E/cbot.txt:86
-#, no-wrap
-msgid ""
-"class
Class declararion\n"
-"public
Declares a public function\n"
-"private
Declares a private class member\n"
-"static
Declares a static class member\n"
-"synchronized
Prevents simultaneous execution\n"
-"new
Creates a new instance\n"
-"this
Reference to the current instance"
-msgstr ""
-"class
Deklaration einer Klasse\n"
-"public
Deklaration einer öffentliche Funktion\n"
-"private
Deklaration eines privaten Gliedes\n"
-"static
Deklaration eines statischen Gliedes\n"
-"synchronized
Verhindert gleichzeitige Ausführung\n"
-"new
Erstellt eine neue Instanz\n"
-"this
Bezieht sich auf die laufende Instanz"
-
#. type: \t; header
-#: ../E/cbot.txt:94
+#: ../E/cbot.txt:97
#, no-wrap
msgid "Specific instructions for strings:"
msgstr "Befehle für die Verarbeitung von Strings (Zeichenketten):"
#. type: Plain text
-#: ../E/cbot.txt:95
+#: ../E/cbot.txt:98
#, no-wrap
msgid ""
"strlen
Gets string length\n"
@@ -173,13 +153,13 @@ msgstr ""
"strlower
Umwandlung in Kleinbuchstaben"
#. type: \t; header
-#: ../E/cbot.txt:104
+#: ../E/cbot.txt:107
#, no-wrap
msgid "Specific instructions for files:"
msgstr "Befehle für die Dateiverwaltung:"
#. type: Plain text
-#: ../E/cbot.txt:105
+#: ../E/cbot.txt:108
#, no-wrap
msgid ""
"open
Opens a file\n"
@@ -197,13 +177,13 @@ msgstr ""
"deletefile
Löscht eine Datei"
#. type: \t; header
-#: ../E/battles.txt:53 ../E/cbot.txt:128 ../E/freehelp.txt:4
+#: ../E/battles.txt:53 ../E/cbot.txt:131 ../E/freehelp.txt:4
#, no-wrap
msgid "See also"
msgstr "Siehe auch"
#. type: Plain text
-#: ../E/cbot.txt:129
+#: ../E/cbot.txt:132
#, no-wrap
msgid "Types and categories."
msgstr "Variablentypen und Kategorien."
@@ -680,13 +660,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:112
+#: ../E/cbot.txt:115
#, no-wrap
msgid "Mathematical functions:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:113
+#: ../E/cbot.txt:116
#, no-wrap
msgid ""
"rand
Returns a random value\n"
@@ -1094,3 +1074,19 @@ msgid ""
"canresearch
Checks if a technology can be researched\n"
"researched
Checks if a technology is researched"
msgstr ""
+
+#. type: Plain text
+#: ../E/cbot.txt:86
+#, no-wrap
+msgid ""
+"class
Class declararion\n"
+"public
Declares a public class member\n"
+"private
Declares a private class member\n"
+"protected
Declares a protected class member\n"
+"static
Declares a static class member\n"
+"synchronized
Prevents simultaneous execution\n"
+"new
Creates a new instance\n"
+"this
Reference to the current instance\n"
+"extends
Extends a class\n"
+"super
Grants access to the parent class"
+msgstr ""
diff --git a/help/generic/po/fr.po b/help/generic/po/fr.po
index f3878a1a..b1f42f95 100644
--- a/help/generic/po/fr.po
+++ b/help/generic/po/fr.po
@@ -135,34 +135,14 @@ msgstr ""
msgid "Specific instructions for classes:"
msgstr "Instructions pour les classes:"
-#. type: Plain text
-#: ../E/cbot.txt:86
-#, no-wrap
-msgid ""
-"class
Class declararion\n"
-"public
Declares a public function\n"
-"private
Declares a private class member\n"
-"static
Declares a static class member\n"
-"synchronized
Prevents simultaneous execution\n"
-"new
Creates a new instance\n"
-"this
Reference to the current instance"
-msgstr ""
-"class
Déclaration d'une classe\n"
-"public
Indique une fonction publique\n"
-"private
Indique un champ privée dans une classe\n"
-"static
Indique un champ statique dans une classe\n"
-"synchronized
Empêche l'exécution simultanée\n"
-"new
Crée une nouvelle instance\n"
-"this
Référence l'instance courante"
-
#. type: \t; header
-#: ../E/cbot.txt:94
+#: ../E/cbot.txt:97
#, no-wrap
msgid "Specific instructions for strings:"
msgstr "Instructions pour les chaînes de caractères:"
#. type: Plain text
-#: ../E/cbot.txt:95
+#: ../E/cbot.txt:98
#, no-wrap
msgid ""
"strlen
Gets string length\n"
@@ -184,13 +164,13 @@ msgstr ""
"strlower
Convertit en minuscules."
#. type: \t; header
-#: ../E/cbot.txt:104
+#: ../E/cbot.txt:107
#, no-wrap
msgid "Specific instructions for files:"
msgstr "Instructions pour les fichiers:"
#. type: Plain text
-#: ../E/cbot.txt:105
+#: ../E/cbot.txt:108
#, no-wrap
msgid ""
"open
Opens a file\n"
@@ -208,13 +188,13 @@ msgstr ""
"deletefile
Supprime un fichier"
#. type: \t; header
-#: ../E/battles.txt:53 ../E/cbot.txt:128 ../E/freehelp.txt:4
+#: ../E/battles.txt:53 ../E/cbot.txt:131 ../E/freehelp.txt:4
#, no-wrap
msgid "See also"
msgstr "Voir aussi"
#. type: Plain text
-#: ../E/cbot.txt:129
+#: ../E/cbot.txt:132
#, no-wrap
msgid "Types and categories."
msgstr "Types et catégories."
@@ -692,13 +672,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:112
+#: ../E/cbot.txt:115
#, no-wrap
msgid "Mathematical functions:"
msgstr "Fonctions mathématiques:"
#. type: Plain text
-#: ../E/cbot.txt:113
+#: ../E/cbot.txt:116
#, no-wrap
msgid ""
"rand
Returns a random value\n"
@@ -1108,3 +1088,19 @@ msgid ""
"canresearch
Checks if a technology can be researched\n"
"researched
Checks if a technology is researched"
msgstr ""
+
+#. type: Plain text
+#: ../E/cbot.txt:86
+#, no-wrap
+msgid ""
+"class
Class declararion\n"
+"public
Declares a public class member\n"
+"private
Declares a private class member\n"
+"protected
Declares a protected class member\n"
+"static
Declares a static class member\n"
+"synchronized
Prevents simultaneous execution\n"
+"new
Creates a new instance\n"
+"this
Reference to the current instance\n"
+"extends
Extends a class\n"
+"super
Grants access to the parent class"
+msgstr ""
diff --git a/help/generic/po/generic.pot b/help/generic/po/generic.pot
index 92a6f6d3..1890ee66 100644
--- a/help/generic/po/generic.pot
+++ b/help/generic/po/generic.pot
@@ -118,27 +118,14 @@ msgstr ""
msgid "Specific instructions for classes:"
msgstr ""
-#. type: Plain text
-#: ../E/cbot.txt:86
-#, no-wrap
-msgid ""
-"class
Class declararion\n"
-"public
Declares a public function\n"
-"private
Declares a private class member\n"
-"static
Declares a static class member\n"
-"synchronized
Prevents simultaneous execution\n"
-"new
Creates a new instance\n"
-"this
Reference to the current instance"
-msgstr ""
-
#. type: \t; header
-#: ../E/cbot.txt:94
+#: ../E/cbot.txt:97
#, no-wrap
msgid "Specific instructions for strings:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:95
+#: ../E/cbot.txt:98
#, no-wrap
msgid ""
"strlen
Gets string length\n"
@@ -152,13 +139,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:104
+#: ../E/cbot.txt:107
#, no-wrap
msgid "Specific instructions for files:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:105
+#: ../E/cbot.txt:108
#, no-wrap
msgid ""
"open
Opens a file\n"
@@ -170,13 +157,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/battles.txt:53 ../E/cbot.txt:128 ../E/freehelp.txt:4
+#: ../E/battles.txt:53 ../E/cbot.txt:131 ../E/freehelp.txt:4
#, no-wrap
msgid "See also"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:129
+#: ../E/cbot.txt:132
#, no-wrap
msgid "Types and categories."
msgstr ""
@@ -615,13 +602,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:112
+#: ../E/cbot.txt:115
#, no-wrap
msgid "Mathematical functions:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:113
+#: ../E/cbot.txt:116
#, no-wrap
msgid ""
"rand
Returns a random value\n"
@@ -1029,3 +1016,19 @@ msgid ""
"canresearch
Checks if a technology can be researched\n"
"researched
Checks if a technology is researched"
msgstr ""
+
+#. type: Plain text
+#: ../E/cbot.txt:86
+#, no-wrap
+msgid ""
+"class
Class declararion\n"
+"public
Declares a public class member\n"
+"private
Declares a private class member\n"
+"protected
Declares a protected class member\n"
+"static
Declares a static class member\n"
+"synchronized
Prevents simultaneous execution\n"
+"new
Creates a new instance\n"
+"this
Reference to the current instance\n"
+"extends
Extends a class\n"
+"super
Grants access to the parent class"
+msgstr ""
diff --git a/help/generic/po/pl.po b/help/generic/po/pl.po
index ccc0395c..7e464a21 100644
--- a/help/generic/po/pl.po
+++ b/help/generic/po/pl.po
@@ -138,34 +138,14 @@ msgstr ""
msgid "Specific instructions for classes:"
msgstr "Instrukcje specyficzne dla klas:"
-#. type: Plain text
-#: ../E/cbot.txt:86
-#, no-wrap
-msgid ""
-"class
Class declararion\n"
-"public
Declares a public function\n"
-"private
Declares a private class member\n"
-"static
Declares a static class member\n"
-"synchronized
Prevents simultaneous execution\n"
-"new
Creates a new instance\n"
-"this
Reference to the current instance"
-msgstr ""
-"class
Deklaracja klasy\n"
-"public
Deklaracja funkcji publicznej\n"
-"private
Deklaracja prywatnego elementu klasy\n"
-"static
Deklaracja statycznego elementu klasy\n"
-"synchronized
Zapobiega jednoczesnemu wykonywaniu\n"
-"new
Tworzy nową instancję\n"
-"this
Odwołanie do bieżącej instancji"
-
#. type: \t; header
-#: ../E/cbot.txt:94
+#: ../E/cbot.txt:97
#, no-wrap
msgid "Specific instructions for strings:"
msgstr "Instrukcje specyficzne dla łańcuchów:"
#. type: Plain text
-#: ../E/cbot.txt:95
+#: ../E/cbot.txt:98
#, no-wrap
msgid ""
"strlen
Gets string length\n"
@@ -187,13 +167,13 @@ msgstr ""
"strlower
Zamienia litery na małe"
#. type: \t; header
-#: ../E/cbot.txt:104
+#: ../E/cbot.txt:107
#, no-wrap
msgid "Specific instructions for files:"
msgstr "Instrukcje specyficzne dla plików:"
#. type: Plain text
-#: ../E/cbot.txt:105
+#: ../E/cbot.txt:108
#, no-wrap
msgid ""
"open
Opens a file\n"
@@ -211,13 +191,13 @@ msgstr ""
"deletefile
Usuwa plik"
#. type: \t; header
-#: ../E/battles.txt:53 ../E/cbot.txt:128 ../E/freehelp.txt:4
+#: ../E/battles.txt:53 ../E/cbot.txt:131 ../E/freehelp.txt:4
#, no-wrap
msgid "See also"
msgstr "Zobacz również"
#. type: Plain text
-#: ../E/cbot.txt:129
+#: ../E/cbot.txt:132
#, no-wrap
msgid "Types and categories."
msgstr "Typy i kategorie."
@@ -729,13 +709,13 @@ msgstr ""
"busy
Sprawdza czy obiekt jest zajęty"
#. type: \t; header
-#: ../E/cbot.txt:112
+#: ../E/cbot.txt:115
#, no-wrap
msgid "Mathematical functions:"
msgstr "Funkcje matematyczne:"
#. type: Plain text
-#: ../E/cbot.txt:113
+#: ../E/cbot.txt:116
#, no-wrap
msgid ""
"rand
Returns a random value\n"
@@ -1187,3 +1167,19 @@ msgstr ""
"penwidth
Zmiana grubości pióra\n"
"canresearch
Sprawdza czy można przeprowadzić badanie\n"
"researched
Sprawdza czy przeprowadzono badanie"
+
+#. type: Plain text
+#: ../E/cbot.txt:86
+#, no-wrap
+msgid ""
+"class
Class declararion\n"
+"public
Declares a public class member\n"
+"private
Declares a private class member\n"
+"protected
Declares a protected class member\n"
+"static
Declares a static class member\n"
+"synchronized
Prevents simultaneous execution\n"
+"new
Creates a new instance\n"
+"this
Reference to the current instance\n"
+"extends
Extends a class\n"
+"super
Grants access to the parent class"
+msgstr ""
diff --git a/help/generic/po/ru.po b/help/generic/po/ru.po
index c7956385..99d20f08 100644
--- a/help/generic/po/ru.po
+++ b/help/generic/po/ru.po
@@ -130,27 +130,14 @@ msgstr ""
msgid "Specific instructions for classes:"
msgstr ""
-#. type: Plain text
-#: ../E/cbot.txt:86
-#, no-wrap
-msgid ""
-"class
Class declararion\n"
-"public
Declares a public function\n"
-"private
Declares a private class member\n"
-"static
Declares a static class member\n"
-"synchronized
Prevents simultaneous execution\n"
-"new
Creates a new instance\n"
-"this
Reference to the current instance"
-msgstr ""
-
#. type: \t; header
-#: ../E/cbot.txt:94
+#: ../E/cbot.txt:97
#, no-wrap
msgid "Specific instructions for strings:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:95
+#: ../E/cbot.txt:98
#, no-wrap
msgid ""
"strlen
Gets string length\n"
@@ -164,13 +151,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:104
+#: ../E/cbot.txt:107
#, no-wrap
msgid "Specific instructions for files:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:105
+#: ../E/cbot.txt:108
#, no-wrap
msgid ""
"open
Opens a file\n"
@@ -182,13 +169,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/battles.txt:53 ../E/cbot.txt:128 ../E/freehelp.txt:4
+#: ../E/battles.txt:53 ../E/cbot.txt:131 ../E/freehelp.txt:4
#, no-wrap
msgid "See also"
msgstr "См. также"
#. type: Plain text
-#: ../E/cbot.txt:129
+#: ../E/cbot.txt:132
#, no-wrap
msgid "Types and categories."
msgstr ""
@@ -653,13 +640,13 @@ msgid ""
msgstr ""
#. type: \t; header
-#: ../E/cbot.txt:112
+#: ../E/cbot.txt:115
#, no-wrap
msgid "Mathematical functions:"
msgstr ""
#. type: Plain text
-#: ../E/cbot.txt:113
+#: ../E/cbot.txt:116
#, no-wrap
msgid ""
"rand
Returns a random value\n"
@@ -1067,3 +1054,19 @@ msgid ""
"canresearch
Checks if a technology can be researched\n"
"researched
Checks if a technology is researched"
msgstr ""
+
+#. type: Plain text
+#: ../E/cbot.txt:86
+#, no-wrap
+msgid ""
+"class
Class declararion\n"
+"public
Declares a public class member\n"
+"private
Declares a private class member\n"
+"protected
Declares a protected class member\n"
+"static
Declares a static class member\n"
+"synchronized
Prevents simultaneous execution\n"
+"new
Creates a new instance\n"
+"this
Reference to the current instance\n"
+"extends
Extends a class\n"
+"super
Grants access to the parent class"
+msgstr ""
diff --git a/textures-src/objects/apollo/apollo-13-remaster.png b/textures-src/objects/apollo/apollo-13-remaster.png
deleted file mode 100644
index a5d91d2c..00000000
Binary files a/textures-src/objects/apollo/apollo-13-remaster.png and /dev/null differ
diff --git a/textures-src/objects/apollo/apollo-26-remaster.png b/textures-src/objects/apollo/apollo-26-remaster.png
deleted file mode 100644
index 4b893a15..00000000
Binary files a/textures-src/objects/apollo/apollo-26-remaster.png and /dev/null differ
diff --git a/textures-src/objects/apollo/apollo-final_pattern.xcf b/textures-src/objects/apollo/apollo-final_pattern.xcf
index 37c1202a..23fa1527 100644
Binary files a/textures-src/objects/apollo/apollo-final_pattern.xcf and b/textures-src/objects/apollo/apollo-final_pattern.xcf differ
diff --git a/textures-src/objects/base1/base1-final_pattern.xcf b/textures-src/objects/base1/base1-final_pattern.xcf
index f5eb58ed..69772e79 100644
Binary files a/textures-src/objects/base1/base1-final_pattern.xcf and b/textures-src/objects/base1/base1-final_pattern.xcf differ
diff --git a/textures-src/objects/convert/convert-06-src_remaster.png b/textures-src/objects/convert/convert-06-src_remaster.png
deleted file mode 100644
index 87662ce3..00000000
Binary files a/textures-src/objects/convert/convert-06-src_remaster.png and /dev/null differ
diff --git a/textures-src/objects/convert/convert-final_pattern.xcf b/textures-src/objects/convert/convert-final_pattern.xcf
index 322bb993..4c46648c 100644
Binary files a/textures-src/objects/convert/convert-final_pattern.xcf and b/textures-src/objects/convert/convert-final_pattern.xcf differ
diff --git a/textures-src/objects/derrick/derrick-04-original.png b/textures-src/objects/derrick/derrick-04-original.png
index d51ae701..92a3e6a5 100644
Binary files a/textures-src/objects/derrick/derrick-04-original.png and b/textures-src/objects/derrick/derrick-04-original.png differ
diff --git a/textures-src/objects/derrick/derrick-05-original.png b/textures-src/objects/derrick/derrick-05-original.png
index abfb4ace..19dbdba5 100644
Binary files a/textures-src/objects/derrick/derrick-05-original.png and b/textures-src/objects/derrick/derrick-05-original.png differ
diff --git a/textures-src/objects/derrick/derrick-06-original.png b/textures-src/objects/derrick/derrick-06-original.png
index 73326c05..f66836db 100644
Binary files a/textures-src/objects/derrick/derrick-06-original.png and b/textures-src/objects/derrick/derrick-06-original.png differ
diff --git a/textures-src/objects/derrick/derrick-07-original.png b/textures-src/objects/derrick/derrick-07-original.png
index 674e178c..9972b356 100644
Binary files a/textures-src/objects/derrick/derrick-07-original.png and b/textures-src/objects/derrick/derrick-07-original.png differ
diff --git a/textures-src/objects/derrick/derrick-08-original.png b/textures-src/objects/derrick/derrick-08-original.png
index 4bcf9343..e771cf25 100644
Binary files a/textures-src/objects/derrick/derrick-08-original.png and b/textures-src/objects/derrick/derrick-08-original.png differ
diff --git a/textures-src/objects/derrick/derrick-09-original.png b/textures-src/objects/derrick/derrick-09-original.png
index 88087179..b79eb649 100644
Binary files a/textures-src/objects/derrick/derrick-09-original.png and b/textures-src/objects/derrick/derrick-09-original.png differ
diff --git a/textures-src/objects/derrick/derrick-10-original.png b/textures-src/objects/derrick/derrick-10-original.png
index a6f6c455..2409f79a 100644
Binary files a/textures-src/objects/derrick/derrick-10-original.png and b/textures-src/objects/derrick/derrick-10-original.png differ
diff --git a/textures-src/objects/derrick/derrick-11-original.png b/textures-src/objects/derrick/derrick-11-original.png
index 38f814c3..b6911724 100644
Binary files a/textures-src/objects/derrick/derrick-11-original.png and b/textures-src/objects/derrick/derrick-11-original.png differ
diff --git a/textures-src/objects/derrick/derrick-12-original.png b/textures-src/objects/derrick/derrick-12-original.png
index ccc3bbed..c430386d 100644
Binary files a/textures-src/objects/derrick/derrick-12-original.png and b/textures-src/objects/derrick/derrick-12-original.png differ
diff --git a/textures-src/objects/derrick/derrick-13-original.png b/textures-src/objects/derrick/derrick-13-original.png
index 46ec3c60..9833758d 100644
Binary files a/textures-src/objects/derrick/derrick-13-original.png and b/textures-src/objects/derrick/derrick-13-original.png differ
diff --git a/textures-src/objects/derrick/derrick-14-original.png b/textures-src/objects/derrick/derrick-14-original.png
deleted file mode 100644
index 713abc0d..00000000
Binary files a/textures-src/objects/derrick/derrick-14-original.png and /dev/null differ
diff --git a/textures-src/objects/derrick/derrick-final_pattern.xcf b/textures-src/objects/derrick/derrick-final_pattern.xcf
new file mode 100644
index 00000000..63cc9bed
Binary files /dev/null and b/textures-src/objects/derrick/derrick-final_pattern.xcf differ
diff --git a/textures-src/objects/factory/factory-final_pattern.xcf b/textures-src/objects/factory/factory-final_pattern.xcf
new file mode 100644
index 00000000..88122bee
Binary files /dev/null and b/textures-src/objects/factory/factory-final_pattern.xcf differ
diff --git a/textures-src/objects/lemt/lemt-25-src_render.blend b/textures-src/objects/lemt/lemt-25-src_render.blend
new file mode 100644
index 00000000..e7fa05b4
Binary files /dev/null and b/textures-src/objects/lemt/lemt-25-src_render.blend differ
diff --git a/textures-src/objects/lemt/lemt-final_pattern.xcf b/textures-src/objects/lemt/lemt-final_pattern.xcf
new file mode 100644
index 00000000..73d35fbb
Binary files /dev/null and b/textures-src/objects/lemt/lemt-final_pattern.xcf differ
diff --git a/textures-src/objects/roller/roller-19-src_render_UraniumOre.blend b/textures-src/objects/roller/roller-19-src_render_UraniumOre.blend
new file mode 100644
index 00000000..c57a4a15
Binary files /dev/null and b/textures-src/objects/roller/roller-19-src_render_UraniumOre.blend differ
diff --git a/textures-src/objects/roller/roller-final_pattern.xcf b/textures-src/objects/roller/roller-final_pattern.xcf
new file mode 100644
index 00000000..3192953b
Binary files /dev/null and b/textures-src/objects/roller/roller-final_pattern.xcf differ
diff --git a/textures-src/objects/search/search-03-src_render_PowerCell.blend b/textures-src/objects/search/search-03-src_render_PowerCell.blend
new file mode 100644
index 00000000..240c8617
Binary files /dev/null and b/textures-src/objects/search/search-03-src_render_PowerCell.blend differ
diff --git a/textures-src/objects/search/search-final_pattern.xcf b/textures-src/objects/search/search-final_pattern.xcf
new file mode 100644
index 00000000..ae34c1a5
Binary files /dev/null and b/textures-src/objects/search/search-final_pattern.xcf differ
diff --git a/textures-src/objects/subm/subm-final_pattern.xcf b/textures-src/objects/subm/subm-final_pattern.xcf
new file mode 100644
index 00000000..e9426c4a
Binary files /dev/null and b/textures-src/objects/subm/subm-final_pattern.xcf differ
diff --git a/textures/interface/intro1.png b/textures/interface/intro1.png
index 416b2318..05d62008 100644
Binary files a/textures/interface/intro1.png and b/textures/interface/intro1.png differ
diff --git a/textures/objects/apollo.png b/textures/objects/apollo.png
index 4704e589..7a8f7b78 100644
Binary files a/textures/objects/apollo.png and b/textures/objects/apollo.png differ
diff --git a/textures/objects/base1.png b/textures/objects/base1.png
index df30fac0..e7fd47ae 100644
Binary files a/textures/objects/base1.png and b/textures/objects/base1.png differ
diff --git a/textures/objects/convert.png b/textures/objects/convert.png
index 7c8e6dbe..ac95ea6f 100644
Binary files a/textures/objects/convert.png and b/textures/objects/convert.png differ
diff --git a/textures/objects/derrick.png b/textures/objects/derrick.png
index 7c9f5279..e91ae726 100644
Binary files a/textures/objects/derrick.png and b/textures/objects/derrick.png differ
diff --git a/textures/objects/factory.png b/textures/objects/factory.png
index 1a4d72d2..6a8f65c3 100644
Binary files a/textures/objects/factory.png and b/textures/objects/factory.png differ
diff --git a/textures/objects/lemt.png b/textures/objects/lemt.png
index 233bde01..78aeae17 100644
Binary files a/textures/objects/lemt.png and b/textures/objects/lemt.png differ
diff --git a/textures/objects/roller.png b/textures/objects/roller.png
index 0adb7c52..dd8f1566 100644
Binary files a/textures/objects/roller.png and b/textures/objects/roller.png differ
diff --git a/textures/objects/search.png b/textures/objects/search.png
index ed0bba2c..b8111a7a 100644
Binary files a/textures/objects/search.png and b/textures/objects/search.png differ
diff --git a/textures/objects/subm.png b/textures/objects/subm.png
index 5b4b3aad..9c08a086 100644
Binary files a/textures/objects/subm.png and b/textures/objects/subm.png differ