#6705 closed defect (fixed)

GAIA woman requirement errors

Reported by: Langbart Owned by: Freagarach
Priority: Should Have Milestone: Alpha 27
Component: Simulation Keywords:
Cc: Patch:

Description

to reproduce

  • start a game with any civ, except Han
  • type exodia 1 or resign immediately
  • select a GAIA woman

errors

ERROR: Error calling component script function ScriptCall
 ERROR: JavaScript error: simulation/helpers/Requirements.js line 124
cmpTechManager is null
  RequirementsHelper.prototype.AllRequirementsMet@simulation/helpers/Requirements.js:124:6
  RequirementsHelper.prototype.AreRequirementsMet@simulation/helpers/Requirements.js:93:14
  GuiInterface.prototype.AreRequirementsMet@simulation/components/GuiInterface.js:667:50
  GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:2130:20
  setupButton@gui/session/selection_panels.js:169:34
  setupUnitPanel@gui/session/unit_commands.js:94:35
  updateUnitCommands@gui/session/unit_commands.js:152:18
  updateSelectionDetails@gui/session/selection_details.js:537:20
  updateGUIObjects@gui/session/session.js:730:2
  onSimulationUpdate@gui/session/session.js:680:2
  __eventhandler54 (SimulationUpdate)@session SimulationUpdate:1:1

bisect

[27245]

possible solution ?

  • binaries/data/mods/public/simulation/helpers/Requirements.js

    a b RequirementsHelper.prototype.AllRequirementsMet = function(template, cmpTechMana  
    121121        if (requirementType === "Techs")
    122122            for (const tech of requirement.split(" "))
    123123                if (tech[0] === "!" ? cmpTechManager.IsTechnologyResearched(tech.substring(1)) :
    124                     !cmpTechManager.IsTechnologyResearched(tech))
     124                    !cmpTechManager?.IsTechnologyResearched(tech))
    125125                    return false;
    126126    }
    127127    return true;

Attachments (1)

gaia_fem.png (299.4 KB ) - added by Langbart 16 months ago.

Download all attachments as: .zip

Change History (2)

by Langbart, 16 months ago

Attachment: gaia_fem.png added

comment:1 by Freagarach, 16 months ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 27480:

Fix comparing requirements for GAIA.

There was no check for cmpTechnologyManager in the comparing code.

Reported by: @Langbart
Fixes #6705

Note: See TracTickets for help on using tickets.