[MOD] another building system [beta] for ver 1.8 ver.

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • ZeroNull wrote:

      Important!

      private function BuildingQueue()
      {
      while($this->CheckPlanetBuildingQueue())
      $this->SetNextQueueElementOnTop();
      $this->CheckPlanetBuildingsNew();
      }

      Source Code

      1. private function CheckPlanetBuildingsNew() { global $resource, $reslist; if (empty($this->PLANET['b_building_id']) || $this->PLANET['b_building'] > $this->TIME) return false; $CurrentQueue = unserialize($this->PLANET['b_building_id']); $b_building = 0; foreach($CurrentQueue as $key => $builElem) { $Element = $builElem[0]; $BuildEndTime = $builElem[3]; $BuildMode = $builElem[4]; if ($BuildEndTime > $this->TIME){ if($b_building == 0) $b_building = $BuildEndTime; elseif($b_building > $BuildEndTime) $b_building = $BuildEndTime; continue; } if(!isset($this->Builded[$Element])) $this->Builded[$Element] = 0; if ($BuildMode == 'build') { $this->PLANET['field_current'] += 1; $this->PLANET[$resource[$Element]] += 1; $this->Builded[$Element] += 1; } else { $this->PLANET['field_current'] -= 1; $this->PLANET[$resource[$Element]] -= 1; $this->Builded[$Element] -= 1; } unset($CurrentQueue[$key]); $OnHash = in_array($Element, $reslist['prod']); $this->UpdateResource($BuildEndTime, !$OnHash); } //замена ошибки $NewQueueArray = array(); foreach($CurrentQueue as $ListIDArray) { $NewQueueArray[] = $ListIDArray; } if (count($NewQueueArray) == 0) { $this->PLANET['b_building'] = 0; $this->PLANET['b_building_id'] = ''; return false; } else { $this->PLANET['b_building'] = $b_building; $this->PLANET['b_building_id'] = serialize($NewQueueArray); return true; } }
      and script buildings.js

      a number of variables in php !
      delete the rest
      не совсем понял что и где ты поменял?