return RET_FAIL;
switch (char0) {
case 'i':
- if (sect.sct_own != 0)
- resnoise(§, "Iron ore content", sect.sct_min, amt);
+ resnoise(§, "Iron ore content", sect.sct_min, amt);
sect.sct_min = (unsigned char)amt;
break;
case 'g':
- if (sect.sct_own != 0)
- resnoise(§, "Gold content", sect.sct_gmin, amt);
+ resnoise(§, "Gold content", sect.sct_gmin, amt);
sect.sct_gmin = (unsigned char)amt;
break;
case 'o':
- if (sect.sct_own != 0)
- resnoise(§, "Oil content", sect.sct_oil, amt);
+ resnoise(§, "Oil content", sect.sct_oil, amt);
sect.sct_oil = (unsigned char)amt;
break;
case 'f':
- if (sect.sct_own != 0)
- resnoise(§, "Fertility content", sect.sct_fertil, amt);
+ resnoise(§, "Fertility content", sect.sct_fertil, amt);
sect.sct_fertil = (unsigned char)amt;
break;
case 'u':
- if (sect.sct_own != 0)
- resnoise(§, "Uranium content", sect.sct_uran, amt);
+ resnoise(§, "Uranium content", sect.sct_uran, amt);
sect.sct_uran = (unsigned char)amt;
break;
default:
current = sect.sct_min;
current += amt;
current = LIMIT_TO(current, 0, 100);
- if (sect.sct_own != 0)
- resnoise(§, "Iron ore content", sect.sct_min, current);
+ resnoise(§, "Iron ore content", sect.sct_min, current);
sect.sct_min = (unsigned char)current;
break;
case 'g':
current = sect.sct_gmin;
current += amt;
current = LIMIT_TO(current, 0, 100);
- if (sect.sct_own != 0)
- resnoise(§, "Gold content", sect.sct_gmin, current);
+ resnoise(§, "Gold content", sect.sct_gmin, current);
sect.sct_gmin = (unsigned char)current;
break;
case 'o':
current = sect.sct_oil;
current += amt;
current = LIMIT_TO(current, 0, 100);
- if (sect.sct_own != 0)
- resnoise(§, "Oil content", sect.sct_oil, current);
+ resnoise(§, "Oil content", sect.sct_oil, current);
sect.sct_oil = (unsigned char)current;
break;
case 'w':
current = sect.sct_mines;
current += amt;
current = LIMIT_TO(current, 0, MINES_MAX);
- if (sect.sct_own != 0) {
- if (sect.sct_own == sect.sct_oldown)
- resnoise(§, "Mines", sect.sct_mines, current);
- else
- pr("Mines of %s changed from %d to %d\n",
- xyas(sect.sct_x, sect.sct_y, player->cnum),
- sect.sct_mines, current);
- }
+ if (sect.sct_own == sect.sct_oldown)
+ resnoise(§, "Mines", sect.sct_mines, current);
+ else
+ pr("Mines of %s changed from %d to %d\n",
+ xyas(sect.sct_x, sect.sct_y, player->cnum),
+ sect.sct_mines, current);
sect.sct_mines = current;
break;
case 'o':
current = sect.sct_fertil;
current += amt;
current = LIMIT_TO(current, 0, 100);
- if (sect.sct_own != 0)
- resnoise(§, "Fertility content", sect.sct_fertil, current);
+ resnoise(§, "Fertility content", sect.sct_fertil, current);
sect.sct_fertil = (unsigned char)current;
break;
case 'u':
current = sect.sct_uran;
current += amt;
current = LIMIT_TO(current, 0, 100);
- if (sect.sct_own != 0)
- resnoise(§, "Uranium content", sect.sct_uran, current);
+ resnoise(§, "Uranium content", sect.sct_uran, current);
sect.sct_uran = (unsigned char)current;
break;
default:
0 -7 -1 4 0 0 0 0 0 0 0 0 0 -7 -1 0 0 0 1 4 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
0 -5 -1 4 0 0 0 0 0 0 0 0 0 -5 -1 0 0 0 1 4 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
0 -3 -1 4 0 0 0 0 0 0 0 0 0 -3 -1 0 0 0 1 4 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
-0 -1 -1 0 0 0 0 0 0 0 0 0 0 -1 -1 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
+0 -1 -1 0 0 0 0 0 0 0 0 0 0 -1 -1 0 0 0 1 0 50 50 50 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
/config
config ship
uid owner xloc yloc type effic mobil off tech opx opy mission radius fleet xstart xend ystart yend cargostart(0) cargostart(1) cargostart(2) cargostart(3) cargostart(4) cargostart(5) cargoend(0) cargoend(1) cargoend(2) cargoend(3) cargoend(4) cargoend(5) amtstart(0) amtstart(1) amtstart(2) amtstart(3) amtstart(4) amtstart(5) amtend(0) amtend(1) amtend(2) amtend(3) amtend(4) amtend(5) autonav civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime access mquota path follow name xbuilt ybuilt builder rflags rpath
['d', 0, 100],
);
+# special case: unowned sector
+edit('sect', '-1,-1', 'i', 50);
+setres('-1,-1', 'g', 50);
+setsect('-1,-1', 'f', 50);
+
# special case: mines in occupied sector
setsect('1:3,-3', 'ol', 1);
setsect('1,-3', 'mi', 1);
Play#0 command edit
Play#0 output Play#0 1 Defense percentage of 7,1 changed from 0 to 100
Play#0 output Play#0 6 0 640
+ Play#0 input edit l -1,-1 i 50
+ Play#0 command edit
+ Play#0 output Play#0 1 Iron ore content of -1,-1 changed from 0 to 50
+ Play#0 output Play#0 6 0 640
+ Play#0 input setres g -1,-1 50
+ Play#0 command setresource
+ Play#0 output Play#0 1 Gold content of -1,-1 changed from 0 to 50
+ Play#0 output Play#0 6 0 640
+ Play#0 input setsect f -1,-1 50
+ Play#0 command setsector
+ Play#0 output Play#0 1 Fertility content of -1,-1 changed from 0 to 50
+ Play#0 output Play#0 6 0 640
Play#0 input setsect ol 1:3,-3 1
Play#0 command setsector
Play#0 output Play#0 1 Old owner of 1,-3 changed from 3 (#3) to 1 (#1).