forked from github/server
enhancement: buildings without an owner report their lack of upkeep to the entire region.
https://bugs.eressea.de/view.php?id=1713
This commit is contained in:
parent
3ac407407a
commit
27b1d55350
|
@ -7164,15 +7164,20 @@
|
||||||
<arg name="building" type="building"/>
|
<arg name="building" type="building"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) kann den Unterhalt von $building($building) nicht bezahlen."</text>
|
<text locale="de">"$unit($unit) kann den Unterhalt von $building($building) nicht bezahlen."</text>
|
||||||
<text locale="fr">"$unit($unit) cannot pay the maintenance for $building($building)."</text>
|
|
||||||
<text locale="en">"$unit($unit) cannot pay the maintenance for $building($building)."</text>
|
<text locale="en">"$unit($unit) cannot pay the maintenance for $building($building)."</text>
|
||||||
</message>
|
</message>
|
||||||
|
<message name="maintenance_noowner" section="errors">
|
||||||
|
<type>
|
||||||
|
<arg name="building" type="building"/>
|
||||||
|
</type>
|
||||||
|
<text locale="de">"Der Unterhalt von $building($building) konnte nicht gezahlt werden, das Gebäude war diese Woche nicht funktionstüchtig."</text>
|
||||||
|
<text locale="en">"The upkeep for $building($building) was not paid, the building was not operational this week."</text>
|
||||||
|
</message>
|
||||||
<message name="maintenance_late" section="errors">
|
<message name="maintenance_late" section="errors">
|
||||||
<type>
|
<type>
|
||||||
<arg name="building" type="building"/>
|
<arg name="building" type="building"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"Der Unterhalt von $building($building) konnte nur verspätet gezahlt werden, das Gebäude war diese Woche nicht funktionstüchtig."</text>
|
<text locale="de">"Der Unterhalt von $building($building) konnte nur verspätet gezahlt werden, das Gebäude war diese Woche nicht funktionstüchtig."</text>
|
||||||
<text locale="fr">"The upkeep for $building($building) was paid late, the building was not operational this week."</text>
|
|
||||||
<text locale="en">"The upkeep for $building($building) was paid late, the building was not operational this week."</text>
|
<text locale="en">"The upkeep for $building($building) was paid late, the building was not operational this week."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="income_tradetax" section="economy">
|
<message name="income_tradetax" section="economy">
|
||||||
|
|
|
@ -734,8 +734,11 @@ static bool maintain(building * b, bool first)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
u = building_owner(b);
|
u = building_owner(b);
|
||||||
if (u == NULL)
|
if (u == NULL) {
|
||||||
|
/* no owner - send a message to the entire region */
|
||||||
|
ADDMSG(&r->msgs, msg_message("maintenance_noowner", "building", b));
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
/* If the owner is the region owner, check if dontpay flag is set for the building where he is in */
|
/* If the owner is the region owner, check if dontpay flag is set for the building where he is in */
|
||||||
if (check_param(global.parameters, "rules.region_owner_pay_building", b->type->_name)) {
|
if (check_param(global.parameters, "rules.region_owner_pay_building", b->type->_name)) {
|
||||||
if (fval(u->building, BLD_DONTPAY)) {
|
if (fval(u->building, BLD_DONTPAY)) {
|
||||||
|
|
Loading…
Reference in New Issue