mirror of
https://github.com/Relintai/broken_seals_roguelike.git
synced 2024-11-10 21:52:09 +01:00
Ported the setup script split from the 3d project. Also removed the world_generator module and updated everything to the latest. Switched the engine to use the 3.x branch.
This commit is contained in:
parent
73ae3000b9
commit
b5a512032e
3
.gitignore
vendored
3
.gitignore
vendored
@ -24,4 +24,5 @@ game/android/build/*
|
|||||||
*.blend1
|
*.blend1
|
||||||
.dir-locals.el
|
.dir-locals.el
|
||||||
|
|
||||||
build.config
|
build.config
|
||||||
|
__pycache__/*
|
||||||
|
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": {"3.2": "f15f5b45781eb3de8e5811400f654e3e49580149"}, "world_generator": {"master": "d12ab222a2387e20164b3e7c6236983223ca88ef"}, "entity_spell_system": {"master": "3bbe1138973bafe57638e569e87d28b6e0a0eb46"}, "ui_extensions": {"master": "f1ae14c1be0750f65c77ecaad037dbe1cfb28269"}, "texture_packer": {"master": "c712c4b30839400ba22e5a6b01f2a20fd9b311fa"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "thread_pool": {"master": "da4e049da09cb726a00f1edb1df935a2e8475902"}}
|
{"engine": {"3.2": "f15f5b45781eb3de8e5811400f654e3e49580149", "3.x": "095dea7b71c4ba858710e8ecbd80ee28cf9877c8"}, "world_generator": {"master": "d12ab222a2387e20164b3e7c6236983223ca88ef"}, "entity_spell_system": {"master": "cc9dc30b8377552df79ee4d53e1ed6d51cb87408"}, "ui_extensions": {"master": "f82273f54cb1ab87d458c91af9554acec5c10831"}, "texture_packer": {"master": "a0786956813a85b5a82093a081b90c2f8a000e6c"}, "fastnoise": {"master": "d447fd5364e9ab5a6b14184483eab23cd3fe820b"}, "thread_pool": {"master": "b2e8c815392052947e7386f722913a12eea543a4"}}
|
136
SConstruct
136
SConstruct
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2019-2020 Péter Magyar
|
# Copyright (c) 2019-2021 Péter Magyar
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -29,6 +30,8 @@ import json
|
|||||||
import shutil
|
import shutil
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
import module_config
|
||||||
|
|
||||||
repository_index = 0
|
repository_index = 0
|
||||||
module_clone_path = '/modules/'
|
module_clone_path = '/modules/'
|
||||||
clone_command = 'git clone {0} {1}'
|
clone_command = 'git clone {0} {1}'
|
||||||
@ -45,27 +48,16 @@ exports = {
|
|||||||
'javascript': [],
|
'javascript': [],
|
||||||
}
|
}
|
||||||
|
|
||||||
engine_repository = [ ['https://github.com/godotengine/godot.git', 'git@github.com:godotengine/godot.git'], 'engine', '' ]
|
additional_commands = {
|
||||||
|
'global': [],
|
||||||
module_repositories = [
|
'linux': [],
|
||||||
[ ['https://github.com/Relintai/world_generator.git', 'git@github.com:Relintai/world_generator.git'], 'world_generator', '' ],
|
'windows': [],
|
||||||
[ ['https://github.com/Relintai/entity_spell_system.git', 'git@github.com:Relintai/entity_spell_system.git'], 'entity_spell_system', '' ],
|
'android': [],
|
||||||
[ ['https://github.com/Relintai/ui_extensions.git', 'git@github.com:Relintai/ui_extensions.git'], 'ui_extensions', '' ],
|
'javascript': [],
|
||||||
[ ['https://github.com/Relintai/texture_packer.git', 'git@github.com:Relintai/texture_packer.git'], 'texture_packer', '' ],
|
}
|
||||||
[ ['https://github.com/Relintai/godot_fastnoise.git', 'git@github.com:Relintai/godot_fastnoise.git'], 'fastnoise', '' ],
|
|
||||||
[ ['https://github.com/Relintai/thread_pool.git', 'git@github.com:Relintai/thread_pool.git'], 'thread_pool', '' ],
|
|
||||||
]
|
|
||||||
|
|
||||||
addon_repositories = [
|
|
||||||
]
|
|
||||||
|
|
||||||
third_party_addon_repositories = [
|
|
||||||
]
|
|
||||||
|
|
||||||
target_commits = {}
|
target_commits = {}
|
||||||
|
|
||||||
godot_branch = '3.2'
|
|
||||||
|
|
||||||
def onerror(func, path, exc_info):
|
def onerror(func, path, exc_info):
|
||||||
"""
|
"""
|
||||||
https://stackoverflow.com/questions/2656322/shutil-rmtree-fails-on-windows-with-access-is-denied
|
https://stackoverflow.com/questions/2656322/shutil-rmtree-fails-on-windows-with-access-is-denied
|
||||||
@ -182,21 +174,27 @@ def copytree(src, dst):
|
|||||||
|
|
||||||
shutil.copy2(sp, dp)
|
shutil.copy2(sp, dp)
|
||||||
|
|
||||||
|
def remove_repository(data, target_folder):
|
||||||
|
folder = os.path.abspath(target_folder + data[1])
|
||||||
|
|
||||||
|
if os.path.isdir(folder):
|
||||||
|
shutil.rmtree(folder)
|
||||||
|
|
||||||
def update_engine():
|
def update_engine():
|
||||||
update_repository(engine_repository, '/', godot_branch)
|
update_repository(module_config.engine_repository, '/', module_config.godot_branch)
|
||||||
|
|
||||||
def update_modules():
|
def update_modules():
|
||||||
for rep in module_repositories:
|
for rep in module_config.module_repositories:
|
||||||
update_repository(rep, module_clone_path)
|
update_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
|
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
|
||||||
|
|
||||||
def update_addons():
|
def update_addons():
|
||||||
for rep in addon_repositories:
|
for rep in module_config.addon_repositories:
|
||||||
update_repository(rep, module_clone_path)
|
update_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
||||||
|
|
||||||
def update_addons_third_party_addons():
|
def update_addons_third_party_addons():
|
||||||
for rep in third_party_addon_repositories:
|
for rep in module_config.third_party_addon_repositories:
|
||||||
update_repository(rep, module_clone_path)
|
update_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
||||||
|
|
||||||
@ -210,20 +208,24 @@ def update_all():
|
|||||||
|
|
||||||
|
|
||||||
def setup_engine():
|
def setup_engine():
|
||||||
setup_repository(engine_repository, '/', godot_branch)
|
setup_repository(module_config.engine_repository, '/', module_config.godot_branch)
|
||||||
|
|
||||||
def setup_modules():
|
def setup_modules():
|
||||||
for rep in module_repositories:
|
for rep in module_config.module_repositories:
|
||||||
setup_repository(rep, module_clone_path)
|
setup_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
|
copy_repository(rep, './engine/modules/', '.' + module_clone_path)
|
||||||
|
|
||||||
|
for rep in module_config.removed_modules:
|
||||||
|
remove_repository(rep, './engine/modules/')
|
||||||
|
|
||||||
|
|
||||||
def setup_addons():
|
def setup_addons():
|
||||||
for rep in addon_repositories:
|
for rep in module_config.addon_repositories:
|
||||||
setup_repository(rep, module_clone_path)
|
setup_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
||||||
|
|
||||||
def setup_addons_third_party_addons():
|
def setup_addons_third_party_addons():
|
||||||
for rep in third_party_addon_repositories:
|
for rep in module_config.third_party_addon_repositories:
|
||||||
setup_repository(rep, module_clone_path)
|
setup_repository(rep, module_clone_path)
|
||||||
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
copy_repository(rep, './game/addons/', '.' + module_clone_path)
|
||||||
|
|
||||||
@ -255,6 +257,20 @@ def get_exports_for(platform):
|
|||||||
|
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
def get_additional_commands_for(platform):
|
||||||
|
command_separator = ';'
|
||||||
|
|
||||||
|
if 'win' in sys.platform:
|
||||||
|
command_separator = '&'
|
||||||
|
|
||||||
|
command = ''
|
||||||
|
|
||||||
|
for p in additional_commands[platform]:
|
||||||
|
command += p + command_separator
|
||||||
|
|
||||||
|
return command
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def parse_config():
|
def parse_config():
|
||||||
global visual_studio_vcvarsall_path
|
global visual_studio_vcvarsall_path
|
||||||
@ -292,6 +308,14 @@ def parse_config():
|
|||||||
export_path = format_path(ls[8 + len(words[1]):])
|
export_path = format_path(ls[8 + len(words[1]):])
|
||||||
|
|
||||||
exports[words[1]].append(export_path)
|
exports[words[1]].append(export_path)
|
||||||
|
elif words[0] == 'run':
|
||||||
|
if (len(words) < 3) or not words[1] in additional_commands:
|
||||||
|
print('This build.config line is malformed, and got ignored: ' + ls)
|
||||||
|
continue
|
||||||
|
|
||||||
|
final_cmd = format_path(ls[5 + len(words[1]):])
|
||||||
|
|
||||||
|
additional_commands[words[1]].append(final_cmd)
|
||||||
|
|
||||||
parse_config()
|
parse_config()
|
||||||
|
|
||||||
@ -301,8 +325,12 @@ if len(sys.argv) > 1:
|
|||||||
|
|
||||||
arg = sys.argv[1]
|
arg = sys.argv[1]
|
||||||
|
|
||||||
|
arg_split = arg.split('_')
|
||||||
|
arg = arg_split[0]
|
||||||
|
arg_split = arg_split[1:]
|
||||||
|
|
||||||
if arg[0] == 'b':
|
if arg[0] == 'b':
|
||||||
build_string = get_exports_for('global') + 'scons '
|
build_string = get_exports_for('global') + get_additional_commands_for('global') + 'scons '
|
||||||
|
|
||||||
build_string += 'tools='
|
build_string += 'tools='
|
||||||
if 'e' in arg:
|
if 'e' in arg:
|
||||||
@ -342,6 +370,18 @@ if len(sys.argv) > 1:
|
|||||||
for i in range(2, len(sys.argv)):
|
for i in range(2, len(sys.argv)):
|
||||||
build_string += ' ' + sys.argv[i] + ' '
|
build_string += ' ' + sys.argv[i] + ' '
|
||||||
|
|
||||||
|
if 'slim' in arg_split:
|
||||||
|
build_string += module_config.slim_args
|
||||||
|
build_string += ' '
|
||||||
|
|
||||||
|
if 'latomic' in arg_split:
|
||||||
|
build_string += 'LINKFLAGS="-latomic"'
|
||||||
|
build_string += ' '
|
||||||
|
|
||||||
|
if 'strip' in arg_split:
|
||||||
|
build_string += 'debug_symbols=no'
|
||||||
|
build_string += ' '
|
||||||
|
|
||||||
target = ' '
|
target = ' '
|
||||||
|
|
||||||
if 'E' in arg:
|
if 'E' in arg:
|
||||||
@ -367,7 +407,7 @@ if len(sys.argv) > 1:
|
|||||||
if 'l' in arg:
|
if 'l' in arg:
|
||||||
build_string += 'platform=x11'
|
build_string += 'platform=x11'
|
||||||
|
|
||||||
build_string = get_exports_for('linux') + build_string + target
|
build_string = get_exports_for('linux') + get_additional_commands_for('linux') + build_string + target
|
||||||
|
|
||||||
print('Running command: ' + build_string)
|
print('Running command: ' + build_string)
|
||||||
|
|
||||||
@ -375,7 +415,7 @@ if len(sys.argv) > 1:
|
|||||||
elif 'w' in arg:
|
elif 'w' in arg:
|
||||||
build_string += 'platform=windows'
|
build_string += 'platform=windows'
|
||||||
|
|
||||||
build_string = get_exports_for('windows') + build_string
|
build_string = get_exports_for('windows') + get_additional_commands_for('windows') + build_string
|
||||||
|
|
||||||
print('Running command: ' + build_string)
|
print('Running command: ' + build_string)
|
||||||
|
|
||||||
@ -383,7 +423,7 @@ if len(sys.argv) > 1:
|
|||||||
elif 'a' in arg:
|
elif 'a' in arg:
|
||||||
build_string += 'platform=android'
|
build_string += 'platform=android'
|
||||||
|
|
||||||
build_string = get_exports_for('android') + build_string
|
build_string = get_exports_for('android') + get_additional_commands_for('android') + build_string
|
||||||
|
|
||||||
print('Running command: ' + build_string + ' android_arch=armv7')
|
print('Running command: ' + build_string + ' android_arch=armv7')
|
||||||
subprocess.call(build_string + ' android_arch=armv7', shell=True)
|
subprocess.call(build_string + ' android_arch=armv7', shell=True)
|
||||||
@ -394,12 +434,12 @@ if len(sys.argv) > 1:
|
|||||||
|
|
||||||
os.chdir(full_path + 'platform/android/java/')
|
os.chdir(full_path + 'platform/android/java/')
|
||||||
|
|
||||||
print('Running command: ' + get_exports_for('global') + get_exports_for('android') + './gradlew generateGodotTemplates')
|
print('Running command: ' + get_exports_for('global') + get_additional_commands_for('global') + get_exports_for('android') + get_additional_commands_for('android') + './gradlew generateGodotTemplates')
|
||||||
subprocess.call(get_exports_for('global') + get_exports_for('android') + './gradlew generateGodotTemplates', shell=True)
|
subprocess.call(get_exports_for('global') + get_additional_commands_for('global') + get_exports_for('android') + get_additional_commands_for('android') + './gradlew generateGodotTemplates', shell=True)
|
||||||
elif 'j' in arg:
|
elif 'j' in arg:
|
||||||
build_string += 'platform=javascript'
|
build_string += 'platform=javascript'
|
||||||
|
|
||||||
build_string = get_exports_for('javascript') + build_string
|
build_string = get_exports_for('javascript') + get_additional_commands_for('javascript') + build_string
|
||||||
|
|
||||||
print('Running command: ' + build_string)
|
print('Running command: ' + build_string)
|
||||||
subprocess.call(build_string, shell=True)
|
subprocess.call(build_string, shell=True)
|
||||||
@ -431,26 +471,40 @@ if len(sys.argv) > 1:
|
|||||||
exit()
|
exit()
|
||||||
elif arg[0] == 'p':
|
elif arg[0] == 'p':
|
||||||
if arg == 'p':
|
if arg == 'p':
|
||||||
#print("Applies a patch. Append c for the compilation database patch. For example: pc")
|
print("Applies a patch. No Patches right now.Append s for the skeleton editor patch. For example: ps ")
|
||||||
print("Applies a patch. No Patches right now.")
|
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
full_path = cwd + '/engine/'
|
full_path = cwd + '/engine/'
|
||||||
|
|
||||||
if not os.path.isdir(full_path):
|
if not os.path.isdir(full_path):
|
||||||
print('engine directory doesnt exists.')
|
print('engine directory does not exists.')
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
os.chdir(full_path)
|
os.chdir(full_path)
|
||||||
|
|
||||||
#apply the patch to just the working directory, without creating a commit
|
#apply the patch to just the working directory, without creating a commit
|
||||||
|
|
||||||
#if 'c' in arg:
|
if 's' in arg:
|
||||||
# subprocess.call('git apply --index ../patches/compilation_db.patch', shell=True)
|
subprocess.call('git apply --index ../patches/custom_skeleton_3d_editor_plugin.patch', shell=True)
|
||||||
|
|
||||||
|
#unstage all files
|
||||||
|
subprocess.call('git reset', shell=True)
|
||||||
|
|
||||||
|
vman_full_path = cwd + '/engine/modules/voxelman/'
|
||||||
|
|
||||||
|
#also patch voxelman as the plugin changes forward_spatial_gui_input's definition
|
||||||
|
if os.path.isdir(vman_full_path):
|
||||||
|
os.chdir(vman_full_path)
|
||||||
|
|
||||||
|
subprocess.call('git apply --index ../../../patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch', shell=True)
|
||||||
|
|
||||||
|
#unstage all files
|
||||||
|
subprocess.call('git reset', shell=True)
|
||||||
|
else:
|
||||||
|
print('Voxelman directory does not exists, skipping patch.')
|
||||||
|
|
||||||
|
|
||||||
#unstage all files
|
|
||||||
subprocess.call('git reset', shell=True)
|
|
||||||
|
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ var visibility_update_timer : float = randi()
|
|||||||
|
|
||||||
var tile_size : int = 32
|
var tile_size : int = 32
|
||||||
|
|
||||||
var nameplate : Node
|
var _nameplate : Node
|
||||||
|
|
||||||
var init : bool = false
|
var init : bool = false
|
||||||
|
|
||||||
@ -80,10 +80,10 @@ func _enter_tree() -> void:
|
|||||||
entity.set_character_skeleton(character_skeleton)
|
entity.set_character_skeleton(character_skeleton)
|
||||||
# entity.connect("notification_ccast", self, "on_notification_ccast")
|
# entity.connect("notification_ccast", self, "on_notification_ccast")
|
||||||
entity.connect("diesd", self, "on_diesd")
|
entity.connect("diesd", self, "on_diesd")
|
||||||
entity.connect("isc_controlled_changed", self, "on_c_controlled_changed")
|
entity.connect("onc_entity_controller_changed", self, "on_c_controlled_changed")
|
||||||
owner = entity
|
owner = entity
|
||||||
|
|
||||||
on_c_controlled_changed(entity.c_is_controlled)
|
on_c_controlled_changed()
|
||||||
|
|
||||||
transform = entity.get_transform_2d(true)
|
transform = entity.get_transform_2d(true)
|
||||||
|
|
||||||
@ -93,17 +93,17 @@ func set_visibility(val : bool) -> void:
|
|||||||
if val:
|
if val:
|
||||||
show()
|
show()
|
||||||
|
|
||||||
if nameplate:
|
if _nameplate:
|
||||||
nameplate.show()
|
_nameplate.show()
|
||||||
elif !val:
|
elif !val:
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
if nameplate:
|
if _nameplate:
|
||||||
nameplate.hide()
|
_nameplate.hide()
|
||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
#Not sure why yet, but _unhandled_input gets called even after set_process_unhandled_input(false)
|
#Not sure why yet, but _unhandled_input gets called even after set_process_unhandled_input(false)
|
||||||
if !entity.c_is_controlled:
|
if !entity.getc_is_controlled():
|
||||||
return
|
return
|
||||||
|
|
||||||
if event.is_action_pressed("left"):
|
if event.is_action_pressed("left"):
|
||||||
@ -298,7 +298,7 @@ func try_move(dx, dy):
|
|||||||
|
|
||||||
set_tile_position(tp)
|
set_tile_position(tp)
|
||||||
|
|
||||||
if entity.c_is_controlled:
|
if entity.getc_is_controlled():
|
||||||
world.player_moved()
|
world.player_moved()
|
||||||
|
|
||||||
func move_towards_target():
|
func move_towards_target():
|
||||||
@ -384,11 +384,14 @@ func cmouseover(position : Vector2):
|
|||||||
last_mouse_over = null
|
last_mouse_over = null
|
||||||
|
|
||||||
|
|
||||||
func on_c_controlled_changed(val):
|
func on_c_controlled_changed():
|
||||||
#create camera and pivot if true
|
#create camera and pivot if true
|
||||||
_controlled = val
|
_controlled = entity.getc_is_controlled()
|
||||||
|
|
||||||
if val:
|
if _controlled:
|
||||||
|
if _nameplate:
|
||||||
|
_nameplate.queue_free()
|
||||||
|
|
||||||
camera = Camera2D.new()
|
camera = Camera2D.new()
|
||||||
camera.zoom = get_node("/root/Main").get_world_scale()
|
camera.zoom = get_node("/root/Main").get_world_scale()
|
||||||
add_child(camera)
|
add_child(camera)
|
||||||
@ -411,8 +414,8 @@ func on_c_controlled_changed(val):
|
|||||||
# set_process_input(false)
|
# set_process_input(false)
|
||||||
set_process_unhandled_input(false)
|
set_process_unhandled_input(false)
|
||||||
var nameplatescn : PackedScene = ResourceLoader.load("res://ui/nameplates/NamePlate.tscn")
|
var nameplatescn : PackedScene = ResourceLoader.load("res://ui/nameplates/NamePlate.tscn")
|
||||||
nameplate = nameplatescn.instance()
|
_nameplate = nameplatescn.instance()
|
||||||
get_parent().add_child(nameplate)
|
get_parent().add_child(_nameplate)
|
||||||
|
|
||||||
set_visibility(false)
|
set_visibility(false)
|
||||||
|
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://ui/nameplates/NamePlate.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://ui/nameplates/NamePlate.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://characters/Character.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://player/Mob.gd" type="Script" id=3]
|
[ext_resource path="res://player/Mob.gd" type="Script" id=3]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id=1]
|
[sub_resource type="EntityResourceHealth" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="EntityResourceSpeed" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id=3]
|
||||||
radius = 20.0
|
radius = 20.0
|
||||||
|
|
||||||
[node name="Mob" type="Entity" groups=[
|
[node name="Mob" type="Entity" groups=[
|
||||||
@ -12,6 +16,7 @@ radius = 20.0
|
|||||||
]]
|
]]
|
||||||
body_path = NodePath("KinematicBody2D")
|
body_path = NodePath("KinematicBody2D")
|
||||||
character_skeleton_path = NodePath("KinematicBody2D/Character")
|
character_skeleton_path = NodePath("KinematicBody2D/Character")
|
||||||
|
sresources = [ SubResource( 1 ), SubResource( 2 ) ]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="NamePlate" parent="." instance=ExtResource( 1 )]
|
[node name="NamePlate" parent="." instance=ExtResource( 1 )]
|
||||||
@ -19,6 +24,6 @@ script = ExtResource( 3 )
|
|||||||
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
|
[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 3 )
|
||||||
|
|
||||||
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 2 )]
|
[node name="Character" parent="KinematicBody2D" instance=ExtResource( 2 )]
|
||||||
|
@ -89,11 +89,6 @@ _global_script_classes=[ {
|
|||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://scenes/MainScene.gd"
|
"path": "res://scenes/MainScene.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Resource",
|
|
||||||
"class": "MainPlanetGenerator",
|
|
||||||
"language": "GDScript",
|
|
||||||
"path": "res://scripts/world_generators/MainPlanetGenerator.gd"
|
|
||||||
}, {
|
|
||||||
"base": "EntityResource",
|
"base": "EntityResource",
|
||||||
"class": "ManaResource",
|
"class": "ManaResource",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
@ -161,7 +156,6 @@ _global_script_class_icons={
|
|||||||
"ItemVisualEntry2D": "",
|
"ItemVisualEntry2D": "",
|
||||||
"LayeredTextureMaker": "",
|
"LayeredTextureMaker": "",
|
||||||
"Main": "",
|
"Main": "",
|
||||||
"MainPlanetGenerator": "",
|
|
||||||
"ManaResource": "",
|
"ManaResource": "",
|
||||||
"Menu": "",
|
"Menu": "",
|
||||||
"MobGD": "",
|
"MobGD": "",
|
||||||
@ -215,7 +209,7 @@ window/size/ui_scale_touch=1.2
|
|||||||
[ess]
|
[ess]
|
||||||
|
|
||||||
data/ess_resource_db_path="res://data/resource_db.tres"
|
data/ess_resource_db_path="res://data/resource_db.tres"
|
||||||
enums/stats="Agility,Strength,Stamina,Intellect,Spirit,Health,Mana,Speed,Global Cooldown,Haste,Haste Rating,Resilience,Armor,Attack Power,Spell Power,Melee Crit,Melee Crit bonus,Spell Crit,Spell Crit Bonus,Block,Parry,Damage Reduction,Melee Damage Reduction,Spell Damage Reduction,Damage Taken,Heal Taken,Melee Damage,Spell Damage,Holy Resist,Shadow Resist,Nature Resist,Fire Resist,Frost Resist,Lightning Resist,Chaos Resist,Silence Resist,Fear Resist,Stun Resist,Energy,Rage,XP Rate"
|
enums/stats="Agility,Strength,Stamina,Intellect,Spirit,Health,Mana,Speed,Global Cooldown,Haste,Haste Rating,Resilience,Armor,Attack Power,Spell Power,Melee Crit,Melee Crit Bonus,Spell Crit,Spell Crit Bonus,Block,Parry,Damage Reduction,Melee Damage Reduction,Spell Damage Reduction,Damage Taken,Heal Taken,Melee Damage,Spell Damage,Holy Resist,Shadow Resist,Nature Resist,Fire Resist,Frost Resist,Lightning Resist,Chaos Resist,Silence Resist,Fear Resist,Stun Resist,Energy,Rage,XP Rate,Weapon Damage Min,Weapon Damage Max"
|
||||||
enums/skeletons_bones=PoolStringArray( "", "root,pelvis,spine,spine_1,spine_2,neck,head,left_clavicle,left_upper_arm,left_forearm,left_hand,left_thumb_base,left_thumb_end,left_fingers_base,left_fingers_end,right_clavicle,right_upper_arm,right_forearm,right_hand,right_thumb_base,right_thumb_end,right_fingers_base,right_fingers_end,left_thigh,left_calf,left_foot,right_thigh,right_calf,right_foot" )
|
enums/skeletons_bones=PoolStringArray( "", "root,pelvis,spine,spine_1,spine_2,neck,head,left_clavicle,left_upper_arm,left_forearm,left_hand,left_thumb_base,left_thumb_end,left_fingers_base,left_fingers_end,right_clavicle,right_upper_arm,right_forearm,right_hand,right_thumb_base,right_thumb_end,right_fingers_base,right_fingers_end,left_thigh,left_calf,left_foot,right_thigh,right_calf,right_foot" )
|
||||||
enums/skeletons_bone_attachment_points=PoolStringArray( "", "left_hand,right_hand,torso,root,right_hip,left_hip,spine_2,weapon_left,weapon_right,weapon_left_back,weapon_right_back,weapon_shield_left" )
|
enums/skeletons_bone_attachment_points=PoolStringArray( "", "left_hand,right_hand,torso,root,right_hip,left_hip,spine_2,weapon_left,weapon_right,weapon_left_back,weapon_right_back,weapon_shield_left" )
|
||||||
xp/class_xps=PoolIntArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
|
xp/class_xps=PoolIntArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
|
||||||
@ -262,105 +256,105 @@ texture={
|
|||||||
|
|
||||||
ui_accept={
|
ui_accept={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_0={
|
actionbar_1_0={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_1={
|
actionbar_1_1={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_2={
|
actionbar_1_2={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":67,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_3={
|
actionbar_1_3={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_4={
|
actionbar_1_4={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":71,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":71,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_5={
|
actionbar_1_5={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":49,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":49,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_6={
|
actionbar_1_6={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":50,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":50,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_7={
|
actionbar_1_7={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":51,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":51,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_8={
|
actionbar_1_8={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":52,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":52,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_9={
|
actionbar_1_9={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_10={
|
actionbar_1_10={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_11={
|
actionbar_1_11={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":84,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
actionbar_1_12={
|
actionbar_1_12={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":39,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":39,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
sheath={
|
sheath={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":80,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":80,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
up={
|
up={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
down={
|
down={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
left={
|
left={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
right={
|
right={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
wait={
|
wait={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":69,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,11 +377,12 @@ quality/driver/driver_name="GLES2"
|
|||||||
quality/driver/fallback_to_gles2=true
|
quality/driver/fallback_to_gles2=true
|
||||||
quality/intended_usage/framebuffer_allocation=0
|
quality/intended_usage/framebuffer_allocation=0
|
||||||
quality/intended_usage/framebuffer_allocation.mobile=0
|
quality/intended_usage/framebuffer_allocation.mobile=0
|
||||||
quality/2d/use_pixel_snap=true
|
2d/snapping/use_gpu_pixel_snap=true
|
||||||
vram_compression/import_etc=true
|
vram_compression/import_etc=true
|
||||||
quality/directional_shadow/size.mobile=1024
|
quality/directional_shadow/size.mobile=1024
|
||||||
quality/reflections/texture_array_reflections=false
|
quality/reflections/texture_array_reflections=false
|
||||||
quality/reflections/high_quality_ggx=false
|
quality/reflections/high_quality_ggx=false
|
||||||
environment/default_clear_color=Color( 0, 0, 0, 1 )
|
environment/default_clear_color=Color( 0, 0, 0, 1 )
|
||||||
|
quality/2d/use_pixel_snap=true
|
||||||
quality/2d/use_batching=true
|
quality/2d/use_batching=true
|
||||||
quality/shadows/enabled=false
|
quality/shadows/enabled=false
|
||||||
|
@ -1,110 +0,0 @@
|
|||||||
tool
|
|
||||||
#extends VoxelmanLevelGenerator
|
|
||||||
extends Resource
|
|
||||||
class_name MainPlanetGenerator
|
|
||||||
|
|
||||||
# Copyright (c) 2019-2020 Péter Magyar
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
const planet_folder : String = "res://modules/planets"
|
|
||||||
|
|
||||||
export(int) var _force_planet : int = -1
|
|
||||||
export(int) var _level_seed : int
|
|
||||||
export(bool) var _spawn_mobs : bool
|
|
||||||
|
|
||||||
#var _world : VoxelWorld
|
|
||||||
var _planet : Planet
|
|
||||||
#var _library : VoxelmanLibrary
|
|
||||||
|
|
||||||
#func setup(world : VoxelWorld, level_seed : int, spawn_mobs : bool, library: VoxelmanLibrary) -> void:
|
|
||||||
# _level_seed = level_seed
|
|
||||||
# _world = world
|
|
||||||
# _spawn_mobs = spawn_mobs
|
|
||||||
# _library = library
|
|
||||||
#
|
|
||||||
# create_planet()
|
|
||||||
|
|
||||||
#func _generate_chunk(chunk : VoxelChunk) -> void:
|
|
||||||
# if _planet == null:
|
|
||||||
# return
|
|
||||||
#
|
|
||||||
# _planet.generate_chunk(chunk, _spawn_mobs)
|
|
||||||
|
|
||||||
func create_planet():
|
|
||||||
var planet_files : Array = get_planets(planet_folder)
|
|
||||||
|
|
||||||
if planet_files.size() == 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
var ind : int
|
|
||||||
if _force_planet == -1:
|
|
||||||
seed(_level_seed)
|
|
||||||
ind = randi() % planet_files.size()
|
|
||||||
else:
|
|
||||||
ind = _force_planet
|
|
||||||
|
|
||||||
var planet_data : Planet = ResourceLoader.load(planet_files[ind], "PlanetData")
|
|
||||||
|
|
||||||
if planet_data == null:
|
|
||||||
print("planet_data is null!")
|
|
||||||
return
|
|
||||||
|
|
||||||
print("planet loaded: " + planet_data.resource_path)
|
|
||||||
|
|
||||||
if planet_data.target_script != null:
|
|
||||||
_planet = planet_data.target_script.new()
|
|
||||||
|
|
||||||
if _planet == null:
|
|
||||||
print("_planet is null. wrong type? " + planet_data.resource_path)
|
|
||||||
return
|
|
||||||
elif planet_data.target_class_name != "":
|
|
||||||
if not ClassDB.class_exists(planet_data.target_class_name):
|
|
||||||
print("class doesnt exists" + planet_data.resource_path)
|
|
||||||
return
|
|
||||||
|
|
||||||
_planet = ClassDB.instance(planet_data.target_class_name)
|
|
||||||
else:
|
|
||||||
_planet = Planet.new()
|
|
||||||
|
|
||||||
_planet.current_seed = _level_seed
|
|
||||||
_planet.data = planet_data
|
|
||||||
_planet.setup()
|
|
||||||
# _planet.setup_library(_library)
|
|
||||||
|
|
||||||
func get_planets(path : String, root : bool = true) -> Array:
|
|
||||||
var planet_files : Array = Array()
|
|
||||||
|
|
||||||
var dir = Directory.new()
|
|
||||||
if dir.open(path) == OK:
|
|
||||||
dir.list_dir_begin(true)
|
|
||||||
var file_name = dir.get_next()
|
|
||||||
while (file_name != ""):
|
|
||||||
if not dir.current_is_dir():
|
|
||||||
planet_files.append(path + "/" + file_name)
|
|
||||||
else:
|
|
||||||
if root:
|
|
||||||
var l : Array = get_planets(path + "/" + file_name, false)
|
|
||||||
|
|
||||||
for i in l:
|
|
||||||
planet_files.append(i)
|
|
||||||
|
|
||||||
file_name = dir.get_next()
|
|
||||||
|
|
||||||
return planet_files
|
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,6 @@
|
|||||||
[ext_resource path="res://tilesets/tileset.tres" type="TileSet" id=1]
|
[ext_resource path="res://tilesets/tileset.tres" type="TileSet" id=1]
|
||||||
[ext_resource path="res://world/WorldLayer.gd" type="Script" id=2]
|
[ext_resource path="res://world/WorldLayer.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
|
||||||
[node name="WorldLayer" type="Navigation2D"]
|
[node name="WorldLayer" type="Navigation2D"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
6
ged.sh
Executable file
6
ged.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cp -u ./engine/bin/godot.x11.opt.tools.64 ./engine/bin/run.godot.x11.opt.tools.64
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=`pwd`/engine/bin/
|
||||||
|
./engine/bin/run.godot.x11.opt.tools.64 -e --path ./game/
|
24
module_config.py
Normal file
24
module_config.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
engine_repository = [ ['https://github.com/godotengine/godot.git', 'git@github.com:godotengine/godot.git'], 'engine', '' ]
|
||||||
|
|
||||||
|
module_repositories = [
|
||||||
|
[ ['https://github.com/Relintai/entity_spell_system.git', 'git@github.com:Relintai/entity_spell_system.git'], 'entity_spell_system', '' ],
|
||||||
|
[ ['https://github.com/Relintai/ui_extensions.git', 'git@github.com:Relintai/ui_extensions.git'], 'ui_extensions', '' ],
|
||||||
|
[ ['https://github.com/Relintai/texture_packer.git', 'git@github.com:Relintai/texture_packer.git'], 'texture_packer', '' ],
|
||||||
|
[ ['https://github.com/Relintai/godot_fastnoise.git', 'git@github.com:Relintai/godot_fastnoise.git'], 'fastnoise', '' ],
|
||||||
|
[ ['https://github.com/Relintai/thread_pool.git', 'git@github.com:Relintai/thread_pool.git'], 'thread_pool', '' ],
|
||||||
|
]
|
||||||
|
|
||||||
|
removed_modules = [
|
||||||
|
[ ['https://github.com/Relintai/world_generator.git', 'git@github.com:Relintai/world_generator.git'], 'world_generator', '' ],
|
||||||
|
]
|
||||||
|
|
||||||
|
addon_repositories = [
|
||||||
|
]
|
||||||
|
|
||||||
|
third_party_addon_repositories = [
|
||||||
|
]
|
||||||
|
|
||||||
|
godot_branch = '3.x'
|
||||||
|
|
||||||
|
slim_args = 'module_webm_enabled=no module_arkit_enabled=no module_visual_script_enabled=no module_gdnative_enabled=no module_mobile_vr_enabled=no module_theora_enabled=no module_xatlas_unwrap_enabled=no no_editor_splash=yes module_bullet_enabled=no module_camera_enabled=no module_csg_enabled=no module_denoise_enabled=no module_fbx_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_lightmapper_cpu_enabled=no module_raycast_enabled=no module_recast_enabled=no module_vhacd_enabled=no module_webxr_enabled=no'
|
Loading…
Reference in New Issue
Block a user