Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions src/definitions/location_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ pub struct LocationConfig {
pub dim_y: Option<u8>,
#[cfg(feature = "2008_3_shim")]
pub unknown_16: Option<bool>,
pub unknown_17: Option<bool>,
pub interact_type: Option<u8>,
pub break_line_of_sight: Option<bool>,
pub is_transparent: Option<bool>,
/// Flag for whether this object has a red rather than a white line on the map.
pub unknown_19: Option<u8>,
Expand Down Expand Up @@ -237,6 +238,13 @@ impl LocationConfig {
if buffer.has_remaining() {
return Err(NotExhausted::new(buffer.remaining()));
} else {
#[cfg(feature = "osrs")]
{
if loc.breakroutefinding.unwrap_or(false) {
loc.interact_type = Some(0);
loc.break_line_of_sight = Some(false);
}
}
break Ok(loc);
}
}
Expand All @@ -260,16 +268,34 @@ impl LocationConfig {
#[cfg(feature = "2008_3_shim")]
16 => loc.unknown_16 = Some(true),

17 => loc.unknown_17 = Some(false),
18 => loc.is_transparent = Some(true),
17 => {
#[cfg(feature = "osrs")]
{
loc.interact_type = Some(0);
}
loc.break_line_of_sight = Some(false)
}
18 => {
#[cfg(feature = "osrs")]
{
loc.break_line_of_sight = Some(false);
}
loc.is_transparent = Some(true)
}
19 => loc.unknown_19 = Some(buffer.try_get_u8()?),
21 => loc.unknown_21 = Some(true),
22 => loc.unknown_22 = Some(true),
23 => loc.occludes_1 = Some(false),
24 => loc.unknown_24 = buffer.try_get_smart32()?,
#[cfg(feature = "legacy")]
25 => loc.unknown_25 = Some(true),
27 => loc.unknown_27 = Some(false),
27 => {
#[cfg(feature = "osrs")]
{
loc.interact_type = Some(1);
}
loc.unknown_27 = Some(false)
}
28 => loc.unknown_28 = Some(buffer.try_get_u8()?),
29 => loc.ambient = Some(buffer.try_get_i8()?),
opcode @ 30..=34 => {
Expand Down