mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Update to the latest ESS.
This commit is contained in:
parent
ae09b0194e
commit
5150dccf9e
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": "f26e2f65cd4af638a5e64a42aa519abc9cde6604", "world_generator": "09372b146936fda509f5c23a522e998d12f38e13", "entity_spell_system": "5f5cdac043e2add5c54d165c6b507b0e02289497", "ui_extensions": "38acc650db260a831dc26ca96fe9d9a087230bdc", "voxelman": "db77530ec1b70861fb2e3783d3ea6ba75a4ac793", "texture_packer": "7bff901e4946b903a73b266d6a02c317f079ab33", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "4bda19b12be2c2a79a6121de6d22e48f3934e726", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49", "procedural_animations": "9c287b9e54dc8d306668a6118a6d2c78415eb8de", "fast_quadratic_mesh_simplifier": "63d55b154967321212a6426e9b327c95e007785d"}
|
{"engine": "217d8f4e9760ab846e258b7c8842548b601c2ab9", "world_generator": "09372b146936fda509f5c23a522e998d12f38e13", "entity_spell_system": "26c638881bcb8f1d86360e22fa39f3c95af32429", "ui_extensions": "38acc650db260a831dc26ca96fe9d9a087230bdc", "voxelman": "db77530ec1b70861fb2e3783d3ea6ba75a4ac793", "texture_packer": "7bff901e4946b903a73b266d6a02c317f079ab33", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "4bda19b12be2c2a79a6121de6d22e48f3934e726", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49", "procedural_animations": "9c287b9e54dc8d306668a6118a6d2c78415eb8de", "fast_quadratic_mesh_simplifier": "63d55b154967321212a6426e9b327c95e007785d"}
|
@ -38,7 +38,7 @@ var _players : Array
|
|||||||
var _mobs : Array
|
var _mobs : Array
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
EntityDataManager.load_all()
|
#EntityDataManager.load_all()
|
||||||
|
|
||||||
_spawn_parent = get_node(spawn_parent_path)
|
_spawn_parent = get_node(spawn_parent_path)
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ func spawn_display_player(name : String) -> Entity:
|
|||||||
func spawn_player_for_menu(class_id : int, name : String, parent : Node) -> Entity:
|
func spawn_player_for_menu(class_id : int, name : String, parent : Node) -> Entity:
|
||||||
var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
||||||
var cls : EntityData = EntityDataManager.get_player_character_data(class_id)
|
var cls : EntityData = EntityDataManager.get_player_character_data(class_id)
|
||||||
var class_profile : ClassProfile = Profiles.get_class_profile(class_id)
|
var class_profile : ClassProfile = ProfileManager.get_class_profile(class_id)
|
||||||
|
|
||||||
createinfo.entity_data = cls
|
createinfo.entity_data = cls
|
||||||
createinfo.player_name = name
|
createinfo.player_name = name
|
||||||
@ -194,7 +194,7 @@ func spawn_networked_player(class_id : int, position : Vector3, name : String,
|
|||||||
|
|
||||||
var cls : EntityData = Entities.get_entity_data(class_id)
|
var cls : EntityData = Entities.get_entity_data(class_id)
|
||||||
|
|
||||||
var class_profile : ClassProfile = Profiles.get_class_profile(class_id)
|
var class_profile : ClassProfile = ProfileManager.get_class_profile(class_id)
|
||||||
|
|
||||||
createinfo.entity_data = cls
|
createinfo.entity_data = cls
|
||||||
createinfo.player_name = name
|
createinfo.player_name = name
|
||||||
@ -225,7 +225,7 @@ func spawn_player(class_id : int, position : Vector3, name : String, node_name
|
|||||||
|
|
||||||
var cls : EntityData = Entities.get_player_character_data(class_id)
|
var cls : EntityData = Entities.get_player_character_data(class_id)
|
||||||
|
|
||||||
var class_profile : ClassProfile = Profiles.get_class_profile(class_id)
|
var class_profile : ClassProfile = ProfileManager.get_class_profile(class_id)
|
||||||
|
|
||||||
createinfo.entity_data = cls
|
createinfo.entity_data = cls
|
||||||
createinfo.player_name = name
|
createinfo.player_name = name
|
15
game/autoload/Entities.tscn
Normal file
15
game/autoload/Entities.tscn
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://autoload/Entities.gd" type="Script" id=1]
|
||||||
|
[ext_resource path="res://player/NetworkedPlayer.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=3]
|
||||||
|
[ext_resource path="res://player/Mob.tscn" type="PackedScene" id=4]
|
||||||
|
[ext_resource path="res://player/DisplayPlayer.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
|
[node name="Entities" type="Node"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
player_scene = ExtResource( 3 )
|
||||||
|
networked_player_scene = ExtResource( 2 )
|
||||||
|
mob_scene = ExtResource( 4 )
|
||||||
|
player_display_scene = ExtResource( 5 )
|
||||||
|
default_level_override = 50
|
@ -1,26 +0,0 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://autoload/EntityDataManager.gd" type="Script" id=1]
|
|
||||||
[ext_resource path="res://player/NetworkedPlayer.tscn" type="PackedScene" id=2]
|
|
||||||
[ext_resource path="res://player/Player.tscn" type="PackedScene" id=3]
|
|
||||||
[ext_resource path="res://player/Mob.tscn" type="PackedScene" id=4]
|
|
||||||
[ext_resource path="res://player/DisplayPlayer.tscn" type="PackedScene" id=5]
|
|
||||||
|
|
||||||
[node name="EntityDataManager" type="Node"]
|
|
||||||
xp_data_path = "res://data/xp/xp_data.tres"
|
|
||||||
entity_resources_folder = "res://data/entity_resources"
|
|
||||||
entity_skills_folder = "res://data/entity_skills"
|
|
||||||
entity_datas_folder = "res://data/entities"
|
|
||||||
spells_folder = "res://data/spells"
|
|
||||||
auras_folder = "res://data/auras"
|
|
||||||
world_spell_datas_folder = "res://data/world_spells"
|
|
||||||
craft_data_folder = "res://data/crafting"
|
|
||||||
item_template_folder = "res://data/item_templates"
|
|
||||||
mob_data_folder = "res://data/mob_data"
|
|
||||||
player_character_data_folder = "res://data/player_character_data"
|
|
||||||
script = ExtResource( 1 )
|
|
||||||
player_scene = ExtResource( 3 )
|
|
||||||
networked_player_scene = ExtResource( 2 )
|
|
||||||
mob_scene = ExtResource( 4 )
|
|
||||||
player_display_scene = ExtResource( 5 )
|
|
||||||
default_level_override = 50
|
|
@ -1,85 +0,0 @@
|
|||||||
extends ProfileManager
|
|
||||||
|
|
||||||
# Copyright Péter Magyar relintai@gmail.com
|
|
||||||
# MIT License, functionality from this class needs to be protable to the entity spell system
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
#export (float) var save_interval : float = 20
|
|
||||||
#var last_save_time : float = 0
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
var save_game : File = File.new()
|
|
||||||
|
|
||||||
if save_game.file_exists("user://profile.save"):
|
|
||||||
load_full()
|
|
||||||
else:
|
|
||||||
load_defaults()
|
|
||||||
|
|
||||||
var actions : Array = InputMap.get_actions()
|
|
||||||
|
|
||||||
for action in actions:
|
|
||||||
var acts : Array = InputMap.get_action_list(action)
|
|
||||||
|
|
||||||
for i in range(len(acts)):
|
|
||||||
var a = acts[i]
|
|
||||||
if a is InputEventKey:
|
|
||||||
var nie : BSInputEventKey = BSInputEventKey.new()
|
|
||||||
nie.from_input_event_key(a as InputEventKey)
|
|
||||||
acts[i] = nie
|
|
||||||
|
|
||||||
InputMap.action_erase_event(action, a)
|
|
||||||
InputMap.action_add_event(action, nie)
|
|
||||||
|
|
||||||
|
|
||||||
func _save() -> void:
|
|
||||||
save_full()
|
|
||||||
|
|
||||||
func _load() -> void:
|
|
||||||
load_full()
|
|
||||||
|
|
||||||
func save_full() -> void:
|
|
||||||
var save_game = File.new()
|
|
||||||
|
|
||||||
save_game.open("user://profile.save", File.WRITE)
|
|
||||||
|
|
||||||
save_game.store_line(to_json(to_dict()))
|
|
||||||
|
|
||||||
save_game.close()
|
|
||||||
|
|
||||||
func load_full() -> void:
|
|
||||||
clear_class_profiles()
|
|
||||||
|
|
||||||
var save_game : File = File.new()
|
|
||||||
|
|
||||||
if save_game.file_exists("user://profile.save"):
|
|
||||||
if save_game.open("user://profile.save", File.READ) == OK:
|
|
||||||
|
|
||||||
var text : String = save_game.get_as_text()
|
|
||||||
|
|
||||||
if text == "":
|
|
||||||
load_defaults()
|
|
||||||
return
|
|
||||||
|
|
||||||
var save_json : Dictionary = parse_json(text)
|
|
||||||
|
|
||||||
from_dict(save_json)
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://autoload/ProfileManager.gd" type="Script" id=1]
|
|
||||||
|
|
||||||
[node name="ProfileManager" type="ProfileManager"]
|
|
||||||
script = ExtResource( 1 )
|
|
@ -44,6 +44,22 @@ var _settings : Dictionary = {
|
|||||||
func _ready():
|
func _ready():
|
||||||
load_settings()
|
load_settings()
|
||||||
|
|
||||||
|
var actions : Array = InputMap.get_actions()
|
||||||
|
|
||||||
|
for action in actions:
|
||||||
|
var acts : Array = InputMap.get_action_list(action)
|
||||||
|
|
||||||
|
for i in range(len(acts)):
|
||||||
|
var a = acts[i]
|
||||||
|
if a is InputEventKey:
|
||||||
|
var nie : BSInputEventKey = BSInputEventKey.new()
|
||||||
|
nie.from_input_event_key(a as InputEventKey)
|
||||||
|
acts[i] = nie
|
||||||
|
|
||||||
|
InputMap.action_erase_event(action, a)
|
||||||
|
InputMap.action_add_event(action, nie)
|
||||||
|
|
||||||
|
|
||||||
func set_value(section, key, value) -> void:
|
func set_value(section, key, value) -> void:
|
||||||
_settings[section][key] = value
|
_settings[section][key] = value
|
||||||
|
|
||||||
|
@ -230,8 +230,7 @@ config/version="0.2"
|
|||||||
Logger="*res://autoload/Logger.tscn"
|
Logger="*res://autoload/Logger.tscn"
|
||||||
Settings="*res://autoload/SettingsManager.gd"
|
Settings="*res://autoload/SettingsManager.gd"
|
||||||
CursorManager="*res://autoload/CursorManager.tscn"
|
CursorManager="*res://autoload/CursorManager.tscn"
|
||||||
Entities="*res://autoload/EntityDataManager.tscn"
|
Entities="*res://autoload/Entities.tscn"
|
||||||
Profiles="*res://autoload/ProfileManager.tscn"
|
|
||||||
WorldNumbers="*res://autoload/WorldNumbers.tscn"
|
WorldNumbers="*res://autoload/WorldNumbers.tscn"
|
||||||
ThemeAtlas="*res://autoload/ThemeAtlas.tscn"
|
ThemeAtlas="*res://autoload/ThemeAtlas.tscn"
|
||||||
Server="*res://autoload/Server.tscn"
|
Server="*res://autoload/Server.tscn"
|
||||||
@ -259,6 +258,7 @@ enabled=PoolStringArray( "ess_data", "prop_tool" )
|
|||||||
|
|
||||||
[ess]
|
[ess]
|
||||||
|
|
||||||
|
data/automatic_load=true
|
||||||
data/xp_data_path="res://data/xp/xp_data.tres"
|
data/xp_data_path="res://data/xp/xp_data.tres"
|
||||||
data/entity_resources_folder="res://data/entity_resources"
|
data/entity_resources_folder="res://data/entity_resources"
|
||||||
data/entity_skills_folder="res://data/entity_skills"
|
data/entity_skills_folder="res://data/entity_skills"
|
||||||
@ -270,7 +270,7 @@ data/craft_data_folder="res://data/crafting"
|
|||||||
data/item_template_folder="res://data/item_templates"
|
data/item_template_folder="res://data/item_templates"
|
||||||
data/mob_data_folder="res://data/mob_data"
|
data/mob_data_folder="res://data/mob_data"
|
||||||
data/player_character_data_folder="res://data/player_character_data"
|
data/player_character_data_folder="res://data/player_character_data"
|
||||||
data/automatic_load=true
|
profiles/automatic_load=true
|
||||||
|
|
||||||
[importer_defaults]
|
[importer_defaults]
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ func _lock_button_click():
|
|||||||
if cls == null:
|
if cls == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
var profile = Profiles.get_class_profile(cls.id)
|
var profile = ProfileManager.get_class_profile(cls.id)
|
||||||
|
|
||||||
profile.actionbar_locked = not profile.actionbar_locked
|
profile.actionbar_locked = not profile.actionbar_locked
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user