From 77910b207bcfe22217ca5d911d904b4bdd3b5e5b Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sat, 18 May 2024 15:00:08 +0200 Subject: [PATCH] Convert into real project --- CORE | 1 + addons/SUI | 1 + .../venus/assets}/uielements/Splash.tscn | 0 .../venus/assets}/uielements/splash.gd | 0 plugin.cfg => addons/venus/plugin.cfg | 0 plugin.gd => addons/venus/plugin.gd | 0 {src => addons/venus/src}/manager.gd | 2 +- {src => addons/venus/src}/modules/splashes.gd | 0 project.godot | 33 +++++++++++++++++++ scenesrc/Loader.tscn | 12 +++++++ src/loader.gd | 28 ++++++++++++++++ 11 files changed, 76 insertions(+), 1 deletion(-) create mode 120000 CORE create mode 120000 addons/SUI rename {assets => addons/venus/assets}/uielements/Splash.tscn (100%) rename {assets => addons/venus/assets}/uielements/splash.gd (100%) rename plugin.cfg => addons/venus/plugin.cfg (100%) rename plugin.gd => addons/venus/plugin.gd (100%) rename {src => addons/venus/src}/manager.gd (98%) rename {src => addons/venus/src}/modules/splashes.gd (100%) create mode 100644 project.godot create mode 100644 scenesrc/Loader.tscn create mode 100644 src/loader.gd diff --git a/CORE b/CORE new file mode 120000 index 0000000..abff4b1 --- /dev/null +++ b/CORE @@ -0,0 +1 @@ +dist/submodules/CORE \ No newline at end of file diff --git a/addons/SUI b/addons/SUI new file mode 120000 index 0000000..7750027 --- /dev/null +++ b/addons/SUI @@ -0,0 +1 @@ +../dist/submodules/SUI \ No newline at end of file diff --git a/assets/uielements/Splash.tscn b/addons/venus/assets/uielements/Splash.tscn similarity index 100% rename from assets/uielements/Splash.tscn rename to addons/venus/assets/uielements/Splash.tscn diff --git a/assets/uielements/splash.gd b/addons/venus/assets/uielements/splash.gd similarity index 100% rename from assets/uielements/splash.gd rename to addons/venus/assets/uielements/splash.gd diff --git a/plugin.cfg b/addons/venus/plugin.cfg similarity index 100% rename from plugin.cfg rename to addons/venus/plugin.cfg diff --git a/plugin.gd b/addons/venus/plugin.gd similarity index 100% rename from plugin.gd rename to addons/venus/plugin.gd diff --git a/src/manager.gd b/addons/venus/src/manager.gd similarity index 98% rename from src/manager.gd rename to addons/venus/src/manager.gd index 99a63f8..3a1d824 100644 --- a/src/manager.gd +++ b/addons/venus/src/manager.gd @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . extends Node -class_name CoreSOSModulesManager +class_name VenusManager var core: Core var logger: CoreLoggerInstance diff --git a/src/modules/splashes.gd b/addons/venus/src/modules/splashes.gd similarity index 100% rename from src/modules/splashes.gd rename to addons/venus/src/modules/splashes.gd diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..74321d5 --- /dev/null +++ b/project.godot @@ -0,0 +1,33 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Venus" +run/main_scene="res://scenesrc/Loader.tscn" +config/use_custom_user_dir=true +config/custom_user_dir_name="StarOpenSource/VenusDev" +config/features=PackedStringArray("4.2", "GL Compatibility") +boot_splash/bg_color=Color(0, 0, 0, 1) + +[display] + +window/size/viewport_width=1440 +window/size/viewport_height=810 + +[editor_plugins] + +enabled=PackedStringArray("res://addons/SUI/plugin.cfg", "res://addons/venus/plugin.cfg") + +[rendering] + +renderer/rendering_method="gl_compatibility" +renderer/rendering_method.mobile="gl_compatibility" +environment/defaults/default_clear_color=Color(0, 0, 0, 1) diff --git a/scenesrc/Loader.tscn b/scenesrc/Loader.tscn new file mode 100644 index 0000000..0d15382 --- /dev/null +++ b/scenesrc/Loader.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=2 format=3 uid="uid://ov5gul5bymsb"] + +[ext_resource type="Script" path="res://src/loader.gd" id="1_gri06"] + +[node name="Loader" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_gri06") diff --git a/src/loader.gd b/src/loader.gd new file mode 100644 index 0000000..f2241ee --- /dev/null +++ b/src/loader.gd @@ -0,0 +1,28 @@ +# STAROPENSOURCE CORE MODULES SOURCE FILE +# Copyright (c) 2024 The StarOpenSource Project & Contributors +# Licensed under the GNU Affero General Public License v3 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +extends Control + +var core: Core = await Core.new() +@onready var logger: CoreLoggerInstance = core.logger.get_instance("src/loader.gd", self) +@onready var manager: VenusManager = VenusManager.new(core) + +func _ready() -> void: + await get_tree().process_frame + get_tree().root.add_child(core) + await core.complete_init() + + manager.register_modules()