|
|
@ -145,8 +145,8 @@ class MobileInfo: |
|
|
|
self.mobile_helper_monster_types = [stream.read_dword() for _ in range(num_helper_monster_types)] |
|
|
|
self.mobile_helper_monster_types = [stream.read_dword() for _ in range(num_helper_monster_types)] |
|
|
|
num_enemy_genders = stream.read_dword() |
|
|
|
num_enemy_genders = stream.read_dword() |
|
|
|
self.mobile_enemy_genders = [stream.read_dword() for _ in range(num_enemy_genders)] |
|
|
|
self.mobile_enemy_genders = [stream.read_dword() for _ in range(num_enemy_genders)] |
|
|
|
num_firendly_charters = stream.read_dword() |
|
|
|
num_friendly_charters = stream.read_dword() |
|
|
|
self.mobile_firendly_charters = [stream.read_dword() for _ in range(num_firendly_charters)] |
|
|
|
self.mobile_friendly_charters = [stream.read_dword() for _ in range(num_friendly_charters)] |
|
|
|
self.mobile_parley_name = stream.read_string() |
|
|
|
self.mobile_parley_name = stream.read_string() |
|
|
|
|
|
|
|
|
|
|
|
def save_binary(self, stream: ResStream): |
|
|
|
def save_binary(self, stream: ResStream): |
|
|
@ -212,9 +212,9 @@ class MobileInfo: |
|
|
|
stream.write_dword(len(self.mobile_enemy_genders)) |
|
|
|
stream.write_dword(len(self.mobile_enemy_genders)) |
|
|
|
for enemy_gender in self.mobile_enemy_genders: |
|
|
|
for enemy_gender in self.mobile_enemy_genders: |
|
|
|
stream.write_dword(enemy_gender) |
|
|
|
stream.write_dword(enemy_gender) |
|
|
|
stream.write_dword(len(self.mobile_firendly_charters)) |
|
|
|
stream.write_dword(len(self.mobile_friendly_charters)) |
|
|
|
for firendly_charter in self.mobile_firendly_charters: |
|
|
|
for friendly_charter in self.mobile_friendly_charters: |
|
|
|
stream.write_dword(firendly_charter) |
|
|
|
stream.write_dword(friendly_charter) |
|
|
|
stream.write_string(self.mobile_parley_name) |
|
|
|
stream.write_string(self.mobile_parley_name) |
|
|
|
|
|
|
|
|
|
|
|
def save_json(self): |
|
|
|
def save_json(self): |
|
|
@ -272,7 +272,7 @@ class MobileInfo: |
|
|
|
data['mobile_enemy_genders'] = [] |
|
|
|
data['mobile_enemy_genders'] = [] |
|
|
|
for enemy_gender in self.mobile_enemy_genders: |
|
|
|
for enemy_gender in self.mobile_enemy_genders: |
|
|
|
data['mobile_enemy_genders'].append(RUNE_SEX_TO_STRING[enemy_gender]) |
|
|
|
data['mobile_enemy_genders'].append(RUNE_SEX_TO_STRING[enemy_gender]) |
|
|
|
data['mobile_firendly_charters'] = self.mobile_firendly_charters |
|
|
|
data['mobile_friendly_charters'] = self.mobile_friendly_charters |
|
|
|
data['mobile_parley_name'] = self.mobile_parley_name |
|
|
|
data['mobile_parley_name'] = self.mobile_parley_name |
|
|
|
return data |
|
|
|
return data |
|
|
|
|
|
|
|
|
|
|
@ -336,5 +336,5 @@ class MobileInfo: |
|
|
|
self.mobile_enemy_genders = [] |
|
|
|
self.mobile_enemy_genders = [] |
|
|
|
for enemy_gender in data['mobile_enemy_genders']: |
|
|
|
for enemy_gender in data['mobile_enemy_genders']: |
|
|
|
self.mobile_enemy_genders.append(STRING_TO_RUNE_SEX[enemy_gender]) |
|
|
|
self.mobile_enemy_genders.append(STRING_TO_RUNE_SEX[enemy_gender]) |
|
|
|
self.mobile_firendly_charters = data['mobile_firendly_charters'] |
|
|
|
self.mobile_friendly_charters = data['mobile_friendly_charters'] |
|
|
|
self.mobile_parley_name = data['mobile_parley_name'] |
|
|
|
self.mobile_parley_name = data['mobile_parley_name'] |
|
|
|