Advanced Strategic Command
|
#include <stdio.h>
#include <cstring>
#include <math.h>
#include <stdarg.h>
#include <ctime>
#include "buildingtype.h"
#include "vehicletype.h"
#include "typen.h"
#include "newfont.h"
#include "spfst.h"
#include "loaders.h"
#include "misc.h"
#include "controls.h"
#include "stack.h"
#include "dlg_box.h"
#include "dialog.h"
#include "attack.h"
#include "gamedlg.h"
#include "gameoptions.h"
#include "ai/ai.h"
#include "errors.h"
#include "viewcalculation.h"
#include "replay.h"
#include "resourcenet.h"
#include "itemrepository.h"
#include "strtmesg.h"
#include "messagedlg.h"
#include "gameevent_dialogs.h"
#include "cannedmessages.h"
#include "mapdisplay.h"
#include "player.h"
#include "dialogs/choosetech.h"
Go to the source code of this file.
Classes | |
class | NewGadgetDetection |
checks, which vehicle and building types are newly available. More... | |
Functions | |
void | setResearchPresenter (TechnologyPresenter *presenter) |
registers the class that will present newly researched technologies to the user More... | |
static bool | anyTechAvailable (const Player &player) |
const Technology * | getNextTechnologyTowardsGoal (Player &player) |
void | runResearch (Player &player, vector< const Technology * > *newTechs, vector< ASCString > *newTechAdapter) |
progresses in the current research, automatically chosing technologies towards the research goal. More... | |
void | checkForNewResearch (Player &player) |
Let's the user select new technology for research if the current research projects are finished. More... | |
Variables | |
static TechnologyPresenter * | techPresenter = NULL |
|
static |
Definition at line 76 of file researchexecution.cpp.
References Available, Player::research, Research::techAvailable(), and technologyRepository.
Referenced by checkForNewResearch(), and runResearch().
void checkForNewResearch | ( | Player & | player | ) |
Let's the user select new technology for research if the current research projects are finished.
Definition at line 193 of file researchexecution.cpp.
References Research::activetechnology, anyTechAvailable(), chooseSingleTechnology(), Research::progress, and Player::research.
Referenced by chooseTechnologyIfAvail(), and hookGuiToMap().
const Technology* getNextTechnologyTowardsGoal | ( | Player & | player | ) |
Definition at line 135 of file researchexecution.cpp.
References Technology::eventually_available(), Research::goal, Technology::id, Player::research, and Research::techResearched().
Referenced by runResearch().
void runResearch | ( | Player & | player, |
vector< const Technology * > * | newTechs, | ||
vector< ASCString > * | newTechAdapter | ||
) |
progresses in the current research, automatically chosing technologies towards the research goal.
This function does not generate any research points, it only consumes them. Research points are generated by doresearch()
No user interaction takes place.
player | the player who is researching |
nweTechs | If non-Null, add all technologies that have been made available during this call |
newTechAdapter | If non-Null, add all TechAdapter that have been activated during this call |
Definition at line 153 of file researchexecution.cpp.
References Research::activetechnology, Research::addanytechnology(), anyTechAvailable(), NewGadgetDetection::evaluate(), getNextTechnologyTowardsGoal(), Technology::id, max(), Research::progress, Player::research, Technology::researchpoints, TechnologyPresenter::showTechnology(), and Research::techResearched().
Referenced by __runResearch(), and DirectResearchCommand::go().
void setResearchPresenter | ( | TechnologyPresenter * | presenter | ) |
registers the class that will present newly researched technologies to the user
Definition at line 70 of file researchexecution.cpp.
Referenced by gamethread().
|
static |
Definition at line 57 of file researchexecution.cpp.
Referenced by SuppressTechPresentation::SuppressTechPresentation().