Простенькая реализация идеи рандомного количества планет в системе.
add in config.php
add in GeneralFunctions.php
Display All
in PlayerUtil.class.php find
change to
find
change to
find
change to
in ShowGalaxyPage.class.php
find
change to
find
change to
in ShowCreatorPage.php find all
and change to
in class.FleetFunctions.php find
change to
in ShowFleetStep1Page.class.php find
if ($targetPlanet != Config::get()->max_planets + 1)
change to
if ($targetPlanet != getGlPlanetCount($targetGalaxy, $targetSystem) + 1)
если у вас еще где то есть
то поменяйте его как сделано выше
Устанавливайте мод только в пустых серверах или переносите вручную планеты. Мод только как пример, можете модифицировать под свои нужды
add in config.php
PHP Source Code: GeneralFunctions.php
- function getGlPlanetCount($galaxy, $system) {
- $sha1 = hash("sha1", GALAXYSALT.$galaxy.GALAXYSALT.$system);
- $numhash = unpack('n1', $sha1)[1];
- return randNum($numhash) + MINPLANET;
- }
- function randNum($number){
- $number = strval($number);
- $sum = 0;
- for($i = 0; $i < strlen($number); $i++) {
- $sum += $number[$i];
- }
- if($sum > MAXPLANET - MINPLANET)
- $sum = randNum($sum);
- return $sum;
- }
find
change to
find
change to
in ShowGalaxyPage.class.php
find
change to
find
and change to
in class.FleetFunctions.php find
if ($targetPlanet != Config::get()->max_planets + 1)
change to
if ($targetPlanet != getGlPlanetCount($targetGalaxy, $targetSystem) + 1)
если у вас еще где то есть
то поменяйте его как сделано выше
Устанавливайте мод только в пустых серверах или переносите вручную планеты. Мод только как пример, можете модифицировать под свои нужды
The post was edited 2 times, last by Kaizoku ().