]> git.tdb.fi Git - r2c2.git/commitdiff
Be more consistent with the use of name and description
authorMikko Rasa <tdb@tdb.fi>
Sun, 4 May 2014 21:08:46 +0000 (00:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 4 May 2014 21:15:27 +0000 (00:15 +0300)
source/designer/designer.cpp
terrain.dat
tracks.dat

index 4ad5274e1cce7754c9742890b4b26607449f9ef6..744f975799f32c0834457df1104dd4b012e52b24 100644 (file)
@@ -591,7 +591,7 @@ string Designer::tooltip(int x, int y)
        if(Object *obj = pick_object(Vector(x*2.0f/rgeom.w-1.0f, y*2.0f/rgeom.h-1.0f, 0)))
        {
                const ObjectType &otype = obj->get_type();
-               string info = format("%d %s", otype.get_article_number(), otype.get_description());
+               string info = format("%d %s", otype.get_article_number(), otype.get_name());
                if(Track *track = dynamic_cast<Track *>(obj))
                {
                        if(mode!=CATALOGUE && abs(track->get_tilt()).radians()>1e-4)
@@ -601,6 +601,15 @@ string Designer::tooltip(int x, int y)
                        else if(track->get_sensor_address())
                                info += format(" (sensor %d)", track->get_sensor_address());
                }
+               if(mode==CATALOGUE)
+               {
+                       const string &descr = otype.get_description();
+                       if(!descr.empty())
+                       {
+                               info += '\n';
+                               info += otype.get_description();
+                       }
+               }
                return info;
        }
 
index 5f51c96469cc9205179920008dc35627200a4d90..7e0558bd514ad69d43e88ecd3933800f5d3cfcb5 100644 (file)
@@ -5,6 +5,7 @@ terrain "tb5"
                vendor "MSP";
                article "tb5";
        };
+       name "Terrain blocks, 5 cm grid";
 
        surface
        {
index 13241d986c64342c7d49b000dd8673eb44d3a76e..34eeef8a8b97f14eecb5fab25a66f49de08bd4aa 100644 (file)
@@ -50,7 +50,8 @@ track "24064"
                article "24064";
        };
        appearance "C";
-       description "Straight, 64.3mm (R3-R4-R5)";
+       name "Straight, 64.3 mm";
+       description "R3-R4-R5 spacing";
        part
        {
                length 64.3;
@@ -65,7 +66,8 @@ track "24071"
                article "24071";
        };
        appearance "C";
-       description "Straight, 70.8mm (for slim turnouts)";
+       name "Straight, 70.8 mm";
+       description "For slim turnouts";
        part
        {
                length 70.8;
@@ -81,7 +83,8 @@ track "24077"
                article "24077";
        };
        appearance "C";
-       description "Straight, 77.5mm (R1-R2-R3)";
+       name "Straight, 77.5 mm";
+       description "R1-R2-R3 spacing";
        part
        {
                length 77.5;
@@ -97,7 +100,7 @@ track "24094"
                article "24094";
        };
        appearance "C";
-       description "Straight, 94.2mm";
+       name "Straight, 94.2 mm";
        part
        {
                length 94.2;
@@ -113,7 +116,7 @@ track "24172"
                article "24172";
        };
        appearance "C";
-       description "Straight, 171.7mm";
+       name "Straight, 171.7 mm";
        part
        {
                length 171.7;
@@ -129,7 +132,8 @@ track "24188"
                article "24188";
        };
        appearance "C";
-       description "Straight, 188.3mm (turnout length)";
+       name "Straight, 188.3 mm";
+       description "Turnout length";
        part
        {
                length 188.3;
@@ -145,7 +149,7 @@ track "24229"
                article "24229";
        };
        appearance "C";
-       description "Straight, 229.3mm";
+       name "Straight, 229.3 mm";
        part
        {
                length 229.3;
@@ -160,7 +164,8 @@ track "24236"
                article "24236";
        };
        appearance "C";
-       description "Straight, 236.1mm (slim turnout length)";
+       name "Straight, 236.1 mm";
+       description "Slim turnout length";
        part
        {
                length 236.1;
@@ -175,7 +180,7 @@ track "24360"
                article "24360";
        };
        appearance "C";
-       description "Straight, 360mm";
+       name "Straight, 360 mm";
        part
        {
                length 360;
@@ -192,7 +197,8 @@ track "24107"
                article "24107";
        };
        appearance "C";
-       description "Curve, R1 = 360mm, 7.5°";
+       name "Curve, R1, 7.5°";
+       description "R = 360 mm";
        part
        {
                length 7.5;
@@ -208,7 +214,8 @@ track "24115"
                article "24115";
        };
        appearance "C";
-       description "Curve, R1 = 360mm, 15°";
+       name "Curve, R1, 15°";
+       description "R = 360 mm";
        part
        {
                length 15;
@@ -224,7 +231,8 @@ track "24130"
                article "24130";
        };
        appearance "C";
-       description "Curve, R1 = 360mm, 30°";
+       name "Curve, R1, 30°";
+       description "R = 360 mm";
        part
        {
                length 30;
@@ -242,7 +250,8 @@ track "24206"
                article "24206";
        };
        appearance "C";
-       description "Curve, R2 = 437.5mm, 5.7° (turnout to 30°)";
+       name "Curve, R2, 5.7°";
+       description "R = 437.5 mm, complements turnout to 30°";
        part
        {
                length 5.7;
@@ -258,7 +267,8 @@ track "24207"
                article "24207";
        };
        appearance "C";
-       description "Curve, R2 = 437.5mm, 7.5°";
+       name "Curve, R2, 7.5°";
+       description "R = 437.5 mm";
        part
        {
                length 7.5;
@@ -274,7 +284,8 @@ track "24215"
                article "24215";
        };
        appearance "C";
-       description "Curve, R2 = 437.5mm, 15°";
+       name "Curve, R2, 15°";
+       description "R = 437.5 mm";
        part
        {
                length 15;
@@ -290,7 +301,8 @@ track "24224"
                article "24224";
        };
        appearance "C";
-       description "Curve, R2 = 437.5mm, 24.3° (turnout)";
+       name "Curve, R2, 24.3°";
+       description "R = 437.5 mm, turnout angle";
        part
        {
                length 24.3;
@@ -306,7 +318,8 @@ track "24230"
                article "24230";
        };
        appearance "C";
-       description "Curve, R2 = 437.5mm, 30°";
+       name "Curve, R2, 30°";
+       description "R = 437.5 mm";
        part
        {
                length 30;
@@ -324,7 +337,8 @@ track "24330"
                article "24330";
        };
        appearance "C";
-       description "Curve, R3 = 515mm, 30°";
+       name "Curve, R3, 30°";
+       description "R = 515mm";
        part
        {
                length 30;
@@ -342,7 +356,8 @@ track "24430"
                article "24430";
        };
        appearance "C";
-       description "Curve, R4 = 579.3mm, 30°";
+       name "Curve, R4, 30°";
+       description "R = 579.3mm";
        part
        {
                length 30;
@@ -360,7 +375,8 @@ track "24530"
                article "24530";
        };
        appearance "C";
-       description "Curve, R5 = 643.6mm, 30°";
+       name "Curve, R5, 30°";
+       description "R = 643.6mm";
        part
        {
                length 30;
@@ -378,7 +394,8 @@ track "24912"
                article "24912";
        };
        appearance "C";
-       description "Curve, R = 1114.6mm, 12.1° (slim turnout)";
+       name "Curve, 12.1°";
+       description "R = 1114.6mm, slim turnout angle";
        part
        {
                length 12.1;
@@ -396,7 +413,8 @@ track "24671"
                article "24671";
        };
        appearance "C";
-       description "Curved turnout, left";
+       name "Curved turnout, left";
+       description "R1, R = 360 mm, 30°";
        part
        {
                length 77.5;
@@ -425,7 +443,8 @@ track "24672"
                article "24672";
        };
        appearance "C";
-       description "Curved turnout, right";
+       name "Curved turnout, right";
+       description "R1, R = 360 mm, 30°";
        part
        {
                length 77.5;
@@ -456,7 +475,8 @@ track "24611"
                article "24611";
        };
        appearance "C";
-       description "Turnout, left";
+       name "Turnout, left";
+       description "R2, R = 437.5 mm, 24.3°";
        part
        {
                length 188.3;
@@ -478,7 +498,8 @@ track "24612"
                article "24612";
        };
        appearance "C";
-       description "Turnout, right";
+       name "Turnout, right";
+       description "R2, R = 437.5 mm, 24.3°";
        part
        {
                length 188.3;
@@ -500,7 +521,8 @@ track "24630"
                article "24630";
        };
        appearance "C";
-       description "Turnout, 3-way";
+       name "Turnout, 3-way";
+       description "R2, R = 437.5 mm, 24.3°";
        part
        {
                length 188.3;
@@ -528,7 +550,8 @@ track "24624"
                article "24624";
        };
        appearance "C";
-       description "Turnout, double slip";
+       name "Turnout, double slip";
+       description "R2, R = 437.5 mm, 24.3°";
        state_bits 1;
        part
        {
@@ -566,7 +589,8 @@ track "24711"
                article "24711";
        };
        appearance "C";
-       description "Slim turnout, left";
+       name "Slim turnout, left";
+       description "R = 1114.6mm, 12.1°";
        part
        {
                length 236.1;
@@ -588,7 +612,8 @@ track "24712"
                article "24712";
        };
        appearance "C";
-       description "Slim turnout, right";
+       name "Slim turnout, right";
+       description "R = 1114.6mm, 12.1°";
        part
        {
                length 236.1;
@@ -612,7 +637,8 @@ track "24640"
                article "24640";
        };
        appearance "C";
-       description "Crossing, 24.3°";
+       name "Crossing, 24.3°";
+       description "Turnout angle";
        part
        {
                length 188.3;
@@ -632,7 +658,8 @@ track "24649"
                article "24649";
        };
        appearance "C";
-       description "Crossing, 48.6°";
+       name "Crossing, 48.6°";
+       description "2× turnout angle";
        part
        {
                length 103.3;
@@ -652,7 +679,8 @@ track "24740"
                article "24740";
        };
        appearance "C";
-       description "Slim crossing, 12.1°";
+       name "Slim crossing, 12.1°";
+       description "Slim turnout angle";
        part
        {
                length 236.1;
@@ -674,7 +702,7 @@ track "24977"
                article "24977";
        };
        appearance "C";
-       description "Bumper";
+       name "Bumper";
        object "bumper.object";
        part
        {
@@ -692,6 +720,7 @@ signal "7039"
                vendor "Märklin";
                article "7039";
        };
+       name "Home signal";
        indication "Hp1"
        {
                aspect 0;