Skip to content

Commit de222db

Browse files
committed
Let's permenantly retain the numbered sprite feature for debugging..
1 parent 757f443 commit de222db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

agrf/lib/building/foundation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from agrf.graphics.sprites.foundation import FoundationSprite
88
from agrf.graphics.helpers.blend import blend_alternative_sprites
99
from agrf.magic import CachedFunctorMixin
10+
from agrf.sprites.numbered import number_alternatives
1011

1112

1213
@dataclass
@@ -20,6 +21,7 @@ class Foundation(CachedFunctorMixin):
2021
ne_clip: bool = False
2122
sw_shareground: bool = False
2223
se_shareground: bool = False
24+
debug_number: int = -1
2325

2426
def __post_init__(self):
2527
super().__init__()
@@ -134,7 +136,10 @@ def make_foundations_subset(self, subset):
134136
)
135137
alts.append(fs)
136138

137-
ret.append(grf.AlternativeSprites(*alts))
139+
alt_sprite = grf.AlternativeSprites(*alts)
140+
if self.debug_number != -1:
141+
alt_sprite = number_alternatives(alt_sprite, self.debug_number)
142+
ret.append(alt_sprite)
138143

139144
return ret
140145

@@ -162,4 +167,5 @@ def get_fingerprint(self):
162167
"ne_clip": int(self.ne_clip),
163168
"sw_shareground": int(self.sw_shareground),
164169
"se_shareground": int(self.se_shareground),
170+
"debug_number": self.debug_number,
165171
}

0 commit comments

Comments
 (0)