Bug fixes for selected cell plugin list
This commit is contained in:
parent
cc625d9029
commit
ae6b3bff12
@ -121,7 +121,6 @@ const CellData: React.FC<Props> = ({ selectedCell, counts }) => {
|
||||
<span>{data.plugins_count}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Loaded Plugins</h2>
|
||||
<PluginList selectedCell={selectedCell} />
|
||||
<CellModList mods={data.mods} counts={counts} />
|
||||
</>
|
||||
|
@ -297,6 +297,7 @@ const Map: React.FC = () => {
|
||||
clearSelectedCell();
|
||||
}
|
||||
} else if (router.query.plugin && typeof router.query.plugin === "string") {
|
||||
clearSelectedCell();
|
||||
clearSelectedCells();
|
||||
setSidebarOpen(true);
|
||||
if (plugins && plugins.length > 0 && pluginsPending === 0) {
|
||||
|
@ -16,7 +16,11 @@ const PluginsList: React.FC<Props> = ({ selectedCell }) => {
|
||||
selectedCell
|
||||
? state.plugins.plugins.filter((plugin) =>
|
||||
plugin.parsed?.cells.some(
|
||||
(cell) => cell.x === selectedCell.x && cell.y === selectedCell.y
|
||||
(cell) =>
|
||||
cell.x === selectedCell.x &&
|
||||
cell.y === selectedCell.y &&
|
||||
// TODO: support other worlds
|
||||
cell.world_form_id === 60
|
||||
)
|
||||
)
|
||||
: state.plugins.plugins
|
||||
@ -25,6 +29,7 @@ const PluginsList: React.FC<Props> = ({ selectedCell }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{selectedCell && plugins.length > 0 && <h2>Loaded Plugins</h2>}
|
||||
<ol className={styles["plugin-list"]}>
|
||||
{plugins.map((plugin) => (
|
||||
<li key={plugin.filename} title={plugin.filename}>
|
||||
|
Loading…
Reference in New Issue
Block a user