mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Factorio: Filter bridged technologies correctly
Turns out, lua does not use regex, nor simple string matching, but its own invention.
This commit is contained in:
@@ -3,7 +3,7 @@ import typing
|
||||
|
||||
|
||||
class AssembleOptions(type):
|
||||
def __new__(cls, name, bases, attrs):
|
||||
def __new__(mcs, name, bases, attrs):
|
||||
options = attrs["options"] = {}
|
||||
name_lookup = attrs["name_lookup"] = {}
|
||||
for base in bases:
|
||||
@@ -17,7 +17,7 @@ class AssembleOptions(type):
|
||||
# apply aliases, without name_lookup
|
||||
options.update({name[6:].lower(): option_id for name, option_id in attrs.items() if
|
||||
name.startswith("alias_")})
|
||||
return super(AssembleOptions, cls).__new__(cls, name, bases, attrs)
|
||||
return super(AssembleOptions, mcs).__new__(mcs, name, bases, attrs)
|
||||
|
||||
|
||||
class Option(metaclass=AssembleOptions):
|
||||
|
Reference in New Issue
Block a user