From 96a63139221587c6be9659c1e07eacd3a8e7f048 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Thu, 6 Jul 2023 10:49:52 +0100 Subject: add untested Burger code --- src/Plugins/Common/StdFoodInfoDialog.cpp | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'src/Plugins/Common/StdFoodInfoDialog.cpp') diff --git a/src/Plugins/Common/StdFoodInfoDialog.cpp b/src/Plugins/Common/StdFoodInfoDialog.cpp index 59d8a8a..e3002bd 100644 --- a/src/Plugins/Common/StdFoodInfoDialog.cpp +++ b/src/Plugins/Common/StdFoodInfoDialog.cpp @@ -1,7 +1,74 @@ +#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; +} -- cgit v1.2.3