Server Python Block

Python entfernt. Server funktioniert eh nicht mehr. Umbau auf Nexus, aufwand nicht wert.
This commit is contained in:
Daniel Nagel 2025-08-30 22:14:24 +02:00
parent c0beeeff92
commit 83d3569f45
3 changed files with 10 additions and 31 deletions

10
Versionshistorie.txt Normal file
View File

@ -0,0 +1,10 @@
v1.3:
Stabile Version OHNE Leaflet Welt Map. Hexgrid, Map Drag and Drop, Fog.
v1.4
Stabile Version mit Leaflet Welt Map. Extra Button Links unten für Weltkarten Modus. Spieleransicht öffnet auch die Weltkarte und aktualisiert die Position per Broadcast vom SL.
v1.4.1:
Stabile Verion. Spieler Leaflet Welt Karte folgt jetzt ohne die Seite neu zu laden der Position die der SL vorgibt. Ein wenig Ruckelig, aber ja...
Auf der linken Seite im UI ist ein Fenster mit Buttons. "Standart Battlemaps". Die Buttons werden generiert anhand der Bilddateien die im Projektordner "standard_maps" sind.
Kann frei Hinzugefügt oder Entfernt werden. Mit Neu laden (F5) werden die Buttons aktualisiert. Die Namen werden automatisch aus den Dateinamen gezogen.

View File

@ -1,26 +0,0 @@
import http.server
import socketserver
import os
import json
PORT = 8000
os.chdir(os.path.dirname(__file__))
class CustomHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/list-maps':
try:
files = os.listdir('standard_maps')
image_files = [f for f in files if f.lower().endswith(('.png', '.jpg', '.jpeg'))]
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
self.wfile.write(json.dumps(image_files).encode('utf-8'))
except Exception as e:
self.send_error(500, f"Fehler: {str(e)}")
else:
super().do_GET()
with socketserver.TCPServer(("", PORT), CustomHandler) as httpd:
print(f"Starte Server auf Port {PORT}...")
httpd.serve_forever()

View File

@ -1,5 +0,0 @@
@echo off
start /min python server_launcher.py
timeout /t 2 >nul
start http://localhost:8000/index.html
start http://localhost:8000/spieler.html