summaryrefslogtreecommitdiff
path: root/src/Plugins/Common/StdFoodInfoDialog.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-06 10:49:52 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-06 10:49:52 +0100
commit96a63139221587c6be9659c1e07eacd3a8e7f048 (patch)
tree23aef453ef216c97b762637f553d131646fd5985 /src/Plugins/Common/StdFoodInfoDialog.cpp
parent27fc86e8c0450a7fe33d76344c4d53e23a70a6c3 (diff)
downloadt2win-96a63139221587c6be9659c1e07eacd3a8e7f048.tar.gz
t2win-96a63139221587c6be9659c1e07eacd3a8e7f048.zip
add untested Burger code
Diffstat (limited to '')
-rw-r--r--src/Plugins/Common/StdFoodInfoDialog.cpp67
1 files changed, 67 insertions, 0 deletions
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;
+}