0x0045935F
| 97 | |
| 98 | // 0x0045935F |
| 99 | void Industry::getStatusString(const char* buffer) |
| 100 | { |
| 101 | char* ptr = (char*)buffer; |
| 102 | *ptr = '\0'; |
| 103 | const auto* industryObj = getObject(); |
| 104 | |
| 105 | // Closing Down |
| 106 | if (hasFlags(IndustryFlags::closingDown)) |
| 107 | { |
| 108 | ptr = StringManager::formatString(ptr, StringIds::industry_closing_down); |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | // Under Construction |
| 113 | if (under_construction != 0xFF) |
| 114 | { |
| 115 | ptr = StringManager::formatString(ptr, StringIds::industry_under_construction); |
| 116 | return; |
| 117 | } |
| 118 | |
| 119 | // Produced Cargo Only |
| 120 | if (!canReceiveCargo()) |
| 121 | { |
| 122 | if (!canProduceCargo()) |
| 123 | { |
| 124 | return; |
| 125 | } |
| 126 | |
| 127 | ptr = StringManager::formatString(ptr, StringIds::industry_producing); |
| 128 | |
| 129 | ptr = industryObj->getProducedCargoString(ptr); |
| 130 | |
| 131 | return; |
| 132 | } |
| 133 | |
| 134 | // Required Cargo |
| 135 | ptr = StringManager::formatString(ptr, StringIds::industry_requires); |
| 136 | |
| 137 | ptr = industryObj->getRequiredCargoString(ptr); |
| 138 | |
| 139 | if (!canProduceCargo()) |
| 140 | { |
| 141 | return; |
| 142 | } |
| 143 | |
| 144 | // Production and Received Cargo |
| 145 | ptr = StringManager::formatString(ptr, StringIds::cargo_to_produce); |
| 146 | |
| 147 | ptr = industryObj->getProducedCargoString(ptr); |
| 148 | } |
| 149 | |
| 150 | // 0x00453275 |
| 151 | void Industry::update() |
nothing calls this directly
no test coverage detected