-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathstructure.py
More file actions
126 lines (103 loc) · 3.9 KB
/
Copy pathstructure.py
File metadata and controls
126 lines (103 loc) · 3.9 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# pyright: reportAssignmentType=false
# pyright: reportUnknownLambdaType=false
import time
# Local application imports
from config_type.types import structs, wrappers
from config_type.types.callable import obj_type as callable
from . import allocateable
import util.versions
import assets
class config_type(allocateable.obj_type):
'''
Configuration specification, according by default to "GameConfig.toml".
More info for each type parameter should be found in Rōblox Freedom Distribution's main README.md file.
'''
class metadata(allocateable.obj_type):
config_version_wildcard: wrappers.rfd_version_check = "*"
class game_setup(allocateable.obj_type):
class asset_cache(allocateable.obj_type):
dir_path: wrappers.path_str = './AssetCache'
name_template: callable[[int | str], str] = (
lambda asset_iden: (
f'{asset_iden:011d}'
if isinstance(asset_iden, int) else
asset_iden
)
)
clear_on_start: bool = False
class persistence(allocateable.obj_type):
sqlite_path: wrappers.path_str = '_.sqlite'
clear_on_start: bool = False
# Don't count too much on 2021E.
# I really recommend that people manually specify which version of Rōblox they want to run.
roblox_version: util.versions.rōblox = util.versions.rōblox.v463
ready_delay_sec: float = 3
class server_core(allocateable.obj_type):
class place_file(allocateable.obj_type):
rbxl_uri: wrappers.uri_obj
enable_saveplace: bool = False
track_file_changes: bool = False
startup_script: str = ''
class metadata(allocateable.obj_type):
title: str = 'Untitled'
description: str = ''
creator_name: str = 'RFD'
icon_uri: wrappers.uri_obj | None = None
chat_style: structs.chat_style = structs.chat_style.CLASSIC_CHAT
retrieve_default_user_code: callable[[], str] = (
lambda tick: 'Player%d' % time.time()
)
check_user_allowed: callable[[str], bool] = (
lambda *a: True
)
check_user_has_admin: callable[[int, str], bool] = (
lambda *a: False
)
retrieve_username: callable[[int, str], str] = (
lambda i, n, *a: n
)
retrieve_user_id: callable[[str], int] = wrappers.counter().__call__
retrieve_avatar: callable[[int, str], structs.avatar_data] = (
lambda *a: {
"type": "R15",
"items": [],
"scales": {
"height": 1,
"width": 1,
"head": 1,
"depth": 1,
"proportion": 0,
"body_type": 0,
},
"colors": {
"head": 1,
"left_arm": 1,
"left_leg": 1,
"right_arm": 1,
"right_leg": 1,
"torso": 1,
},
}
)
retrieve_groups: callable[[int, str], dict[str, int]] = (
lambda *a: {}
)
retrieve_account_age: callable[[int, str], int] = (
lambda *a: 0
)
retrieve_default_funds: callable[[int, str], int] = (
lambda *a: 0
)
filter_text: callable[[str, int, str], str] = (
lambda t, *a: t
)
retrieve_membership_type: callable[[int, str], str] = (
lambda *a: "None"
)
class remote_data(allocateable.obj_type):
gamepasses: structs.gamepasses = []
devproducts: structs.devproducts = []
asset_redirects: callable[[int | str], assets.asset_redirect | None] = (
lambda *a: None
)
badges: structs.badges = []