| 186 | |
| 187 | template<bool IsSrcGlobal, bool IsGlobal, class _Pr> |
| 188 | bool TEventExt::VariableCheckBinary(TEventClass* pThis) |
| 189 | { |
| 190 | auto itr = ScenarioExt::Global()->Variables[IsGlobal].find(pThis->Value); |
| 191 | |
| 192 | if (itr != ScenarioExt::Global()->Variables[IsGlobal].end()) |
| 193 | { |
| 194 | // We uses TechnoName for our src variable index |
| 195 | int nSrcVariable = atoi(pThis->String); |
| 196 | auto itrsrc = ScenarioExt::Global()->Variables[IsSrcGlobal].find(nSrcVariable); |
| 197 | |
| 198 | if (itrsrc != ScenarioExt::Global()->Variables[IsSrcGlobal].end()) |
| 199 | return _Pr()(itr->second.Value, itrsrc->second.Value); |
| 200 | } |
| 201 | |
| 202 | return false; |
| 203 | } |
| 204 | |
| 205 | bool TEventExt::HouseOwnsTechnoTypeTEvent(TEventClass* pThis) |
| 206 | { |