-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentities.py
More file actions
39 lines (28 loc) · 829 Bytes
/
entities.py
File metadata and controls
39 lines (28 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
this file is GPLv3
original author Biel Bestué de Luna
"""
"""
structure of a def
several instances of:
return_type name {
*several types of data dependant of the return type*
}
"""
import os
import utils
class entity_context:
ENTITIES_DEF_PATH = ""
EXTENSION = ""
def __init__( game_context, ent_dir="def", extension="def" )
ent_path = os.path.join( game_context.GAME_DIR, ent_dir )
utils.dir_exist_or_GTFO( ent_path )
self.ENTITIES_DEF_PATH = ent_dir
self.EXTENSION = os.extsep + extension
def get_list_of_entities(context):
l_relevantfiles = []
for f in os.listdir( ENTITYPATH ):
if f.endswith( EXTENSION ):
l_relevantfiles.append(f)
for f in l_relevantfiles:
#extract list of entities