mirror of
https://github.com/redstrate/Kawari.git
synced 2025-05-19 17:27:45 +00:00
Add warning message when failing to find poprange
This commit is contained in:
parent
1cdd2d4bff
commit
59815df5c1
3 changed files with 12 additions and 10 deletions
|
@ -2,23 +2,23 @@
|
||||||
POS_START = 2299848
|
POS_START = 2299848
|
||||||
|
|
||||||
function Scene00000(player)
|
function Scene00000(player)
|
||||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Scene00001(player)
|
function Scene00001(player)
|
||||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function onEnterTerritory(player, zone)
|
function onEnterTerritory(player, zone)
|
||||||
--- move the player into the starting position
|
--- move the player into the starting position
|
||||||
start_pos = zone:get_pop_range(POS_START)
|
start_pos = zone:get_pop_range(POS_START)
|
||||||
player:set_position(start_pos)
|
player:set_position(start_pos)
|
||||||
|
|
||||||
Scene00000(player);
|
Scene00000(player);
|
||||||
end
|
end
|
||||||
|
|
||||||
function onSceneFinished(player, scene)
|
function onSceneFinished(player, scene)
|
||||||
if scene == 0 then
|
if scene == 0 then
|
||||||
Scene00001(player)
|
Scene00001(player)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -237,6 +237,8 @@ impl UserData for Zone {
|
||||||
y: trans[1],
|
y: trans[1],
|
||||||
z: trans[2],
|
z: trans[2],
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
tracing::warn!("Failed to find pop range for {id}!");
|
||||||
}
|
}
|
||||||
Ok(mlua::Nil)
|
Ok(mlua::Nil)
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@ use physis::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Represents a loaded zone
|
/// Represents a loaded zone
|
||||||
#[derive(Default)]
|
#[derive(Default, Debug)]
|
||||||
pub struct Zone {
|
pub struct Zone {
|
||||||
pub id: u16,
|
pub id: u16,
|
||||||
planevent: Option<LayerGroup>,
|
planevent: Option<LayerGroup>,
|
||||||
|
|
Loading…
Add table
Reference in a new issue