Drop C_MOD flag from commands that "obviously" don't need it
C_MOD prevents print functions from blocking. The common reason for wanting non-blocking prints are "read, print, write back" patterns. There might be other reasons lurking in the code, and that's why messing with C_MOD is scary. Nevertheless, drop it from cutoff, headlines, land, lstat, motd, neweff, payoff, qorder, sorder, and wall. These commands have had C_MOD "forever", even though they clearly don't modify game state. They're all pretty simple. Similar commands such as census, news, ship, plane, nuke, sstat, pstat, flash never had C_MOD.
This commit is contained in:
parent
d965ddd79e
commit
d4a245e0fd
1 changed files with 10 additions and 10 deletions
|
@ -79,7 +79,7 @@ struct cmndstr player_coms[] = {
|
|||
1, cons, C_MOD, NORM + CAP},
|
||||
{"convert <SECTS> <NUM> [sure?]", 2, conv, C_MOD, NORM + MONEY + CAP},
|
||||
{"country <NATS>", 0, coun, 0, 0},
|
||||
{"cutoff <SECTS>", 0, cuto, C_MOD, NORM},
|
||||
{"cutoff <SECTS>", 0, cuto, 0, NORM},
|
||||
{"declare <all|friend|neut|hos|war> <NATS>",
|
||||
2, decl, C_MOD, NORM + CAP},
|
||||
{"deliver <COMM> <SECTS> [q|<THRESH>] [<DIR>]", 1, deli, C_MOD, NORM},
|
||||
|
@ -113,12 +113,12 @@ struct cmndstr player_coms[] = {
|
|||
{"give <COMM> <SECT> <NUM>", 0, give, C_MOD, GOD},
|
||||
{"grind <SECT> <NUM>", 1, grin, C_MOD, NORM + MONEY + CAP},
|
||||
{"harden <PLANES> <NUM>", 2, hard, C_MOD, NORM + MONEY + CAP},
|
||||
{"headlines [days]", 0, head, C_MOD, 0},
|
||||
{"headlines [days]", 0, head, 0, 0},
|
||||
{"help <topic>", 0, info, 0, 0},
|
||||
{"improve <road|rail|defense> <SECTS> <NUM>",
|
||||
1, improve, C_MOD, NORM + MONEY + CAP},
|
||||
{"info <topic>", 0, info, 0, 0},
|
||||
{"land <UNITS>", 0, land, C_MOD, NORM},
|
||||
{"land <UNITS>", 0, land, 0, NORM},
|
||||
{"launch <PLANES> <SECT|SHIP>", 3, laun, C_MOD, NORM + MONEY + CAP},
|
||||
{"lbmap <SECTS|LAND UNIT> [s|l|n|p|r|t|*|h]", 0, map, C_MOD, NORM},
|
||||
{"lboard <to-LAND> [<from-sector>]",
|
||||
|
@ -140,7 +140,7 @@ struct cmndstr player_coms[] = {
|
|||
{"lradar <UNITS | SECTS>", 1, lrad, C_MOD, NORM + CAP},
|
||||
{"lretreat <UNITS|ARMY> <PATH> [i|h|b|c]",
|
||||
1, lretr, C_MOD, NORM + CAP},
|
||||
{"lstat <UNITS>", 0, lsta, C_MOD, NORM},
|
||||
{"lstat <UNITS>", 0, lsta, 0, NORM},
|
||||
{"ltend <COMM> <tender-SHIPS> <NUM> <UNITS>",
|
||||
1, ltend, C_MOD, NORM + CAP},
|
||||
{"lunload <COMM|\"land\"|\"plane\"> <UNITS> <NUM|UNITS|PLANES>",
|
||||
|
@ -152,7 +152,7 @@ struct cmndstr player_coms[] = {
|
|||
{"mission <TYPE> <PLANES|SHIPS|UNITS> <mission type> <op sect> [<radius>]",
|
||||
2, mission, C_MOD, NORM + CAP},
|
||||
{"morale <UNITS> <retreat%>", 1, morale, C_MOD, NORM + CAP},
|
||||
{"motd", 0, show_motd, C_MOD, 0},
|
||||
{"motd", 0, show_motd, 0, 0},
|
||||
{"move <COMM> <SECT> <NUM> <PATH|DESTINATION>",
|
||||
1, move, C_MOD, NORM + CAP},
|
||||
{"mquota <SHIPS> <value>", 2, mobq, C_MOD, NORM + CAP},
|
||||
|
@ -162,7 +162,7 @@ struct cmndstr player_coms[] = {
|
|||
{"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},
|
||||
{"neweff <SECTS>", 0, newe, 0, NORM},
|
||||
{"newspaper [days]", 0, news, 0, 0},
|
||||
{"nmap <SECTS|NUKE> [s|l|n|p|*|h]", 0, map, C_MOD, NORM},
|
||||
{"nuke <SECTS>", 0, nuke, 0, NORM},
|
||||
|
@ -173,7 +173,7 @@ struct cmndstr player_coms[] = {
|
|||
{"paradrop <cargo-PLANES> <fighter-PLANES> <ap-SECT> <PATH|DESTINATION>",
|
||||
3, para, C_MOD, NORM + MONEY + CAP},
|
||||
{"path <SECT>", 0, path, C_MOD, NORM},
|
||||
{"payoff <SHIPS>", 0, payo, C_MOD, NORM},
|
||||
{"payoff <SHIPS>", 0, payo, 0, 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},
|
||||
|
@ -186,7 +186,7 @@ struct cmndstr player_coms[] = {
|
|||
{"pray", 0, tele, C_MOD, NORM},
|
||||
{"production <SECTS>", 0, prod, 0, NORM},
|
||||
{"pstat <PLANES>", 0, pstat, 0, NORM},
|
||||
{"qorder <SHIPS>", 0, qorde, C_MOD, NORM},
|
||||
{"qorder <SHIPS>", 0, qorde, 0, NORM},
|
||||
{"quit", 0, quit, 0, 0},
|
||||
{"radar <SHIPS | SECTS>", 1, rada, C_MOD, NORM + CAP},
|
||||
{"range <PLANES> <range>", 1, range, C_MOD, NORM + CAP},
|
||||
|
@ -233,7 +233,7 @@ struct cmndstr player_coms[] = {
|
|||
{"skywatch <SECTS>", 1, skyw, C_MOD, NORM + CAP},
|
||||
{"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},
|
||||
{"sorder <SHIPS>", 0, sorde, 0, NORM},
|
||||
{"spy <SECTS>", 1, spy, C_MOD, NORM + CAP},
|
||||
{"sstat <SHIPS>", 0, sstat, 0, NORM},
|
||||
{"start <TYPE> <SECTS|PLANES|SHIPS|UNITS>", 1, start, C_MOD, NORM},
|
||||
|
@ -268,7 +268,7 @@ struct cmndstr player_coms[] = {
|
|||
{"upgrade <s|p|l> <SHIPS|PLANES|UNITS>",
|
||||
1, upgr, C_MOD, NORM + MONEY + CAP},
|
||||
{"version", 0, vers, 0, 0},
|
||||
{"wall [<message>]", 0, wall, C_MOD, NORM},
|
||||
{"wall [<message>]", 0, wall, 0, NORM},
|
||||
{"wingadd <WING> <PLANES>", 1, wing, C_MOD, NORM},
|
||||
{"wipe <SECTS>", 1, wipe, C_MOD, NORM},
|
||||
{"wire [yes|no|<days>]", 0, rea, C_MOD, 0},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue