mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
Scripting WIP (#70)
* Scripting introduced * AppImage workflow fixes * AppImage workflow simplified * README.md update * README.md update * small fix
This commit is contained in:
parent
ce26f0c227
commit
acce49f188
35 changed files with 649 additions and 138 deletions
|
|
@ -25,14 +25,14 @@ int main(int argc, char** argv) {
|
|||
return EXIT_SUCCESS;
|
||||
|
||||
platform::configure_encoding();
|
||||
std::filesystem::path userfiles = paths.getUserfiles();
|
||||
fs::path userfiles = paths.getUserfiles();
|
||||
try {
|
||||
EngineSettings settings;
|
||||
std::unique_ptr<toml::Wrapper> wrapper (create_wrapper(settings));
|
||||
|
||||
fs::path settings_file = userfiles/fs::path(SETTINGS_FILE);
|
||||
fs::path controls_file = userfiles/fs::path(CONTROLS_FILE);
|
||||
if (std::filesystem::is_regular_file(settings_file)) {
|
||||
if (fs::is_regular_file(settings_file)) {
|
||||
std::cout << "-- loading settings" << std::endl;
|
||||
std::string text = files::read_string(settings_file);
|
||||
toml::Reader reader(wrapper.get(), settings_file.string(), text);
|
||||
|
|
@ -40,7 +40,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
setup_bindings();
|
||||
Engine engine(settings, &paths);
|
||||
if (std::filesystem::is_regular_file(controls_file)) {
|
||||
if (fs::is_regular_file(controls_file)) {
|
||||
std::cout << "-- loading controls" << std::endl;
|
||||
std::string text = files::read_string(controls_file);
|
||||
load_controls(controls_file.string(), text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue