Advanced Strategic Command
Classes | Functions | Variables
researchexecution.cpp File Reference
#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"
Include dependency graph for researchexecution.cpp:

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 TechnologygetNextTechnologyTowardsGoal (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 TechnologyPresentertechPresenter = NULL
 

Function Documentation

static bool anyTechAvailable ( const Player player)
static
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)
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.

Parameters
playerthe player who is researching
nweTechsIf non-Null, add all technologies that have been made available during this call
newTechAdapterIf 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().

Variable Documentation

TechnologyPresenter* techPresenter = NULL
static