From ec6560a2811c9609e00315343b73dbd4b736cdb8 Mon Sep 17 00:00:00 2001 From: Steffen Mecke Date: Thu, 15 Jan 2015 03:45:07 +0100 Subject: [PATCH] adding a nice region message --- res/core/messages.xml | 7 +++++++ src/laws.c | 9 ++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/res/core/messages.xml b/res/core/messages.xml index cbc5dd780..b5b6ee248 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -3658,6 +3658,13 @@ "$unit($unit): '$order($command)' - The unit already uses $resource($using,0)." "$unit($unit): '$order($command)' - The unit already uses $resource($using,0)." + + + + + "$if($eq($births,1),"Einen Bauern","$int($births) Bauern") besucht unverhofft der Storch." + "The stork paid an unexpected visit to $if($eq($births,1),"one peasant","$int($births) peasants")." + diff --git a/src/laws.c b/src/laws.c index 0eefa8be4..dbae94035 100755 --- a/src/laws.c +++ b/src/laws.c @@ -305,9 +305,6 @@ static void peasants(region * r) int n, satiated; int dead = 0; - /* Bis zu 1000 Bauern können Zwillinge bekommen oder 1000 Bauern - * wollen nicht! */ - if (peasants > 0 && get_param_int(global.parameters, "rules.peasants.growth", 1)) { int luck = 0; double fraction = peasants * 0.0001F * PEASANTGROWTH; @@ -318,8 +315,10 @@ static void peasants(region * r) luck = a->data.i * 1000; } - births += peasant_luck_effect(peasants, luck, maxp); - peasants += births; + luck = peasant_luck_effect(peasants, luck, maxp); + ADDMSG(&r->msgs, msg_message("peasantluck_success", "births", luck)); + + peasants += births + luck; } /* Alle werden satt, oder halt soviele für die es auch Geld gibt */