Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,68 @@
@tool
class_name DialogicEndBranchEvent
extends DialogicEvent
## Event that indicates the end of a condition or choice (or custom branch).
## In text this is not stored (only as a change in indentation).
################################################################################
## EXECUTE
################################################################################
func _execute() -> void:
dialogic.current_event_idx = find_next_index()-1
finish()
func find_next_index():
var idx: int = dialogic.current_event_idx
var ignore: int = 1
while true:
idx += 1
var event = dialogic.current_timeline.get_event(idx)
if not event:
return idx
if event is DialogicEndBranchEvent:
if ignore > 1: ignore -= 1
elif event.can_contain_events and not event.should_execute_this_branch():
ignore += 1
elif ignore <= 1:
return idx
return idx
################################################################################
## INITIALIZE
################################################################################
func _init() -> void:
event_name = "End Branch"
event_color = Color(1,1,1,1)
event_category = Category.Logic
event_sorting_index = 0
disable_editor_button = true
continue_at_end = true
################################################################################
## SAVING/LOADING
################################################################################
## NOTE: This event is very special. It is rarely stored at all, as it is usually
## just a placeholder for removing an indentation level.
## When copying events however, some representation of this is necessary. That's why this is half-implemented.
func to_text() -> String:
return "<<END BRANCH>>"
func from_text(string:String) -> void:
pass
func is_valid_event(string:String) -> bool:
if string.strip_edges().begins_with("<<END BRANCH>>"):
return true
return false

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b0h5mknqmos7r"
path="res://.godot/imported/icon.png-2770b68f95c6e9b6492f82019c7cb894.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/dialogic/Events/End Branch/icon.png"
dest_files=["res://.godot/imported/icon.png-2770b68f95c6e9b6492f82019c7cb894.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

View file

@ -0,0 +1,6 @@
@tool
extends DialogicIndexer
func _get_events() -> Array:
return [this_folder.path_join('event_end_branch.gd')]