Skip to content

Commit 3218e8b

Browse files
committed
Report animated doors/containers with traps/keys
1 parent d3ca016 commit 3218e8b

5 files changed

Lines changed: 36 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "StandardsValidator"
3-
version = "2.25.0"
3+
version = "2.26.0"
44
edition = "2021"
55

66
[dependencies]

WARNINGS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ Which makes the black squares stand out like a sore thumb if placed above the wa
8080
### Contains an unlinked PrisonMarker
8181
This cell contains a `PrisonMarker` that doesn't link to an interior cell. `PrisonMarker`s need to link to interiors containing `stolen_goods` to prevent crashes.
8282

83+
### Contains a trapped door or container
84+
This cell contains a scripted door or container that has been assigned a trap. The script prevents the trap from working.
85+
86+
### Contains door or container unlocked with
87+
This cell contains a scripted door or container that has been assigned a key. The script prevents the key from working.
88+
8389
### Contains non-real position or rotation
8490
This reference's position or rotation is not a real number (NaN or Infinity) which breaks things.
8591

src/extended/equipment.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ fn can_equip(slot: EquipmentType, rule: Rule) -> bool {
7171
EquipmentType::Feet => {
7272
rule != Rule::MaleImga && rule != Rule::FemaleImga && rule != Rule::Tsaesci
7373
}
74-
EquipmentType::Head => {
75-
rule != Rule::MaleImga && rule != Rule::Naga
76-
}
74+
EquipmentType::Head => rule != Rule::MaleImga && rule != Rule::Naga,
7775
EquipmentType::Legs => rule != Rule::Tsaesci,
7876
_ => true,
7977
}

src/validators/doors.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ use super::Context;
22
use crate::handlers::Handler;
33
use tes3::esp::{Cell, EditorId, Reference, TES3Object};
44

5+
const SCRIPTED_DOORS: [&str; 8] = [
6+
"t_ayl_dngruin_doorirondbl_01",
7+
"t_ayl_dngruin_doorirondblopn_01",
8+
"t_ayl_dngruin_doorironsqr_01",
9+
"t_he_dngdirenni_doorin_01",
10+
"t_he_dngdirenni_doorin_02",
11+
"t_de_setind_doorrectin",
12+
"t_cyrimp_furnr_display1",
13+
"t_cyrimp_furnr_display2",
14+
];
15+
516
pub struct DoorValidator {}
617

718
impl Handler<'_> for DoorValidator {
@@ -28,6 +39,22 @@ impl Handler<'_> for DoorValidator {
2839
record.editor_id(),
2940
reference.id
3041
);
42+
} else if SCRIPTED_DOORS.contains(&id) {
43+
if reference.trap.is_some() {
44+
println!(
45+
"Cell {} contains a trapped {}",
46+
record.editor_id(),
47+
reference.id
48+
);
49+
}
50+
if let Some(key) = &reference.key {
51+
println!(
52+
"Cell {} contains {} unlocked with {}",
53+
record.editor_id(),
54+
reference.id,
55+
key
56+
);
57+
}
3158
}
3259
}
3360
}

0 commit comments

Comments
 (0)