DeepSeek ArtifactsDeepSeek Artifacts

Python Turtle WoW 插件开发

4.0
zh
软件开发
Python
Turtle WoW
Lua
Addon Development
PyQt6

提示语

Create a Python desktop application for Turtle WoW (1.12.1) addon development with these features:

1. **Core Functionality**
   - Lua 5.0 editor with syntax highlighting
   - Real-time compatibility validator (flags retail/C_* APIs, Lua 5.1+ features)
   - Turtle WoW API autocomplete (custom races/quests)
   - Secure code analyzer (taint detection, memory leak checks)

2. **Integrated Tools**
   - Snippet manager with preloaded templates:
     * Secure action buttons
     * Event-driven frames
     * Saved variables
     * Slash commands
   - Project wizard (auto-generates .toc, folder structure)
   - Version-safe function lookup (Lua 5.0 vs 5.1 differences)

3. **Turtle-Specific Modules**
   - High Elf detection template
   - Custom quest hook generator
   - Hardcore mode utilities
   - Turtle API explorer (scraped from wiki)

4. **Technical Requirements**
   - GUI: PyQt6 or Tkinter
   - Lua parsing: Lupa or Lunatic Python
   - Output: Single .exe (PyInstaller)
   - Vanilla API database: JSON file with:
     {
       "GetUnitHealth": {
         "syntax": "health = UnitHealth(unit)",
         "version": "1.0+",
         "taint": "secure"
       },
       "C_QuestLog": {
         "status": "FORBIDDEN (retail)"
       }
     }

5. **UI Layout**
   ┌────────────────┬────────────────┐
   │ Project Manager│ Code Editor    │
   │ (TOC/files)    │ (Lua 5.0)      │
   ├────────────────┴────────────────┤
   │ Turtle Tools                    │
   │ [Race Detector][Quest Builder]  │
   ├─────────────────────────────────┤
   │ Validation Panel                │
   │ ✔ Secure  ✘ Lua 5.1 ⚠ Taint    │
   └─────────────────────────────────┘

生成结果

import React from 'react';

function App() {
  return (
    <div className="App bg-gray-900 text-white min-h-screen p-8">
      <header className="text-center mb-12">
        <h1 className="text-4xl font-bold">Turtle WoW Addon Development</h1>
        <p className="text-gray-400 mt-2">Create powerful addons for Turtle WoW (1.12.1) with ease</p>
      </header>

      <div className="grid grid-cols-2 gap-8 mb-8">
        <section className="bg-gray-800 p-6 rounded-lg">
          <h2 className="text-2xl font-semibold mb-4">Project Manager</h2>
          <div className="space-y-4">
            <div className="bg-gray-700 p-4 rounded">TOC/Files</div>
          </div>
        </section>

        <section className="bg-gray-800 p-6 rounded-lg">
          <h2 className="text-2xl font-semibold mb-4">Code Editor</h2>
          <textarea className="w-full bg-gray-700 p-4 rounded text-white" rows={10}>
            // Lua 5.0 code here
          </textarea>
        </section>
      </div>

      <section className="bg-gray-800 p-6 rounded-lg mb-8">
        <h2 className="text-2xl font-semibold mb-4">Turtle Tools</h2>
        <div className="grid grid-cols-2 gap-4">
          <button className="bg-purple-600 hover:bg-purple-700 text-white py-3 px-6 rounded">Race Detector</button>
          <button className="bg-green-600 hover:bg-green-700 text-white py-3 px-6 rounded">Quest Builder</button>
        </div>
      </section>

      <section className="bg-gray-800 p-6 rounded-lg">
        <h2 className="text-2xl font-semibold mb-4">Validation Panel</h2>
        <div className="grid grid-cols-3 gap-4 text-center">
          <div className="bg-green-600 p-4 rounded">✔ Secure</div>
          <div className="bg-red-600 p-4 rounded">✘ Lua 5.1</div>
          <div className="bg-yellow-600 p-4 rounded">⚠ Taint</div>
        </div>
      </section>

      <footer className="text-center mt-12 text-gray-400">
        <p>© 2025 Turtle WoW Addon Development. All rights reserved.</p>
      </footer>
    </div>
  );
}

export default App;

更多推荐

查看全部