#include "../Food/Common/Trash.h" #include "StdFoodInfoDialog.h" #include "T2EquipPtrList.h" #include "T2RouteNavigator.h" #include "T2Tenant.h" #include "T2TowerDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif StdFoodInfoDialog::StdFoodInfoDialog(T2Tenant *inTenant) : StdShopInfoDialog(inTenant) { } StdFoodInfoDialog::~StdFoodInfoDialog() { } /*virtual*/ void StdFoodInfoDialog::GenerateComments() { StdShopInfoDialog::GenerateComments(); if (GetDocument()->IsDustOn()) { T2EquipPtrList *theTrashFacilityList = GetTrashFacilities(GetDocument(), GetTenant()); if (!theTrashFacilityList || theTrashFacilityList->GetCount() == 0) { // EN: There's no Trash Facility. AppendComment(14); } else { T2RouteNavigator *theNavi = GetDocument()->GetRouteNavi(); #line 48 _ASSERT(theNavi != NULL); BOOL isNotConnected = true; T2Tenant *tenant = NULL; POINT theTenantExit = GetTenant()->GetExitPt(); LArrayIterator iterator(*theTrashFacilityList); while (iterator.Next(&tenant)) { if (theNavi->CheckRoute(theTenantExit, tenant->GetEntrancePt(), 1000, kRouteType1)) { isNotConnected = false; break; } } if (isNotConnected) { // EN: Item not connected to Trash Facility. AppendComment(15); } } } if (GetTenant()->GetWorkCount() >= 3) { // EN: Forced to close. AppendComment(16); } else if (GetTenant()->GetWorkCount() > 0) { // EN: Full of garbage. AppendComment(15); } } /*virtual*/ BOOL StdFoodInfoDialog::GenerateStatusProc(CString &outStr, BOOL &outIsBad) { BOOL result = false; if (GetTenant()->GetWorkCount() >= 3) { // "営業停止" - Suspension of business outStr = "\x89\x63\x8B\xC6\x92\xE2\x8E\x7E"; outIsBad = true; result = true; } return result; }