forked from github/server
E2 fähig gemacht
Der Burgenbesitzer sieht nur noch etwas wenn er auch Leuchtturmbesitzer ist. Das geht jetzt auch für E2 ohne region_owner rule.
This commit is contained in:
parent
90cf6d845f
commit
fe0ff71aa1
|
@ -670,7 +670,12 @@ static unit *building_owner_ex(const building * bld, const struct faction * last
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!heir && check_param(global.parameters, "rules.region_owner_pay_building", bld->type->_name)) {
|
if (!heir && check_param(global.parameters, "rules.region_owner_pay_building", bld->type->_name)) {
|
||||||
u = building_owner(largestbuilding(bld->region, &cmp_taxes, false));
|
if (rule_region_owners()) {
|
||||||
|
u = building_owner(largestbuilding(bld->region, &cmp_taxes, false));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
u = building_owner(largestbuilding(bld->region, &cmp_wage, false));
|
||||||
|
}
|
||||||
if (u) {
|
if (u) {
|
||||||
heir = u;
|
heir = u;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1538,8 +1538,10 @@ int lighthouse_range(const building * b, const faction * f)
|
||||||
int c = 0;
|
int c = 0;
|
||||||
unit *u;
|
unit *u;
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (u->building == b) {
|
if (u->building == b || u == building_owner(b)) {
|
||||||
c += u->number;
|
if (u->building == b) {
|
||||||
|
c += u->number;
|
||||||
|
}
|
||||||
if (c > buildingcapacity(b))
|
if (c > buildingcapacity(b))
|
||||||
break;
|
break;
|
||||||
if (f == NULL || u->faction == f) {
|
if (f == NULL || u->faction == f) {
|
||||||
|
|
|
@ -1526,8 +1526,7 @@ static void prepare_reports(void)
|
||||||
if (check_param(global.parameters, "rules.region_owner_pay_building", bt_lighthouse->_name)) {
|
if (check_param(global.parameters, "rules.region_owner_pay_building", bt_lighthouse->_name)) {
|
||||||
for (b = rbuildings(r); b; b = b->next) {
|
for (b = rbuildings(r); b; b = b->next) {
|
||||||
if (b && b->type == bt_lighthouse) {
|
if (b && b->type == bt_lighthouse) {
|
||||||
u = building_owner(largestbuilding(r, &cmp_taxes, false));
|
u = building_owner(b);
|
||||||
/* alternativ: u = building_owner(b); if not all region owners should see */
|
|
||||||
if (u) {
|
if (u) {
|
||||||
prepare_lighthouse(b, u->faction);
|
prepare_lighthouse(b, u->faction);
|
||||||
if (u_race(u) != get_race(RC_SPELL) || u->number == RS_FARVISION) {
|
if (u_race(u) != get_race(RC_SPELL) || u->number == RS_FARVISION) {
|
||||||
|
|
Loading…
Reference in New Issue