mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Update ESS to the latest to get the id to resource path changes.
This commit is contained in:
parent
1a04066f4c
commit
a2933a2b7b
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": {"3.2": "cb1366f006dfc9904083e8fc6fa23e271bc39e39", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "9d946f1623b9cb57b2e1d9681ac3b7f7e7b746d4"}, "entity_spell_system": {"master": "67395b3d355f0bf6cd4efa28e6fd916791f46b34"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "23c4321d71927a0e2d08b5d19fc4c5bb8242e7d2"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}}
|
{"engine": {"3.2": "cb1366f006dfc9904083e8fc6fa23e271bc39e39", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "9d946f1623b9cb57b2e1d9681ac3b7f7e7b746d4"}, "entity_spell_system": {"master": "178c2bf921732ca2bbf91f12f96235732a404b38"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "23c4321d71927a0e2d08b5d19fc4c5bb8242e7d2"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}}
|
@ -118,7 +118,7 @@ func load_player(file_name : String, position : Vector3, network_owner : int) ->
|
|||||||
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 = ESS.resource_db.get_entity_data(class_id)
|
var cls : EntityData = ESS.resource_db.get_entity_data(class_id)
|
||||||
var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(class_id)
|
var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(cls.resource_path)
|
||||||
|
|
||||||
var level : int = 1
|
var level : int = 1
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ func _ready():
|
|||||||
ce.owner = container
|
ce.owner = container
|
||||||
|
|
||||||
ce.id = d.id
|
ce.id = d.id
|
||||||
var class_profile : ClassProfile = profile.get_class_profile(d.id)
|
var class_profile : ClassProfile = profile.get_class_profile(d.resource_path)
|
||||||
ce.set_class_name(d.entity_class_data.text_name, class_profile.level, class_profile)
|
ce.set_class_name(d.entity_class_data.text_name, class_profile.level, class_profile)
|
||||||
ce.group = character_creation_button_group
|
ce.group = character_creation_button_group
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ func renounce_character() -> void:
|
|||||||
if b == null:
|
if b == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(b.entity.characterclass_id)
|
var class_profile : ClassProfile = ProfileManager.getc_player_profile().get_class_profile(b.entity.sentity_data.resource_path)
|
||||||
|
|
||||||
var xp_data : XPData = ESS.get_resource_db().get_xp_data()
|
var xp_data : XPData = ESS.get_resource_db().get_xp_data()
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ extends EntityResourceData
|
|||||||
|
|
||||||
func _get_entity_resource_instance() -> EntityResource:
|
func _get_entity_resource_instance() -> EntityResource:
|
||||||
var mr = ManaResource.new()
|
var mr = ManaResource.new()
|
||||||
mr.data_id = id
|
mr.data_path = resource_path
|
||||||
|
|
||||||
return mr
|
return mr
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ func setup_icon() -> void:
|
|||||||
|
|
||||||
icon_rect.texture = null
|
icon_rect.texture = null
|
||||||
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL):
|
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL):
|
||||||
if (button_entry.item_id == 0):
|
if (button_entry.item_path == ""):
|
||||||
if icon_rect.texture != null:
|
if icon_rect.texture != null:
|
||||||
ThemeAtlas.unref_texture(icon_rect.texture)
|
ThemeAtlas.unref_texture(icon_rect.texture)
|
||||||
|
|
||||||
@ -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 = ESS.resource_db.get_spell(button_entry.item_id)
|
var spell = ESS.resource_db.get_spell_path(button_entry.item_path)
|
||||||
|
|
||||||
if spell == null:
|
if spell == null:
|
||||||
return
|
return
|
||||||
@ -174,7 +174,7 @@ func setup_icon() -> void:
|
|||||||
spell_type = spell.spell_type
|
spell_type = spell.spell_type
|
||||||
has_gcd = spell.cooldown_global_cooldown_enabled
|
has_gcd = spell.cooldown_global_cooldown_enabled
|
||||||
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM):
|
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM):
|
||||||
if (button_entry.item_id == 0):
|
if (button_entry.item_path == ""):
|
||||||
if icon_rect.texture != null:
|
if icon_rect.texture != null:
|
||||||
ThemeAtlas.unref_texture(icon_rect.texture)
|
ThemeAtlas.unref_texture(icon_rect.texture)
|
||||||
|
|
||||||
@ -185,7 +185,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 item : ItemTemplate = ESS.get_resource_db().get_item_template(button_entry.item_id)
|
var item : ItemTemplate = ESS.get_resource_db().get_item_template_path(button_entry.item_path)
|
||||||
|
|
||||||
if item.icon != null:
|
if item.icon != null:
|
||||||
icon_rect.texture = ThemeAtlas.add_texture(item.icon)
|
icon_rect.texture = ThemeAtlas.add_texture(item.icon)
|
||||||
@ -197,20 +197,20 @@ func setup_icon() -> void:
|
|||||||
|
|
||||||
func _on_button_pressed() -> void:
|
func _on_button_pressed() -> void:
|
||||||
if button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL:
|
if button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL:
|
||||||
if (button_entry.item_id == 0):
|
if (button_entry.item_path == ""):
|
||||||
return
|
return
|
||||||
|
|
||||||
player.crequest_spell_cast(button_entry.item_id)
|
player.crequest_spell_cast(ESS.resource_db.spell_path_to_id(button_entry.item_path))
|
||||||
|
|
||||||
elif button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM:
|
elif button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM:
|
||||||
if (button_entry.item_id == 0):
|
if (button_entry.item_path == ""):
|
||||||
return
|
return
|
||||||
|
|
||||||
player.crequest_use_item(button_entry.item_id)
|
player.crequest_use_item(ESS.resource_db.item_template_path_to_id(button_entry.item_path))
|
||||||
|
|
||||||
func set_button_entry_data(type: int, item_id: int) -> void:
|
func set_button_entry_data(type: int, item_path: String) -> void:
|
||||||
button_entry.type = type
|
button_entry.type = type
|
||||||
button_entry.itekm_id = item_id
|
button_entry.item_path = item_path
|
||||||
|
|
||||||
setup_icon()
|
setup_icon()
|
||||||
|
|
||||||
@ -235,10 +235,10 @@ func get_drag_data(pos: Vector2) -> Object:
|
|||||||
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM):
|
elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM):
|
||||||
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_ITEM
|
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_ITEM
|
||||||
|
|
||||||
esd.item_id = button_entry.item_id
|
esd.item_path = button_entry.item_path
|
||||||
|
|
||||||
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_NONE
|
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_NONE
|
||||||
button_entry.item_id = 0
|
button_entry.item_path = ""
|
||||||
|
|
||||||
# Profiles.save()
|
# Profiles.save()
|
||||||
|
|
||||||
@ -251,22 +251,22 @@ func can_drop_data(pos, data) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
func drop_data(pos, esd) -> void:
|
func drop_data(pos, esd) -> void:
|
||||||
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL and button_entry.item_id == esd.item_id:
|
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL and button_entry.item_path == esd.item_path:
|
||||||
return
|
return
|
||||||
|
|
||||||
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL:
|
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL:
|
||||||
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL
|
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL
|
||||||
button_entry.item_id = esd.item_id
|
button_entry.item_path = esd.item_path
|
||||||
elif esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_ITEM or esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM or esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM:
|
elif esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_ITEM or esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM or esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM:
|
||||||
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM
|
button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM
|
||||||
|
|
||||||
if button_entry.item_id != esd.item_id:
|
if button_entry.item_path != esd.item_path:
|
||||||
var it : ItemTemplate = ESS.get_resource_db().get_item_template(esd.item_id)
|
var it : ItemTemplate = ESS.get_resource_db().get_item_template_path(esd.item_path)
|
||||||
|
|
||||||
if it == null or it.use_spell == null:
|
if it == null or it.use_spell == null:
|
||||||
button_entry.item_id = 0
|
button_entry.item_path = ""
|
||||||
else:
|
else:
|
||||||
button_entry.item_id = esd.item_id
|
button_entry.item_path = esd.item_path
|
||||||
|
|
||||||
|
|
||||||
setup_icon()
|
setup_icon()
|
||||||
|
@ -167,7 +167,7 @@ func get_drag_data(pos: Vector2) -> Object:
|
|||||||
|
|
||||||
esd.origin = self
|
esd.origin = self
|
||||||
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM
|
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM
|
||||||
esd.item_id = item.item_template.id
|
esd.item_path = item.item_template.resource_path
|
||||||
esd.set_meta("slot_id", slot_id)
|
esd.set_meta("slot_id", slot_id)
|
||||||
|
|
||||||
setup_icon()
|
setup_icon()
|
||||||
@ -181,10 +181,10 @@ func can_drop_data(pos, data) -> bool:
|
|||||||
|
|
||||||
func drop_data(pos, esd) -> void:
|
func drop_data(pos, esd) -> void:
|
||||||
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM:
|
if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_INVENTORY_ITEM:
|
||||||
player.crequest_item_swap(slot_id, esd.item_id)
|
player.crequest_item_swap(slot_id, esd.get_meta("slot_id"))
|
||||||
setup_icon()
|
setup_icon()
|
||||||
elif esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM:
|
elif esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM:
|
||||||
player.crequest_equip(esd.item_id, slot_id)
|
player.crequest_equip(ESS.resource_db.get_item_template_path(esd.item_path).id, slot_id)
|
||||||
setup_icon()
|
setup_icon()
|
||||||
|
|
||||||
func set_slot_id(pslot_id : int) -> void:
|
func set_slot_id(pslot_id : int) -> void:
|
||||||
|
@ -88,7 +88,7 @@ func get_drag_data(position):
|
|||||||
|
|
||||||
esd.origin = self
|
esd.origin = self
|
||||||
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM
|
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_EQUIPPED_ITEM
|
||||||
esd.item_id = _item_instance.item_template.id
|
esd.item_path = _item_instance.item_template.resource_path
|
||||||
esd.set_meta("equip_slot_id", equip_slot)
|
esd.set_meta("equip_slot_id", equip_slot)
|
||||||
|
|
||||||
return esd
|
return esd
|
||||||
|
@ -40,6 +40,6 @@ func get_drag_data(pos):
|
|||||||
var esd = ESDragAndDrop.new()
|
var esd = ESDragAndDrop.new()
|
||||||
|
|
||||||
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL
|
esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL
|
||||||
esd.item_id = spell.id
|
esd.item_path = spell.resource_path
|
||||||
|
|
||||||
return esd
|
return esd
|
||||||
|
Loading…
Reference in New Issue
Block a user