28 #include "../../Landscape/ls.h"
29 #include "../../Landscape/cropprogs/PermanentGrassLowYield.h"
56 m_field->SetMDates(0, 0, g_date->DayInYear(15, 9));
58 m_field->SetMDates(1, 0, g_date->DayInYear(1, 10));
70 g_msg->Warn(WARN_BUG,
"PermanentGrassLowYield::Do(): "
71 "Harvest too late for the next crop to start!!!",
"");
75 for (
int i = 0; i < noDates; i++) {
86 int today = g_date->Date();
91 g_msg->Warn(WARN_BUG,
" PermanentGrassLowYield::Do(): "
92 "Crop start attempt after last possible start date",
"");
99 if (g_date->Date() > d1) {
119 SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 6),
134 g_date->DayInYear(25, 6) - g_date->DayInYear()))
150 g_date->DayInYear(26, 6) - g_date->DayInYear())) {
160 g_date->DayInYear(1, 7) - g_date->DayInYear()))
175 if (
m_field->GetMConstants(0) == 0) {
178 g_msg->Warn(WARN_BUG,
"PermanentGrassLowYield::Do(): failure in 'CattleOut' execution",
"");
194 if (
m_field->GetMConstants(0) == 0) {
196 g_msg->Warn(WARN_BUG,
"PermanentGrassLowYield::Do(): failure in 'CattleOut' execution",
"");
219 if (
m_field->GetMConstants(0) == 0) {
222 if (g_date->Date() ==
m_field->GetMDates(1, 0)){
223 g_msg->Warn(WARN_BUG,
"PermanentGrassLowYield::Do(): failure in 'CattleIsOut' execution",
"");
235 if (g_date->DayInYear() < g_date->DayInYear(10, 9))
246 (g_date->DayInYear() < g_date->DayInYear(15, 8)))
251 Field * pf = dynamic_cast<Field*>(
m_field);
252 pf->Add_missed_herb_app();
262 SimpleEvent(g_date->OldDays() + g_date->DayInYear(15, 8),
269 (g_date->DayInYear() < g_date->DayInYear(15, 9)))
272 g_date->DayInYear(15, 9) - g_date->DayInYear())) {
283 g_msg->Warn(WARN_BUG,
"PermanantGrassLowYield::Do(): "
284 "Unknown event type! ",
"");