]> git.pond.sub.org Git - empserver/commit
shpsub: Make shp_check_nav() return more useful information
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 20 Jan 2014 21:34:17 +0000 (22:34 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 12:19:25 +0000 (13:19 +0100)
commitc03db4c5ef7b67bbe1feb322f6c87e6dfe8faf9c
tree2f26b06c3c42363e2e2820a506e2abc8ee17ebce
parent1fee5028a2876f7a51a5082cc90c424a11b32943
shpsub: Make shp_check_nav() return more useful information

Some callers have to second-guess shp_check_nav() to figure out
whether CN_LANDLOCKED means "too big to fit into the canal" or "can't
go there at all".

Fix that by returning d_navigation.  CN_LANDLOCKED becomes either
NAV_CANAL or NAV_NONE, CN_CONSTRUCTION becomes either NAV_02 or
NAV_60, and CN_NAVIGABLE becomes NAVOK.

The CN_NAVIGABLE, ... codes are now unused.  Drop them.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/sect.h
include/ship.h
include/types.h
src/lib/subs/retreat.c
src/lib/subs/shpsub.c
src/lib/update/sail.c