]> git.pond.sub.org Git - empserver/commitdiff
edit: Limit resources to 100 instead of 127
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 25 Jan 2013 18:30:18 +0000 (19:30 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 6 Jun 2013 17:55:00 +0000 (19:55 +0200)
Back in Empire 1, resources were limited consistently: fertility to
120, all others to 100.

When Chainsaw added setresource, consistency was lost: fertility got
limited to 100 there.

Chainsaw 3 changed edit to limit all resources to 127.

Commit 3fcee8dd and commit 8e430ae2 (both v4.3.11) changed fairland
and setsector to limit fertility to 100, matching setresource.

Now only edit remains different.  Change it to finally make things
consistent again.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/edit.c
tests/actofgod/actofgod.xdump
tests/actofgod/geninput.pl
tests/actofgod/journal.log

index 6353c4c21bfde1eaf573aedd768d20797dd18f7c..fd286a8ab4deac44e2d7a4a935875d00fcfab0a9 100644 (file)
@@ -466,27 +466,27 @@ edit_sect(struct sctstr *sect, char *key, int arg, char *p)
        sect->sct_mobil = new;
        break;
     case 'i':
-       new = LIMIT_TO(arg, 0, 127);
+       new = LIMIT_TO(arg, 0, 100);
        noise(sect, "Iron ore content", sect->sct_min, new);
        sect->sct_min = (unsigned char)new;
        break;
     case 'g':
-       new = LIMIT_TO(arg, 0, 127);
+       new = LIMIT_TO(arg, 0, 100);
        noise(sect, "Gold content", sect->sct_gmin, new);
        sect->sct_gmin = (unsigned char)new;
        break;
     case 'f':
-       new = LIMIT_TO(arg, 0, 127);
+       new = LIMIT_TO(arg, 0, 100);
        noise(sect, "Fertility", sect->sct_fertil, new);
        sect->sct_fertil = (unsigned char)new;
        break;
     case 'c':
-       new = LIMIT_TO(arg, 0, 127);
+       new = LIMIT_TO(arg, 0, 100);
        noise(sect, "Oil content", sect->sct_oil, new);
        sect->sct_oil = (unsigned char)new;
        break;
     case 'u':
-       new = LIMIT_TO(arg, 0, 127);
+       new = LIMIT_TO(arg, 0, 100);
        noise(sect, "Uranium content", sect->sct_uran, new);
        sect->sct_uran = (unsigned char)new;
        break;
index 343b92ebdd4a5c403db290458ee46981df83b502..c24b973e6d6132b4e0da9bd4989e6cb87479a37b 100644 (file)
@@ -14,8 +14,8 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd
 0 -2 0 0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 1 1 4 0 -127 0 0 0 0 0 0 0 1 1 0 0 0 1 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 3 1 4 0 -127 0 0 0 0 0 0 0 3 1 0 0 0 1 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
-1 5 1 4 100 127 0 127 0 0 0 0 0 5 1 9999 0 100 1 4 127 127 127 127 127 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32767 exposed 32767 255 0 9999 0 100 100 100
-1 7 1 4 100 127 0 127 0 0 0 0 0 7 1 9999 0 100 1 4 127 127 127 127 127 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32767 exposed 32767 255 0 9999 0 100 100 100
+1 5 1 4 100 127 0 127 0 0 0 0 0 5 1 9999 0 100 1 4 100 100 100 100 100 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32767 exposed 32767 255 0 9999 0 100 100 100
+1 7 1 4 100 127 0 127 0 0 0 0 0 7 1 9999 0 100 1 4 100 100 100 100 100 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32767 exposed 32767 255 0 9999 0 100 100 100
 1 9 1 4 0 0 0 0 0 0 0 0 0 9 1 0 0 100 1 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 11 1 4 0 0 0 0 0 0 0 0 0 11 1 0 0 100 1 4 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 2 -11 1 4 0 0 0 0 0 0 0 0 0 -11 1 0 0 100 1 4 0 0 0 0 0 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
index 1abc1bd1b0ab7a8c2fbf69b980bea9824b2477a4..f5f168ff37d502536f2b6a633fd05a15663efc42 100755 (executable)
@@ -154,7 +154,6 @@ sub sect_int {
        edit_int1('sect', '1,1', $key, $lob, $upb);
        my $rkey = $edit2setres{$key};
        if (defined $rkey) {
-           $upb = 100;
            setres('2,2', $rkey, $lob);
            setres('4,2', $rkey, $lob - 1);
            setres('6,2', $rkey, $upb);
@@ -172,11 +171,11 @@ sub sect_int {
 sect_int(
     ['e', 0, 100],
     ['m', -127, 127],
-    ['i', 0, 127],
-    ['g', 0, 127],
-    ['f', 0, 127],
-    ['c', 0, 127],
-    ['u', 0, 127],
+    ['i', 0, 100],
+    ['g', 0, 100],
+    ['f', 0, 100],
+    ['c', 0, 100],
+    ['u', 0, 100],
     ['w', 0, 100],
     ['l', 0, 127],
     ['x', 0, 255],
index 5fe1e1ddc9dd34778b76b0f378dc534020671885..55b93449a0d565111d766f8bceb150714c5cea9c 100644 (file)
     Play#0 command edit
     Play#0 output Play#0 1 Iron ore content of 3,1 changed from 0 to 0
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 5,1 i 127
+    Play#0 input edit l 5,1 i 100
     Play#0 command edit
-    Play#0 output Play#0 1 Iron ore content of 5,1 changed from 0 to 127
+    Play#0 output Play#0 1 Iron ore content of 5,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 7,1 i 128
+    Play#0 input edit l 7,1 i 101
     Play#0 command edit
-    Play#0 output Play#0 1 Iron ore content of 7,1 changed from 0 to 127
+    Play#0 output Play#0 1 Iron ore content of 7,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
     Play#0 input setres i 2,2 0
     Play#0 command setresource
     Play#0 command edit
     Play#0 output Play#0 1 Gold content of 3,1 changed from 0 to 0
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 5,1 g 127
+    Play#0 input edit l 5,1 g 100
     Play#0 command edit
-    Play#0 output Play#0 1 Gold content of 5,1 changed from 0 to 127
+    Play#0 output Play#0 1 Gold content of 5,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 7,1 g 128
+    Play#0 input edit l 7,1 g 101
     Play#0 command edit
-    Play#0 output Play#0 1 Gold content of 7,1 changed from 0 to 127
+    Play#0 output Play#0 1 Gold content of 7,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
     Play#0 input setres g 2,2 0
     Play#0 command setresource
     Play#0 command edit
     Play#0 output Play#0 1 Fertility of 3,1 changed from 0 to 0
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 5,1 f 127
+    Play#0 input edit l 5,1 f 100
     Play#0 command edit
-    Play#0 output Play#0 1 Fertility of 5,1 changed from 0 to 127
+    Play#0 output Play#0 1 Fertility of 5,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 7,1 f 128
+    Play#0 input edit l 7,1 f 101
     Play#0 command edit
-    Play#0 output Play#0 1 Fertility of 7,1 changed from 0 to 127
+    Play#0 output Play#0 1 Fertility of 7,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
     Play#0 input setres f 2,2 0
     Play#0 command setresource
     Play#0 command edit
     Play#0 output Play#0 1 Oil content of 3,1 changed from 0 to 0
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 5,1 c 127
+    Play#0 input edit l 5,1 c 100
     Play#0 command edit
-    Play#0 output Play#0 1 Oil content of 5,1 changed from 0 to 127
+    Play#0 output Play#0 1 Oil content of 5,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 7,1 c 128
+    Play#0 input edit l 7,1 c 101
     Play#0 command edit
-    Play#0 output Play#0 1 Oil content of 7,1 changed from 0 to 127
+    Play#0 output Play#0 1 Oil content of 7,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
     Play#0 input setres o 2,2 0
     Play#0 command setresource
     Play#0 command edit
     Play#0 output Play#0 1 Uranium content of 3,1 changed from 0 to 0
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 5,1 u 127
+    Play#0 input edit l 5,1 u 100
     Play#0 command edit
-    Play#0 output Play#0 1 Uranium content of 5,1 changed from 0 to 127
+    Play#0 output Play#0 1 Uranium content of 5,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
-    Play#0 input edit l 7,1 u 128
+    Play#0 input edit l 7,1 u 101
     Play#0 command edit
-    Play#0 output Play#0 1 Uranium content of 7,1 changed from 0 to 127
+    Play#0 output Play#0 1 Uranium content of 7,1 changed from 0 to 100
     Play#0 output Play#0 6 0 640
     Play#0 input setres u 2,2 0
     Play#0 command setresource
     Play#0 output Play#0 1 Mobility in 3,1 was changed from 0 to -127 by an act of POGO
     Play#0 output Play#0 1 Mobility in 5,1 was changed from 0 to 127 by an act of POGO
     Play#0 output Play#0 1 Mobility in 7,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Iron ore content in 5,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Iron ore content in 7,1 was changed from 0 to 127 by an act of POGO
+    Play#0 output Play#0 1 Iron ore content in 5,1 was changed from 0 to 100 by an act of POGO
+    Play#0 output Play#0 1 Iron ore content in 7,1 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 6,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 8,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 3,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 7,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 5,3 was changed from 1 to 0 by an act of POGO
     Play#0 output Play#0 1 Iron ore content in 7,3 was changed from 1 to 0 by an act of POGO
-    Play#0 output Play#0 1 Gold content in 5,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Gold content in 7,1 was changed from 0 to 127 by an act of POGO
+    Play#0 output Play#0 1 Gold content in 5,1 was changed from 0 to 100 by an act of POGO
+    Play#0 output Play#0 1 Gold content in 7,1 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Gold content in 6,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Gold content in 8,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Gold content in 3,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Gold content in 7,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Gold content in 5,3 was changed from 1 to 0 by an act of POGO
     Play#0 output Play#0 1 Gold content in 7,3 was changed from 1 to 0 by an act of POGO
-    Play#0 output Play#0 1 Fertility in 5,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Fertility in 7,1 was changed from 0 to 127 by an act of POGO
+    Play#0 output Play#0 1 Fertility in 5,1 was changed from 0 to 100 by an act of POGO
+    Play#0 output Play#0 1 Fertility in 7,1 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 6,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 8,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 3,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 7,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 5,3 was changed from 1 to 0 by an act of POGO
     Play#0 output Play#0 1 Fertility content in 7,3 was changed from 1 to 0 by an act of POGO
-    Play#0 output Play#0 1 Oil content in 5,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Oil content in 7,1 was changed from 0 to 127 by an act of POGO
+    Play#0 output Play#0 1 Oil content in 5,1 was changed from 0 to 100 by an act of POGO
+    Play#0 output Play#0 1 Oil content in 7,1 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Oil content in 6,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Oil content in 8,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Oil content in 3,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Oil content in 7,3 was changed from 0 to 1 by an act of POGO
     Play#0 output Play#0 1 Oil content in 5,3 was changed from 1 to 0 by an act of POGO
     Play#0 output Play#0 1 Oil content in 7,3 was changed from 1 to 0 by an act of POGO
-    Play#0 output Play#0 1 Uranium content in 5,1 was changed from 0 to 127 by an act of POGO
-    Play#0 output Play#0 1 Uranium content in 7,1 was changed from 0 to 127 by an act of POGO
+    Play#0 output Play#0 1 Uranium content in 5,1 was changed from 0 to 100 by an act of POGO
+    Play#0 output Play#0 1 Uranium content in 7,1 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Uranium content in 6,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Uranium content in 8,2 was changed from 0 to 100 by an act of POGO
     Play#0 output Play#0 1 Uranium content in 3,3 was changed from 0 to 1 by an act of POGO