Skip to content

Commit 5024102

Browse files
Merge branch 'develop'
2 parents c6f0b84 + e6e7356 commit 5024102

File tree

5 files changed

+23
-17
lines changed

5 files changed

+23
-17
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ File format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
See cloning and downloading instructions [here](https://www.ivoyager.dev/developers/).
88

9+
## [v0.0.20] - 2024-12-20
10+
11+
Developed using Godot 4.3.
12+
13+
### Fixed
14+
* Export breaking reference to EditorInterface outside of EditorPlugin.
15+
916
## [v0.0.19] - 2024-12-16
1017

1118
Developed using Godot 4.3.
@@ -84,5 +91,6 @@ Requires plugin [ivoyager_table_reader](https://github.com/ivoyager/ivoyager_tab
8491
##
8592
I, Voyager projects v0.0.16 and earlier used a different core submodule [ivoyager](https://github.com/ivoyager/ivoyager) (now depreciated); see previous changelog [here](https://github.com/ivoyager/ivoyager/blob/master/CHANGELOG.md).
8693

94+
[v0.0.20]: https://github.com/ivoyager/ivoyager_core/compare/v0.0.19...v0.0.20
8795
[v0.0.19]: https://github.com/ivoyager/ivoyager_core/compare/v0.0.18...v0.0.19
8896
[v0.0.18]: https://github.com/ivoyager/ivoyager_core/compare/v0.0.17...v0.0.18

editor_plugin/core_editor_plugin.gd

+8-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func _enter_tree() -> void:
4343
# Wait for required plugins...
4444
await get_tree().process_frame
4545
var wait_counter := 0
46-
while !IVPluginUtils.is_plugins_enabled(REQUIRED_PLUGINS):
46+
while !_is_required_plugins_enabled():
4747
wait_counter += 1
4848
if wait_counter == 10:
4949
push_error("Enable required plugins before ivoyager_core: " + str(REQUIRED_PLUGINS))
@@ -66,6 +66,13 @@ func _exit_tree() -> void:
6666
_remove_autoloads()
6767

6868

69+
func _is_required_plugins_enabled() -> bool:
70+
for plugin in REQUIRED_PLUGINS:
71+
if !EditorInterface.is_plugin_enabled(plugin):
72+
return false
73+
return true
74+
75+
6976
func _process_ivoyager_cofig_files() -> void:
7077
_config = IVPluginUtils.get_ivoyager_config("res://addons/ivoyager_core/ivoyager_core.cfg")
7178
if !_config:

editor_plugin/plugin_utils.gd

+4-13
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,16 @@ extends Object
3030

3131

3232
## Supply only the base name from the plugin path.
33-
## Assumes plugin.cfg path is "res://addons/<plugin>/plugin.cfg".
33+
## Assumes plugin.cfg path is "res://addons/<plugin>/plugin.cfg".[br][br]
34+
##
35+
## This is for runtime usage! EditorPlugin should use the EditorInterface
36+
## function of the same name instead.
3437
static func is_plugin_enabled(plugin: String) -> bool:
35-
if EditorInterface.has_method(&"is_plugin_enabled"): # called from EditorPlugin!
36-
return EditorInterface.is_plugin_enabled(plugin)
37-
# called at runtime...
3838
var path := "res://addons/" + plugin + "/plugin.cfg"
3939
var plugin_paths: PackedStringArray = ProjectSettings.get_setting("editor_plugins/enabled")
4040
return plugin_paths.has(path)
4141

4242

43-
## Supply only the base names from the plugin paths.
44-
## Assumes plugin.cfg paths are "res://addons/<plugin>/plugin.cfg".
45-
static func is_plugins_enabled(plugins: Array[String]) -> bool:
46-
for plugin in plugins:
47-
if !is_plugin_enabled(plugin):
48-
return false
49-
return true
50-
51-
5243
## Assumes plugin.cfg path is "res://addons/<plugin>/plugin.cfg".[br][br]
5344
## WARNING: For this function to work in exported project, add "*.cfg" or specific cofig file to
5445
## Project/Export.../Resources/"Filters to export non-resource files/folders".

plugin.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="I, Voyager - Core"
44
description="This is I, Voyager's core plugin! It runs the solar system simulator."
55
author="Charlie Whitfield"
6-
version="v0.0.19"
6+
version="v0.0.20"
77
script="editor_plugin/core_editor_plugin.gd"

shaders/rings.gdshader

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void vertex() {
7979
vec3 sun_position = iv_sun_global_positions[sun_index];
8080
vec3 sun_vector = (VIEW_MATRIX * vec4(sun_position, 1.0)).xyz;
8181
sun_direction = normalize(sun_vector);
82-
82+
8383
mat4 inverse_model_matrix = inverse(MODEL_MATRIX);
8484
float sun_y = (inverse_model_matrix * vec4(sun_position, 1.0)).y;
8585
float camera_y = (inverse_model_matrix * vec4(CAMERA_POSITION_WORLD, 1.0)).y;
@@ -150,7 +150,7 @@ void fragment() {
150150

151151
// FIXME? Godot docs suggest that use of discard might break something
152152
// related to shadows. Or maybe not. For now we're using ALPHA = 0.0.
153-
// We can revisit use of discard after other shadow issues are resolved.
153+
// We can revisit use of discard after other shadow issues are resolved.
154154

155155
//discard;
156156
ALPHA = 0.0;

0 commit comments

Comments
 (0)