mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
ESS update.
This commit is contained in:
parent
3cce5a2b3e
commit
ae09b0194e
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": "188dc714b000bbdb086513dcff3dd4bc4f75a0e7", "world_generator": "09372b146936fda509f5c23a522e998d12f38e13", "entity_spell_system": "29a26d9774ba6c05858aba6b5fe442c282bbd117", "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": "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"}
|
@ -38,6 +38,8 @@ var _players : Array
|
|||||||
var _mobs : Array
|
var _mobs : Array
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
EntityDataManager.load_all()
|
||||||
|
|
||||||
_spawn_parent = get_node(spawn_parent_path)
|
_spawn_parent = get_node(spawn_parent_path)
|
||||||
|
|
||||||
# get_tree().connect("network_peer_connected", self, "_player_connected")
|
# get_tree().connect("network_peer_connected", self, "_player_connected")
|
||||||
@ -121,7 +123,7 @@ puppet func spawn_owned_player(data : String, position : Vector3) -> void:
|
|||||||
func load_player(file_name : String, position : Vector3, network_owner : int) -> Entity:
|
func load_player(file_name : String, position : Vector3, network_owner : int) -> Entity:
|
||||||
# var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
# var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
||||||
#
|
#
|
||||||
# var cls : EntityData = Entities.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 = Profiles.get_class_profile(class_id)
|
||||||
#
|
#
|
||||||
@ -163,7 +165,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 = Entities.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 = Profiles.get_class_profile(class_id)
|
||||||
|
|
||||||
createinfo.entity_data = cls
|
createinfo.entity_data = cls
|
||||||
@ -251,7 +253,7 @@ func spawn_player(class_id : int, position : Vector3, name : String, node_name
|
|||||||
func spawn_mob(class_id : int, level : int, position : Vector3) -> Entity:
|
func spawn_mob(class_id : int, level : int, position : Vector3) -> Entity:
|
||||||
var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
var createinfo : EntityCreateInfo = EntityCreateInfo.new()
|
||||||
|
|
||||||
var cls : EntityData = Entities.get_entity_data(class_id)
|
var cls : EntityData = EntityDataManager.get_entity_data(class_id)
|
||||||
|
|
||||||
if cls == null:
|
if cls == null:
|
||||||
print("clsnull")
|
print("clsnull")
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
[ext_resource path="res://player/Mob.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://player/Mob.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://player/DisplayPlayer.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://player/DisplayPlayer.tscn" type="PackedScene" id=5]
|
||||||
|
|
||||||
[node name="EntityDataManager" type="EntityDataManager"]
|
[node name="EntityDataManager" type="Node"]
|
||||||
xp_data_path = "res://data/xp/xp_data.tres"
|
xp_data_path = "res://data/xp/xp_data.tres"
|
||||||
entity_resources_folder = "res://data/entity_resources"
|
entity_resources_folder = "res://data/entity_resources"
|
||||||
entity_skills_folder = "res://data/entity_skills"
|
entity_skills_folder = "res://data/entity_skills"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
[ext_resource path="res://data/icons/items/gold.tres" type="Texture" id=1]
|
[ext_resource path="res://data/icons/items/gold.tres" type="Texture" id=1]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
|
resource_name = "Gold"
|
||||||
id = 1
|
id = 1
|
||||||
text_name = "Gold"
|
text_name = "Gold"
|
||||||
item_type = 13
|
item_type = 13
|
||||||
|
@ -289,10 +289,10 @@ func _setup():
|
|||||||
sentity_name = sentity_data.text_name
|
sentity_name = sentity_data.text_name
|
||||||
|
|
||||||
func _son_xp_gained(value : int) -> void:
|
func _son_xp_gained(value : int) -> void:
|
||||||
if not Entities.get_xp_data().can_level_up(gets_level()):
|
if not EntityDataManager.get_xp_data().can_level_up(gets_level()):
|
||||||
return
|
return
|
||||||
|
|
||||||
var xpr : int = Entities.get_xp_data().get_xp(gets_level());
|
var xpr : int = EntityDataManager.get_xp_data().get_xp(gets_level());
|
||||||
|
|
||||||
if xpr <= sxp:
|
if xpr <= sxp:
|
||||||
slevelup(1)
|
slevelup(1)
|
||||||
|
@ -428,10 +428,10 @@ func _con_spell_cast_success(info):
|
|||||||
anim_node_state_machine.travel("run-loop")
|
anim_node_state_machine.travel("run-loop")
|
||||||
|
|
||||||
func _son_xp_gained(value : int) -> void:
|
func _son_xp_gained(value : int) -> void:
|
||||||
if not Entities.get_xp_data().can_level_up(gets_level()):
|
if not EntityDataManager.get_xp_data().can_level_up(gets_level()):
|
||||||
return
|
return
|
||||||
|
|
||||||
var xpr : int = Entities.get_xp_data().get_xp(gets_level());
|
var xpr : int = EntityDataManager.get_xp_data().get_xp(gets_level());
|
||||||
|
|
||||||
if xpr <= sxp:
|
if xpr <= sxp:
|
||||||
slevelup(1)
|
slevelup(1)
|
||||||
|
@ -257,6 +257,21 @@ window/size/viewport_scale=100
|
|||||||
|
|
||||||
enabled=PoolStringArray( "ess_data", "prop_tool" )
|
enabled=PoolStringArray( "ess_data", "prop_tool" )
|
||||||
|
|
||||||
|
[ess]
|
||||||
|
|
||||||
|
data/xp_data_path="res://data/xp/xp_data.tres"
|
||||||
|
data/entity_resources_folder="res://data/entity_resources"
|
||||||
|
data/entity_skills_folder="res://data/entity_skills"
|
||||||
|
data/entity_datas_folder="res://data/entities"
|
||||||
|
data/spells_folder="res://data/spells"
|
||||||
|
data/auras_folder="res://data/auras"
|
||||||
|
data/world_spell_datas_folder="res://data/world_spells"
|
||||||
|
data/craft_data_folder="res://data/crafting"
|
||||||
|
data/item_template_folder="res://data/item_templates"
|
||||||
|
data/mob_data_folder="res://data/mob_data"
|
||||||
|
data/player_character_data_folder="res://data/player_character_data"
|
||||||
|
data/automatic_load=true
|
||||||
|
|
||||||
[importer_defaults]
|
[importer_defaults]
|
||||||
|
|
||||||
texture_array={
|
texture_array={
|
||||||
|
@ -36,8 +36,8 @@ func _ready():
|
|||||||
|
|
||||||
var fb : Button = null
|
var fb : Button = null
|
||||||
|
|
||||||
for i in range(Entities.get_player_character_data_count()):
|
for i in range(EntityDataManager.get_player_character_data_count()):
|
||||||
var d : EntityData = Entities.get_player_character_data_index(i)
|
var d : EntityData = EntityDataManager.get_player_character_data_index(i)
|
||||||
|
|
||||||
var ce : Button = character_entry.instance() as Button
|
var ce : Button = character_entry.instance() as Button
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ func setup_icon() -> void:
|
|||||||
ThemeAtlas.unref_texture(icon_rect.texture)
|
ThemeAtlas.unref_texture(icon_rect.texture)
|
||||||
icon_rect.texture = null
|
icon_rect.texture = null
|
||||||
|
|
||||||
var spell = Entities.get_spell(button_entry.item_id)
|
var spell = EntityDataManager.get_spell(button_entry.item_id)
|
||||||
|
|
||||||
if spell.icon != null:
|
if spell.icon != null:
|
||||||
icon_rect.texture = ThemeAtlas.add_texture(spell.icon)
|
icon_rect.texture = ThemeAtlas.add_texture(spell.icon)
|
||||||
|
@ -96,7 +96,7 @@ func clevel_changed(entity: Entity, value : int) -> void:
|
|||||||
_level_text.text = str(_player.clevel)
|
_level_text.text = str(_player.clevel)
|
||||||
|
|
||||||
_xp_range.min_value = 0
|
_xp_range.min_value = 0
|
||||||
_xp_range.max_value = Entities.get_xp_data().get_xp(_player.clevel)
|
_xp_range.max_value = EntityDataManager.get_xp_data().get_xp(_player.clevel)
|
||||||
|
|
||||||
func con_xp_gained(entity: Entity, val: int) -> void:
|
func con_xp_gained(entity: Entity, val: int) -> void:
|
||||||
_xp_range.value = _player.cxp
|
_xp_range.value = _player.cxp
|
||||||
|
Loading…
Reference in New Issue
Block a user