edit: Report flags change properly
Print a message, send bulletin to owner. Affects ship key 'W', land unit key 'W', and plane key 'f'. The message is necessary to give the deity a chance to catch unexpected changes, e.g. a player modifying retreat conditions right before the deity edits them. Watching out for such changes is especially important with non-interactive edit. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
ef2e2d08a2
commit
4aa2f071ba
5 changed files with 86 additions and 1 deletions
|
@ -844,6 +844,8 @@ edit_ship(struct shpstr *ship, char *key, char *p)
|
|||
strncpy(ship->shp_rpath, p, sizeof(ship->shp_rpath) - 1);
|
||||
break;
|
||||
case 'W':
|
||||
divine_flag_change((struct empobj *)ship, "Retreat conditions",
|
||||
ship->shp_rflags, arg, retreat_flags);
|
||||
ship->shp_rflags = arg;
|
||||
break;
|
||||
case 'c':
|
||||
|
@ -938,6 +940,8 @@ edit_land(struct lndstr *land, char *key, char *p)
|
|||
strncpy(land->lnd_rpath, p, sizeof(land->lnd_rpath) - 1);
|
||||
break;
|
||||
case 'W':
|
||||
divine_flag_change((struct empobj *)land, "Retreat condition",
|
||||
land->lnd_rflags, arg, retreat_flags);
|
||||
land->lnd_rflags = arg;
|
||||
break;
|
||||
case 'c':
|
||||
|
@ -1025,6 +1029,8 @@ edit_plane(struct plnstr *plane, char *key, char *p)
|
|||
plane->pln_land = arg;
|
||||
break;
|
||||
case 'f':
|
||||
divine_flag_change((struct empobj *)plane, "Flags",
|
||||
plane->pln_flags, arg, plane_flags);
|
||||
plane->pln_flags = arg;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue