Changeset 07a80e0452a3db3c441e627e666c09d5cbcc52e7
- Timestamp:
- 07/07/07 22:35:45
(1 year ago)
- Author:
- Christopher Jung <bktheg@web.de>
- git-committer:
- Christopher Jung <bktheg@web.de> 1183840545 +0200
- git-parent:
[15c854d20931d81a8e2bbab52eac1029983a5cfd]
- git-author:
- Christopher Jung <bktheg@web.de> 1183840545 +0200
- Message:
Werft: Baukosten pro Tick eingebaut
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8e3cf9b |
r07a80e0 |
|
| 6 | 6 | `remaining` tinyint(4) NOT NULL default '0', |
|---|
| 7 | 7 | `flagschiff` tinyint(1) unsigned NOT NULL default '0', |
|---|
| | 8 | `costsPerTick` varchar(300) NOT NULL default '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,', |
|---|
| | 9 | `energyPerTick` int NOT NULL default '0', |
|---|
| 8 | 10 | PRIMARY KEY (`werft`,`position`) |
|---|
| 9 | 11 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|---|
| r29cd7e5 |
r07a80e0 |
|
| 321 | 321 | ALTER TABLE `weaponfactory` ADD PRIMARY KEY ( `col` ); |
|---|
| 322 | 322 | ALTER TABLE `weaponfactory` DROP INDEX `col`; |
|---|
| | 323 | ALTER TABLE `werft_queues` ADD COLUMN costsPerTick varchar(300) NOT NULL default '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'; |
|---|
| | 324 | ALTER TABLE `werft_queues` ADD COLUMN energyPerTick int NOT NULL default '0'; |
|---|
| 323 | 325 | ]]></update> |
|---|
| 324 | 326 | </updates> |
|---|
| r8e3cf9b |
r07a80e0 |
|
| 71 | 71 | } |
|---|
| 72 | 72 | if( werft.isBuildContPossible() ) { |
|---|
| 73 | | werft.decRemainingTime(); |
|---|
| | 73 | werft.continueBuild(); |
|---|
| 74 | 74 | this.log("\tVoraussetzungen erfuellt - bau geht weiter"); |
|---|
| 75 | 75 | } |
|---|
| rfdd9b7d |
r07a80e0 |
|
| 398 | 398 | |
|---|
| 399 | 399 | @Override |
|---|
| 400 | | public boolean buildShip( int build, int item, boolean testonly ) { |
|---|
| 401 | | boolean result = super.buildShip(build, item, testonly); |
|---|
| | 400 | public boolean buildShip( int build, int item, boolean costsPerTick, boolean testonly ) { |
|---|
| | 401 | boolean result = super.buildShip(build, item, costsPerTick, testonly); |
|---|
| 402 | 402 | |
|---|
| 403 | 403 | this.ship.recalculateShipStatus(); |
|---|
| radac94a |
r07a80e0 |
|
| 49 | 49 | import net.driftingsouls.ds2.server.ships.Ship; |
|---|
| 50 | 50 | import net.driftingsouls.ds2.server.ships.ShipTypeData; |
|---|
| 51 | | import net.driftingsouls.ds2.server.ships.Ship.ModuleEntry; |
|---|
| 52 | 51 | |
|---|
| 53 | 52 | import org.apache.commons.lang.StringUtils; |
|---|
| … | … | |
| 91 | 90 | |
|---|
| 92 | 91 | // Baudialog |
|---|
| 93 | | if( build != 0 ) { |
|---|
| 94 | | final int item = context.getRequest().getParameterInt("item"); |
|---|
| 95 | | final String conf = context.getRequest().getParameterString("conf"); |
|---|
| 96 | | |
|---|
| 97 | | this.out_buildShip(build, item, werft, conf); |
|---|
| | 92 | if( build != 0 ) { |
|---|
| | 93 | this.out_buildShip(build, werft); |
|---|
| 98 | 94 | } |
|---|
| 99 | 95 | // Werkstadt |
|---|
| … | … | |
| 688 | 684 | } |
|---|
| 689 | 685 | |
|---|
| 690 | | private void out_buildShip(int build, int item, WerftObject werft, String conf) { |
|---|
| | 686 | private void out_buildShip(int build, WerftObject werft) { |
|---|
| | 687 | final int item = context.getRequest().getParameterInt("item"); |
|---|
| | 688 | final boolean perTick = context.getRequest().getParameterInt("pertick") != 0; |
|---|
| | 689 | final String conf = context.getRequest().getParameterString("conf"); |
|---|
| | 690 | |
|---|
| 691 | 691 | Cargo cargo = werft.getCargo(false); |
|---|
| 692 | 692 | |
|---|
| … | … | |
| 711 | 711 | |
|---|
| 712 | 712 | //Standardresourcen |
|---|
| 713 | | Cargo shipdataCosts = (Cargo)shipdata.get("costs"); |
|---|
| | 713 | Cargo shipdataCosts = new Cargo((Cargo)shipdata.get("costs")); |
|---|
| | 714 | Cargo perTickCosts = new Cargo(shipdataCosts); |
|---|
| | 715 | perTickCosts.multiply(1/(double)shipdata.getInt("dauer"), Cargo.Round.CEIL); |
|---|
| | 716 | |
|---|
| 714 | 717 | ResourceList reslist = shipdataCosts.compare( cargo, false ); |
|---|
| 715 | 718 | for( ResourceEntry res : reslist ) { |
|---|
| 716 | 719 | t.set_var( "res.image", res.getImage(), |
|---|
| 717 | 720 | "res.plainname", res.getPlainName(), |
|---|
| | 721 | "res.cargo.pertick", perTickCosts.getResourceCount(res.getId()), |
|---|
| 718 | 722 | "res.cargo.available", res.getCargo2(), |
|---|
| 719 | 723 | "res.cargo.needed", res.getCargo1(), |
|---|
| … | … | |
| 721 | 725 | t.parse("build.res.list", "build.res.listitem", true); |
|---|
| 722 | 726 | } |
|---|
| 723 | | |
|---|
| 724 | | int frei = werft.getCrew(); |
|---|
| 725 | 727 | |
|---|
| 726 | 728 | //E-Kosten |
|---|
| | 729 | |
|---|
| | 730 | int ePerTick = (int)Math.ceil(shipdata.getInt("ekosten")/(double)shipdata.getInt("dauer")); |
|---|
| | 731 | |
|---|
| 727 | 732 | t.set_var( "res.image", Configuration.getSetting("URL")+"data/interface/energie.gif", |
|---|
| 728 | 733 | "res.plainname", "Energie", |
|---|
| | 734 | "res.cargo.pertick", ePerTick, |
|---|
| 729 | 735 | "res.cargo.available", werft.getEnergy(), |
|---|
| 730 | 736 | "res.cargo.needed", shipdata.getInt("ekosten"), |
|---|
| 731 | 737 | "res.cargo.mangel", (shipdata.getInt("ekosten") > werft.getEnergy() ? shipdata.getInt("ekosten") - werft.getEnergy() : 0) ); |
|---|
| 732 | | t.parse("build.othercosts.list", "build.res.listitem", true); |
|---|
| 733 | | |
|---|
| 734 | | //Crew |
|---|
| | 738 | t.parse("build.res.list", "build.res.listitem", true); |
|---|
| | 739 | |
|---|
| | 740 | // Crew |
|---|
| | 741 | int frei = werft.getCrew(); |
|---|
| | 742 | |
|---|
| 735 | 743 | t.set_var( "res.image", Configuration.getSetting("URL")+"data/interface/arbeitslos.gif", |
|---|
| 736 | 744 | "res.plainname", "Crew", |
|---|
| | 745 | "res.cargo.pertick", "", |
|---|
| 737 | 746 | "res.cargo.available", frei, |
|---|
| 738 | 747 | "res.cargo.needed", shipdata.getInt("crew"), |
|---|
| … | … | |
| 740 | 749 | t.parse("build.othercosts.list", "build.res.listitem", true); |
|---|
| 741 | 750 | |
|---|
| 742 | | boolean result = werft.buildShip(build, item, !conf.equals("ok") ); |
|---|
| 743 | | |
|---|
| 744 | | if( !result ) { |
|---|
| 745 | | t.set_var("build.error", StringUtils.replace(werft.MESSAGE.getMessage(), "\n", "<br/>\n")); |
|---|
| 746 | | } |
|---|
| | 751 | // Testen ob Bau moeglich |
|---|
| | 752 | if( !conf.equals("ok") ) { |
|---|
| | 753 | // Sofort zahlen |
|---|
| | 754 | boolean result = werft.buildShip(build, item, false, true ); |
|---|
| | 755 | |
|---|
| | 756 | if( !result ) { |
|---|
| | 757 | t.set_var("build.instant.error", StringUtils.replace(werft.MESSAGE.getMessage(), "\n", "<br/>\n")); |
|---|
| | 758 | } |
|---|
| | 759 | |
|---|
| | 760 | // Kosten pro Tick |
|---|
| | 761 | result = werft.buildShip(build, item, true, true ); |
|---|
| | 762 | |
|---|
| | 763 | if( !result ) { |
|---|
| | 764 | t.set_var("build.pertick.error", StringUtils.replace(werft.MESSAGE.getMessage(), "\n", "<br/>\n")); |
|---|
| | 765 | } |
|---|
| | 766 | } |
|---|
| | 767 | // Bau ausfuehren |
|---|
| | 768 | else { |
|---|
| | 769 | boolean result = werft.buildShip(build, item, perTick, false ); |
|---|
| | 770 | |
|---|
| | 771 | if( !result ) { |
|---|
| | 772 | t.set_var("build.error", StringUtils.replace(werft.MESSAGE.getMessage(), "\n", "<br/>\n")); |
|---|
| | 773 | } |
|---|
| | 774 | } |
|---|
| 747 | 775 | |
|---|
| 748 | 776 | return; |
|---|
| r6b38a1a |
r07a80e0 |
|
| 341 | 341 | } |
|---|
| 342 | 342 | |
|---|
| | 343 | // Pruefen, ob ein evt notwendiges Item vorhanden ist |
|---|
| 343 | 344 | if( this.getRequiredItem() > -1 ) { |
|---|
| 344 | 345 | Context context = ContextMap.getContext(); |
|---|
| … | … | |
| 357 | 358 | } |
|---|
| 358 | 359 | } |
|---|
| | 360 | |
|---|
| | 361 | // Pruefen, ob die anfallenden Baukosten bezahlt werden koennen |
|---|
| | 362 | WerftQueueEntry entry = getQueueTopEntry(); |
|---|
| | 363 | if( !entry.getCostsPerTick().isEmpty() ) { |
|---|
| | 364 | Cargo cargo = this.getCargo(false); |
|---|
| | 365 | ResourceList reslist = entry.getCostsPerTick().compare(cargo, false); |
|---|
| | 366 | for( ResourceEntry res : reslist ) { |
|---|
| | 367 | if( res.getDiff() > 0 ) { |
|---|
| | 368 | return false; |
|---|
| | 369 | } |
|---|
| | 370 | } |
|---|
| | 371 | } |
|---|
| | 372 | |
|---|
| | 373 | if( entry.getEnergyPerTick() != 0 ) { |
|---|
| | 374 | if( this.getEnergy() < entry.getEnergyPerTick() ) { |
|---|
| | 375 | return false; |
|---|
| | 376 | } |
|---|
| | 377 | } |
|---|
| 359 | 378 | |
|---|
| 360 | 379 | return true; |
|---|
| | 380 | } |
|---|
| | 381 | |
|---|
| | 382 | private void substractBuildCosts() { |
|---|
| | 383 | WerftQueueEntry entry = getQueueTopEntry(); |
|---|
| | 384 | if( !entry.getCostsPerTick().isEmpty() ) { |
|---|
| | 385 | Cargo cargo = this.getCargo(false); |
|---|
| | 386 | cargo.substractCargo(entry.getCostsPerTick()); |
|---|
| | 387 | this.setCargo(cargo, false); |
|---|
| | 388 | } |
|---|
| | 389 | |
|---|
| | 390 | if( entry.getEnergyPerTick() != 0 ) { |
|---|
| | 391 | this.setEnergy(this.getEnergy() - entry.getEnergyPerTick()); |
|---|
| | 392 | } |
|---|
| | 393 | } |
|---|
| | 394 | |
|---|
| | 395 | /** |
|---|
| | 396 | * <p>Setzt den Bau fort. Dies umfasst u.a. das Dekrementieren |
|---|
| | 397 | * der verbleibenden Bauzeit um 1 sowie des Abzugs der pro Tick |
|---|
| | 398 | * anfallenden Baukosten.</p> |
|---|
| | 399 | * <p>Es wird nicht geprueft, ob die Bedingungen fuer ein fortsetzen des |
|---|
| | 400 | * Baus erfuellt sind</p> |
|---|
| | 401 | * @see #isBuildContPossible() |
|---|
| | 402 | */ |
|---|
| | 403 | public void continueBuild() { |
|---|
| | 404 | this.decRemainingTime(); |
|---|
| | 405 | this.substractBuildCosts(); |
|---|
| 361 | 406 | } |
|---|
| 362 | 407 | |
|---|
| … | … | |
| 1356 | 1401 | * @param build Schiffbau-ID |
|---|
| 1357 | 1402 | * @param item Item-ID |
|---|
| | 1403 | * @param costsPerTick Sollen die Baukosten pro Tick (<code>true</code>) oder der Gesamtbetrag jetzt (<code>false</code>) abgezogen werden |
|---|
| 1358 | 1404 | * @param testonly Soll nur getestet (true) oder wirklich gebaut (false) werden? |
|---|
| 1359 | 1405 | * @return true, wenn kein Fehler aufgetreten ist |
|---|
| 1360 | 1406 | */ |
|---|
| 1361 | | public boolean buildShip( int build, int item, boolean testonly ) { |
|---|
| | 1407 | public boolean buildShip( int build, int item, boolean costsPerTick, boolean testonly ) { |
|---|
| 1362 | 1408 | StringBuilder output = MESSAGE.get(); |
|---|
| 1363 | 1409 | |
|---|
| … | … | |
| 1366 | 1412 | User user = (User)db.get(User.class, this.getOwner()); |
|---|
| 1367 | 1413 | |
|---|
| 1368 | | Cargo basec = this.getCargo(false); |
|---|
| 1369 | | Cargo newbasec = (Cargo)basec.clone(); |
|---|
| | 1414 | Cargo cargo = this.getCargo(false); |
|---|
| 1370 | 1415 | |
|---|
| 1371 | 1416 | Cargo allyitems = null; |
|---|
| … | … | |
| 1450 | 1495 | boolean ok = true; |
|---|
| 1451 | 1496 | |
|---|
| 1452 | | Cargo shipdataCosts = (Cargo)shipdata.get("costs"); |
|---|
| 1453 | | |
|---|
| 1454 | | //Standardresourcen |
|---|
| 1455 | | ResourceList reslist = shipdataCosts.compare( basec, false ); |
|---|
| 1456 | | for( ResourceEntry res : reslist ) { |
|---|
| 1457 | | if( res.getDiff() > 0 ) { |
|---|
| | 1497 | int e = this.getEnergy(); |
|---|
| | 1498 | |
|---|
| | 1499 | Cargo shipdataCosts = new Cargo((Cargo)shipdata.get("costs")); |
|---|
| | 1500 | |
|---|
| | 1501 | if( !costsPerTick ) { |
|---|
| | 1502 | // Abzug der sofort anfallenden Baukosten |
|---|
| | 1503 | ResourceList reslist = shipdataCosts.compare( cargo, false ); |
|---|
| | 1504 | for( ResourceEntry res : reslist ) { |
|---|
| | 1505 | if( res.getDiff() > 0 ) { |
|---|
| | 1506 | ok = false; |
|---|
| | 1507 | break; |
|---|
| | 1508 | } |
|---|
| | 1509 | } |
|---|
| | 1510 | |
|---|
| | 1511 | cargo.substractCargo( shipdataCosts ); |
|---|
| | 1512 | |
|---|
| | 1513 | // E-Kosten |
|---|
| | 1514 | if( shipdata.getInt("ekosten") > this.getEnergy()) { |
|---|
| 1458 | 1515 | ok = false; |
|---|
| 1459 | | break; |
|---|
| 1460 | | } |
|---|
| 1461 | | } |
|---|
| 1462 | | |
|---|
| 1463 | | newbasec.substractCargo( shipdataCosts ); |
|---|
| | 1516 | } |
|---|
| | 1517 | e -= shipdata.getInt("ekosten"); |
|---|
| | 1518 | } |
|---|
| 1464 | 1519 | |
|---|
| 1465 | 1520 | int frei = this.getCrew(); |
|---|
| 1466 | | |
|---|
| 1467 | | //E-Kosten |
|---|
| 1468 | | if( shipdata.getInt("ekosten") > this.getEnergy()) { |
|---|
| 1469 | | ok = false; |
|---|
| 1470 | | } |
|---|
| 1471 | | int e = this.getEnergy() - shipdata.getInt("ekosten"); |
|---|
| 1472 | 1521 | |
|---|
| 1473 | 1522 | //Crew |
|---|
| … | … | |
| 1490 | 1539 | else { |
|---|
| 1491 | 1540 | if( this.getOneWayFlag() == 0 ) { |
|---|
| 1492 | | this.setCargo(newbasec, false); |
|---|
| | 1541 | this.setCargo(cargo, false); |
|---|
| 1493 | 1542 | this.setEnergy(e); |
|---|
| 1494 | 1543 | this.setCrew(frei); |
|---|
| … | … | |
| 1533 | 1582 | this.buildFlagschiff = true; |
|---|
| 1534 | 1583 | } |
|---|
| | 1584 | if( costsPerTick ) { |
|---|
| | 1585 | shipdataCosts.multiply(1/(double)shipdata.getInt("dauer"), Cargo.Round.CEIL); |
|---|
| | 1586 | entry.setCostsPerTick(shipdataCosts); |
|---|
| | 1587 | entry.setEnergyPerTick((int)Math.ceil(shipdata.getInt("ekosten")/(double)shipdata.getInt("dauer"))); |
|---|
| | 1588 | } |
|---|
| 1535 | 1589 | db.persist(entry); |
|---|
| 1536 | 1590 | |
|---|
| r8e3cf9b |
r07a80e0 |
|
| 30 | 30 | import javax.persistence.Table; |
|---|
| 31 | 31 | |
|---|
| | 32 | import org.hibernate.annotations.Type; |
|---|
| | 33 | |
|---|
| | 34 | import net.driftingsouls.ds2.server.cargo.Cargo; |
|---|
| 32 | 35 | import net.driftingsouls.ds2.server.framework.ContextMap; |
|---|
| 33 | 36 | import net.driftingsouls.ds2.server.ships.ShipType; |
|---|
| … | … | |
| 127 | 130 | private boolean buildFlagschiff = false; |
|---|
| 128 | 131 | private int remaining = 0; |
|---|
| 129 | | |
|---|
| | 132 | @Type(type="cargo") |
|---|
| | 133 | private Cargo costsPerTick; |
|---|
| | 134 | private int energyPerTick; |
|---|
| | 135 | |
|---|
| 130 | 136 | /** |
|---|
| 131 | 137 | * Konstruktor |
|---|
| … | … | |
| 147 | 153 | this.buildItem = -1; |
|---|
| 148 | 154 | this.remaining = remaining; |
|---|
| | 155 | this.costsPerTick = new Cargo(); |
|---|
| 149 | 156 | } |
|---|
| 150 | 157 | |
|---|
| … | … | |
| 254 | 261 | this.remaining = remaining; |
|---|
| 255 | 262 | } |
|---|
| 256 | | |
|---|
| 257 | | |
|---|
| | 263 | |
|---|
| | 264 | /** |
|---|
| | 265 | * Gibt die pro Tick faelligen Baukosten zurueck |
|---|
| | 266 | * @return Die Baukosten pro Tick |
|---|
| | 267 | */ |
|---|
| | 268 | public Cargo getCostsPerTick() { |
|---|
| | 269 | return costsPerTick; |
|---|
| | 270 | } |
|---|
| | 271 | |
|---|
| | 272 | /** |
|---|
| | 273 | * Setzt die pro Tick faelligen Baukosten |
|---|
| | 274 | * @param costsPerTick Die Baukosten pro Tick |
|---|
| | 275 | */ |
|---|
| | 276 | public void setCostsPerTick(Cargo costsPerTick) { |
|---|
| | 277 | this.costsPerTick = costsPerTick; |
|---|
| | 278 | } |
|---|
| | 279 | |
|---|
| | 280 | /** |
|---|
| | 281 | * Gibt die Energiekosten pro Tick zurueck |
|---|
| | 282 | * @return Die Energiekosten pro Tick |
|---|
| | 283 | */ |
|---|
| | 284 | public int getEnergyPerTick() { |
|---|
| | 285 | return energyPerTick; |
|---|
| | 286 | } |
|---|
| | 287 | |
|---|
| | 288 | /** |
|---|
| | 289 | * Setzt die Energiekosten pro Tick |
|---|
| | 290 | * @param energyPerTick Die Energiekosten pro Tick |
|---|
| | 291 | */ |
|---|
| | 292 | public void setEnergyPerTick(int energyPerTick) { |
|---|
| | 293 | this.energyPerTick = energyPerTick; |
|---|
| | 294 | } |
|---|
| 258 | 295 | } |
|---|
| rfe6254f |
r07a80e0 |
|
| 174 | 174 | <table class="noBorderX" cellpadding="2" cellspacing="1" style="margin-left:auto;margin-right:auto"> |
|---|
| 175 | 175 | <tr> |
|---|
| 176 | | <th style="text-align:center" colspan="3"><h3>Baukosten</h3></th> |
|---|
| | 176 | <th style="text-align:center" colspan="5"><h3>Baukosten</h3></th> |
|---|
| 177 | 177 | </tr> |
|---|
| 178 | 178 | <tr> |
|---|
| 179 | 179 | <td class="noBorderX" style="width:32px"></td> |
|---|
| 180 | 180 | <td class="noBorderX" style="width:100px;text-align:right">Vorhanden</td> |
|---|
| 181 | | <td class="noBorderX" style="width:100px;text-align:right">Sofort</td> |
|---|
| | 181 | <td class="noBorderX" style="width:50px;text-align:right">Sofort</td> |
|---|
| | 182 | <td class="noBorderX" style="width:40px;text-align:center">oder</td> |
|---|
| | 183 | <td class="noBorderX" style="width:40px;text-align:right">Pro Tick</td> |
|---|
| 182 | 184 | </tr> |
|---|
| 183 | 185 | <!-- BEGIN build.res.listitem --> |
|---|
| … | … | |
| 187 | 189 | </td> |
|---|
| 188 | 190 | <td class="noBorderX" style="width:100px;text-align:right">{res.cargo.available}</td> |
|---|
| 189 | | <td class="noBorderX" style="width:100px;text-align:right"> |
|---|
| | 191 | <td class="noBorderX" style="width:50px;text-align:right"> |
|---|
| 190 | 192 | {if res.cargo.mangel} |
|---|
| 191 | 193 | <a class="error" onmouseover="return overlib('<span style=\'font-size:13px\'>Mehrbedarf:<br />{res.cargo.mangel} Einheiten</span>',TIMEOUT,0,DELAY,300,WIDTH,100);" onmouseout="return nd();" href="#"> |
|---|
| … | … | |
| 196 | 198 | {/endif} |
|---|
| 197 | 199 | </td> |
|---|
| | 200 | {if res.cargo.pertick} |
|---|
| | 201 | <td class="noBorderX"></td> |
|---|
| | 202 | <td class="noBorderX" style="width:40px;text-align:right">{res.cargo.pertick}</td> |
|---|
| | 203 | {else} |
|---|
| | 204 | <td class="noBorderX" colspan="2"></td> |
|---|
| | 205 | {/endif} |
|---|
| 198 | 206 | </tr> |
|---|
| 199 | 207 | <!-- END build.res.listitem --> |
|---|
| 200 | 208 | <tr><td class="noBorderX" colspan="3"></td></tr> |
|---|
| 201 | 209 | <tr> |
|---|
| 202 | | <th style="text-align:center" colspan="3"><h3>Werftkapazität</h3></th> |
|---|
| | 210 | <th style="text-align:center" colspan="5"><h3>Werftkapazität</h3></th> |
|---|
| 203 | 211 | </tr> |
|---|
| 204 | 212 | |
|---|
| … | … | |
| 211 | 219 | <h3>Aktionen</h3> |
|---|
| 212 | 220 | <div style="margin-top:3px; margin-bottom:3px"> |
|---|
| 213 | | {if build.error} |
|---|
| 214 | | <span class="error">{build.error}</span> |
|---|
| | 221 | {if build.conf} |
|---|
| | 222 | {if build.instant.error} |
|---|
| | 223 | <span class="error">{build.instant.error}</span><br /> |
|---|
| | 224 | {else} |
|---|
| | 225 | <a class="ok" href="{werftgui.urlbase}&sess={global.sess}&build={build.id}&item={build.item.id}&conf=ok&pertick=0">Bauen und sofort bezahlen</a><br /> |
|---|
| | 226 | {/endif} |
|---|
| | 227 | {if build.pertick.error} |
|---|
| | 228 | <span class="error">{build.pertick.error}</span> |
|---|
| | 229 | {else} |
|---|
| | 230 | <a class="ok" href="{werftgui.urlbase}&sess={global.sess}&build={build.id}&item={build.item.id}&conf=ok&pertick=1">Bauen mit pro Tick Kosten</a> |
|---|
| | 231 | {/endif} |
|---|
| 215 | 232 | {else} |
|---|
| 216 | | {if build.conf} |
|---|
| 217 | | <a class="ok" href="{werftgui.urlbase}&sess={global.sess}&build={build.id}&item={build.item.id}&conf=ok">{build.type.name} bauen</a> |
|---|
| 218 | | {else} |
|---|
| 219 | | <span class="ok">genügend Material vorhanden - beginne Bau</span> |
|---|
| | 233 | {if build.error} |
|---|
| | 234 | <span class="error">{build.error}</span> |
|---|
| | 235 | {else} |
|---|
| | 236 | <span class="ok">alles ok - beginne mit Bau</span> |
|---|
| 220 | 237 | {/endif} |
|---|
| 221 | 238 | {/endif} |
|---|