|
UFO: Alien Invasion
|
Header for research related stuff. More...
#include "../../DateTime.h"

Go to the source code of this file.
Data Structures | |
| struct | requirement_t |
| union | requirement_t::typelink_t |
| struct | requirements_t |
| struct | markResearched_t |
| struct | techMail_t |
| available mails for a tech - mail and mail_pre in script files More... | |
| struct | technologyDescriptions_t |
| struct | technology_t |
| This is the technology parsed from research.ufo. More... | |
Macros | |
| #define | MAX_RESEARCHLIST 32 |
| #define | MAX_TECHNOLOGIES 256 |
| #define | MAX_TECHLINKS 16 |
| #define | MAX_DESCRIPTIONS 8 |
| #define | TECH_INVALID -1 |
| #define | ANTIMATTER_ITEM_ID "antimatter" |
| #define | RS_Collected_(tech) |
Enumerations | |
| enum | researchStatus_t { RS_NONE , RS_RUNNING , RS_PAUSED , RS_FINISH } |
| The status of a research (per tech). More... | |
| enum | researchType_t { RS_TECH , RS_WEAPON , RS_ARMOUR , RS_CRAFT , RS_CRAFTITEM , RS_BUILDING , RS_ALIEN , RS_UGV , RS_NEWS , RS_LOGIC } |
| Types of research topics. More... | |
| enum | requirementType_t { RS_LINK_TECH , RS_LINK_TECH_NOT , RS_LINK_ITEM , RS_LINK_ALIEN , RS_LINK_ALIEN_DEAD , RS_LINK_ALIEN_GLOBAL , RS_LINK_UFO , RS_LINK_ANTIMATTER , MAX_RS_LINKTYPES } |
| enum | techMailType_t { TECHMAIL_PRE , TECHMAIL_RESEARCHED , TECHMAIL_MAX } |
| Types for tech mail definitions - see tech->mail[]. More... | |
| enum | mailSentType_t { MAILSENT_NONE , MAILSENT_PROPOSAL , MAILSENT_FINISHED , MAILSENT_MAX } |
Functions | |
| void | RS_InitStartup (void) |
| This is more or less the initial Bind some of the functions in this file to console-commands that you can call ingame. Called from UI_InitStartup resp. CL_InitLocal. | |
| void | RS_ResetTechs (void) |
| This is called everytime RS_ParseTechnologies is called - to prevent cyclic hash tables. | |
| 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 technologies (technology_t). | |
| bool | RS_IsResearched_idx (int techIdx) |
| Checks if the technology (tech-index) has been researched. | |
| bool | RS_IsResearched_ptr (const technology_t *tech) |
| Checks whether an item is already researched. | |
| technology_t * | RS_GetTechForItem (const objDef_t *item) |
| Returns technology entry for an item. | |
| technology_t * | RS_GetTechForTeam (const teamDef_t *team) |
| Returns technology entry for a team. | |
| void | RS_AddObjectTechs (void) |
| void | RS_RequiredLinksAssign (void) |
| Assign Link pointers to all required techs/items/etc... | |
| void | RS_InitTree (const struct campaign_s *campaign, bool load) |
| const char * | RS_GetDescription (technologyDescriptions_t *desc) |
| returns the currently used description for a technology. | |
| void | RS_MarkCollected (technology_t *tech) __attribute__((nonnull)) |
| Marks a give technology as collected. | |
| void | RS_MarkResearchable (const struct base_s *base, bool init=false) |
| bool | RS_MarkStoryLineEventResearched (const char *techID) |
| void | RS_ResearchFinish (technology_t *tech) |
| Sets a technology status to researched and updates the date. | |
| void | RS_StopResearch (technology_t *tech) |
| Stops a research (Removes scientists from it). | |
| void | RS_MarkOneResearchable (technology_t *tech) |
| Marks one tech as researchable. | |
| void | RS_AssignScientist (technology_t *tech, struct base_s *base, Employee *employee=nullptr) |
| void | RS_RemoveScientist (technology_t *tech, Employee *employee) |
| Remove a scientist from a technology. | |
| void | RS_RemoveFiredScientist (struct base_s *base, Employee *employee) |
| void | RS_RemoveScientistsExceedingCapacity (struct base_s *base) |
| technology_t * | RS_GetTechByID (const char *id) |
| return a pointer to the technology identified by given id string | |
| technology_t * | RS_GetTechByProvided (const char *idProvided) |
| returns a pointer to the item tech (as listed in "provides") | |
| 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. | |
| technology_t * | RS_GetTechWithMostScientists (const struct base_s *base) |
| Searches for the technology that has the most scientists assigned in a given base. | |
| int | RS_GetTechIdxByName (const char *name) |
| Returns the index (idx) of a "tech" entry given it's name. | |
| int | RS_CountScientistsInBase (const struct base_s *base) |
| bool | RS_ScriptSanityCheck (void) |
| Checks the parsed tech data for errors. | |
| void | UP_AircraftDescription (const technology_t *t) |
| Prints the UFOpaedia description for aircraft. | |
| void | UP_UGVDescription (const struct ugv_s *ugvType) |
| void | RS_CheckRequirements (void) |
| Checks if running researches still meet their requirements. | |
| bool | RS_RequirementsMet (const technology_t *tech, const struct base_s *base) |
Header for research related stuff.
Definition in file cp_research.h.
| #define ANTIMATTER_ITEM_ID "antimatter" |
Definition at line 37 of file cp_research.h.
Referenced by AIR_Refuel(), B_AddAntimatter(), B_AntimatterInBase(), B_ItemIsStoredInBaseStorage(), B_UpdateAntimatterCap(), PR_FinishDisassembly(), PR_RequirementsInfo(), TR_Add_f(), TR_CargoList(), TR_FillItems(), and TR_List_f().
| #define MAX_DESCRIPTIONS 8 |
Maximum number of descriptions (per tech and description-type).
Definition at line 33 of file cp_research.h.
Referenced by RS_ParseTechnologies().
| #define MAX_RESEARCHLIST 32 |
Definition at line 30 of file cp_research.h.
| #define MAX_TECHLINKS 16 |
Maximum number of requirements in a technology (i.e in requireAND and requireOR).
Definition at line 32 of file cp_research.h.
Referenced by RS_ParseTechnologies().
| #define MAX_TECHNOLOGIES 256 |
Maximum number of technologies overall.
Definition at line 31 of file cp_research.h.
Referenced by AII_GetCraftitemTechsByType(), RS_IsValidTechIndex(), and RS_ParseTechnologies().
| #define RS_Collected_ | ( | tech | ) |
Definition at line 203 of file cp_research.h.
Referenced by UP_AircraftDescription(), UP_Article(), UP_TechGetsDisplayed(), and UP_UGVDescription().
| #define TECH_INVALID -1 |
The value for an "undef" tech-index.
Definition at line 35 of file cp_research.h.
Referenced by RS_GetTechIdxByName(), and RS_IsValidTechIndex().
| enum mailSentType_t |
| Enumerator | |
|---|---|
| MAILSENT_NONE | No mail sent yet. |
| MAILSENT_PROPOSAL | Mail for research proposal already send. |
| MAILSENT_FINISHED | Mail for finished research sent (and maybe the previous as well). |
| MAILSENT_MAX | |
Definition at line 122 of file cp_research.h.
| enum requirementType_t |
| Enumerator | |
|---|---|
| RS_LINK_TECH | |
| RS_LINK_TECH_NOT | |
| RS_LINK_ITEM | |
| RS_LINK_ALIEN | |
| RS_LINK_ALIEN_DEAD | |
| RS_LINK_ALIEN_GLOBAL | |
| RS_LINK_UFO | |
| RS_LINK_ANTIMATTER | |
| MAX_RS_LINKTYPES | |
Definition at line 61 of file cp_research.h.
| enum researchStatus_t |
The status of a research (per tech).
| Enumerator | |
|---|---|
| RS_NONE | |
| RS_RUNNING | |
| RS_PAUSED | |
| RS_FINISH | |
Definition at line 40 of file cp_research.h.
| enum researchType_t |
Types of research topics.
| Enumerator | |
|---|---|
| RS_TECH | |
| RS_WEAPON | |
| RS_ARMOUR | |
| RS_CRAFT | |
| RS_CRAFTITEM | |
| RS_BUILDING | |
| RS_ALIEN | |
| RS_UGV | |
| RS_NEWS | |
| RS_LOGIC | |
Definition at line 48 of file cp_research.h.
| enum techMailType_t |
Types for tech mail definitions - see tech->mail[].
| Enumerator | |
|---|---|
| TECHMAIL_PRE | this is a mail_pre (proposal) definition |
| TECHMAIL_RESEARCHED | this is the mail definition (after research was completed) |
| TECHMAIL_MAX | |
Definition at line 99 of file cp_research.h.
| void RS_AssignScientist | ( | technology_t * | tech, |
| struct base_s * | base, | ||
| Employee * | employee = nullptr ) |
Checks if running researches still meet their requirements.
Definition at line 790 of file cp_research.cpp.
References _, technology_t::base, ccs, Com_sprintf(), cp_messageBuffer, i, MSG_RESEARCH_HALTED, MSO_CheckAddNewMessage(), technology_t::name, NT_RESEARCH_HALTED, RS_GetTechByIDX(), RS_RequirementsMet(), RS_RUNNING, RS_StopResearch(), and technology_t::statusResearch.
Referenced by US_RemoveStoredUFO().
| int RS_CountScientistsInBase | ( | const struct base_s * | base | ) |
| const char * RS_GetDescription | ( | technologyDescriptions_t * | desc | ) |
returns the currently used description for a technology.
| [in,out] | desc | A list of possible descriptions (with tech-links that decide which one is the correct one) |
< Stored used description
Definition at line 271 of file cp_research.cpp.
References i, technologyDescriptions_t::numDescriptions, RS_GetTechByID(), RS_IsResearched_ptr(), technologyDescriptions_t::tech, technologyDescriptions_t::text, and technologyDescriptions_t::usedDescription.
Referenced by RS_MarkOneResearchable(), RS_ResearchFinish(), and UP_Article().
| technology_t * RS_GetTechByID | ( | const char * | id | ) |
return a pointer to the technology identified by given id string
| [in] | id | Unique identifier of the tech as defined in the research.ufo file (e.g. "tech xxxx"). |
Definition at line 1603 of file cp_research.cpp.
References cgi, Com_HashKey(), hash, technology_t::hashNext, technology_t::id, Q_strcasecmp, Q_strnull(), TECH_HASH_SIZE, and techHash.
Referenced by AIM_AutoEquipAircraft(), AIR_ParseAircraft(), B_BuildingScriptSanityCheck(), BDEF_BaseDefenceMenuUpdate_f(), CP_AddTechAsResearchable_f(), CP_CheckTriggerEvent(), CP_GetEventsByID(), CP_ParseCampaignData(), CP_XVIInit(), AlienContainment::isLifeSupported(), MS_LoadXML(), RS_AssignTechLinks(), RS_Change_f(), RS_GetDescription(), RS_GetDetails_f(), RS_LoadXML(), RS_MarkStoryLineEventResearched(), RS_Max_f(), RS_RequiredLinksAssign(), RS_Stop_f(), TEST_F(), TEST_F(), and UP_FindEntry_f().
| technology_t * RS_GetTechByIDX | ( | int | techIdx | ) |
Returns the technology pointer for a tech index. You can use this instead of "&ccs.technologies[techIdx]" to avoid having to check valid indices.
| [in] | techIdx | Index in the global ccs.technologies[] array. |
Definition at line 1590 of file cp_research.cpp.
References ccs, and RS_IsValidTechIndex().
Referenced by AIM_AircraftEquipMenuClick_f(), CP_ParseResearchableCampaignStates(), CP_ParseResearchedCampaignItems(), RS_CheckRequirements(), RS_FillTechnologyList_f(), RS_GetTechWithMostScientists(), RS_MarkResearchable(), RS_RequiredLinksAssign(), RS_ResearchRun(), RS_SaveXML(), and RS_ShowActiveResearch_f().
| technology_t * RS_GetTechByProvided | ( | const char * | idProvided | ) |
returns a pointer to the item tech (as listed in "provides")
| [in] | idProvided | Unique identifier of the object the tech is providing |
Definition at line 1622 of file cp_research.cpp.
References cgi, Com_HashKey(), DEBUG_CLIENT, hash, technology_t::hashProvidedNext, technology_t::provides, Q_strcasecmp, TECH_HASH_SIZE, and techHashProvided.
Referenced by AII_LoadOneSlotXML(), AIRFIGHT_LoadXML(), B_ParseBuildings(), BS_FillMarket_f(), BS_MarketInfoClick_f(), GAME_CP_GetItemModel(), INS_LinkTechnologies(), RS_InitTree(), UFO_GetTechnologyFromType(), and UP_UGVDescription().
| technology_t * RS_GetTechForItem | ( | const objDef_t * | item | ) |
Returns technology entry for an item.
| [in] | item | Pointer to the item (object) definition |
Definition at line 456 of file cp_research.cpp.
References ccs, cgi, ERR_DROP, objDef_t::id, objDef_t::idx, and lengthof.
Referenced by AII_AutoAddAmmo(), AII_CarriedItems(), AII_GetCraftitemTechsByType(), AIM_AircraftEquipMenuUpdate(), AIM_DrawAircraftSlots(), B_AddToStorage(), B_SellOrAddItems(), BDEF_AddSlotToSlotList(), BS_FillMarket_f(), BS_InitMarket(), BS_SetAutosell_f(), CP_AddItemAsCollected_f(), CP_CampaignRunMarket(), GAME_CP_ItemIsUseable(), PR_FinishDisassembly(), PR_GetTech(), PR_ItemIsProduceable(), PR_ItemProductionInfo(), PR_ProductionListClick_f(), PR_ProductionListRightClick_f(), PR_RequirementsInfo(), PR_UpdateProductionList(), TEST_F(), UP_AircraftItemDescription(), UP_DrawAssociatedAmmo(), and UP_ResearchedLinkClick_f().
| technology_t * RS_GetTechForTeam | ( | const teamDef_t * | team | ) |
Returns technology entry for a team.
| [in] | team | Pointer to the team definition |
Definition at line 471 of file cp_research.cpp.
References ccs, cgi, ERR_DROP, teamDef_t::id, teamDef_t::idx, and lengthof.
Referenced by AC_Init_f(), AC_KillOne_f(), and AlienContainment::add().
| int RS_GetTechIdxByName | ( | const char * | name | ) |
Returns the index (idx) of a "tech" entry given it's name.
| [in] | name | the name of the tech |
Definition at line 1670 of file cp_research.cpp.
References cgi, Com_HashKey(), hash, technology_t::hashNext, technology_t::id, technology_t::idx, name, Q_strcasecmp, TECH_HASH_SIZE, TECH_INVALID, and techHash.
| technology_t * RS_GetTechWithMostScientists | ( | const struct base_s * | base | ) |
Searches for the technology that has the most scientists assigned in a given base.
| [in] | base | In what base the tech should be researched. |
Definition at line 1645 of file cp_research.cpp.
References technology_t::base, ccs, i, RS_GetTechByIDX(), RS_RUNNING, technology_t::scientists, and technology_t::statusResearch.
Referenced by RS_RemoveFiredScientist(), and RS_RemoveScientistsExceedingCapacity().
This is more or less the initial Bind some of the functions in this file to console-commands that you can call ingame. Called from UI_InitStartup resp. CL_InitLocal.
Definition at line 1069 of file cp_research.cpp.
References cgi.
Referenced by CP_InitStartup().
| void RS_InitTree | ( | const struct campaign_s * | campaign, |
| bool | load ) |
| bool RS_IsResearched_idx | ( | int | techIdx | ) |
Checks if the technology (tech-index) has been researched.
| [in] | techIdx | index of the technology. |
true if the technology has been researched, otherwise (or on error) false; Definition at line 1561 of file cp_research.cpp.
References ccs, RS_FINISH, and RS_IsValidTechIndex().
| bool RS_IsResearched_ptr | ( | const technology_t * | tech | ) |
Checks whether an item is already researched.
Definition at line 1577 of file cp_research.cpp.
References RS_FINISH, and technology_t::statusResearch.
Referenced by AC_Init_f(), AIM_CheckTechnologyIntoSlot(), AIM_CrafttypeFilter(), AIM_SelectableCraftItem(), B_ListBuildings_f(), B_SellOrAddItems(), BDEF_BaseDefenceMenuUpdate_f(), BS_FillMarket_f(), BS_InitMarket(), BS_SetAutosell_f(), CP_CampaignRunMarket(), CP_CheckTriggerEvent(), CP_IsXVIVisible(), GAME_CP_ItemIsUseable(), GAME_CP_TeamIsKnown(), GEO_DrawMarkers(), INS_FillTypes_f(), INS_SelectType_f(), AlienContainment::isLifeSupported(), PR_ProductionListClick_f(), PR_ProductionListRightClick_f(), PR_RequirementsMet(), PR_UpdateProductionList(), RS_GetDescription(), RS_MarkStoryLineEventResearched(), RS_RequirementsMet(), TR_DestinationCapacityList_f(), UFO_GetName(), UP_AircraftDescription(), UP_AircraftItemDescription(), UP_Article(), UP_GetUnreadMails(), UP_TechGetsDisplayed(), and UP_UGVDescription().
| void RS_MarkCollected | ( | technology_t * | tech | ) |
Marks a give technology as collected.
| [in] | tech | The technology pointer to mark collected |
Definition at line 305 of file cp_research.cpp.
References _, ccs, Com_sprintf(), cp_messageBuffer, DateTime::getDateAsDays(), technology_t::mailSent, MAILSENT_FINISHED, MAILSENT_PROPOSAL, MSG_RESEARCH_PROPOSAL, MSO_CheckAddNewMessage(), technology_t::name, NT_RESEARCH_PROPOSED, technology_t::preResearchedDate, RS_FINISH, technology_t::statusCollected, technology_t::statusResearch, and technology_t::time.
Referenced by AlienContainment::add(), AII_CarriedItems(), B_SellOrAddItems(), CP_AddItemAsCollected_f(), PR_FinishDisassembly(), UR_ProcessActive(), and US_StoreUFO().
| void RS_MarkOneResearchable | ( | technology_t * | tech | ) |
Marks one tech as researchable.
| tech | The technology to be marked. |
At this point we define what research proposal description is used when displayed. (i.e. "usedDescription" is set here). That's because this is the first the player will see anything from the tech and any later changes may make the content (proposal) of the tech inconsistent for the player.
Definition at line 107 of file cp_research.cpp.
References _, ccs, cgi, Com_sprintf(), cp_messageBuffer, DEBUG_CLIENT, DateTime::getDateAsDays(), technology_t::id, technology_t::mailSent, MAILSENT_FINISHED, MAILSENT_PROPOSAL, MSG_RESEARCH_PROPOSAL, MSO_CheckAddNewMessage(), technology_t::name, NT_RESEARCH_PROPOSED, technology_t::preDescription, technology_t::preResearchedDate, RS_GetDescription(), technology_t::statusResearchable, and technology_t::time.
Referenced by CP_AddTechAsResearchable_f(), CP_ParseResearchableCampaignStates(), RS_MarkResearchable(), and TEST_F().
| void RS_MarkResearchable | ( | const struct base_s * | base, |
| bool | init = false ) |
| bool RS_MarkStoryLineEventResearched | ( | const char * | techID | ) |
Pick a random base to research a story line event tech
| techID | The event technology script id to research |
Definition at line 774 of file cp_research.cpp.
References B_GetNext(), RS_GetTechByID(), RS_IsResearched_ptr(), and RS_MarkResearched().
Referenced by CP_CheckCampaignEvents().
| 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 technologies (technology_t).
| [in] | name | Unique id of a technology_t. This is parsed from "tech xxx" -> id=xxx |
| [in] | text | the whole following text that is part of the "tech" item definition in research.ufo. |
Definition at line 1134 of file cp_research.cpp.
References _, requirement_t::amount, ccs, cgi, Com_HashKey(), Com_Parse(), cp_campaignPool, linkedList_t::data, DEBUG_CLIENT, technology_t::description, ERR_DROP, hash, technology_t::hashNext, technology_t::hashProvidedNext, i, requirement_t::id, technology_t::id, technology_t::idx, requirements_t::links, technology_t::mail, MAX_DESCRIPTIONS, MAX_TECHLINKS, MAX_TECHNOLOGIES, techMail_t::model, name, linkedList_t::next, technologyDescriptions_t::numDescriptions, requirements_t::numLinks, technology_t::numTechMails, OBJZERO, technology_t::overallTime, technology_t::preDescription, technology_t::provides, Q_streq, redirectedTechs, technology_t::requireAND, technology_t::requireForProduction, technology_t::requireOR, RS_ALIEN, RS_ARMOUR, RS_BUILDING, RS_CRAFT, RS_CRAFTITEM, RS_LINK_ALIEN, RS_LINK_ALIEN_DEAD, RS_LINK_ALIEN_GLOBAL, RS_LINK_ANTIMATTER, RS_LINK_ITEM, RS_LINK_TECH, RS_LINK_TECH_NOT, RS_LINK_UFO, RS_LOGIC, RS_NEWS, RS_NONE, RS_TECH, RS_UGV, RS_WEAPON, technology_t::statusResearch, technology_t::statusResearchable, Sys_Error(), technologyDescriptions_t::tech, TECH_HASH_SIZE, techHash, techHashProvided, TECHMAIL_MAX, TECHMAIL_PRE, TECHMAIL_RESEARCHED, technologyDescriptions_t::text, technology_t::time, requirement_t::type, technology_t::type, technology_t::upChapter, technology_t::upNext, technology_t::upPrev, technologyDescriptions_t::usedDescription, valid_tech_vars, and valid_techmail_vars.
Referenced by CP_ParseScriptFirst().
| void RS_RemoveScientist | ( | technology_t * | tech, |
| Employee * | employee ) |
Remove a scientist from a technology.
| [in] | tech | The technology you want to remove the scientist from. |
| [in] | employee | Employee you want to remove (nullptr if you don't care which one should be removed). |
Definition at line 695 of file cp_research.cpp.
References technology_t::base, CAP_AddCurrent(), CAP_LABSPACE, cgi, E_GetAssignedEmployee(), EMPL_SCIENTIST, RS_PAUSED, technology_t::scientists, Employee::setAssigned(), and technology_t::statusResearch.
Referenced by RS_Change_f(), RS_RemoveFiredScientist(), RS_RemoveScientistsExceedingCapacity(), and RS_StopResearch().
Assign Link pointers to all required techs/items/etc...
< Use this so we do not change the original redirectedTechs pointer.
Definition at line 420 of file cp_research.cpp.
References ccs, cgi, linkedList_t::data, i, linkedList_t::next, requirements_t::numLinks, technology_t::redirect, redirectedTechs, technology_t::requireAND, technology_t::requireForProduction, technology_t::requireOR, RS_AssignTechLinks(), RS_GetTechByID(), and RS_GetTechByIDX().
Referenced by CP_ParseCampaignData().
| bool RS_RequirementsMet | ( | const technology_t * | tech, |
| const struct base_s * | base ) |
| void RS_ResearchFinish | ( | technology_t * | tech | ) |
Sets a technology status to researched and updates the date.
| [in] | tech | The technology that was researched. |
At this point we define what research-report description is used when displayed. (i.e. "usedDescription" is set here). That's because this is the first the player will see the research result and any later changes may make the content inconsistent for the player.
Definition at line 52 of file cp_research.cpp.
References _, technology_t::announce, ccs, cgi, Com_sprintf(), cp_messageBuffer, technology_t::description, technology_t::finishedResearchEvent, technology_t::id, technology_t::mailSent, MAILSENT_FINISHED, MSG_RESEARCH_FINISHED, MSO_CheckAddNewMessage(), technology_t::name, NT_RESEARCH_COMPLETED, technology_t::preDescription, technology_t::preResearchedDate, technology_t::researchedDate, RS_FINISH, RS_GetDescription(), RS_LOGIC, RS_StopResearch(), technology_t::statusResearch, technology_t::statusResearchable, technology_t::type, UP_OpenWith(), and technologyDescriptions_t::usedDescription.
Referenced by RS_InitTree(), RS_MarkResearchable(), and RS_MarkResearched().
Checks the research status.
Definition at line 814 of file cp_research.cpp.
References _, technology_t::base, ccs, Com_sprintf(), cp_messageBuffer, i, MSG_RESEARCH_HALTED, MSO_CheckAddNewMessage(), technology_t::name, NT_RESEARCH_HALTED, RS_GetTechByIDX(), RS_MarkResearched(), RS_RequirementsMet(), RS_ResearchAllowed(), RS_RUNNING, RS_StopResearch(), technology_t::scientists, technology_t::statusResearch, and technology_t::time.
Referenced by CP_CampaignRun(), and TEST_F().
This is called everytime RS_ParseTechnologies is called - to prevent cyclic hash tables.
Definition at line 1083 of file cp_research.cpp.
References cgi, OBJZERO, redirectedTechs, techHash, and techHashProvided.
Referenced by CP_ResetCampaignData().
| bool RS_ScriptSanityCheck | ( | void | ) |
Checks the parsed tech data for errors.
Definition at line 1850 of file cp_research.cpp.
References ccs, cgi, technology_t::description, i, technology_t::id, technology_t::name, technology_t::produceTime, technology_t::provides, RS_ALIEN, RS_BUILDING, RS_LOGIC, RS_NEWS, RS_TECH, technologyDescriptions_t::text, and technology_t::type.
| void RS_StopResearch | ( | technology_t * | tech | ) |
Stops a research (Removes scientists from it).
| [in] | tech | The technology that is being researched. |
Definition at line 94 of file cp_research.cpp.
References RS_RemoveScientist(), and technology_t::scientists.
Referenced by B_AddToStorage(), RS_CheckRequirements(), RS_ResearchFinish(), RS_ResearchRun(), and RS_Stop_f().
| void UP_AircraftDescription | ( | const technology_t * | tech | ) |
Prints the UFOpaedia description for aircraft.
Definition at line 323 of file cp_ufopedia.cpp.
References _, AIR_AircraftMenuStatsValues(), AIR_GetAircraft(), AIR_GetHangarCapacityType(), AIR_GetOperationRange(), AIR_IsUFO, AIR_STATS_ACCURACY, AIR_STATS_ANTIMATTER, AIR_STATS_DAMAGE, AIR_STATS_FUELSIZE, AIR_STATS_MAX, AIR_STATS_MAXSPEED, AIR_STATS_SPEED, B_GetBuildingTemplateByType(), B_GetBuildingTypeByCapacity(), cgi, Com_sprintf(), i, aircraft_t::maxElectronics, aircraft_t::maxTeamSize, aircraft_t::maxWeapons, building_t::name, technology_t::provides, Q_strcat(), RS_Collected_, RS_IsResearched_ptr(), aircraft_t::stats, TEXT_ITEMDESCRIPTION, UP_AircraftStatToName(), UP_DisplayTechTree(), and upBuffer.
Referenced by BS_MarketAircraftDescription(), and UP_Article().
| void UP_UGVDescription | ( | const struct ugv_s * | ugvType | ) |
Referenced by BS_ShowInfo_f().