created fog of war
This commit is contained in:
5
addons/scene-library/icons/thumb_placeholder.svg
Normal file
5
addons/scene-library/icons/thumb_placeholder.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192">
|
||||
<path fill="#ccc" d="m24.863 51.73 5.274 89.665 72.375 31.894 57.93-37.187 5.038-87.993-74.902-16.453" />
|
||||
<path fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="6" d="m24.862 51.731 5.274 89.665 72.375 31.893 57.93-37.186 5.039-87.992-74.903-16.453L24.862 51.73m140.618-3.62-62.372 25.705" />
|
||||
<path fill="none" stroke="black" stroke-width="6" d="m24.862 51.731 78.242 22.086-.593 99.472" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 502 B |
37
addons/scene-library/icons/thumb_placeholder.svg.import
Normal file
37
addons/scene-library/icons/thumb_placeholder.svg.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cqln7j6oifypf"
|
||||
path="res://.godot/imported/thumb_placeholder.svg-81a80a6d7c59edb9d7ce28b01f213c5c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/scene-library/icons/thumb_placeholder.svg"
|
||||
dest_files=["res://.godot/imported/thumb_placeholder.svg-81a80a6d7c59edb9d7ce28b01f213c5c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
7
addons/scene-library/plugin.cfg
Normal file
7
addons/scene-library/plugin.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="Scene Library"
|
||||
description="A tool for easy work with your scenes"
|
||||
author="Mansur Isaev and contributors"
|
||||
version="0.7.0-dev"
|
||||
script="plugin.gd"
|
||||
65
addons/scene-library/plugin.gd
Normal file
65
addons/scene-library/plugin.gd
Normal file
@@ -0,0 +1,65 @@
|
||||
# Copyright (c) 2023-2024 Mansur Isaev and contributors - MIT License
|
||||
# See `LICENSE.md` included in the source distribution for details.
|
||||
|
||||
@tool
|
||||
extends EditorPlugin
|
||||
|
||||
|
||||
const SceneLibrary = preload("res://addons/scene-library/scripts/scene_library.gd")
|
||||
|
||||
const BUTTON_NAME: String = "Scene Library"
|
||||
|
||||
|
||||
var _editor: SceneLibrary = null
|
||||
var _button: Button = null
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
_editor = SceneLibrary.new()
|
||||
_button = add_control_to_bottom_panel(_editor, BUTTON_NAME)
|
||||
_editor.open_asset_request.connect(_on_open_asset_request)
|
||||
_editor.show_in_file_system_request.connect(_on_show_in_file_system_request)
|
||||
_editor.show_in_file_manager_request.connect(_on_show_in_file_manager_request)
|
||||
_editor.library_saved.connect(_on_library_saved)
|
||||
_editor.library_unsaved.connect(_on_library_unsaved)
|
||||
|
||||
get_parent().connect(&"scene_saved", _editor.handle_scene_saved)
|
||||
EditorInterface.get_file_system_dock().files_moved.connect(_editor.handle_file_moved)
|
||||
EditorInterface.get_file_system_dock().file_removed.connect(_editor.handle_file_removed)
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
remove_control_from_bottom_panel(_editor)
|
||||
_editor.queue_free()
|
||||
|
||||
|
||||
func _save_external_data() -> void:
|
||||
if _editor.is_saved():
|
||||
return
|
||||
|
||||
var library_path: String = _editor.get_current_library_path()
|
||||
if library_path.is_empty():
|
||||
return
|
||||
|
||||
_editor.save_library(library_path)
|
||||
|
||||
|
||||
func _on_library_saved() -> void:
|
||||
_button.set_text(BUTTON_NAME)
|
||||
|
||||
func _on_library_unsaved() -> void:
|
||||
_button.set_text(BUTTON_NAME + "(*)")
|
||||
|
||||
|
||||
func _on_open_asset_request(path: String) -> void:
|
||||
EditorInterface.open_scene_from_path(path)
|
||||
|
||||
|
||||
func _on_show_in_file_system_request(path: String) -> void:
|
||||
EditorInterface.get_file_system_dock().navigate_to_path(path)
|
||||
|
||||
|
||||
func _on_show_in_file_manager_request(path: String) -> void:
|
||||
var error := OS.shell_show_in_file_manager(ProjectSettings.globalize_path(path), true)
|
||||
if error:
|
||||
push_warning(error_string(error))
|
||||
4
addons/scene-library/scene_library.cfg
Normal file
4
addons/scene-library/scene_library.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
library=Array[Dictionary]([{
|
||||
"assets": Array[Dictionary]([]),
|
||||
"name": "Props"
|
||||
}])
|
||||
1469
addons/scene-library/scripts/scene_library.gd
Normal file
1469
addons/scene-library/scripts/scene_library.gd
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user