]> git.pond.sub.org Git - empserver/commitdiff
(map, unit_map, draw_map, player_coms[]):
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 24 Jun 2006 17:29:40 +0000 (17:29 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 24 Jun 2006 17:29:40 +0000 (17:29 +0000)
Modify nmap command to allow mapping around a nuke.
Add new command nbmap for bmapping around a nuke.
Add a new mapping flag 'n' for adding nukes to a map.
Correct syntax description for pmap, pbmap, lmap and lbmap
in player_coms[].

14 files changed:
include/map.h
info/bmap.t
info/lbmap.t
info/lmap.t
info/map.t
info/nbmap.t [new file with mode: 0644]
info/nmap.t
info/pbmap.t
info/pmap.t
info/sbmap.t
info/smap.t
src/lib/commands/map.c
src/lib/common/maps.c
src/lib/player/empmod.c

index 9bdbf01c1172810f3ee91f85df5694f0b84658fa..c5a0a22301c1064449768c25b671a9761f96fce2 100644 (file)
@@ -50,7 +50,8 @@ extern void border(struct range *, char *, char *);
 #define MAP_SHIP       bit(0)
 #define MAP_LAND       bit(1)
 #define MAP_PLANE      bit(2)
-#define MAP_HIGH       bit(3)
-#define MAP_ALL                MAP_SHIP | MAP_LAND | MAP_PLANE
+#define MAP_NUKE       bit(3)
+#define MAP_HIGH       bit(4)
+#define MAP_ALL                MAP_SHIP | MAP_LAND | MAP_PLANE | MAP_NUKE
 
 #endif
index d1093a26f884b10c328089db0052a98e3407e062..08a8a559ff6246484bd106b096153c1763ee1853 100644 (file)
@@ -1,10 +1,11 @@
 .TH Command BMAP
 .NA bmap "Big map of all your worldly knowledge"
 .LV Basic
-.SY "bmap [<SECTS> | <SHIP>] <s|p|l|r|t|*|h>"
-.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|*|h>"
-.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|*|h>"
-.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|*|h>"
+.SY "bmap [<SECTS> | <SHIP>] <s|p|l|n|r|t|*|h>"
+.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|n|*|h>"
+.SY "nbmap [<SECTS> | <NUKE>] <s|p|l|n|*|h>"
+.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|n|*|h>"
+.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|n|*|h>"
 A bmap gives you a graphic representation of all or part of your country.
 .s1
 Bmap differs from map in that it reflects everything you've learned
@@ -67,15 +68,17 @@ bmap centered on the location of that ship, provided you own it.
 If you use lbmap, you can get a bmap around a land unit. 
 If you use pbmap, you can get a bmap around a plane.
 If you use sbmap, you can get a bmap around a ship.
+If you use nbmap, you can get a bmap around a nuke.
 .s1
 .L "BMAP FLAGS"
 .s1
 If you specify an 's' flag, bmap will put your ships on the map.
 If you specify an 'l' flag, bmap will put your land units on the map.
 If you specify an 'p' flag, bmap will put your planes on the map.
+If you specify an 'n' flag, bmap will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specify the 'h' flag.
 .s1
 You actually have two bmaps.  One which is created by the server; this
index ac728b7e9c6ad6c972b710738d73ec1763096cf8..cc75520a16c3ac1535bb9cfd68ed663f36fa99cc 100644 (file)
@@ -1,10 +1,11 @@
 .TH Command LBMAP
 .NA lbmap "Big map of all your worldly knowledge around a land unit"
 .LV Expert
-.SY "bmap [<SECTS> | <SHIP>] <s|p|l|r|t|*|h>"
-.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|*|h>"
-.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|*|h>"
-.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|*|h>"
+.SY "bmap [<SECTS> | <SHIP>] <s|p|l|n|r|t|*|h>"
+.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|n|*|h>"
+.SY "nbmap [<SECTS> | <NUKE>] <s|p|l|n|*|h>"
+.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|n|*|h>"
+.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|n|*|h>"
 A bmap gives you a graphic representation of all or part of your country.
 .s1
 Bmap differs from map in that it reflects everything you've learned
@@ -69,15 +70,17 @@ bmap centered on the location of that ship, provided you own it.
 If you use lbmap, you can get a bmap around a land unit. 
 If you use pbmap, you can get a bmap around a plane.
 If you use sbmap, you can get a bmap around a ship.
+If you use nbmap, you can get a bmap around a nuke.
 .s1
 .L "BMAP FLAGS"
 .s1
 If you specify an 's' flag, bmap will put your ships on the map.
 If you specify an 'l' flag, bmap will put your land units on the map.
 If you specify an 'p' flag, bmap will put your planes on the map.
+If you specify an 'n' flag, bmap will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specify the 'h' flag.
 .s1
 You actually have two bmaps.  One which is created by the server; this
index 15d50da0a1d9122051e4dd808423152c3ac6a50f..d01e2827aba12e3863b263ee3840a886ba85f4d4 100644 (file)
@@ -1,11 +1,11 @@
 .TH Command LMAP
 .NA lmap "Map around a land unit"
 .LV Expert
-.SY "map <SECTS | SHIP> <s|p|l|*|h>"
-.SY "nmap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "smap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "lmap <SECTS | LAND UNIT> <s|p|l|*|h>"
-.SY "pmap <SECTS | PLANE> <s|p|l|*|h>"
+.SY "map <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "nmap <SECTS | NUKE> <s|p|l|n|*|h>"
+.SY "smap <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "lmap <SECTS | LAND UNIT> <s|p|l|n|*|h>"
+.SY "pmap <SECTS | PLANE> <s|p|l|n|*|h>"
 A map gives you a graphic representation of all or part of your country.
 .s1
 Your own sectors as well as sea, mountains, wasteland and unowned
@@ -56,15 +56,17 @@ instead of old sector designations of your own country.
 If you use lmap, you can get a map around a land unit. 
 If you use pmap, you can get a map around a plane.
 If you use smap, you can get a map around a ship.
+If you use nmap, you can get a map around a nuke.
 .s1
 .L "MAP FLAGS"
 .s1
 If you specify an 's' flag, map will put your ships on the map.
 If you specify an 'l' flag, map will put your land units on the map.
 If you specify an 'p' flag, map will put your planes on the map.
+If you specify an 'n' flag, map will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specifiy the 'h' flag.
 .s1
 .SA "census, commodity, radar, realm, route, update, LandUnits, Maps"
index 40ef1d9ba3eafd4db366edf475893ca97691f8ff..1bdcd43337e9b5febc2aeaa9eaa9fc1b2776db9d 100644 (file)
@@ -1,11 +1,11 @@
 .TH Command MAP
 .NA map "Generate a map showing sector types, seas, etc"
 .LV Basic
-.SY "map <SECTS | SHIP> <s|p|l|*|h>"
-.SY "nmap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "smap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "lmap <SECTS | LAND UNIT> <s|p|l|*|h>"
-.SY "pmap <SECTS | PLANE> <s|p|l|*|h>"
+.SY "map <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "nmap <SECTS | NUKE> <s|p|l|n|*|h>"
+.SY "smap <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "lmap <SECTS | LAND UNIT> <s|p|l|n|*|h>"
+.SY "pmap <SECTS | PLANE> <s|p|l|n|*|h>"
 A map gives you a graphic representation of all or part of your country.
 .s1
 Your own sectors as well as sea, mountains, wasteland and unowned
@@ -54,15 +54,17 @@ instead of old sector designations of your own country.
 If you use lmap, you can get a map around a land unit. 
 If you use pmap, you can get a map around a plane.
 If you use smap, you can get a map around a ship.
+If you use nmap, you can get a map around a nuke.
 .s1
 .L "MAP FLAGS"
 .s1
 If you specify an 's' flag, map will put your ships on the map.
 If you specify an 'l' flag, map will put your land units on the map.
 If you specify an 'p' flag, map will put your planes on the map.
+If you specify an 'n' flag, map will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specifiy the 'h' flag.
 .s1
 .SA "census, commodity, radar, realm, route, update, Maps"
diff --git a/info/nbmap.t b/info/nbmap.t
new file mode 100644 (file)
index 0000000..895730a
--- /dev/null
@@ -0,0 +1,97 @@
+.TH Command NBMAP
+.NA sbmap "Big map of all your worldly knowledge around a nuke"
+.LV Basic
+.SY "bmap [<SECTS> | <SHIP>] <s|p|l|n|r|t|*|h>"
+.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|n|*|h>"
+.SY "nbmap [<SECTS> | <NUKE>] <s|p|l|n|*|h>"
+.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|n|*|h>"
+.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|n|*|h>"
+A bmap gives you a graphic representation of all or part of your country.
+.s1
+Bmap differs from map in that it reflects everything you've learned
+about the world. If, for example, you navigate near a sector and find
+out that it is sea, it will show up on your bmap as sea, even if it 
+doesn't show up on your map.
+.s1
+Note that bmap shows the \*QLAST KNOWN INFORMATION\*U you have about
+a sector. It may change, and your bmap will not reflect it. For example,
+if you re-designate a sector, it won't show up on your bmap as the
+new sector type until you do a map.
+.s1
+Commands contributing to bmap include (but are not limited to):
+map, nav, fly, bomb, recon, para, drop, lookout, coastwatch, radar.
+(probably others)
+.s1
+Note that any sector
+marked as 'X' on your bmap will automatically be avoided by
+ships when they are trying to calculate the best path between two
+points.  Whenever you detect a sea mine in a sector, the server will
+automatically put an 'X' on your bmap.
+.s1
+You can call up a local bmap while navigating or marching by typing 'B'
+at the prompt.
+.s1
+Examples:
+.EX bmap -9:18,-8:5
+generates a 28 x 14 bmap based on data supplied by the sectors
+in the area specified.
+.NF
+    ---------0000000000111111111
+    9876543210123456789012345678
+ -8        . . . - -             -8
+ -7       . . . . - ^            -7
+ -6    . . . . - - - -           -6
+ -5   . . - . a a - ^ ? ? -      -5
+ -4  . . . . k o ! - ^ ? ? ?     -4
+ -3 . - . a h j a ^ ^ ^ ^ ^ -    -3
+ -2  . . - . a a a ^ a a - - -   -2
+ -1   . . . a a a b + + ^ ^ -    -1
+  0  . . . m c u a a - ^ - ^     0
+  1   . - . a a . a a - - ^      1
+  2    - ^ ^ a a a ^ a - - ^     2
+  3     - - - - - - - . . -      3
+  4      ^ - - - - - ^ - -       4
+  5       - ^ - - ^ - - -        5
+    ---------0000000000111111111
+    9876543210123456789012345678
+.FI
+.s1
+.EX bmap # >mapfil
+where your \*Qrealm\*U (or '#',
+see \*Qinfo realm\*U or \*Qinfo update\*U)
+is -5:5,-6:6 will type out a 11 by 13 sector bmap
+and also put the bmap in the file called \*Qmapfil\*U.
+.s1
+You can also give the number of a ship, and bmap will give you a small
+bmap centered on the location of that ship, provided you own it.
+.s1
+If you use lbmap, you can get a bmap around a land unit. 
+If you use pbmap, you can get a bmap around a plane.
+If you use sbmap, you can get a bmap around a ship.
+If you use nbmap, you can get a bmap around a nuke.
+.s1
+.L "BMAP FLAGS"
+.s1
+If you specify an 's' flag, bmap will put your ships on the map.
+If you specify an 'l' flag, bmap will put your land units on the map.
+If you specify an 'p' flag, bmap will put your planes on the map.
+If you specify an 'n' flag, bmap will put your nukes on the map.
+A '*' will put all on the map.
+When multiple unit types are selected they are displayed
+in the following priority order: nukes, land units, ships, planes.
+To highlight sectors you own, specify the 'h' flag.
+.s1
+You actually have two bmaps.  One which is created by the server; this
+one is called your 'true' bmap.  You can view your true bmap at any
+time using the
+.SY "bmap <SECTS> true"
+command.  However, usually when you view your bmap, you are looking at
+your 'working' bmap.  The only difference between your working bmap
+and your true bmap is that your working bmap also contains
+designations put on there by you using the 'bdes' command, and by your
+friends using the "sharebmap" command.  If somehow your bmap gets
+corrupted, you can revert your working bmap back to your true bmap
+using the command:
+.SY "bmap <SECTS> revert"
+.s1
+.SA "bdes, map, navigate, fly, bomb, recon, paradrop, drop, lookout, coastwatch, radar, sharebmap, Nukes, Maps"
index 3a517c0a41b7bb00d335e4a108de085da5162799..a1b4dc43f4cae7c0d0b73bb61f4c45703abd03bd 100644 (file)
@@ -1,11 +1,11 @@
 .TH Command NMAP
-.NA nmap "Generate a map showing new sector types, seas, etc"
+.NA nmap "Generate a map showing new sector types or around a nuke"
 .LV Basic
-.SY "map <SECTS | SHIP> <s|p|l|*|h>"
-.SY "nmap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "smap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "lmap <SECTS | LAND UNIT> <s|p|l|*|h>"
-.SY "pmap <SECTS | PLANE> <s|p|l|*|h>"
+.SY "map <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "nmap <SECTS | NUKE> <s|p|l|n|*|h>"
+.SY "smap <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "lmap <SECTS | LAND UNIT> <s|p|l|n|*|h>"
+.SY "pmap <SECTS | PLANE> <s|p|l|n|*|h>"
 A map gives you a graphic representation of all or part of your country.
 .s1
 Your own sectors as well as sea, mountains, wasteland and unowned
@@ -54,15 +54,17 @@ instead of old sector designations of your own country.
 If you use lmap, you can get a map around a land unit. 
 If you use pmap, you can get a map around a plane.
 If you use smap, you can get a map around a ship.
+If you use nmap, you can get a map around a nuke.
 .s1
 .L "MAP FLAGS"
 .s1
 If you specify an 's' flag, map will put your ships on the map.
 If you specify an 'l' flag, map will put your land units on the map.
 If you specify an 'p' flag, map will put your planes on the map.
+If you specify an 'n' flag, map will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specifiy the 'h' flag.
 .s1
-.SA "census, commodity, radar, realm, route, update, Maps"
+.SA "census, commodity, radar, realm, route, update, Nukes, Maps"
index 5ce3f631c0315896f847d43988897ab48ab7059d..8757089d65f6319e24e742dca02f1b30be96c21d 100644 (file)
@@ -1,10 +1,11 @@
 .TH Command PBMAP
 .NA pbmap "Big map of all your worldly knowledge around a plane"
 .LV Expert
-.SY "bmap [<SECTS> | <SHIP>] <s|p|l|r|t|*|h>"
-.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|*|h>"
-.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|*|h>"
-.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|*|h>"
+.SY "bmap [<SECTS> | <SHIP>] <s|p|l|n|r|t|*|h>"
+.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|n|*|h>"
+.SY "nbmap [<SECTS> | <NUKE>] <s|p|l|n|*|h>"
+.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|n|*|h>"
+.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|n|*|h>"
 A bmap gives you a graphic representation of all or part of your country.
 .s1
 Bmap differs from map in that it reflects everything you've learned
@@ -67,15 +68,17 @@ bmap centered on the location of that ship, provided you own it.
 If you use lbmap, you can get a bmap around a land unit. 
 If you use pbmap, you can get a bmap around a plane.
 If you use sbmap, you can get a bmap around a ship.
+If you use nbmap, you can get a bmap around a nuke.
 .s1
 .L "BMAP FLAGS"
 .s1
 If you specify an 's' flag, bmap will put your ships on the map.
 If you specify an 'l' flag, bmap will put your land units on the map.
 If you specify an 'p' flag, bmap will put your planes on the map.
+If you specify an 'n' flag, bmap will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specify the 'h' flag.
 .s1
 You actually have two bmaps.  One which is created by the server; this
index 188ac30e053e280ea1c0578b1ccd2d6604d479eb..b322b6aa98ca1798e8d81efc6eb1c64ab5e4a7d4 100644 (file)
@@ -1,11 +1,11 @@
 .TH Command PMAP
 .NA pmap "Get a map around a plane"
 .LV Expert
-.SY "map <SECTS | SHIP> <s|p|l|*|h>"
-.SY "nmap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "smap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "lmap <SECTS | LAND UNIT> <s|p|l|*|h>"
-.SY "pmap <SECTS | PLANE> <s|p|l|*|h>"
+.SY "map <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "nmap <SECTS | NUKE> <s|p|l|n|*|h>"
+.SY "smap <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "lmap <SECTS | LAND UNIT> <s|p|l|n|*|h>"
+.SY "pmap <SECTS | PLANE> <s|p|l|n|*|h>"
 A map gives you a graphic representation of all or part of your country.
 .s1
 Your own sectors as well as sea, mountains, wasteland and unowned
@@ -54,15 +54,17 @@ instead of old sector designations of your own country.
 If you use lmap, you can get a map around a land unit. 
 If you use pmap, you can get a map around a plane.
 If you use smap, you can get a map around a ship.
+If you use nmap, you can get a map around a nuke.
 .s1
 .L "MAP FLAGS"
 .s1
 If you specify an 's' flag, map will put your ships on the map.
 If you specify an 'l' flag, map will put your land units on the map.
 If you specify an 'p' flag, map will put your planes on the map.
+If you specify an 'n' flag, map will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specifiy the 'h' flag.
 .s1
 .SA "census, commodity, radar, realm, route, update, Planes, Maps"
index d88d1e23fa733a8b68fc37e305dc31949a10ea3e..56f4919c7045caa968aeb9d3bbeac5ef46e7d924 100644 (file)
@@ -1,10 +1,11 @@
 .TH Command SBMAP
 .NA sbmap "Big map of all your worldly knowledge around a ship"
 .LV Basic
-.SY "bmap [<SECTS> | <SHIP>] <s|p|l|r|t|*|h>"
-.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|*|h>"
-.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|*|h>"
-.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|*|h>"
+.SY "bmap [<SECTS> | <SHIP>] <s|p|l|n|r|t|*|h>"
+.SY "lbmap [<SECTS> | <LAND UNIT>] <s|p|l|n|*|h>"
+.SY "nbmap [<SECTS> | <NUKE>] <s|p|l|n|*|h>"
+.SY "pbmap [<SECTS> | <PLANE>] <s|p|l|n|*|h>"
+.SY "sbmap [<SECTS> | <SHIP>] <s|p|l|n|*|h>"
 A bmap gives you a graphic representation of all or part of your country.
 .s1
 Bmap differs from map in that it reflects everything you've learned
@@ -69,15 +70,17 @@ bmap centered on the location of that ship, provided you own it.
 If you use lbmap, you can get a bmap around a land unit. 
 If you use pbmap, you can get a bmap around a plane.
 If you use sbmap, you can get a bmap around a ship.
+If you use nbmap, you can get a bmap around a nuke.
 .s1
 .L "BMAP FLAGS"
 .s1
 If you specify an 's' flag, bmap will put your ships on the map.
 If you specify an 'l' flag, bmap will put your land units on the map.
 If you specify an 'p' flag, bmap will put your planes on the map.
+If you specify an 'n' flag, bmap will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specify the 'h' flag.
 .s1
 You actually have two bmaps.  One which is created by the server; this
index 1e27f6029d16ca53380b9fb79af9b931125db85a..adae248c1888e323a69471c968fbb187e9a3356b 100644 (file)
@@ -1,11 +1,11 @@
 .TH Command SMAP
 .NA smap "Get a map around a ship"
 .LV Basic
-.SY "map <SECTS | SHIP> <s|p|l|*|h>"
-.SY "nmap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "smap <SECTS | SHIP> <s|p|l|*|h>"
-.SY "lmap <SECTS | LAND UNIT> <s|p|l|*|h>"
-.SY "pmap <SECTS | PLANE> <s|p|l|*|h>"
+.SY "map <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "nmap <SECTS | NUKE> <s|p|l|n|*|h>"
+.SY "smap <SECTS | SHIP> <s|p|l|n|*|h>"
+.SY "lmap <SECTS | LAND UNIT> <s|p|l|n|*|h>"
+.SY "pmap <SECTS | PLANE> <s|p|l|n|*|h>"
 A map gives you a graphic representation of all or part of your country.
 .s1
 Your own sectors as well as sea, mountains, wasteland and unowned
@@ -56,15 +56,17 @@ instead of old sector designations of your own country.
 If you use lmap, you can get a map around a land unit. 
 If you use pmap, you can get a map around a plane.
 If you use smap, you can get a map around a ship.
+If you use nmap, you can get a map around a nuke.
 .s1
 .L "MAP FLAGS"
 .s1
 If you specify an 's' flag, map will put your ships on the map.
 If you specify an 'l' flag, map will put your land units on the map.
 If you specify an 'p' flag, map will put your planes on the map.
+If you specify an 'n' flag, map will put your nukes on the map.
 A '*' will put all on the map.
 When multiple unit types are selected they are displayed
-in the following priority order: land units, ships, planes.
+in the following priority order: nukes, land units, ships, planes.
 To highlight sectors you own, specifiy the 'h' flag.
 .s1
 .SA "census, commodity, radar, realm, route, update, Ships, Maps"
index 5227aa93e28885d9ae4fc102efa885c5b9ec8cc0..5cae613b2a04155461a49c3b5be8489042d72e09 100644 (file)
@@ -62,9 +62,13 @@ map(void)
     if (**player->argp != 'm') {
        if (**player->argp == 'b')
            bmap = 'b';
-       else if (**player->argp == 'n')
-           bmap = 'n';
-       else {
+       else if (**player->argp == 'n') {
+           unit_type = EF_NUKE;
+           if (player->argp[0][1] == 'b')
+               bmap = 'b';
+           else
+               bmap = 'n';
+       } else {
            if (**player->argp == 'l')
                unit_type = EF_LAND;
            else if (**player->argp == 'p')
@@ -111,6 +115,10 @@ map(void)
        case 'P':
            map_flags |= MAP_PLANE;
            break;
+       case 'n':
+       case 'N':
+           map_flags |= MAP_NUKE;
+           break;
        case 'h':
        case 'H':
            map_flags |= MAP_HIGH;
index 23a23ac74c66cf9f4399a55e54e066ec4ca19710..458f0e7a9b5cfb5a47a42bf8383ec2663c5423f8 100644 (file)
@@ -62,6 +62,7 @@ draw_map(int bmap, char origin, int map_flags, struct nstr_sect *nsp)
     struct shpstr ship;
     struct lndstr land;
     struct plnstr plane;
+    struct nukstr nuke;
     coord x, y;
     int i;
     /* Note this is not re-entrant anyway, so we keep the buffers
@@ -217,6 +218,21 @@ draw_map(int bmap, char origin, int map_flags, struct nstr_sect *nsp)
            wmap[y][x] = (*lchr[(int)land.lnd_type].l_name) & ~0x20;
        }
     }
+    if (map_flags & MAP_NUKE) {
+       snxtitem_all(&ni, EF_NUKE);
+       while (nxtitem(&ni, &nuke)) {
+           if (nuke.nuk_own == 0)
+               continue;
+           if (nuke.nuk_own != player->cnum && !player->god)
+               continue;
+           if (!xyinrange(nuke.nuk_x, nuke.nuk_y, &nsp->range))
+               continue;
+
+           x = xnorm(nuke.nuk_x - nsp->range.lx);
+           y = ynorm(nuke.nuk_y - nsp->range.ly);
+           wmap[y][x] = 'N';
+       }
+    }
     if (map_flags & MAP_HIGH) {
        char *ptr;
        struct sctstr sect;
@@ -305,6 +321,7 @@ unit_map(int unit_type, int uid, struct nstr_sect *nsp, char *originp)
     struct shpstr origs;
     struct lndstr origl;
     struct plnstr origp;
+    struct nukstr orign;
     struct genitem *gp;
     struct range range;
 
@@ -318,6 +335,11 @@ unit_map(int unit_type, int uid, struct nstr_sect *nsp, char *originp)
            return RET_FAIL;
        gp = (struct genitem *)&origp;
        *originp = *plchr[(int)origp.pln_type].pl_name;
+    } else if (unit_type == EF_NUKE) {
+       if (!getnuke(uid, &orign) || !player->owner || orign.nuk_own == 0)
+           return RET_FAIL;
+       gp = (struct genitem *)&orign;
+       *originp = 'n';
     } else {
        if (!getship(uid, &origs) || !player->owner || origs.shp_own == 0)
            return RET_FAIL;
index 3ad9da80a098e930e73b3e0aebb69d54320f26e8..d9ff0e126410d969134725651a976714b93e0e64 100644 (file)
@@ -55,7 +55,7 @@ struct cmndstr player_coms[] = {
      3, atta, C_MOD, NORM + MONEY + CAP},
     {"bdes <SECTS> <type>", 0, bdes, C_MOD, NORM},
     {"bestpath <SECTS> <SECTS>", 0, best, 0, NORM},
-    {"bmap <SECTS|UNIT> [s|l|p|r|t|*|h]", 0, map, C_MOD, NORM},
+    {"bmap <SECTS|SHIP> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
     {"board <to-SHIP> [<from-SHIP>|<from-sector>]",
      3, boar, C_MOD, NORM + MONEY + CAP},
     {"bomb <bomber-PLANES> <fighter-PLANES> <pin|strat> <ap-SECT> <PATH|DESTINATION>",
@@ -124,7 +124,7 @@ struct cmndstr player_coms[] = {
     {"info <topic>", 0, info, 0, VIS},
     {"land <UNITS>", 0, land, C_MOD, NORM},
     {"launch <PLANES> <SECT|SHIP>", 3, laun, C_MOD, NORM + MONEY + CAP},
-    {"lbmap <SECTS|UNIT> [s|l|p|r|t|*|h]", 0, map, C_MOD, NORM},
+    {"lbmap <SECTS|LAND UNIT> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
     {"lboard <to-LAND> [<from-sector>]",
      3, lboa, C_MOD, NORM + MONEY + CAP},
     {"lcargo <UNITS>", 0, lcarg, 0, NORM},
@@ -135,7 +135,7 @@ struct cmndstr player_coms[] = {
     {"lload <COMM|\"land\"|\"plane\"> <UNITS> <NUM|UNITS|PLANES>",
      1, lload, C_MOD, NORM + CAP},
     {"llookout <UNITS>", 1, llook, 0, NORM + CAP},
-    {"lmap <SECTS|UNIT> [s|l|p|*|h]", 0, map, C_MOD, NORM},
+    {"lmap <SECTS|LAND UNIT> [s|l|n|p|*|h]", 0, map, C_MOD, NORM},
     {"lmine <UNITS>", 2, landmine, C_MOD, NORM + MONEY + CAP},
     {"load <COMM|\"land\"|\"plane\"> <SHIPS> <NUM|UNITS|PLANES>",
      1, load, C_MOD, NORM + CAP},
@@ -150,7 +150,7 @@ struct cmndstr player_coms[] = {
      1, ltend, C_MOD, NORM + CAP},
     {"lunload <COMM|\"land\"|\"plane\"> <UNITS> <NUM|UNITS|PLANES>",
      1, lload, C_MOD, NORM + CAP},
-    {"map <SECTS|SHIP> [s|l|p|*|h]", 0, map, C_MOD, VIS},
+    {"map <SECTS|SHIP> [s|l|n|p|*|h]", 0, map, C_MOD, VIS},
     {"march <UNITS> <PATH|DESTINATION>", 1, march, C_MOD, NORM + CAP},
     {"market <COMM|\"all\">", 0, mark, 0, VIS},
     {"mine <SHIPS>", 2, mine, C_MOD, NORM + MONEY + CAP},
@@ -165,11 +165,12 @@ struct cmndstr player_coms[] = {
     {"name <SHIPS> <NAME>", 0, name, C_MOD, NORM},
     {"nation [as-COUNTRY]", 0, nati, 0, VIS},
     {"navigate <SHIPS> <PATH|DESTINATION>", 1, navi, C_MOD, NORM + CAP},
+    {"nbmap <SECTS|NUKE> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
     {"ndump <SECTS>", 0, ndump, 0, NORM},
     {"newcap <NAT> [<SECTOR>]", 0, new, C_MOD, GOD},
     {"neweff <SECTS>", 0, newe, C_MOD, NORM},
     {"newspaper [days]", 0, news, 0, VIS},
-    {"nmap <SECTS|SHIP> [s|l|p|*|h]", 0, map, C_MOD, VIS},
+    {"nmap <SECTS|NUKE> [s|l|n|p|*|h]", 0, map, C_MOD, VIS},
     {"nuke <SECTS>", 0, nuke, 0, NORM},
     {"offer <loan|treaty> <NAT> [<NUM> <DAYS> <IRATE>]",
      1, offe, C_MOD, NORM + MONEY + CAP},
@@ -179,13 +180,13 @@ struct cmndstr player_coms[] = {
      3, para, C_MOD, NORM + MONEY + CAP},
     {"path <SECT>", 0, path, 0, NORM},
     {"payoff <SHIPS>", 0, payo, C_MOD, NORM},
-    {"pbmap <SECTS|UNIT> [s|l|p|r|t|*|h]", 0, map, C_MOD, NORM},
+    {"pbmap <SECTS|PLANE> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
     {"pboard <PLANES>", 3, pboa, C_MOD, NORM + MONEY + CAP},
     {"pdump <PLANES> [<fields>]", 0, pdump, 0, NORM},
     {"peek <SECTS>", 0, peek, 0, GOD},
     {"plane <SECTS>", 0, plan, 0, NORM},
     {"players", 0, play, 0, VIS},
-    {"pmap <SECTS|UNIT> [s|l|p|*|h]", 0, map, C_MOD, NORM},
+    {"pmap <SECTS|PLANE> [s|l|n|p|*|h]", 0, map, C_MOD, NORM},
     {"power [[\"new\" [<NUMBER OF COUNTRIES>]] | [\"country\" <NATS>]]",
      0, powe, C_MOD, VIS},
     {"pray", 0, tele, C_MOD, NORM},
@@ -213,7 +214,7 @@ struct cmndstr player_coms[] = {
     {"sail <SHIPS> <PATH>", 1, sail, C_MOD, NORM + CAP},
     {"satellite <PLANE> [<se|sh|l> [?cond&cond&...]]",
      1, sate, 0, NORM + MONEY + CAP},
-    {"sbmap <SECTS|UNIT> [s|l|p|r|t|*|h]", 0, map, C_MOD, NORM},
+    {"sbmap <SECTS|SHIP> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
     {"scrap <s|p|l> <SHIPS|PLANES|UNITS>",
      2, scra, C_MOD, NORM + MONEY + CAP},
     {"scuttle <s|p|l> <SHIPS|PLANES|UNITS>", 5, scut, C_MOD, NORM + CAP},
@@ -232,7 +233,7 @@ struct cmndstr player_coms[] = {
     {"shutdown [<minutes>] <disable update?>", 0, shut, 0, GOD},
     {"sinfrastructure <SECTS>", 0, sinfra, 0, VIS},
     {"skywatch <SECTS>", 1, skyw, C_MOD, NORM + CAP},
-    {"smap <SECTS|UNIT> [s|l|p|*|h]", 0, map, C_MOD, NORM},
+    {"smap <SECTS|SHIP> [s|l|n|p|*|h]", 0, map, C_MOD, NORM},
     {"sonar <SHIPS> <brief?>", 1, sona, C_MOD, NORM + CAP},
     {"sorder <SHIPS>", 0, sorde, C_MOD, NORM + CAP},
     {"spy <SECTS>", 1, spy, C_MOD, NORM + CAP},