UFO: Alien Invasion
Loading...
Searching...
No Matches
technology_t Struct Reference

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

#include <cp_research.h>

Collaboration diagram for technology_t:
Collaboration graph

Data Fields

char * id
int idx
char * name
technologyDescriptions_t description
technologyDescriptions_t preDescription
researchType_t type
struct technology_s * redirect
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_s * base
int scientists
char * image
char * mdl
bool statusResearchable
int produceTime
mailSentType_t mailSent
requirements_t requireForProduction
class DateTime preResearchedDate
class DateTime researchedDate
markResearched_t markResearched
struct pediaChapter_s * upChapter
struct technology_s * upPrev
struct technology_s * upNext
techMail_t mail [TECHMAIL_MAX]
int numTechMails
struct technology_s * hashNext
struct technology_s * hashProvidedNext

Detailed Description

This is the technology parsed from research.ufo.

Definition at line 139 of file cp_research.h.

Field Documentation

◆ announce

bool technology_t::announce

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

Definition at line 167 of file cp_research.h.

Referenced by RS_ResearchFinish().

◆ base

◆ delay

int technology_t::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 161 of file cp_research.h.

◆ description

technologyDescriptions_t technology_t::description

Descriptions of researched item.

Definition at line 143 of file cp_research.h.

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

◆ finishedResearchEvent

char* technology_t::finishedResearchEvent

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

Definition at line 166 of file cp_research.h.

Referenced by RS_ResearchFinish().

◆ hashNext

struct technology_s* technology_t::hashNext

Definition at line 199 of file cp_research.h.

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

◆ hashProvidedNext

struct technology_s* technology_t::hashProvidedNext

Definition at line 200 of file cp_research.h.

Referenced by RS_GetTechByProvided(), and RS_ParseTechnologies().

◆ id

◆ idx

int technology_t::idx

Self-link in the global list

Definition at line 141 of file cp_research.h.

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

◆ image

char* technology_t::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 172 of file cp_research.h.

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

◆ mail

techMail_t technology_t::mail[TECHMAIL_MAX]

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

Definition at line 196 of file cp_research.h.

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

◆ mailSent

mailSentType_t technology_t::mailSent

◆ markResearched

markResearched_t technology_t::markResearched

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

Definition at line 189 of file cp_research.h.

Referenced by CP_ParseResearchedCampaignItems(), and RS_InitTree().

◆ mdl

char* technology_t::mdl

◆ name

◆ numTechMails

int technology_t::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 197 of file cp_research.h.

Referenced by RS_ParseTechnologies(), and UP_SetMailHeader().

◆ overallTime

float technology_t::overallTime

◆ preDescription

technologyDescriptions_t technology_t::preDescription

Descriptions of item before it's researched.

Definition at line 144 of file cp_research.h.

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

◆ preResearchedDate

class DateTime technology_t::preResearchedDate

Date for UFOpaedia. Research proposal.

Definition at line 186 of file cp_research.h.

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

◆ produceTime

int technology_t::produceTime

How many hours the production of this items runs.

Definition at line 179 of file cp_research.h.

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

◆ provides

◆ redirect

struct technology_s* technology_t::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 147 of file cp_research.h.

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

◆ requireAND

requirements_t technology_t::requireAND

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

Definition at line 150 of file cp_research.h.

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

◆ requireForProduction

requirements_t technology_t::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 181 of file cp_research.h.

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

◆ requireOR

requirements_t technology_t::requireOR

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

Definition at line 151 of file cp_research.h.

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

◆ researchedDate

class DateTime technology_t::researchedDate

Date for UFOpaedia. Finished research.

Definition at line 187 of file cp_research.h.

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

◆ scientists

◆ statusCollected

bool technology_t::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 152 of file cp_research.h.

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

◆ statusResearch

◆ statusResearchable

◆ time

float technology_t::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 158 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().

◆ type

researchType_t technology_t::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 145 of file cp_research.h.

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

◆ upChapter

struct pediaChapter_s* technology_t::upChapter

UFOpaedia chapter as stored in research.ufo.

Definition at line 192 of file cp_research.h.

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

◆ upNext

struct technology_s* technology_t::upNext

Next tech in pedia.

Definition at line 194 of file cp_research.h.

Referenced by RS_ParseTechnologies(), and UP_GenerateArticlesSummary().

◆ upPrev

struct technology_s* technology_t::upPrev

Previous tech in pedia.

Definition at line 193 of file cp_research.h.

Referenced by RS_ParseTechnologies().


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