begin making shipowner use ship->owner.

This commit is contained in:
Enno Rehling 2012-05-17 00:14:05 -07:00
parent 1f0d5f205e
commit 76ba2b9303
7 changed files with 22 additions and 23 deletions

View File

@ -79,10 +79,9 @@ static void equip_newunits(const struct equipment *eq, struct unit *u)
break;
case RC_AQUARIAN:
{
ship *sh = new_ship(st_find("boat"), u->faction->locale, r);
ship *sh = new_ship(st_find("boat"), r, u->faction->locale);
sh->size = sh->type->construction->maxsize;
u->ship = sh;
fset(u, UFL_OWNER);
u_set_ship(u, sh);
}
break;
case RC_CENTAUR:

View File

@ -33,7 +33,7 @@
#include <stdlib.h>
#include <assert.h>
static message *cinfo_building(const void *obj, typ_t typ, const curse * c,
static message *cinfo_building(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -48,7 +48,7 @@ static message *cinfo_building(const void *obj, typ_t typ, const curse * c,
/* CurseInfo mit Spezialabfragen */
/* C_MAGICWALLS*/
static message *cinfo_magicrunes(const void *obj, typ_t typ, const curse * c,
static message *cinfo_magicrunes(const void *obj, objtype_t typ, const curse * c,
int self)
{
message *msg = NULL;

View File

@ -41,7 +41,7 @@
/*
* godcursezone
*/
static message *cinfo_cursed_by_the_gods(const void *obj, typ_t typ,
static message *cinfo_cursed_by_the_gods(const void *obj, objtype_t typ,
const curse * c, int self)
{
region *r = (region *) obj;
@ -66,7 +66,7 @@ static struct curse_type ct_godcursezone = {
/*
* C_GBDREAM
*/
static message *cinfo_dreamcurse(const void *obj, typ_t typ, const curse * c,
static message *cinfo_dreamcurse(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(self);
@ -90,7 +90,7 @@ static struct curse_type ct_gbdream = {
* C_MAGICSTREET
* erzeugt Straßennetz
*/
static message *cinfo_magicstreet(const void *obj, typ_t typ, const curse * c,
static message *cinfo_magicstreet(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -113,7 +113,7 @@ static struct curse_type ct_magicstreet = {
/* --------------------------------------------------------------------- */
static message *cinfo_antimagiczone(const void *obj, typ_t typ, const curse * c,
static message *cinfo_antimagiczone(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -131,7 +131,7 @@ static message *cinfo_antimagiczone(const void *obj, typ_t typ, const curse * c,
/* alle Magier können eine Antimagiezone wahrnehmen */
static int
cansee_antimagiczone(const struct faction *viewer, const void *obj, typ_t typ,
cansee_antimagiczone(const struct faction *viewer, const void *obj, objtype_t typ,
const curse * c, int self)
{
region *r;
@ -163,7 +163,7 @@ static struct curse_type ct_antimagiczone = {
};
/* --------------------------------------------------------------------- */
static message *cinfo_farvision(const void *obj, typ_t typ, const curse * c,
static message *cinfo_farvision(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);

View File

@ -34,7 +34,7 @@
#include <stdlib.h>
#include <assert.h>
message *cinfo_ship(const void *obj, typ_t typ, const curse * c, int self)
message *cinfo_ship(const void *obj, objtype_t typ, const curse * c, int self)
{
message *msg;
@ -56,7 +56,7 @@ message *cinfo_ship(const void *obj, typ_t typ, const curse * c, int self)
/* CurseInfo mit Spezialabfragen */
/* C_SHIP_NODRIFT */
static message *cinfo_shipnodrift(const void *obj, typ_t typ, const curse * c,
static message *cinfo_shipnodrift(const void *obj, objtype_t typ, const curse * c,
int self)
{
ship *sh = (ship *) obj;

View File

@ -19,7 +19,7 @@ extern "C" {
struct locale;
struct message;
extern struct message *cinfo_ship(const void *obj, typ_t typ,
extern struct message *cinfo_ship(const void *obj, objtype_t typ,
const struct curse *c, int self);
extern void register_shipcurse(void);
extern struct curse *shipcurse_flyingship(struct ship *sh, struct unit *mage,

View File

@ -43,7 +43,7 @@
* C_AURA
*/
/* erhöht/senkt regeneration und maxaura um effect% */
static message *cinfo_auraboost(const void *obj, typ_t typ, const curse * c,
static message *cinfo_auraboost(const void *obj, objtype_t typ, const curse * c,
int self)
{
struct unit *u = (struct unit *)obj;
@ -76,7 +76,7 @@ static struct curse_type ct_magicboost = {
/*
* C_SLAVE
*/
static message *cinfo_slave(const void *obj, typ_t typ, const curse * c,
static message *cinfo_slave(const void *obj, objtype_t typ, const curse * c,
int self)
{
unit *u;
@ -101,7 +101,7 @@ static struct curse_type ct_slavery = { "slavery",
/*
* C_CALM
*/
static message *cinfo_calm(const void *obj, typ_t typ, const curse * c,
static message *cinfo_calm(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -130,7 +130,7 @@ static struct curse_type ct_calmmonster = {
/*
* C_SPEED
*/
static message *cinfo_speed(const void *obj, typ_t typ, const curse * c,
static message *cinfo_speed(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -154,7 +154,7 @@ static struct curse_type ct_speed = {
/*
* C_ORC
*/
message *cinfo_unit(const void *obj, typ_t typ, const curse * c, int self)
message *cinfo_unit(const void *obj, objtype_t typ, const curse * c, int self)
{
unused(typ);
assert(typ == TYP_UNIT);
@ -177,7 +177,7 @@ static struct curse_type ct_orcish = {
/*
* C_KAELTESCHUTZ
*/
static message *cinfo_kaelteschutz(const void *obj, typ_t typ, const curse * c,
static message *cinfo_kaelteschutz(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);
@ -201,7 +201,7 @@ static struct curse_type ct_insectfur = {
/*
* C_SPARKLE
*/
static message *cinfo_sparkle(const void *obj, typ_t typ, const curse * c,
static message *cinfo_sparkle(const void *obj, objtype_t typ, const curse * c,
int self)
{
const char *effects[] = {
@ -330,7 +330,7 @@ write_skill(struct storage *store, const curse * c, const void *target)
return 0;
}
static message *cinfo_skillmod(const void *obj, typ_t typ, const curse * c,
static message *cinfo_skillmod(const void *obj, objtype_t typ, const curse * c,
int self)
{
unused(typ);

View File

@ -19,7 +19,7 @@ extern "C" {
struct curse;
struct message;
extern struct message *cinfo_unit(const void *obj, typ_t typ,
extern struct message *cinfo_unit(const void *obj, objtype_t typ,
const struct curse *c, int self);
extern void register_unitcurse(void);