} // now transfer $planet->shields += $amount; $ship->hardware[1] -= $amount; $account->log(11, "Player puts {$amount} shields on planet.", $player->sector_id); // do the user wants to transfer drones? } else { if ($type_id == 4) { // do we want transfer more than we have? if ($amount > $ship->hardware[4]) { create_error("You can't transfer more combat drones than you carry!"); } // do we want to transfer more than we can carry? if ($amount + $planet->drones > $planet->construction[2] * 20) { create_error("The planet can't hold more than " . $planet->construction[2] * 20 . " drones!"); } // now transfer $planet->drones += $amount; $ship->hardware[4] -= $amount; $account->log(11, "Player puts {$amount} drones on planet.", $player->sector_id); } } } else { create_error("You must choose if you want to transfer to planet or to the ship!"); } $ship->mark_seen(); // update both $planet->update(); $ship->update_hardware(); $ship->mark_seen(); forward(create_container("skeleton.php", "planet_defense.php"));