UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
technology_s Struct Reference

This is the technology parsed from research.ufo. More...

#include <cp_research.h>

Data Fields

char * id
 
int idx
 
char * name
 
technologyDescriptions_t description
 
technologyDescriptions_t preDescription
 
researchType_t type
 
struct technology_sredirect
 
requirements_t requireAND
 
requirements_t requireOR
 
bool statusCollected
 
char * provides
 
float overallTime
 
float time
 
int delay
 
researchStatus_t statusResearch
 
char * finishedResearchEvent
 
bool announce
 
struct base_sbase
 
int scientists
 
char * image
 
char * mdl
 
bool statusResearchable
 
int produceTime
 
mailSentType_t mailSent
 
requirements_t requireForProduction
 
date_t preResearchedDate
 
date_t researchedDate
 
markResearched_t markResearched
 
struct pediaChapter_supChapter
 
struct technology_supPrev
 
struct technology_supNext
 
techMail_t mail [TECHMAIL_MAX]
 
int numTechMails
 
struct technology_shashNext
 
struct technology_shashProvidedNext
 

Detailed Description

This is the technology parsed from research.ufo.

Definition at line 137 of file cp_research.h.

Field Documentation

bool technology_s::announce

if this is true the ufopedia will be opened on finishing the research

Definition at line 165 of file cp_research.h.

Referenced by RS_ResearchFinish().

int technology_s::delay
Todo:
Number in days the system should wait until the tech is available for research. Starting from the first time all other dependencies have been fulfilled and counting only if a day has passed and they still are met.

Definition at line 159 of file cp_research.h.

technologyDescriptions_t technology_s::description

Descriptions of researched item.

Definition at line 141 of file cp_research.h.

Referenced by RS_ParseTechnologies(), RS_ResearchFinish(), RS_ScriptSanityCheck(), and UP_Article().

char* technology_s::finishedResearchEvent

nullptr or string with scriptable commands that are executed after the tech was successfully researched

Definition at line 164 of file cp_research.h.

Referenced by RS_ResearchFinish().

struct technology_s* technology_s::hashNext

Definition at line 197 of file cp_research.h.

Referenced by RS_GetTechByID(), RS_GetTechIdxByName(), and RS_ParseTechnologies().

struct technology_s* technology_s::hashProvidedNext

Definition at line 198 of file cp_research.h.

Referenced by RS_GetTechByProvided(), and RS_ParseTechnologies().

int technology_s::idx

Self-link in the global list

Definition at line 139 of file cp_research.h.

Referenced by RS_AssignScientist(), RS_GetTechIdxByName(), RS_ParseTechnologies(), and UP_GenerateArticlesSummary().

char* technology_s::image

Image to display in the Ufopedia and other menus for this tech. If not set in the .ufo file this is auto-set in RS_InitTree.

See also
cl_research.c: RS_InitTree

Definition at line 170 of file cp_research.h.

Referenced by AC_Init_f(), RS_GetDetails_f(), RS_InitTree(), and UP_Article().

techMail_t technology_s::mail[TECHMAIL_MAX]

UFOpaedia mails. See techMailType_t for the different array-entries.

Definition at line 194 of file cp_research.h.

Referenced by RS_InitTree(), RS_LoadXML(), RS_ParseTechnologies(), RS_SaveXML(), UP_GetUnreadMails(), UP_SetAllMailsRead_f(), and UP_SetMailHeader().

mailSentType_t technology_s::mailSent
markResearched_t technology_s::markResearched

Mark as researched at parsing state - but i only know the date if we already started a campaign.

Definition at line 187 of file cp_research.h.

Referenced by CP_ParseResearchedCampaignItems(), and RS_InitTree().

char* technology_s::mdl
int technology_s::numTechMails

Used to store which "mail" entry to display in pedia. if It's equal to TECHMAIL_MAX both mailtypes are available.

Definition at line 195 of file cp_research.h.

Referenced by RS_ParseTechnologies(), and UP_SetMailHeader().

float technology_s::overallTime
technologyDescriptions_t technology_s::preDescription

Descriptions of item before it's researched.

Definition at line 142 of file cp_research.h.

Referenced by RS_MarkOneResearchable(), RS_ParseTechnologies(), RS_ResearchFinish(), UP_Article(), and UP_TechGetsDisplayed().

date_t technology_s::preResearchedDate

Date for UFOpaedia. Research proposal.

Definition at line 184 of file cp_research.h.

Referenced by RS_LoadXML(), RS_MarkCollected(), RS_MarkOneResearchable(), RS_ResearchFinish(), RS_SaveXML(), and UP_SetMailHeader().

int technology_s::produceTime

How many hours the production of this items runs.

Definition at line 177 of file cp_research.h.

Referenced by PR_CalculateTotalFrames(), PR_ItemIsProduceable(), PR_ProductionListClick_f(), PR_QueueNew(), PR_UpdateProductionList(), RS_ScriptSanityCheck(), and TEST_F().

struct technology_s* technology_s::redirect

Set this to the entry that is supposed to get displayed instead of this one. Mostly used for e.g ammo that doesn't need its own description but rather the one for the weapon.

Definition at line 145 of file cp_research.h.

Referenced by RS_RequiredLinksAssign(), UP_FindEntry_f(), and UP_TechGetsDisplayed().

requirements_t technology_s::requireAND

A list of requirements that ALL need to be met (= AND-related) See struct above.

Definition at line 148 of file cp_research.h.

Referenced by RS_InitTree(), RS_ParseTechnologies(), RS_RequiredLinksAssign(), RS_RequirementsMet(), UP_DisplayTechTree(), and UP_TechTreeClick_f().

requirements_t technology_s::requireForProduction

A list of items that are needed (and used up) on production of this item. Only "item"-type is allowed. All requirements need to be fulfilled in order for one item to be produced. This check is done for each item.

Definition at line 179 of file cp_research.h.

Referenced by PR_AircraftInfo(), PR_DecreaseProduction(), PR_IncreaseProduction(), PR_ItemProductionInfo(), PR_ProductionIncrease_f(), PR_QueueDelete(), PR_QueueNew(), RS_ParseTechnologies(), and RS_RequiredLinksAssign().

requirements_t technology_s::requireOR

A list of requirements where ANY need to be met (= OR-related) See struct above.

Definition at line 149 of file cp_research.h.

Referenced by RS_InitTree(), RS_ParseTechnologies(), RS_RequiredLinksAssign(), and RS_RequirementsMet().

date_t technology_s::researchedDate

Date for UFOpaedia. Finished research.

Definition at line 185 of file cp_research.h.

Referenced by CP_CampaignRunMarket(), RS_LoadXML(), RS_ResearchFinish(), RS_SaveXML(), and UP_SetMailHeader().

bool technology_s::statusCollected

Did we loot any items of this tech? This is updated from the info stored in the requireOR and requireAND lists.

See also
RS_CheckCollected.

Definition at line 150 of file cp_research.h.

Referenced by RS_FillTechnologyList_f(), RS_LoadXML(), RS_MarkCollected(), and RS_SaveXML().

float technology_s::time

The time that is needed to research this tech. (in days). "overallTime" stays always the same, "time" will be modified when it is under research.

Definition at line 156 of file cp_research.h.

Referenced by AC_Init_f(), RS_FillTechnologyList_f(), RS_LoadXML(), RS_MarkCollected(), RS_MarkOneResearchable(), RS_MarkResearchable(), RS_ParseTechnologies(), RS_ResearchRun(), RS_SaveXML(), RS_ShowActiveResearch_f(), and TEST_F().

researchType_t technology_s::type

Defines what type this tech-entry is an where to search for other information "tech", "weapon" etc... see research.ufo for more

Definition at line 143 of file cp_research.h.

Referenced by RS_InitTree(), RS_ParseTechnologies(), RS_ResearchFinish(), RS_ScriptSanityCheck(), UP_Article(), and UP_TechGetsDisplayed().

struct pediaChapter_s* technology_s::upChapter

UFOpaedia chapter as stored in research.ufo.

Definition at line 190 of file cp_research.h.

Referenced by RS_ParseTechnologies(), UP_Article(), and UP_TechTreeClick_f().

struct technology_s* technology_s::upNext

Next tech in pedia.

Definition at line 192 of file cp_research.h.

Referenced by RS_ParseTechnologies(), UP_GenerateArticlesSummary(), and UP_GenerateSummary().

struct technology_s* technology_s::upPrev

Previous tech in pedia.

Definition at line 191 of file cp_research.h.

Referenced by RS_ParseTechnologies().


The documentation for this struct was generated from the following file: