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