From 329da055dd6f01bfcdcacb797ed78efbc589b09e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 29 Dec 2013 19:43:47 +0100 Subject: [PATCH] nukes: New selector stockpile Not interesting without way to make stockpiles. Coming soon. Signed-off-by: Markus Armbruster --- include/nuke.h | 2 +- src/lib/common/nsc.c | 1 + tests/actofgod/actofgod.xdump | 2 +- tests/fairland/fairland.xdump | 2 +- tests/files/files.xdump | 2 +- tests/smoke/fairland.xdump | 2 +- tests/smoke/journal.log | 6 ++++-- tests/smoke/smoke.xdump | 2 +- 8 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/nuke.h b/include/nuke.h index a59afa3f..918e92a7 100644 --- a/include/nuke.h +++ b/include/nuke.h @@ -53,7 +53,7 @@ struct nukstr { signed char nuk_mobil; /* unused, always 0 */ unsigned char nuk_off; /* repairs stopped? (unused) */ short nuk_tech; /* nuke's tech level */ - char nuk_stockpile; /* group membership, unused */ + char nuk_stockpile; /* group membership */ coord nuk_opx, nuk_opy; /* Op sector coords, unused */ short nuk_mission; /* mission code, unused */ short nuk_radius; /* mission radius, unused */ diff --git a/src/lib/common/nsc.c b/src/lib/common/nsc.c index 55fc237e..4f371245 100644 --- a/src/lib/common/nsc.c +++ b/src/lib/common/nsc.c @@ -407,6 +407,7 @@ struct castr lchr_ca[] = { struct castr nuke_ca[] = { #define CURSTR struct nukstr NSC_GENITEM(EF_NUKE, EF_NUKE_CHR), + {"stockpile", fldoff(nuk_stockpile), NSC_STRINGY, 1, NULL, EF_BAD, 0}, {"plane", fldoff(nuk_plane), NSC_INT, 0, NULL, EF_PLANE, 0}, {NULL, 0, NSC_NOTYPE, 0, NULL, EF_BAD, 0} #undef CURSTR diff --git a/tests/actofgod/actofgod.xdump b/tests/actofgod/actofgod.xdump index 5a0903ae..a446e563 100644 --- a/tests/actofgod/actofgod.xdump +++ b/tests/actofgod/actofgod.xdump @@ -353,7 +353,7 @@ uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship h 49 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0 /config config nuke -uid owner xloc yloc type effic mobil off tech opx opy mission radius plane +uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane /config config news actor action victim times duration time diff --git a/tests/fairland/fairland.xdump b/tests/fairland/fairland.xdump index 59c17ab5..4566bd0a 100644 --- a/tests/fairland/fairland.xdump +++ b/tests/fairland/fairland.xdump @@ -1035,7 +1035,7 @@ config land uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access /config config nuke -uid owner xloc yloc type effic mobil off tech opx opy mission radius plane +uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane /config config news actor action victim times duration time diff --git a/tests/files/files.xdump b/tests/files/files.xdump index d33ca7b3..6b863ab6 100644 --- a/tests/files/files.xdump +++ b/tests/files/files.xdump @@ -1035,7 +1035,7 @@ config land uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access /config config nuke -uid owner xloc yloc type effic mobil off tech opx opy mission radius plane +uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane /config config news actor action victim times duration time diff --git a/tests/smoke/fairland.xdump b/tests/smoke/fairland.xdump index 047b8605..5d5f4988 100644 --- a/tests/smoke/fairland.xdump +++ b/tests/smoke/fairland.xdump @@ -1035,7 +1035,7 @@ config land uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access /config config nuke -uid owner xloc yloc type effic mobil off tech opx opy mission radius plane +uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane /config config news actor action victim times duration time diff --git a/tests/smoke/journal.log b/tests/smoke/journal.log index 11ec1b00..2af540c0 100644 --- a/tests/smoke/journal.log +++ b/tests/smoke/journal.log @@ -326,8 +326,9 @@ Play#0 output Play#0 1 "opy" 10 0 0 -1 Play#0 output Play#0 1 "mission" 6 0 0 35 Play#0 output Play#0 1 "radius" 6 0 0 -1 + Play#0 output Play#0 1 "stockpile" 14 0 1 -1 Play#0 output Play#0 1 "plane" 8 0 0 2 - Play#0 output Play#0 1 /14 + Play#0 output Play#0 1 /15 Play#0 output Play#0 6 0 640 Play#0 input xdump meta news Play#0 command xdump @@ -1473,8 +1474,9 @@ Play#2 output Play#2 1 "opy" 10 0 0 -1 Play#2 output Play#2 1 "mission" 6 0 0 35 Play#2 output Play#2 1 "radius" 6 0 0 -1 + Play#2 output Play#2 1 "stockpile" 14 0 1 -1 Play#2 output Play#2 1 "plane" 8 0 0 2 - Play#2 output Play#2 1 /14 + Play#2 output Play#2 1 /15 Play#2 output Play#2 6 0 636 Play#2 input xdump meta news Play#2 command xdump diff --git a/tests/smoke/smoke.xdump b/tests/smoke/smoke.xdump index af132a19..a50f42cb 100644 --- a/tests/smoke/smoke.xdump +++ b/tests/smoke/smoke.xdump @@ -1185,7 +1185,7 @@ uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship h 49 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0 /config config nuke -uid owner xloc yloc type effic mobil off tech opx opy mission radius plane +uid owner xloc yloc type effic mobil off tech opx opy mission radius stockpile plane /config config news actor action victim times duration time