mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-10 08:42:11 +01:00
Update ESS to get the Entity level simplifications.
This commit is contained in:
parent
2e3e0d88f4
commit
67e327f471
@ -10,7 +10,57 @@ character_level/6 = 7
|
||||
character_level/7 = 8
|
||||
character_level/8 = 9
|
||||
character_level/9 = 1
|
||||
character_level/10 = null
|
||||
character_level/10 = 1
|
||||
character_level/11 = 1
|
||||
character_level/12 = 1
|
||||
character_level/13 = 1
|
||||
character_level/14 = 1
|
||||
character_level/15 = 1
|
||||
character_level/16 = 1
|
||||
character_level/17 = 1
|
||||
character_level/18 = 1
|
||||
character_level/19 = 1
|
||||
character_level/20 = 1
|
||||
character_level/21 = 1
|
||||
character_level/22 = 1
|
||||
character_level/23 = 1
|
||||
character_level/24 = 1
|
||||
character_level/25 = 1
|
||||
character_level/26 = 1
|
||||
character_level/27 = 1
|
||||
character_level/28 = 1
|
||||
character_level/29 = 1
|
||||
character_level/30 = 1
|
||||
character_level/31 = 1
|
||||
character_level/32 = 1
|
||||
character_level/33 = 1
|
||||
character_level/34 = 1
|
||||
character_level/35 = 1
|
||||
character_level/36 = 1
|
||||
character_level/37 = 1
|
||||
character_level/38 = 1
|
||||
character_level/39 = 1
|
||||
character_level/40 = 1
|
||||
character_level/41 = 1
|
||||
character_level/42 = 1
|
||||
character_level/43 = 1
|
||||
character_level/44 = 1
|
||||
character_level/45 = 1
|
||||
character_level/46 = 1
|
||||
character_level/47 = 1
|
||||
character_level/48 = 1
|
||||
character_level/49 = 1
|
||||
character_level/50 = 1
|
||||
character_level/51 = 1
|
||||
character_level/52 = 1
|
||||
character_level/53 = 1
|
||||
character_level/54 = 1
|
||||
character_level/55 = 1
|
||||
character_level/56 = 1
|
||||
character_level/57 = 1
|
||||
character_level/58 = 1
|
||||
character_level/59 = 1
|
||||
character_level/60 = null
|
||||
class_level/1 = 1
|
||||
class_level/2 = 1
|
||||
class_level/3 = 1
|
||||
|
@ -72,7 +72,7 @@ func _notification_sdeath():
|
||||
|
||||
dead = true
|
||||
|
||||
var ldiff : float = scharacter_level - starget.scharacter_level + 10.0
|
||||
var ldiff : float = slevel - starget.slevel + 10.0
|
||||
|
||||
if ldiff < 0:
|
||||
ldiff = 0
|
||||
@ -82,7 +82,7 @@ func _notification_sdeath():
|
||||
|
||||
ldiff /= 10.0
|
||||
|
||||
starget.xp_adds(int(5.0 * scharacter_level * ldiff))
|
||||
starget.xp_adds(int(5.0 * slevel * ldiff))
|
||||
|
||||
starget = null
|
||||
|
||||
@ -111,14 +111,14 @@ func _notification_cheal(what, info):
|
||||
WorldNumbers.heal(get_body().translation, 1.6, info.heal, info.crit)
|
||||
|
||||
func _notification_sxp_gained(value : int) -> void:
|
||||
if not ESS.get_resource_db().get_xp_data().can_character_level_up(gets_character_level()):
|
||||
if not ESS.get_resource_db().get_xp_data().can_character_level_up(slevel):
|
||||
return
|
||||
|
||||
var xpr : int = ESS.get_resource_db().get_xp_data().get_character_xp(gets_character_level());
|
||||
var xpr : int = ESS.get_resource_db().get_xp_data().get_character_xp(slevel);
|
||||
|
||||
if xpr <= scharacter_xp:
|
||||
levelup_scharacter(1)
|
||||
scharacter_xp = 0
|
||||
if xpr <= sxp:
|
||||
levelups(1)
|
||||
sxp = 0
|
||||
|
||||
func _notification_sclass_level_up(value: int):
|
||||
._notification_sclass_level_up(value)
|
||||
|
@ -125,10 +125,9 @@ func spawn_player_for_menu(class_id : int, name : String, parent : Node) -> Enti
|
||||
createinfo.class_id = class_id
|
||||
createinfo.entity_data = cls
|
||||
createinfo.player_name = name
|
||||
createinfo.character_level = level
|
||||
createinfo.class_level = class_profile.level
|
||||
createinfo.character_xp = 0
|
||||
createinfo.class_xp = class_profile.xp
|
||||
createinfo.level = level
|
||||
createinfo.xp = 0
|
||||
# createinfo.class_xp = class_profile.xp
|
||||
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
|
||||
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_DISPLAY
|
||||
createinfo.networked = false
|
||||
@ -170,10 +169,10 @@ func spawn_networked_player(class_id : int, position : Vector3, name : String,
|
||||
createinfo.class_id = class_id
|
||||
createinfo.entity_data = cls
|
||||
createinfo.player_name = name
|
||||
createinfo.character_level = 1
|
||||
createinfo.class_level = level
|
||||
createinfo.character_xp = 0
|
||||
createinfo.class_xp = class_profile.xp
|
||||
createinfo.level = 1
|
||||
# createinfo.class_level = level
|
||||
createinfo.xp = 0
|
||||
# createinfo.class_xp = class_profile.xp
|
||||
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
|
||||
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_NETWORKED
|
||||
createinfo.network_owner = sid
|
||||
@ -200,10 +199,10 @@ func spawn_player(class_id : int, position : Vector3, name : String, node_name
|
||||
createinfo.class_id = class_id
|
||||
createinfo.entity_data = cls
|
||||
createinfo.player_name = name
|
||||
createinfo.character_level = 1
|
||||
createinfo.class_level = level
|
||||
createinfo.character_xp = 0
|
||||
createinfo.class_xp = class_profile.xp
|
||||
createinfo.level = 1
|
||||
# createinfo.class_level = level
|
||||
createinfo.xp = 0
|
||||
# createinfo.class_xp = class_profile.xp
|
||||
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_PLAYER
|
||||
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_PLAYER
|
||||
createinfo.network_owner = network_owner
|
||||
@ -225,8 +224,8 @@ func spawn_mob(class_id : int, level : int, position : Vector3) -> void:
|
||||
createinfo.class_id = class_id
|
||||
createinfo.entity_data = cls
|
||||
createinfo.player_name = "Mob"
|
||||
createinfo.character_level = level
|
||||
createinfo.class_level = level
|
||||
createinfo.level = level
|
||||
# createinfo.class_level = level
|
||||
createinfo.entity_controller = EntityEnums.ENITIY_CONTROLLER_AI
|
||||
createinfo.entity_player_type = EntityEnums.ENTITY_PLAYER_TYPE_AI
|
||||
createinfo.transform.origin = position
|
||||
|
@ -106,7 +106,7 @@ func refresh():
|
||||
centry.pressed = true
|
||||
centry.connect("pressed", self, "character_selection_changed")
|
||||
|
||||
centry.setup(file_name, display.sentity_name, ESS.get_resource_db().get_entity_data(display.characterclass_id).text_name, display.scharacter_level, display.sclass_level, display)
|
||||
centry.setup(file_name, display.sentity_name, ESS.get_resource_db().get_entity_data(display.characterclass_id).text_name, display.slevel, display.slevel, display)
|
||||
|
||||
if first_entry == null:
|
||||
first_entry = centry
|
||||
|
@ -69,6 +69,10 @@ chunk_spawn_range = 6
|
||||
build_flags = 511
|
||||
lod_update_interval = 2.0
|
||||
script = ExtResource( 8 )
|
||||
meshes = [ ]
|
||||
editor_generate = false
|
||||
show_loading_screen = true
|
||||
generate_on_ready = false
|
||||
test_prop = ExtResource( 4 )
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
@ -71,8 +71,8 @@ func set_player(p_player: Entity) -> void:
|
||||
_player = p_player
|
||||
|
||||
_player.connect("cname_changed", self, "cname_changed")
|
||||
_player.connect("notification_ccharacter_level_up", self, "clevel_changed")
|
||||
_player.connect("con_character_level_changed", self, "clevel_changed")
|
||||
_player.connect("notification_clevel_up", self, "clevel_changed")
|
||||
_player.connect("con_level_changed", self, "clevel_changed")
|
||||
_player.connect("notification_cxp_gained", self, "notification_cxp_gained")
|
||||
_player.connect("centity_resource_added", self, "centity_resource_added")
|
||||
|
||||
@ -84,7 +84,7 @@ func set_player(p_player: Entity) -> void:
|
||||
_health.connect("changed", self, "_on_player_health_changed")
|
||||
|
||||
_name_text.text = _player.centity_name
|
||||
_level_text.text = str(_player.ccharacter_level)
|
||||
_level_text.text = str(_player.clevel)
|
||||
|
||||
clevel_changed(_player, 0)
|
||||
notification_cxp_gained(_player, 0)
|
||||
@ -132,9 +132,9 @@ func cname_changed(entity: Entity) -> void:
|
||||
_name_text.text = _player.centity_name
|
||||
|
||||
func clevel_changed(entity: Entity, value : int) -> void:
|
||||
_level_text.text = str(_player.ccharacter_level)
|
||||
_level_text.text = str(_player.clevel)
|
||||
|
||||
var xpreq : int = ESS.get_resource_db().get_xp_data().get_character_xp(_player.ccharacter_level)
|
||||
var xpreq : int = ESS.get_resource_db().get_xp_data().get_character_xp(_player.clevel)
|
||||
|
||||
if xpreq == 0:
|
||||
_xp_range.value = 0
|
||||
@ -146,5 +146,5 @@ func clevel_changed(entity: Entity, value : int) -> void:
|
||||
_xp_range.max_value = xpreq
|
||||
|
||||
func notification_cxp_gained(entity: Entity, val: int) -> void:
|
||||
_xp_range.value = _player.ccharacter_xp
|
||||
_xp_range.value = _player.cxp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user