forked from github/server
This commit is contained in:
parent
685bf6f4e0
commit
7970aa276d
|
@ -83,6 +83,11 @@ add_give(unit * u, unit * u2, int n, const resource_type * rtype, struct order *
|
||||||
int give_quota(const unit * src, const unit * dst, const item_type * type, int n)
|
int give_quota(const unit * src, const unit * dst, const item_type * type, int n)
|
||||||
{
|
{
|
||||||
static float divisor = -1;
|
static float divisor = -1;
|
||||||
|
|
||||||
|
/* luxuries and herbs are traded 1:1 */
|
||||||
|
if (fval(type, ITF_HERB) || type->rtype->ltype) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
if (dst && src && src->faction!=dst->faction) {
|
if (dst && src && src->faction!=dst->faction) {
|
||||||
if (divisor<0) {
|
if (divisor<0) {
|
||||||
divisor = get_param_flt(global.parameters, "rules.items.give_divisor", 1);
|
divisor = get_param_flt(global.parameters, "rules.items.give_divisor", 1);
|
||||||
|
|
Loading…
Reference in New Issue