Deadlock Mod Manager
Developer DocumentationPlugins Developer Documentation

Sudo Plugin

Technical details for the Sudo administrative plugin

Sudo Plugin

Technical reference for the Sudo plugin which provides administrative controls and developer features.

Manifest

{
  "id": "sudo",
  "nameKey": "plugins.sudo.title",
  "descriptionKey": "plugins.sudo.description",
  "version": "0.0.1",
  "author": "Skeptic",
  "icon": "public/icon.svg",
  "entry": "./index.tsx"
}

Implementation Details

Minimal Implementation

The Sudo plugin currently has a minimal implementation:

const Render = () => {
  const isEnabled = usePersistedStore(
    (s) => s.enabledPlugins[manifest.id] ?? false,
  );

  useEffect(() => {
    return () => {};
  }, []);

  return null;
};

const Settings = () => {
  const { t } = useTranslation();
  return (
    <div className='flex flex-col gap-2'>
      <p className='text-sm text-muted-foreground'>
        {t("plugins.sudo.usageInstructions")}
      </p>
    </div>
  );
};

Current State

  • Render Component: Returns null - no global UI elements
  • Settings Component: Shows usage instructions from i18n
  • No State Management: Currently no persistent settings
  • Placeholder Implementation: Ready for future administrative features

Global Rendering

The Render component returns null - this plugin doesn't render UI elements globally. It's designed as a settings-only plugin for administrative controls.

State Management

Currently no persistent settings are stored. The plugin only checks its enabled state via usePersistedStore.

Future Development

This plugin is designed to be extended with:

  • Administrative controls
  • Developer debugging tools
  • System override capabilities
  • Advanced configuration options

Translation Keys

The plugin uses these i18n keys:

  • plugins.sudo.title
  • plugins.sudo.description
  • plugins.sudo.usageInstructions