Project

General

Profile

Bug #823695

HutTech unit flag

Added by Alexandro Ignatiev about 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

common/unittype.h, all current branches with just different numbers:

/* can be found in hut, global tech required */
#define SPECENUM_VALUE80 L_HUT_TECH
#define SPECENUM_VALUE80NAME N_("?unitflag:HutTech")

In fact, the unit is given in default.lua by
  local owner = unit.owner
  local type = find.role_unit_type('HutTech', owner)

while the method is
Unit_Type *api_find_role_unit_type(lua_State *L, const char *role_name,
                                   Player *pplayer)
{// ...
  if (pplayer) {
    return best_role_unit_for_player(pplayer, role_or_flag);
  }//...
}

that in fact requires that the player, not anybody, can build the unit. Either the comment should be corrected or we should give a unit using somehow find_a_unit_type(role, role_tech).

History

#1 Updated by Marko Lindqvist 10 months ago

  • Category set to General
  • Status changed from New to In Progress

Ruleset documentation say just that tech is required, not promising that global tech would be enough. So the comment seems to be what is in error here.

#3 Updated by Marko Lindqvist 10 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF