Limit parsed plugin cell displays to plugins for Skyrim.esm
In-case someone drag and drops a fallout 4 folder onto the page, it should not display any selected cells.
This commit is contained in:
parent
21eaa5cb11
commit
7df5cbb324
@ -307,6 +307,7 @@ const Map: React.FC = () => {
|
||||
cell.x !== undefined &&
|
||||
cell.y !== undefined &&
|
||||
cell.world_form_id === 60 &&
|
||||
plugin.parsed.header.masters[0] === "Skyrim.esm" &&
|
||||
cellSet.has(cell.x + cell.y * 1000) === false
|
||||
) {
|
||||
cells.push({ x: cell.x, y: cell.y });
|
||||
@ -336,7 +337,8 @@ const Map: React.FC = () => {
|
||||
if (
|
||||
cell.x !== undefined &&
|
||||
cell.y !== undefined &&
|
||||
cell.world_form_id === 60
|
||||
cell.world_form_id === 60 &&
|
||||
plugin.parsed.header.masters[0] === "Skyrim.esm"
|
||||
) {
|
||||
newCells.push({ x: cell.x, y: cell.y });
|
||||
}
|
||||
|
@ -90,7 +90,8 @@ const PluginDetail: React.FC<Props> = ({ hash, counts }) => {
|
||||
(cell) =>
|
||||
cell.x !== undefined &&
|
||||
cell.y !== undefined &&
|
||||
cell.world_form_id === 60
|
||||
cell.world_form_id === 60 &&
|
||||
plugin.parsed?.header.masters[0] === "Skyrim.esm"
|
||||
) as CellCoord[]) ||
|
||||
data?.cells ||
|
||||
[]
|
||||
|
@ -24,7 +24,8 @@ const PluginsList: React.FC<Props> = ({ selectedCell }) => {
|
||||
cell.x === selectedCell.x &&
|
||||
cell.y === selectedCell.y &&
|
||||
// TODO: support other worlds
|
||||
cell.world_form_id === 60
|
||||
cell.world_form_id === 60 &&
|
||||
plugin.parsed?.header.masters[0] === "Skyrim.esm"
|
||||
)
|
||||
)
|
||||
: state.plugins.plugins
|
||||
|
Loading…
Reference in New Issue
Block a user