diff options
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r-- | src/game/base/game.cc | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index 2ec3c62..e198d42 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -724,19 +724,41 @@ void Game::func_wingmen(core::Player *player, const std::string &args) } } } - } else if (str.compare("combat") == 0) { - if (ship->has_autopilot_flag(Ship::AutoPilotCombat)) { + } else if (str.compare("combat") == 0) + { + if (ship->has_autopilot_flag(Ship::AutoPilotCombat)) + { ship->unset_autopilot_flag(Ship::AutoPilotCombat); - player->send("Wingmen going into formation!"); - } else { + player->send("^BWingmen going into formation!"); + } else + { ship->set_autopilot_flag(Ship::AutoPilotCombat); - player->send("Wingmen entering combat!"); + player->send("^BWingmen entering combat!"); + } + + } else if ((str.compare("recall") == 0) || (str.compare("laucnh") == 0)) + { + if (ship->has_flag(core::Entity::Dockable)) { + if (ship->has_autopilot_flag(Ship::AutoPilotRecall)) + { + ship->unset_autopilot_flag(Ship::AutoPilotRecall); + player->send("^BLaunching wingmen!"); + } else + { + ship->set_autopilot_flag(Ship::AutoPilotRecall); + player->send("^BRecalling wingmen to dock!"); + + } + } else + { + player->send("^WWingmen can't dock at your ship!"); } - - - } else { + } else + { player->send("Usage: wingmen add [faction label] [amount]"); - player->send(" wingmen combat"); + player->send(" wingmen combat switch wingmen between formation flying and combat mode"); + player->send(" wingmen recall switched wingmend between docked and laucnhed"); + player->send(" wingmen launch alias for recall"); } } |