feat(sprite-generation): ✨ Update sprite generation algorithm and optimize file scanning logic
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
c5ff2527a0
commit
cabf9ba11c
2 changed files with 8 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ class SpriteGenerator:
|
|||
}.items() if v is not None
|
||||
}
|
||||
prompt = compose_prompt(category, entity_data, dimensions)
|
||||
negative = get_negative(category, combat_type=combat_type)
|
||||
negative = get_negative(category, combat_type=combat_type, race=race or "")
|
||||
return prompt, negative
|
||||
|
||||
# Non-units: use entity_id as base description
|
||||
|
|
|
|||
|
|
@ -257,7 +257,13 @@ class SpriteScanner:
|
|||
"""
|
||||
prompt = prompt_override or compose_prompt(category, entity_data)
|
||||
combat_type = entity_data.get("combat_type", "")
|
||||
negative = get_negative(category, combat_type=combat_type)
|
||||
race = entity_data.get("race", "")
|
||||
if not race and category == "units":
|
||||
for r in ("dwarves", "humans", "high_elves", "orcs"):
|
||||
if f"_{r}" in entity_id:
|
||||
race = r
|
||||
break
|
||||
negative = get_negative(category, combat_type=combat_type, race=race)
|
||||
gen_w, gen_h = get_generation_size(category)
|
||||
tgt_w, tgt_h = get_target_size(category)
|
||||
install = self._install_path(category, sprite_id)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue