From efec4417d3e073955dbcc8efc435fff6a385dbcd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 6 Jan 2015 14:45:51 +0100 Subject: [PATCH] tests/actofgod: Test plane type change's effect on range Demonstrate bugs: doesn't always preserve unlimited range, and doesn't always cut range back to maximum. Signed-off-by: Markus Armbruster --- tests/actofgod/final.xdump | 2 ++ tests/actofgod/geninput.pl | 2 ++ tests/actofgod/journal.log | 14 ++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/tests/actofgod/final.xdump b/tests/actofgod/final.xdump index 03c6a092..6d7338a8 100644 --- a/tests/actofgod/final.xdump +++ b/tests/actofgod/final.xdump @@ -187,6 +187,8 @@ uid owner xloc yloc type effic mobil off tech opx opy mission radius wing range 4 3 3 -1 0 100 127 0 32767 0 0 none 0 "" 18 0 -1 4 () 0 0.00000 5 3 1 -1 0 100 127 0 32767 1 -1 air\040defense 4 "" 18 0 -1 -1 () 0 0.00000 6 1 0 0 9 10 0 0 90 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000 +7 0 0 0 9 0 0 0 90 0 0 none 0 "" 4 0 -1 -1 () 0 0.00000 +8 0 0 0 0 0 0 0 90 0 0 none 0 "" 15 0 -1 -1 () 0 0.00000 49 0 0 0 0 0 0 0 0 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000 /config config land diff --git a/tests/actofgod/geninput.pl b/tests/actofgod/geninput.pl index b6f1df4c..c176e42d 100755 --- a/tests/actofgod/geninput.pl +++ b/tests/actofgod/geninput.pl @@ -252,6 +252,8 @@ edit_int('ship', 2, ( # plane: type edit('plane', 6, 'T', 'mb', 'O', 1, 'T', 'mb', 'T', 'hb', 'T', 'mb'); +edit('plane', 7, 'r', 255, 'T', 'hb', 'T', 'mb'); +edit('plane', 8, 'T', 'hb', 'r', 255, 'T', 'f1'); # plane: effic mobil range tech edit_int('plane', 2, ( diff --git a/tests/actofgod/journal.log b/tests/actofgod/journal.log index 51491ce5..3acdf34c 100644 --- a/tests/actofgod/journal.log +++ b/tests/actofgod/journal.log @@ -1158,6 +1158,20 @@ Play#0 output Play#0 1 Tech level of hb B-26B Marauder #6 changed from 80 to 90 Play#0 output Play#0 1 Type of hb B-26B Marauder #6 changed to mb medium bomber Play#0 output Play#0 6 0 640 + Play#0 input edit p 7 r 255 T hb T mb + Play#0 command edit + Play#0 output Play#0 1 Range of f1 Sopwith Camel #7 changed from 0 to 4 + Play#0 output Play#0 1 Type of f1 Sopwith Camel #7 changed to hb B-26B Marauder + Play#0 output Play#0 1 Tech level of hb B-26B Marauder #7 changed from 0 to 90 + Play#0 output Play#0 1 Type of hb B-26B Marauder #7 changed to mb medium bomber + Play#0 output Play#0 6 0 640 + Play#0 input edit p 8 T hb r 255 T f1 + Play#0 command edit + Play#0 output Play#0 1 Type of f1 Sopwith Camel #8 changed to hb B-26B Marauder + Play#0 output Play#0 1 Tech level of hb B-26B Marauder #8 changed from 0 to 90 + Play#0 output Play#0 1 Range of hb B-26B Marauder #8 changed from 0 to 15 + Play#0 output Play#0 1 Type of hb B-26B Marauder #8 changed to f1 Sopwith Camel + Play#0 output Play#0 6 0 640 Play#0 input edit p 2 e 0 Play#0 command edit Play#0 output Play#0 1 Efficiency of f1 Sopwith Camel #2 unchanged