zombie-escape 1.8.0__py3-none-any.whl → 1.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Toshihiro Kamiya <kamiya@mbj.nifty.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "1.8.0"
4
+ __version__ = "1.10.1"
zombie_escape/colors.py CHANGED
@@ -23,6 +23,8 @@ class EnvironmentPalette:
23
23
 
24
24
  floor_primary: tuple[int, int, int]
25
25
  floor_secondary: tuple[int, int, int]
26
+ fall_zone_primary: tuple[int, int, int]
27
+ fall_zone_secondary: tuple[int, int, int]
26
28
  outside: tuple[int, int, int]
27
29
  inner_wall: tuple[int, int, int]
28
30
  inner_wall_border: tuple[int, int, int]
@@ -41,6 +43,7 @@ def _adjust_color(
41
43
 
42
44
  r, g, b = color
43
45
  gray = 0.2126 * r + 0.7152 * g + 0.0722 * b
46
+
44
47
  def mix(component: int) -> int:
45
48
  value = gray + (component - gray) * saturation
46
49
  value *= brightness
@@ -57,6 +60,8 @@ DAWN_AMBIENT_PALETTE_KEY = "dawn"
57
60
  _DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
58
61
  floor_primary=(43, 57, 70),
59
62
  floor_secondary=(50, 64, 79),
63
+ fall_zone_primary=(84, 48, 29),
64
+ fall_zone_secondary=(94, 54, 32),
60
65
  outside=(32, 60, 40),
61
66
  inner_wall=(125, 101, 78),
62
67
  inner_wall_border=(136, 110, 85),
@@ -67,31 +72,47 @@ _DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
67
72
  # Dark, desaturated palette that sells the "alone without a flashlight" vibe.
68
73
  _GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
69
74
  floor_primary=_adjust_color(
70
- _DEFAULT_ENVIRONMENT_PALETTE.floor_primary, brightness=0.725, saturation=0.675
75
+ _DEFAULT_ENVIRONMENT_PALETTE.floor_primary, brightness=0.8, saturation=0.75
71
76
  ),
72
77
  floor_secondary=_adjust_color(
73
- _DEFAULT_ENVIRONMENT_PALETTE.floor_secondary, brightness=0.74, saturation=0.65
78
+ _DEFAULT_ENVIRONMENT_PALETTE.floor_secondary, brightness=0.8, saturation=0.75
79
+ ),
80
+ fall_zone_primary=_adjust_color(
81
+ _DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary,
82
+ brightness=0.8,
83
+ saturation=0.75,
84
+ ),
85
+ fall_zone_secondary=_adjust_color(
86
+ _DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary,
87
+ brightness=0.8,
88
+ saturation=0.75,
74
89
  ),
75
90
  outside=_adjust_color(
76
- _DEFAULT_ENVIRONMENT_PALETTE.outside, brightness=0.7, saturation=0.625
91
+ _DEFAULT_ENVIRONMENT_PALETTE.outside, brightness=0.8, saturation=0.75
77
92
  ),
78
93
  inner_wall=_adjust_color(
79
- _DEFAULT_ENVIRONMENT_PALETTE.inner_wall, brightness=0.775, saturation=0.7
94
+ _DEFAULT_ENVIRONMENT_PALETTE.inner_wall, brightness=0.8, saturation=0.75
80
95
  ),
81
96
  inner_wall_border=_adjust_color(
82
- _DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border, brightness=0.775, saturation=0.7
97
+ _DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border,
98
+ brightness=0.8,
99
+ saturation=0.75,
83
100
  ),
84
101
  outer_wall=_adjust_color(
85
- _DEFAULT_ENVIRONMENT_PALETTE.outer_wall, brightness=0.75, saturation=0.675
102
+ _DEFAULT_ENVIRONMENT_PALETTE.outer_wall, brightness=0.8, saturation=0.75
86
103
  ),
87
104
  outer_wall_border=_adjust_color(
88
- _DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border, brightness=0.75, saturation=0.675
105
+ _DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
106
+ brightness=0.8,
107
+ saturation=0.75,
89
108
  ),
90
109
  )
91
110
 
92
111
  _DAWN_ENVIRONMENT_PALETTE = EnvironmentPalette(
93
112
  floor_primary=(58, 70, 84),
94
113
  floor_secondary=(66, 78, 92),
114
+ fall_zone_primary=(84, 39, 29),
115
+ fall_zone_secondary=(95, 44, 33),
95
116
  outside=(118, 140, 104),
96
117
  inner_wall=(125, 101, 78),
97
118
  inner_wall_border=(136, 110, 85),
@@ -111,30 +132,42 @@ def get_environment_palette(key: str | None) -> EnvironmentPalette:
111
132
 
112
133
  if not key:
113
134
  return ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
114
- return ENVIRONMENT_PALETTES.get(key, ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY])
135
+ return ENVIRONMENT_PALETTES.get(
136
+ key, ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
137
+ )
115
138
 
116
139
 
117
140
  def ambient_palette_key_for_flashlights(count: int) -> str:
118
141
  """Return the palette key for the provided flashlight inventory count."""
119
142
 
120
143
  return (
121
- DEFAULT_AMBIENT_PALETTE_KEY
122
- if max(0, count) > 0
123
- else NO_FLASHLIGHT_PALETTE_KEY
144
+ DEFAULT_AMBIENT_PALETTE_KEY if max(0, count) > 0 else NO_FLASHLIGHT_PALETTE_KEY
124
145
  )
125
146
 
126
147
 
127
148
  # World colors (default palette versions preserved for backwards compatibility).
128
149
  INTERNAL_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.inner_wall
129
- INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border
150
+ INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] = (
151
+ _DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border
152
+ )
130
153
  OUTER_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outer_wall
131
- OUTER_WALL_BORDER_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border
154
+ OUTER_WALL_BORDER_COLOR: tuple[int, int, int] = (
155
+ _DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border
156
+ )
132
157
  FLOOR_COLOR_PRIMARY: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.floor_primary
133
- FLOOR_COLOR_SECONDARY: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.floor_secondary
158
+ FLOOR_COLOR_SECONDARY: tuple[int, int, int] = (
159
+ _DEFAULT_ENVIRONMENT_PALETTE.floor_secondary
160
+ )
134
161
  FLOOR_COLOR_OUTSIDE: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outside
135
162
  FOOTPRINT_COLOR: tuple[int, int, int] = (110, 200, 255)
136
163
  STEEL_BEAM_COLOR: tuple[int, int, int] = (110, 50, 50)
137
164
  STEEL_BEAM_LINE_COLOR: tuple[int, int, int] = (180, 90, 90)
165
+ FALL_ZONE_FLOOR_PRIMARY: tuple[int, int, int] = (
166
+ _DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary
167
+ )
168
+ FALL_ZONE_FLOOR_SECONDARY: tuple[int, int, int] = (
169
+ _DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary
170
+ )
138
171
 
139
172
 
140
173
  __all__ = [
@@ -161,6 +194,8 @@ __all__ = [
161
194
  "FOOTPRINT_COLOR",
162
195
  "STEEL_BEAM_COLOR",
163
196
  "STEEL_BEAM_LINE_COLOR",
197
+ "FALL_ZONE_FLOOR_PRIMARY",
198
+ "FALL_ZONE_FLOOR_SECONDARY",
164
199
  "EnvironmentPalette",
165
200
  "DEFAULT_AMBIENT_PALETTE_KEY",
166
201
  "NO_FLASHLIGHT_PALETTE_KEY",