Skip to content

Commit

Permalink
updated README with 4.3 branch information and removed updater
Browse files Browse the repository at this point in the history
  • Loading branch information
ninetailsrabbit committed Mar 4, 2025
1 parent da544d2 commit 9f9f2aa
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 848 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
To better understand what branch to choose from for which Godot version, please refer to this table:
|Godot Version|terrainy Branch|terrainy Version|
|---|---|--|
|[![GodotEngine](https://img.shields.io/badge/Godot_4.3.x_stable-blue?logo=godotengine&logoColor=white)](https://godotengine.org/)|`main`|`1.x`|
|[![GodotEngine](https://img.shields.io/badge/Godot_4.3.x_stable-blue?logo=godotengine&logoColor=white)](https://godotengine.org/)|`4.3`|`1.x`|
|[![GodotEngine](https://img.shields.io/badge/Godot_4.4.x_stable-blue?logo=godotengine&logoColor=white)](https://godotengine.org/)|`main`|`1.x`|

---

Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

22 changes: 1 addition & 21 deletions addons/ninetailsrabbit.terrainy/ninetailsrabbit.terrainy.gd
Original file line number Diff line number Diff line change
@@ -1,36 +1,16 @@
@tool
extends EditorPlugin

const UpdateNotifyToolScene = preload("updater/update_notify_tool.tscn")

var update_notify_tool_instance: Node
var inspector_plugin
var plugin_custom_type: String = "Terrainy"


func _enter_tree() -> void:
MyPluginSettings.set_update_notification()
_setup_updater()

if not DirAccess.dir_exists_absolute(MyPluginSettings.PluginTemporaryReleaseUpdateDirectoryPath):
DirAccess.make_dir_recursive_absolute(MyPluginSettings.PluginTemporaryReleaseUpdateDirectoryPath)

inspector_plugin = preload("src/inspector/inspector_button_plugin.gd").new()
add_inspector_plugin(inspector_plugin)
add_custom_type(plugin_custom_type, "Node", preload("src/terrainy.gd"), preload("assets/terrainy.svg"))


func _exit_tree() -> void:
MyPluginSettings.remove_settings()

if update_notify_tool_instance:
update_notify_tool_instance.free()
update_notify_tool_instance = null

remove_custom_type(plugin_custom_type)
remove_inspector_plugin(inspector_plugin)

## Update tool referenced from https://github.com/MikeSchulze/gdUnit4/blob/master/addons/gdUnit4
func _setup_updater() -> void:
if MyPluginSettings.is_update_notification_enabled():
update_notify_tool_instance = UpdateNotifyToolScene.instantiate()
Engine.get_main_loop().root.add_child.call_deferred(update_notify_tool_instance)
2 changes: 1 addition & 1 deletion addons/ninetailsrabbit.terrainy/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Terrainy"
description="Quickly create natural-looking terrain with customizable noise parameters. This tool is designed to create simple terrains that do not require manual painting."
author="Ninetailsrabbit"
version="1.1.5"
version="1.1.6"
script="ninetailsrabbit.terrainy.gd"
24 changes: 2 additions & 22 deletions addons/ninetailsrabbit.terrainy/settings/plugin_settings.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@tool
class_name MyPluginSettings extends RefCounted
class_name TerrainyPluginSettings extends RefCounted

const PluginPrefixName: String = "ninetailsrabbit.terrainy" ## The folder name
const GitRepositoryName: String = "terrainy"
Expand All @@ -16,32 +16,12 @@ static var PluginTemporaryReleaseFilePath = "%s/%s.zip" % [PluginTemporaryDirect
static var PluginDebugDirectoryPath = "res://debug"

#region Plugin Settings
static var UpdateNotificationSetting: String = PluginSettingsBasePath + "/update_notification_enabled"
## PluginSettingsBasePath + "/update_notification_enabled"
#endregion

## Enable to test the updater without need to have a latest release version to trigger it
static var DebugMode: bool = false

static func set_update_notification(enable: bool = true) -> void:
ProjectSettings.set_setting(UpdateNotificationSetting, enable)
ProjectSettings.add_property_info({
"name": UpdateNotificationSetting,
"type": typeof(enable),
"value": enable,
"hint": PROPERTY_HINT_TYPE_STRING,
"hint_string": "Turn notifications on or off to receive alerts when new versions of the plugin are released"
})
ProjectSettings.save()


static func is_update_notification_enabled() -> bool:
return ProjectSettings.get_setting(UpdateNotificationSetting, true)


static func remove_settings() -> void:
remove_setting(UpdateNotificationSetting)


static func remove_setting(name: String) -> void:
if ProjectSettings.has_setting(name):
ProjectSettings.set_setting(name, null)
Expand Down
66 changes: 0 additions & 66 deletions addons/ninetailsrabbit.terrainy/updater/plugin_version.gd

This file was deleted.

121 changes: 0 additions & 121 deletions addons/ninetailsrabbit.terrainy/updater/update_notify_tool.gd

This file was deleted.

Loading

0 comments on commit 9f9f2aa

Please sign in to comment.