Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated graphics used for preexisting objects/effects #7

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed AnimatedTextureMaker/AnimTexture Maker.exe
Binary file not shown.
Binary file removed AnimatedTextureMaker/AnimTexture Maker.pck
Binary file not shown.
2 changes: 1 addition & 1 deletion Autoload/Slabset.gd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func import_cfg_slabset(filePath, fullImport, showMessages):
resize_dat_and_tng_based_on_cfg(cfg)

if cfg.has_section("slab0.S"):
if cfg.get_value("slab0.S", "columns"): # Lowercase "Columns" means it's an out of date slabset.cfg file
if cfg.has_section_key("slab0.S", "columns"): # Lowercase "Columns" means it's an out of date slabset.cfg file
oMessage.big("Failed loading Slabset", "Old /fxdata/slabset.cfg file, please install the latest KeeperFX alpha patch")


Expand Down
171 changes: 97 additions & 74 deletions Autoload/Things.gd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Scenes/SlabsetWindow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ func snap_and_update_spinbox_value(spinbox: SpinBox, property: int, float_value:
spinbox.value = new_value
spinbox.connect("value_changed", self, method_name)

var int_value:int = round(new_value * 256)
var int_value = round(new_value * 256)
#spinbox.hint_tooltip = str("Real: " + str(int_value))
update_object_property(property, int(int_value))

Expand Down
21 changes: 21 additions & 0 deletions addons/animated_texture_but_better/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Anaxie Studio OHG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions addons/animated_texture_but_better/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# godot-better-animated-texture
A Godot plugin providing an extended AnimatedTexture class.

See the sample directories for examples on how to use the plugin.
58 changes: 58 additions & 0 deletions addons/animated_texture_but_better/animated_texture_but_better.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
tool
extends AnimatedTexture

const ALLOWED_FILE_EXTENSIONS: PoolStringArray = PoolStringArray([
"png", "jpg", "jpeg", "gif", "tiff", "tif"
])

export(String, DIR) var sprites_dir: String setget set_sprites_dir

#func _init():
# set_sprites_dir_automatically()

func set_sprites_dir(new_sprites_dir: String):
sprites_dir = new_sprites_dir
update_sprites()

#func set_sprites_dir_automatically():
# var plugin = Engine.get_main_loop().find_node("AnimatedTextureButBetterPlugin", true, false)
# if plugin:
# sprites_dir = plugin.get_current_resource_directory()
# update_sprites()

func update_sprites():
frames = 1

if not sprites_dir:
set_frame_texture(0, null)

var dir: Directory = Directory.new()
if dir.open(sprites_dir) == OK:
dir.list_dir_begin()

var file_name: String = dir.get_next()
var texture_id: int = -1
while file_name:
var name_extension_split: PoolStringArray = (
file_name.rsplit(".", true, 1)
)

if name_extension_split.size() >= 2 and name_extension_split[1] in ALLOWED_FILE_EXTENSIONS:
var texture_id_split: Array = name_extension_split[0].rsplit("_", true, 1)

if texture_id_split.size() >= 2 and texture_id_split[1].is_valid_integer():
texture_id = int(texture_id_split[1])
else:
texture_id += 1

if texture_id + 1 > frames:
frames = texture_id + 1

set_frame_texture(
texture_id,
load("%s/%s" % [sprites_dir, file_name])
)

file_name = dir.get_next()

dir.list_dir_end()
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tool
extends EditorPlugin


func _enter_tree():
# Initialization of the plugin goes here.
# Add the new type with a name, a parent type, a script and an icon.
add_custom_type(
"AnimatedTextureButBetter",
"AnimatedTexture",
preload("animated_texture_but_better.gd"),
preload("icon.svg")
)


func _exit_tree():
# Clean-up of the plugin goes here.
# Always remember to remove it from the engine when deactivated.
remove_custom_type("AnimatedTextureButBetter")

func get_current_resource_directory() -> String:
var current_path = get_editor_interface().get_edited_scene_root().get_filename()
return current_path.get_base_dir()
Binary file added addons/animated_texture_but_better/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions addons/animated_texture_but_better/icon.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/icon.png-2496f217e8203385f95b529b691d6eed.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/animated_texture_but_better/icon.png"
dest_files=[ "res://.import/icon.png-2496f217e8203385f95b529b691d6eed.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
1 change: 1 addition & 0 deletions addons/animated_texture_but_better/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions addons/animated_texture_but_better/icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/icon.svg-7e6860a38b44a9e348513cd7b6c68fa9.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/animated_texture_but_better/icon.svg"
dest_files=[ "res://.import/icon.svg-7e6860a38b44a9e348513cd7b6c68fa9.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0
7 changes: 7 additions & 0 deletions addons/animated_texture_but_better/plugin.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[plugin]

name="Better Animated Texture"
description="Gives the class AnimatedTextureButBetter which is a subclass of AnimatedTexture which has the ability to load frames by choosing a folder."
author="Anaxie Studio"
version="1.0"
script="animated_texture_but_better.plugin.gd"
Binary file removed dk_images/crucials/anim0780/AnimHeroGate.res
Binary file not shown.
57 changes: 57 additions & 0 deletions dk_images/crucials/anim0780/AnimHeroGate.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[gd_resource type="AnimatedTexture" load_steps=18 format=2]

[ext_resource path="res://addons/animated_texture_but_better/animated_texture_but_better.gd" type="Script" id=1]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame06.png" type="Texture" id=2]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame02.png" type="Texture" id=3]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame03.png" type="Texture" id=4]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame05.png" type="Texture" id=5]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame07.png" type="Texture" id=6]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame08.png" type="Texture" id=7]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame09.png" type="Texture" id=8]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame10.png" type="Texture" id=9]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame01.png" type="Texture" id=10]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame04.png" type="Texture" id=11]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame14.png" type="Texture" id=12]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame13.png" type="Texture" id=13]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame12.png" type="Texture" id=14]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame16.png" type="Texture" id=15]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame11.png" type="Texture" id=16]
[ext_resource path="res://dk_images/crucials/anim0780/r1frame15.png" type="Texture" id=17]

[resource]
flags = 9
frames = 16
fps = 20.0
frame_0/texture = ExtResource( 10 )
frame_1/texture = ExtResource( 3 )
frame_1/delay_sec = 0.0
frame_2/texture = ExtResource( 4 )
frame_2/delay_sec = 0.0
frame_3/texture = ExtResource( 11 )
frame_3/delay_sec = 0.0
frame_4/texture = ExtResource( 5 )
frame_4/delay_sec = 0.0
frame_5/texture = ExtResource( 2 )
frame_5/delay_sec = 0.0
frame_6/texture = ExtResource( 6 )
frame_6/delay_sec = 0.0
frame_7/texture = ExtResource( 7 )
frame_7/delay_sec = 0.0
frame_8/texture = ExtResource( 8 )
frame_8/delay_sec = 0.0
frame_9/texture = ExtResource( 9 )
frame_9/delay_sec = 0.0
frame_10/texture = ExtResource( 16 )
frame_10/delay_sec = 0.0
frame_11/texture = ExtResource( 14 )
frame_11/delay_sec = 0.0
frame_12/texture = ExtResource( 13 )
frame_12/delay_sec = 0.0
frame_13/texture = ExtResource( 12 )
frame_13/delay_sec = 0.0
frame_14/texture = ExtResource( 17 )
frame_14/delay_sec = 0.0
frame_15/texture = ExtResource( 15 )
frame_15/delay_sec = 0.0
script = ExtResource( 1 )
sprites_dir = "res://dk_images/crucials/anim0780/"
Binary file removed dk_images/crucials/anim0950/AnimDungeonHeart.res
Binary file not shown.
45 changes: 45 additions & 0 deletions dk_images/crucials/anim0950/AnimDungeonHeart.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_resource type="AnimatedTexture" load_steps=14 format=2]

[ext_resource path="res://addons/animated_texture_but_better/animated_texture_but_better.gd" type="Script" id=1]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame01.png" type="Texture" id=2]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame08.png" type="Texture" id=3]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame12.png" type="Texture" id=4]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame06.png" type="Texture" id=5]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame10.png" type="Texture" id=6]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame05.png" type="Texture" id=7]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame02.png" type="Texture" id=8]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame03.png" type="Texture" id=9]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame07.png" type="Texture" id=10]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame09.png" type="Texture" id=11]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame04.png" type="Texture" id=12]
[ext_resource path="res://dk_images/crucials/anim0950/r1frame11.png" type="Texture" id=13]

[resource]
flags = 9
frames = 12
fps = 15.0
frame_0/texture = ExtResource( 2 )
frame_1/texture = ExtResource( 8 )
frame_1/delay_sec = 0.0
frame_2/texture = ExtResource( 9 )
frame_2/delay_sec = 0.0
frame_3/texture = ExtResource( 12 )
frame_3/delay_sec = 0.0
frame_4/texture = ExtResource( 7 )
frame_4/delay_sec = 0.0
frame_5/texture = ExtResource( 5 )
frame_5/delay_sec = 0.0
frame_6/texture = ExtResource( 10 )
frame_6/delay_sec = 0.0
frame_7/texture = ExtResource( 3 )
frame_7/delay_sec = 0.0
frame_8/texture = ExtResource( 11 )
frame_8/delay_sec = 0.0
frame_9/texture = ExtResource( 6 )
frame_9/delay_sec = 0.0
frame_10/texture = ExtResource( 13 )
frame_10/delay_sec = 0.0
frame_11/texture = ExtResource( 4 )
frame_11/delay_sec = 0.0
script = ExtResource( 1 )
sprites_dir = "res://dk_images/crucials/anim0950/"
Binary file removed dk_images/food/anim0822/AnimChicken.res
Binary file not shown.
Loading