Page Shipyard Default Tpl (2moons 2.0)

  • To make the change you just need to change the following code

    Smarty: page.shipyard.default.tpl
    1. <div>
    2.     {if $Element.AlreadyBuild}<span style="color:red">{$LNG.bd_protection_shield_only_one}</span>{elseif $NotBuilding && $Element.buyable}<input style="width: 90%;" type="text" name="fmenge[{$ID}]" id="input_{$ID}" value="0" tabindex="{$smarty.foreach.FleetList.iteration}">
    3.     <input style="padding: 8px; margin-left: -10px; border-left: none;" type="button" value="{$LNG.bd_max_ships}" onclick="$('#input_{$ID}').val('{$Element.maxBuildable}')"></p>
    4.     {/if}
    5. </div>
    6. {if $NotBuilding}<div style="text-align:center"><input type="submit" value="{$LNG.bd_build_ships}"></div>{/if}

    And replace by

    enjoy

  • Can you help me so that once we build the shield dome, the build button will disappear and there will be a warning that it can only be built once in the button?


    A warning that you need to upgrade the rocket silo for interplanetary rockets and interceptor rockets would be nice.

  • Can you help me so that once we build the shield dome, the build button will disappear and there will be a warning that it can only be built once in the button?


    A warning that you need to upgrade the rocket silo for interplanetary rockets and interceptor rockets would be nice.

    search

    PHP: ShowShipyardPage.class.php
    1. $AlreadyBuild = in_array($Element, $reslist['one']) && (isset($elementInQueue[$Element]) || $PLANET[$resource[$Element]] != 0);

    addon

    PHP
    1. $isMissile = true;
    2. if ($maxBuildable == 0 && ($Element == 502 || $Element == 503))
    3. {
    4.     $isMissile = false;
    5. }

    search

    Code
    1. $elementList[$Element] = array(
    2.     'id' => $Element,
    3.     'available' => $PLANET[$resource[$Element]],
    4.     'costResources' => $costResources,
    5.     'costOverflow' => $costOverflow,
    6. 'elementTime' => $elementTime,
    7. 'buyable' => $buyable,
    8. 'maxBuildable' => floatToString($maxBuildable),
    9. 'AlreadyBuild' => $AlreadyBuild,
    10. );

    replace by

    Smarty
    1. <div>
    2. {if $Element.AlreadyBuild}<span style="color:red">{$LNG.bd_protection_shield_only_one}</span>{elseif $NotBuilding && $Element.buyable}<input style="width: 90%;" type="text" name="fmenge[{$ID}]" id="input_{$ID}" value="0" tabindex="{$smarty.foreach.FleetList.iteration}">
    3. <input style="padding: 8px; margin-left: -10px; border-left: none;" type="button" value="{$LNG.bd_max_ships}" onclick="$('#input_{$ID}').val('{$Element.maxBuildable}')"></p>
    4. {/if}
    5. </div>
    6. {if $NotBuilding}<div style="text-align:center"><input type="submit" value="{$LNG.bd_build_ships}"></div>{/if}

    Replace by

    enjoy ;)