RESERVE_GIVE war im flaschen File defined.

This commit is contained in:
Enno Rehling 2004-07-06 16:08:49 +00:00
parent 6602252027
commit aa38d6325c
2 changed files with 7 additions and 5 deletions

View File

@ -19,9 +19,6 @@
* permission from the authors. * permission from the authors.
*/ */
#define RESERVE_DONATIONS 1 /* shall we reserve objects given to us by other factions? */
#define RESERVE_GIVE 1 /* reserve anything that's given from one unit to another? */
#include <config.h> #include <config.h>
#include "eressea.h" #include "eressea.h"
#include "economy.h" #include "economy.h"

View File

@ -43,6 +43,9 @@
/* Wieviel Fremde eine Partei pro Woche aufnehmen kann */ /* Wieviel Fremde eine Partei pro Woche aufnehmen kann */
#define MAXNEWBIES 5 #define MAXNEWBIES 5
#define RESERVE_DONATIONS /* shall we reserve objects given to us by other factions? */
#define RESERVE_GIVE /* reserve anything that's given from one unit to another? */
static int static int
GiveRestriction(void) { GiveRestriction(void) {
@ -111,12 +114,14 @@ give_item(int want, const item_type * itype, unit * src, unit * dest, struct ord
if (use<n) use += new_use_pooled(src, item2resource(itype), GET_RESERVE|GET_POOLED_SLACK, n-use); if (use<n) use += new_use_pooled(src, item2resource(itype), GET_RESERVE|GET_POOLED_SLACK, n-use);
if (dest) { if (dest) {
i_change(&dest->items, itype, n); i_change(&dest->items, itype, n);
#if RESERVE_DONATIONS #ifdef RESERVE_GIVE
#ifdef RESERVE_DONATIONS
new_change_resvalue(dest, item2resource(itype), n); new_change_resvalue(dest, item2resource(itype), n);
#elif RESERVE_GIVE #else
if (src->faction==dest->faction) { if (src->faction==dest->faction) {
new_change_resvalue(dest, item2resource(itype), n); new_change_resvalue(dest, item2resource(itype), n);
} }
#endif
#endif #endif
handle_event(&src->attribs, "give", dest); handle_event(&src->attribs, "give", dest);
handle_event(&dest->attribs, "receive", src); handle_event(&dest->attribs, "receive", src);