]> git.pond.sub.org Git - empserver/commit
Refactor and fix scuttle and scrap code
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 13 Sep 2008 22:35:50 +0000 (18:35 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Sep 2008 23:40:13 +0000 (19:40 -0400)
commitf3651f17e5d539d20c1433ecab23c754bfaeef54
tree254141bb9deead8c8c13a27dfa8187df3451e9c7
parent3318e4e4e5816d89ab13f4a33cdcc30211cbc55b
Refactor and fix scuttle and scrap code

Factor unit_drop_cargo() out of scra(), scuttle_ship(),
scuttle_land(), fix it up:

* Some messages were sent as bulletins instead of printing them.

* Nukes were always destroyed.  They're now treated exactly like other
  cargo.

* scuttle destroyed some cargo silently, and listed other cargo as
  "scuttled".  It now simply lets unit_update_cargo() running from
  carrier prewrite callbacks list all cargo "lost".

Simplify its callers.  scuttle_ship() and scuttle_land() are now
trivial, inline and remove.
include/prototypes.h
include/unit.h
src/lib/commands/scra.c
src/lib/commands/scut.c
src/lib/subs/unitsub.c
src/lib/update/nav_ship.c