diff --git a/HEADS b/HEADS index 209ab922..01b432d8 100644 --- a/HEADS +++ b/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"}} \ No newline at end of file +{"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"}} \ No newline at end of file diff --git a/game/player/bs_entity_spawner.gd b/game/player/bs_entity_spawner.gd index 94daa0e5..569c21a4 100644 --- a/game/player/bs_entity_spawner.gd +++ b/game/player/bs_entity_spawner.gd @@ -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: var createinfo : EntityCreateInfo = EntityCreateInfo.new() 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 diff --git a/game/scenes/CharacterCreationMenu.gd b/game/scenes/CharacterCreationMenu.gd index 665e5ca7..ae86280f 100644 --- a/game/scenes/CharacterCreationMenu.gd +++ b/game/scenes/CharacterCreationMenu.gd @@ -53,7 +53,7 @@ func _ready(): ce.owner = container 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.group = character_creation_button_group diff --git a/game/scenes/CharacterSelectorMenu.gd b/game/scenes/CharacterSelectorMenu.gd index 480a5a28..29f6893d 100644 --- a/game/scenes/CharacterSelectorMenu.gd +++ b/game/scenes/CharacterSelectorMenu.gd @@ -148,7 +148,7 @@ func renounce_character() -> void: if b == null: 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() diff --git a/game/scripts/resources/ManaResourceData.gd b/game/scripts/resources/ManaResourceData.gd index 5b592398..6652cf5b 100644 --- a/game/scripts/resources/ManaResourceData.gd +++ b/game/scripts/resources/ManaResourceData.gd @@ -22,7 +22,7 @@ extends EntityResourceData func _get_entity_resource_instance() -> EntityResource: var mr = ManaResource.new() - mr.data_id = id + mr.data_path = resource_path return mr diff --git a/game/ui/actionbars/ActionBarEntry.gd b/game/ui/actionbars/ActionBarEntry.gd index 2378f873..3b480f31 100644 --- a/game/ui/actionbars/ActionBarEntry.gd +++ b/game/ui/actionbars/ActionBarEntry.gd @@ -150,7 +150,7 @@ func setup_icon() -> void: icon_rect.texture = null 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: ThemeAtlas.unref_texture(icon_rect.texture) @@ -161,7 +161,7 @@ func setup_icon() -> void: ThemeAtlas.unref_texture(icon_rect.texture) 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: return @@ -174,7 +174,7 @@ func setup_icon() -> void: spell_type = spell.spell_type has_gcd = spell.cooldown_global_cooldown_enabled 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: ThemeAtlas.unref_texture(icon_rect.texture) @@ -185,7 +185,7 @@ func setup_icon() -> void: ThemeAtlas.unref_texture(icon_rect.texture) 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: icon_rect.texture = ThemeAtlas.add_texture(item.icon) @@ -197,20 +197,20 @@ func setup_icon() -> void: func _on_button_pressed() -> void: if button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_SPELL: - if (button_entry.item_id == 0): + if (button_entry.item_path == ""): 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: - if (button_entry.item_id == 0): + if (button_entry.item_path == ""): 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.itekm_id = item_id + button_entry.item_path = item_path setup_icon() @@ -235,10 +235,10 @@ func get_drag_data(pos: Vector2) -> Object: elif (button_entry.type == ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_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.item_id = 0 + button_entry.item_path = "" # Profiles.save() @@ -251,22 +251,22 @@ func can_drop_data(pos, data) -> bool: 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 if esd.type == ESDragAndDrop.ES_DRAG_AND_DROP_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: button_entry.type = ActionBarButtonEntry.ACTION_BAR_BUTTON_ENTRY_TYPE_ITEM - if button_entry.item_id != esd.item_id: - var it : ItemTemplate = ESS.get_resource_db().get_item_template(esd.item_id) + if button_entry.item_path != esd.item_path: + var it : ItemTemplate = ESS.get_resource_db().get_item_template_path(esd.item_path) if it == null or it.use_spell == null: - button_entry.item_id = 0 + button_entry.item_path = "" else: - button_entry.item_id = esd.item_id + button_entry.item_path = esd.item_path setup_icon() diff --git a/game/ui/bags/BagEntry.gd b/game/ui/bags/BagEntry.gd index d797b880..d1730b6e 100644 --- a/game/ui/bags/BagEntry.gd +++ b/game/ui/bags/BagEntry.gd @@ -167,7 +167,7 @@ func get_drag_data(pos: Vector2) -> Object: esd.origin = self 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) setup_icon() @@ -181,10 +181,10 @@ func can_drop_data(pos, data) -> bool: func drop_data(pos, esd) -> void: 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() 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() func set_slot_id(pslot_id : int) -> void: diff --git a/game/ui/bags/EquipmentSlot.gd b/game/ui/bags/EquipmentSlot.gd index 46f80e77..6d562841 100644 --- a/game/ui/bags/EquipmentSlot.gd +++ b/game/ui/bags/EquipmentSlot.gd @@ -88,7 +88,7 @@ func get_drag_data(position): esd.origin = self 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) return esd diff --git a/game/ui/windows/SpellDragAndDropSpellBook.gd b/game/ui/windows/SpellDragAndDropSpellBook.gd index a33b8335..87e30be1 100644 --- a/game/ui/windows/SpellDragAndDropSpellBook.gd +++ b/game/ui/windows/SpellDragAndDropSpellBook.gd @@ -40,6 +40,6 @@ func get_drag_data(pos): var esd = ESDragAndDrop.new() esd.type = ESDragAndDrop.ES_DRAG_AND_DROP_TYPE_SPELL - esd.item_id = spell.id + esd.item_path = spell.resource_path return esd