30#define MAX_RESEARCHLIST 32
31#define MAX_TECHNOLOGIES 256
32#define MAX_TECHLINKS 16
33#define MAX_DESCRIPTIONS 8
35#define TECH_INVALID -1
37#define ANTIMATTER_ITEM_ID "antimatter"
40typedef enum researchStatus_s {
48typedef enum researchType_s {
61typedef enum requirementType_s {
73typedef struct requirement_s {
77 const struct technology_s*
tech;
78 const struct objDef_s*
od;
79 const struct teamDef_s*
td;
86typedef struct requirements_s {
92typedef struct markResearched_s {
110typedef struct techMail_s {
130typedef struct technologyDescriptions_s {
139typedef struct technology_s {
203#define RS_Collected_(tech) ((tech)->statusCollected)
DateTime class definition.
Class describing a point of time.
void RS_InitTree(const struct campaign_s *campaign, bool load)
void RS_MarkOneResearchable(technology_t *tech)
Marks one tech as researchable.
void UP_UGVDescription(const struct ugv_s *ugvType)
const char * RS_GetDescription(technologyDescriptions_t *desc)
returns the currently used description for a technology.
void RS_RemoveScientist(technology_t *tech, Employee *employee)
Remove a scientist from a technology.
void RS_MarkResearchable(const struct base_s *base, bool init=false)
bool RS_RequirementsMet(const technology_t *tech, const struct base_s *base)
int RS_CountScientistsInBase(const struct base_s *base)
researchStatus_t
The status of a research (per tech).
technology_t * RS_GetTechForTeam(const teamDef_t *team)
Returns technology entry for a team.
technology_t * RS_GetTechForItem(const objDef_t *item)
Returns technology entry for an item.
researchType_t
Types of research topics.
int RS_GetTechIdxByName(const char *name)
Returns the index (idx) of a "tech" entry given it's name.
void RS_ResetTechs(void)
This is called everytime RS_ParseTechnologies is called - to prevent cyclic hash tables.
bool RS_IsResearched_ptr(const technology_t *tech)
Checks whether an item is already researched.
technology_t * RS_GetTechByID(const char *id)
return a pointer to the technology identified by given id string
void RS_StopResearch(technology_t *tech)
Stops a research (Removes scientists from it).
void RS_InitStartup(void)
This is more or less the initial Bind some of the functions in this file to console-commands that you...
bool RS_MarkStoryLineEventResearched(const char *techID)
technology_t * RS_GetTechWithMostScientists(const struct base_s *base)
Searches for the technology that has the most scientists assigned in a given base.
void RS_RemoveFiredScientist(struct base_s *base, Employee *employee)
void RS_ResearchFinish(technology_t *tech)
Sets a technology status to researched and updates the date.
int RS_ResearchRun(void)
Checks the research status.
void RS_ParseTechnologies(const char *name, const char **text)
Parses one "tech" entry in the research.ufo file and writes it into the next free entry in technologi...
technology_t * RS_GetTechByProvided(const char *idProvided)
returns a pointer to the item tech (as listed in "provides")
void RS_CheckRequirements(void)
Checks if running researches still meet their requirements.
techMailType_t
Types for tech mail definitions - see tech->mail[].
void UP_AircraftDescription(const technology_t *t)
Prints the UFOpaedia description for aircraft.
technology_t * RS_GetTechByIDX(int tech_idx)
Returns the technology pointer for a tech index. You can use this instead of "&ccs....
void RS_RequiredLinksAssign(void)
Assign Link pointers to all required techs/items/etc...
bool RS_IsResearched_idx(int techIdx)
Checks if the technology (tech-index) has been researched.
bool RS_ScriptSanityCheck(void)
Checks the parsed tech data for errors.
void RS_AssignScientist(technology_t *tech, struct base_s *base, Employee *employee=nullptr)
void RS_AddObjectTechs(void)
void RS_RemoveScientistsExceedingCapacity(struct base_s *base)
void RS_MarkCollected(technology_t *tech) __attribute__((nonnull))
Marks a give technology as collected.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
char * campaign[MAX_CAMPAIGNS]
bool markOnly[MAX_CAMPAIGNS]
Defines all attributes of objects used in the inventory.
requirement_t links[MAX_TECHLINKS]
available mails for a tech - mail and mail_pre in script files
This is the technology parsed from research.ufo.
struct technology_s * upPrev
requirements_t requireForProduction
researchStatus_t statusResearch
struct technology_s * hashProvidedNext
technologyDescriptions_t description
struct technology_s * hashNext
markResearched_t markResearched
char * finishedResearchEvent
technologyDescriptions_t preDescription
requirements_t requireAND
struct technology_s * redirect
class DateTime preResearchedDate
struct technology_s * upNext
struct pediaChapter_s * upChapter
techMail_t mail[TECHMAIL_MAX]
class DateTime researchedDate
char * text[MAX_DESCRIPTIONS]
char * tech[MAX_DESCRIPTIONS]
const struct objDef_s * od
const struct aircraft_s * aircraft
const struct technology_s * tech
const struct teamDef_s * td