Add the four crowd-variety characters and extend the baseline to twelve
This commit is contained in:
1 parent
b945eb6e8f
commit
4e8665e25b
17 files changed
+199
-12
No files matched your search
@@ -99,6 +99,17 @@ CHARACTERS = {
|
||||
"npc_guard": {"layer": "guard", "hair": "buzz", "build": "broad",
|
||||
"gear": ["cap", "wand"],
|
||||
"roles": ["player_guard", "venue_security"]},
|
||||
# Crowd-variety prototypes (character development): vary build, head
|
||||
# silhouette, hair/beard and outer layer without labelling behaviour.
|
||||
"npc_crowd_a": {"layer": "none", "hair": "bun", "build": "slim",
|
||||
"gear": ["sunglasses"], "roles": ["tourist", "guest"]},
|
||||
"npc_crowd_b": {"layer": "none", "hair": "bald", "build": "broad",
|
||||
"beard": True, "gear": ["shoulder_bag"],
|
||||
"roles": ["confused_visitor", "guest"]},
|
||||
"npc_crowd_c": {"layer": "coat", "hair": "short",
|
||||
"gear": ["umbrella"], "roles": ["intoxicated", "guest"]},
|
||||
"npc_crowd_d": {"layer": "hood", "hair": "short", "build": "slim",
|
||||
"gear": ["cup"], "roles": ["tourist", "guest"]},
|
||||
}
|
||||
|
||||
# Gear origin = the attach point; offsets are in the attach node's local space.
|
||||
|
||||
@@ -21,6 +21,10 @@ VARIANTS = [
|
||||
"npc_hoodie",
|
||||
"npc_firefighter",
|
||||
"npc_guard",
|
||||
"npc_crowd_a",
|
||||
"npc_crowd_b",
|
||||
"npc_crowd_c",
|
||||
"npc_crowd_d",
|
||||
]
|
||||
VIEWS = ["front", "three_quarter", "profile", "back", "full_body", "crowd"]
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import npc_baseline
|
||||
class NpcBaselineTests(unittest.TestCase):
|
||||
def test_expected_files_cover_all_variants_and_views(self):
|
||||
rows = npc_baseline.expected_files()
|
||||
self.assertEqual(len(rows), 48)
|
||||
self.assertEqual(len(rows), len(npc_baseline.VARIANTS) * len(npc_baseline.VIEWS))
|
||||
self.assertEqual({row[0] for row in rows}, set(npc_baseline.VARIANTS))
|
||||
self.assertEqual({row[1] for row in rows}, set(npc_baseline.VIEWS))
|
||||
self.assertEqual(len({row[2] for row in rows}), 48)
|
||||
self.assertEqual(len({row[2] for row in rows}), len(rows))
|
||||
|
||||
def test_sheet_accepts_a_custom_view_list(self):
|
||||
from PIL import Image
|
||||
|
||||
@@ -6,8 +6,8 @@ import npc_proportions
|
||||
class NpcProportionTests(unittest.TestCase):
|
||||
def test_every_library_character_is_measured(self):
|
||||
rows = npc_proportions.report()
|
||||
self.assertEqual(len(rows), 8)
|
||||
self.assertEqual(len({row["character"] for row in rows}), 8)
|
||||
self.assertEqual(len(rows), 12)
|
||||
self.assertEqual(len({row["character"] for row in rows}), 12)
|
||||
for row in rows:
|
||||
self.assertGreater(row["measurements"]["height"], 1.6)
|
||||
|
||||
|
||||
Reference in new issue
Block a user