Fix doors not working

This commit is contained in:
Melledy 2023-12-17 21:40:53 -08:00
parent be6c95004c
commit 6c8be5930b
3 changed files with 8 additions and 1 deletions

View File

@ -15,7 +15,8 @@ public class PropExcel extends GameResource {
private transient boolean recoverHp;
private transient boolean recoverMp;
private transient boolean isDoor;
@Override
public int getId() {
return ID;
@ -29,6 +30,8 @@ public class PropExcel extends GameResource {
this.recoverMp = true;
} else if (getJsonPath().contains("HPRecoverBox")) {
this.recoverHp = true;
} else if (getJsonPath().contains("_Door_")) {
this.isDoor = true;
}
}

View File

@ -67,6 +67,9 @@ public class SceneEntityLoader {
// Skip tutorial simulated universe
return null;
}
} else if (prop.getExcel().isDoor()) {
// Hacky fix to always open doors
prop.setState(PropState.Open, false);
} else if (prop.getExcel().getPropType() == PropType.PROP_SPRING) {
// Cache teleport anchors
scene.getHealingSprings().add(prop);

View File

@ -28,6 +28,7 @@ public class EntityProp implements GameEntity {
private final Position pos;
private final Position rot;
// Prop extra info
@Setter private PropRogueData rogueData;
public EntityProp(Scene scene, PropExcel excel, GroupInfo group, PropInfo propInfo) {