File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ def __str__(self):
103103]
104104
105105# TODO: When v2 comes around, remove siege machines from here
106- HOME_TROOP_ORDER = ELIXIR_TROOP_ORDER + SUPER_TROOP_ORDER + DARK_ELIXIR_TROOP_ORDER + SIEGE_MACHINE_ORDER
106+ HOME_TROOP_ORDER = ELIXIR_TROOP_ORDER + DARK_ELIXIR_TROOP_ORDER + \
107+ SIEGE_MACHINE_ORDER + SUPER_TROOP_ORDER
108+
107109
108110BUILDER_TROOPS_ORDER = [
109111 "Raged Barbarian" ,
Original file line number Diff line number Diff line change @@ -364,7 +364,10 @@ def home_troops(self) -> typing.List[Troop]:
364364 if not self ._home_troops :
365365 _ = self .troops
366366
367- return list (sorted (self ._home_troops .values (), key = lambda t : order .get (t .name , 0 )))
367+ return list (sorted (
368+ filter (lambda t : t .name in HOME_TROOP_ORDER , self ._home_troops .values ()),
369+ key = lambda t : order [t .name ]
370+ ))
368371
369372 @cached_property ("_cs_builder_troops" )
370373 def builder_troops (self ) -> typing .List [Troop ]:
You can’t perform that action at this time.
0 commit comments