From 35b0f811f23f029110373798b19d9d0895d907f0 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 5 Jan 2025 16:54:36 +0100 Subject: next commit --- data_models/login_character_list.gd | 8 ++++++++ data_models/player_data.gd | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 data_models/player_data.gd (limited to 'data_models') diff --git a/data_models/login_character_list.gd b/data_models/login_character_list.gd index f34d61e..e638877 100644 --- a/data_models/login_character_list.gd +++ b/data_models/login_character_list.gd @@ -14,3 +14,11 @@ static func from_character_list_packet(packet: CharacterServerLoginSuccessCharac resource.character_information = packet.character_information return resource + + +func get_info_for_slot(slot_idx: int): + for info in character_information: + if info.character_number == slot_idx: + return info + + return null diff --git a/data_models/player_data.gd b/data_models/player_data.gd new file mode 100644 index 0000000..c4a7c73 --- /dev/null +++ b/data_models/player_data.gd @@ -0,0 +1,6 @@ +class_name PlayerData +extends Resource + + +var head_direction: Constants.Direction +var body_direction: Constants.Direction -- cgit v1.2.3