1 |
In
september
a
method
was
added
that
iterates
over
all
factories.
It
does
so
by
selecting
units
that
are
'ploppable'
or
are
named
"striderhub".
Whenever
a
unit
is
selected
that
has
no
buildoptions
an
error
is
thrown.
|
1 |
In
September
a
method
was
added
that
iterates
over
all
factories.
It
does
so
by
selecting
all
units
that
are
'ploppable'
or
are
named
"striderhub".
When
the
iterated
unit
has
no
buildoptions
an
error
is
thrown.
|
2 |
\n
|
2 |
\n
|
3 |
So
that
change
formalized
the
assumption/assertion/expectation
that
'[only]
factories
are
ploppable'.
|
3 |
So,
that
change
formalized
the
assumption/assertion/expectation
that
'[only]
factories
are
ploppable'.
|
4 |
\n
|
4 |
\n
|
5 |
\n
|
5 |
\n
|
6 |
{{{
|
6 |
{{{
|
7 |
for name, ud in pairs(UnitDefs) do
|
7 |
for name, ud in pairs(UnitDefs) do
|
8 |
if ud.customparams.ploppable or name == "striderhub" then
|
8 |
if ud.customparams.ploppable or name == "striderhub" then
|
9 |
for i = 1, #ud.buildoptions do
|
9 |
for i = 1, #ud.buildoptions do
|
10 |
local unit = ud.buildoptions[i]
|
10 |
local unit = ud.buildoptions[i]
|
11 |
UnitDefs[unit].customparams.from_factory = name
|
11 |
UnitDefs[unit].customparams.from_factory = name
|
12 |
end
|
12 |
end
|
13 |
end
|
13 |
end
|
14 |
end}}}
|
14 |
end}}}
|
15 |
\n
|
15 |
\n
|
16 |
\n
|
16 |
\n
|
17 |
Try giving the detri buildoptions.
|
17 |
Try giving the detri buildoptions.
|