Skip to content

Commit

Permalink
SkyTemple/skytemple-files#381: Clarify monster spawn field names
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Jul 31, 2023
1 parent 08099d3 commit 7fd3322
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions skytemple_rust/st_mappa_bin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class MappaTrapList:

class MappaMonster:
level: u8
weight: u16
weight2: u16
main_spawn_weight: u16
monster_house_spawn_weight: u16
md_index: u16

def __init__(self, level: u8, weight: u16, weight2: u16, md_index: u16):
def __init__(self, level: u8, main_spawn_weight: u16, monster_house_spawn_weight: u16, md_index: u16):
self.level = level
self.weight = weight
self.weight2 = weight2
self.main_spawn_weight = main_spawn_weight
self.monster_house_spawn_weight = monster_house_spawn_weight
self.md_index = md_index

def __eq__(self, other: object) -> bool: ...
Expand Down
10 changes: 5 additions & 5 deletions src/st_mappa_bin/monster_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ impl From<Py<MappaMonsterList>> for StBytes {
pub struct MappaMonster {
level_raw: u16,
#[pyo3(get, set)]
pub weight: u16,
pub main_spawn_weight: u16,
#[pyo3(get, set)]
pub weight2: u16,
pub monster_house_spawn_weight: u16,
#[pyo3(get, set)]
pub md_index: u16,
}
Expand All @@ -84,11 +84,11 @@ impl MappaMonster {
const LEVEL_MULTIPLIER: u16 = 512;

#[new]
pub fn new(level: u8, weight: u16, weight2: u16, md_index: u16) -> Self {
pub fn new(level: u8, main_spawn_weight: u16, monster_house_spawn_weight: u16, md_index: u16) -> Self {
Self {
level_raw: (level as u16) * Self::LEVEL_MULTIPLIER,
weight,
weight2,
main_spawn_weight,
monster_house_spawn_weight,
md_index,
}
}
Expand Down

0 comments on commit 7fd3322

Please sign in to comment.