tests: restore remaining 'requires' data-key text in fixtures
This commit is contained in:
parent
4dc323f674
commit
b404f89e16
3 changed files with 6 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// tech {
|
||||
// name "IND_Waldo" family "IND" type P threat N group TORPS option_cost 1.2
|
||||
// requires_tech "TECH" | "GRP_<group>" -- prerequisite beyond the allows edge
|
||||
// requires "TECH" | "GRP_<group>" -- prerequisite beyond the allows edge
|
||||
// allows "CHILD RP:cost Human:% Zuul:% Hiver:% Tarkas:% Liir:% Morrigi:%"
|
||||
// strategy { inc TECHBEN_X dec TECHBEN_Y }
|
||||
// ship { section STEM ... } -- "new section" notice (not a build gate)
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ std::vector<Violation> Ruleset::validate(const Design& d) const {
|
|||
if (want->empty()) continue;
|
||||
if (!part->def || !iequals(part->def->stem, *want))
|
||||
add(v, "A8", Level::Error,
|
||||
m.stem + " requires_tech " + slot_str(part->slot) + " section " + *want + ", got " +
|
||||
m.stem + " requires " + slot_str(part->slot) + " section " + *want + ", got " +
|
||||
(part->def ? part->def->stem : std::string("none")),
|
||||
part->slot);
|
||||
}
|
||||
|
|
@ -366,7 +366,7 @@ std::vector<Violation> Ruleset::validate(const Design& d) const {
|
|||
}
|
||||
if (known && bank.weapon.empty())
|
||||
for (const std::string& t : w->requires_tech)
|
||||
if (!known->satisfies(cat.tech, t)) add(v, "C2", Level::Error, w->stem + " requires_tech " + t, p->slot, bi);
|
||||
if (!known->satisfies(cat.tech, t)) add(v, "C2", Level::Error, w->stem + " requires " + t, p->slot, bi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -403,9 +403,9 @@ std::vector<Violation> Ruleset::validate(const Design& d) const {
|
|||
if (!cat.tech.find(t) && !data::is_group_ref(t))
|
||||
add(v, "C1", Level::Warn, s.stem + " requires unknown tech " + t, p->slot);
|
||||
else if (known && !known->satisfies(cat.tech, t))
|
||||
add(v, "C1", gate, s.stem + " requires_tech " + t, p->slot);
|
||||
add(v, "C1", gate, s.stem + " requires " + t, p->slot);
|
||||
if (unobtainable(t, race))
|
||||
add(v, "C5", Level::Error, s.stem + " requires_tech " + t + ", which " + std::string(rk) + " can never research", p->slot);
|
||||
add(v, "C5", Level::Error, s.stem + " requires " + t + ", which " + std::string(rk) + " can never research", p->slot);
|
||||
}
|
||||
if (auto hct = hull_class_tech(s); hct && known && !known->satisfies(cat.tech, *hct))
|
||||
add(v, "C4", gate, s.stem + " is a " + fold(s.section_class_text) + " section; " + *hct + " not researched", p->slot);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ std::string de_armor(const char* extra = "") {
|
|||
|
||||
std::string de_fission(const char* drive) {
|
||||
return "shipsection { model c.X Section_Type Engine section_class Destroyer socket_fore EngineNode\n"
|
||||
" requires DRV_Fissn requires_tech " + std::string(drive) +
|
||||
" requires DRV_Fissn requires " + std::string(drive) +
|
||||
"\n health 450 mass 2500 cost 5000 cpoints 1380 engine_techera fission ftlspeed .2 nodespeed 4 range 9\n" +
|
||||
std::string(kArmorOptions) + " option DRV_RecFiss\n"
|
||||
" netforcelimits { force_forward 23000 force_right 23000 force_up 23000 torque_yaw 5 torque_pitch 5 torque_roll 5 speed 40 rotspeed 10 }\n" +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue