Server Python Block
Python entfernt. Server funktioniert eh nicht mehr. Umbau auf Nexus, aufwand nicht wert.
This commit is contained in:
parent
c0beeeff92
commit
83d3569f45
10
Versionshistorie.txt
Normal file
10
Versionshistorie.txt
Normal 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.
|
||||||
|
|
@ -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()
|
|
||||||
|
|
@ -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
|
|
||||||
Loading…
Reference in New Issue
Block a user