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
|
||||
|
||||
function Scene00000(player)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||
end
|
||||
|
||||
function Scene00001(player)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||
end
|
||||
|
||||
function onEnterTerritory(player, zone)
|
||||
--- move the player into the starting position
|
||||
start_pos = zone:get_pop_range(POS_START)
|
||||
player:set_position(start_pos)
|
||||
--- move the player into the starting position
|
||||
start_pos = zone:get_pop_range(POS_START)
|
||||
player:set_position(start_pos)
|
||||
|
||||
Scene00000(player);
|
||||
Scene00000(player);
|
||||
end
|
||||
|
||||
function onSceneFinished(player, scene)
|
||||
if scene == 0 then
|
||||
Scene00001(player)
|
||||
end
|
||||
if scene == 0 then
|
||||
Scene00001(player)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -237,6 +237,8 @@ impl UserData for Zone {
|
|||
y: trans[1],
|
||||
z: trans[2],
|
||||
});
|
||||
} else {
|
||||
tracing::warn!("Failed to find pop range for {id}!");
|
||||
}
|
||||
Ok(mlua::Nil)
|
||||
},
|
||||
|
|
|
@ -8,7 +8,7 @@ use physis::{
|
|||
};
|
||||
|
||||
/// Represents a loaded zone
|
||||
#[derive(Default)]
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Zone {
|
||||
pub id: u16,
|
||||
planevent: Option<LayerGroup>,
|
||||
|
|
Loading…
Add table
Reference in a new issue