diff options
author | Vadim Misbakh-Soloviov <mva@gentoo.org> | 2024-01-16 11:21:43 +0700 |
---|---|---|
committer | Vadim Misbakh-Soloviov <mva@gentoo.org> | 2024-01-16 11:24:30 +0700 |
commit | 4900137dde22ca34250c4de54fb1d2ec3e569170 (patch) | |
tree | a8b4737484d2c52fbaf68c80ce6986efb6745198 /games-strategy/unknown-horizons/files/unitmanager.patch | |
parent | games-engines/fifengine: fix build (diff) | |
download | gamerlay-4900137dde22ca34250c4de54fb1d2ec3e569170.tar.gz gamerlay-4900137dde22ca34250c4de54fb1d2ec3e569170.tar.bz2 gamerlay-4900137dde22ca34250c4de54fb1d2ec3e569170.zip |
Closes: https://bugs.gentoo.org/905123
Signed-off-by: Vadim Misbakh-Soloviov <mva@gentoo.org>
Diffstat (limited to 'games-strategy/unknown-horizons/files/unitmanager.patch')
-rw-r--r-- | games-strategy/unknown-horizons/files/unitmanager.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/games-strategy/unknown-horizons/files/unitmanager.patch b/games-strategy/unknown-horizons/files/unitmanager.patch new file mode 100644 index 0000000..901ea64 --- /dev/null +++ b/games-strategy/unknown-horizons/files/unitmanager.patch @@ -0,0 +1,20 @@ +--- a/horizons/ai/aiplayer/combat/unitmanager.py 2019-01-12 16:15:42.000000000 +0100 ++++ b/horizons/ai/aiplayer/combat/unitmanager.py 2022-09-04 03:17:12.660088944 +0200 +@@ -151,7 +151,7 @@ + """ + Rule stating that ship has to be in any of given states. + """ +- if not isinstance(ship_states, collections.Iterable): ++ if not isinstance(ship_states, collections.abc.Iterable): + ship_states = (ship_states,) + return lambda ship: (state_dict[ship] in ship_states) + +@@ -178,7 +178,7 @@ + @param rules: conditions each ship has to meet (AND) + @type rules: iterable of lambda(ship) or single lambda(ship) + """ +- if not isinstance(rules, collections.Iterable): ++ if not isinstance(rules, collections.abc.Iterable): + rules = (rules,) + return [ship for ship in ships if all((rule(ship) for rule in rules))] + |