mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-07 13:21:49 +02:00
Issue #102: add preliminary variable processing.
This commit is contained in:
parent
dc54c47916
commit
d2e205fcaf
1 changed files with 9 additions and 1 deletions
|
@ -395,7 +395,15 @@ class Scheme:
|
|||
return Color(color)
|
||||
except (ValueError, AttributeError):
|
||||
logging.debug(f"Unknown color `{color}`.")
|
||||
return DEFAULT_COLOR
|
||||
return Color(self.colors["default"])
|
||||
|
||||
def get(self, variable_name: str):
|
||||
"""
|
||||
FIXME: colors should be variables.
|
||||
"""
|
||||
if variable_name in self.colors:
|
||||
return self.colors[variable_name]
|
||||
return 0.0
|
||||
|
||||
def is_no_drawable(self, key: str, value: str) -> bool:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue