recuperación repo
recuperación del repositorio anterior ya que se ha perdido.
This commit is contained in:
19
CanceladoraV1.uproject
Normal file
19
CanceladoraV1.uproject
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"EngineAssociation": "5.7",
|
||||
"Category": "",
|
||||
"Description": "",
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "ModelingToolsEditorMode",
|
||||
"Enabled": true,
|
||||
"TargetAllowList": [
|
||||
"Editor"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "HttpBlueprint",
|
||||
"Enabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Config/DefaultEditor.ini
Normal file
4
Config/DefaultEditor.ini
Normal file
File diff suppressed because one or more lines are too long
105
Config/DefaultEngine.ini
Normal file
105
Config/DefaultEngine.ini
Normal file
@@ -0,0 +1,105 @@
|
||||
|
||||
|
||||
[/Script/EngineSettings.GameMapsSettings]
|
||||
GameDefaultMap=/Game/Canceladora.Canceladora
|
||||
EditorStartupMap=/Game/Canceladora.Canceladora
|
||||
|
||||
[/Script/Engine.RendererSettings]
|
||||
r.AllowStaticLighting=False
|
||||
|
||||
r.GenerateMeshDistanceFields=True
|
||||
|
||||
r.DynamicGlobalIlluminationMethod=1
|
||||
|
||||
r.ReflectionMethod=1
|
||||
|
||||
r.SkinCache.CompileShaders=True
|
||||
|
||||
r.RayTracing=True
|
||||
|
||||
r.Shadow.Virtual.Enable=1
|
||||
|
||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
|
||||
|
||||
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8
|
||||
|
||||
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8
|
||||
|
||||
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||
-D3D12TargetedShaderFormats=PCD3D_SM5
|
||||
+D3D12TargetedShaderFormats=PCD3D_SM6
|
||||
-D3D11TargetedShaderFormats=PCD3D_SM5
|
||||
+D3D11TargetedShaderFormats=PCD3D_SM5
|
||||
Compiler=Default
|
||||
AudioSampleRate=48000
|
||||
AudioCallbackBufferFrameSize=1024
|
||||
AudioNumBuffersToEnqueue=1
|
||||
AudioMaxChannels=0
|
||||
AudioNumSourceWorkers=4
|
||||
SpatializationPlugin=
|
||||
SourceDataOverridePlugin=
|
||||
ReverbPlugin=
|
||||
OcclusionPlugin=
|
||||
CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0)
|
||||
CacheSizeKB=65536
|
||||
MaxChunkSizeOverrideKB=0
|
||||
bResampleForDevice=False
|
||||
MaxSampleRate=48000.000000
|
||||
HighSampleRate=32000.000000
|
||||
MedSampleRate=24000.000000
|
||||
LowSampleRate=12000.000000
|
||||
MinSampleRate=8000.000000
|
||||
CompressionQualityModifier=1.000000
|
||||
AutoStreamingThreshold=0.000000
|
||||
SoundCueCookQualityIndex=-1
|
||||
|
||||
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
|
||||
-TargetedRHIs=SF_VULKAN_SM5
|
||||
+TargetedRHIs=SF_VULKAN_SM6
|
||||
|
||||
[/Script/HardwareTargeting.HardwareTargetingSettings]
|
||||
TargetedHardwareClass=Desktop
|
||||
AppliedTargetedHardwareClass=Desktop
|
||||
DefaultGraphicsPerformance=Maximum
|
||||
AppliedDefaultGraphicsPerformance=Maximum
|
||||
|
||||
[/Script/WorldPartitionEditor.WorldPartitionEditorSettings]
|
||||
CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet'
|
||||
|
||||
[/Script/Engine.UserInterfaceSettings]
|
||||
RenderFocusRule=NavigationOnly
|
||||
HardwareCursors=()
|
||||
SoftwareCursors=()
|
||||
ApplicationScale=1.000000
|
||||
UIScaleRule=ShortestSide
|
||||
CustomScalingRuleClass=None
|
||||
UIScaleCurve=(EditorCurveData=(Keys=((Time=480.000000,Value=0.444000),(Time=720.000000,Value=0.666000),(Time=1080.000000,Value=1.000000),(Time=8640.000000,Value=8.000000)),DefaultValue=340282346638528859811704183484516925440.000000,PreInfinityExtrap=RCCE_Constant,PostInfinityExtrap=RCCE_Constant),ExternalCurve=None)
|
||||
bAllowHighDPIInGameMode=False
|
||||
DesignScreenSize=(X=1920,Y=1080)
|
||||
bLoadWidgetsOnDedicatedServer=True
|
||||
bAuthorizeAutomaticWidgetVariableCreation=False
|
||||
CustomFontDPI=96
|
||||
FontDPIPreset=Standard
|
||||
bUseCustomFontDPI=False
|
||||
bEnableDistanceFieldFontRasterization=False
|
||||
|
||||
[/Script/Engine.Engine]
|
||||
+ActiveGameNameRedirects=(OldGameName="TP_BlankBP",NewGameName="/Script/CanceladoraV1")
|
||||
+ActiveGameNameRedirects=(OldGameName="/Script/TP_BlankBP",NewGameName="/Script/CanceladoraV1")
|
||||
|
||||
[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
|
||||
bEnablePlugin=True
|
||||
bAllowNetworkConnection=True
|
||||
SecurityToken=C56CD511416425AC75C459B7E9612F56
|
||||
bIncludeInShipping=False
|
||||
bAllowExternalStartInShipping=False
|
||||
bCompileAFSProject=False
|
||||
bUseCompression=False
|
||||
bLogFiles=False
|
||||
bReportStats=False
|
||||
ConnectionType=USBOnly
|
||||
bUseManualIPAddress=False
|
||||
ManualIPAddress=
|
||||
|
||||
6
Config/DefaultGame.ini
Normal file
6
Config/DefaultGame.ini
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
[/Script/EngineSettings.GeneralProjectSettings]
|
||||
ProjectID=8B8DA3D046245E33674ADCAF1BE82BDF
|
||||
bAllowWindowResize=True
|
||||
|
||||
84
Config/DefaultInput.ini
Normal file
84
Config/DefaultInput.ini
Normal file
@@ -0,0 +1,84 @@
|
||||
[/Script/Engine.InputSettings]
|
||||
-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f))
|
||||
-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
+AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False))
|
||||
bAltEnterTogglesFullscreen=True
|
||||
bF11TogglesFullscreen=True
|
||||
bUseMouseForTouch=False
|
||||
bEnableMouseSmoothing=True
|
||||
bEnableFOVScaling=True
|
||||
bCaptureMouseOnLaunch=True
|
||||
bEnableLegacyInputScales=True
|
||||
bEnableMotionControls=True
|
||||
bFilterInputByPlatformUser=False
|
||||
bShouldFlushPressedKeysOnViewportFocusLost=True
|
||||
bAlwaysShowTouchInterface=False
|
||||
bShowConsoleOnFourFingerTap=True
|
||||
bEnableGestureRecognizer=False
|
||||
bUseAutocorrect=False
|
||||
DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown
|
||||
DefaultViewportMouseLockMode=LockOnCapture
|
||||
FOVScale=0.011110
|
||||
DoubleClickTime=0.200000
|
||||
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput
|
||||
DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
|
||||
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
|
||||
-ConsoleKeys=Tilde
|
||||
+ConsoleKeys=Tilde
|
||||
|
||||
BIN
Content/Canceladora.umap
Normal file
BIN
Content/Canceladora.umap
Normal file
Binary file not shown.
BIN
Content/Interface/DT_Coches.uasset
Normal file
BIN
Content/Interface/DT_Coches.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/E_CampoActivo.uasset
Normal file
BIN
Content/Interface/E_CampoActivo.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/Fonts/MicrosoftSansSerif.uasset
Normal file
BIN
Content/Interface/Fonts/MicrosoftSansSerif.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/Fonts/microsoftsansserif_Font.uasset
Normal file
BIN
Content/Interface/Fonts/microsoftsansserif_Font.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Interface/IMG/Ajustes.uasset
Normal file
BIN
Content/Interface/IMG/Ajustes.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/borrar.uasset
Normal file
BIN
Content/Interface/IMG/borrar.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/check_verde.uasset
Normal file
BIN
Content/Interface/IMG/check_verde.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/logo_generico.uasset
Normal file
BIN
Content/Interface/IMG/logo_generico.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/logo_generico_grande.uasset
Normal file
BIN
Content/Interface/IMG/logo_generico_grande.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/oscurecimiento.uasset
Normal file
BIN
Content/Interface/IMG/oscurecimiento.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/IMG/volver_azul.uasset
Normal file
BIN
Content/Interface/IMG/volver_azul.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/S_Coches.uasset
Normal file
BIN
Content/Interface/S_Coches.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/Sonido-picar.uasset
Normal file
BIN
Content/Interface/Sonido-picar.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Ajustes.uasset
Normal file
BIN
Content/Interface/WBP_Ajustes.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Brillo.uasset
Normal file
BIN
Content/Interface/WBP_Brillo.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Canceladora.uasset
Normal file
BIN
Content/Interface/WBP_Canceladora.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Identificacion.uasset
Normal file
BIN
Content/Interface/WBP_Identificacion.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Inicio.uasset
Normal file
BIN
Content/Interface/WBP_Inicio.uasset
Normal file
Binary file not shown.
BIN
Content/Interface/WBP_Loader.uasset
Normal file
BIN
Content/Interface/WBP_Loader.uasset
Normal file
Binary file not shown.
68
ServerTESTstring/server.py
Normal file
68
ServerTESTstring/server.py
Normal file
@@ -0,0 +1,68 @@
|
||||
import http.server
|
||||
import socketserver
|
||||
from datetime import datetime
|
||||
import locale
|
||||
|
||||
# 1. Configurar la localización a español para abreviaturas correctas
|
||||
# Esto es crucial para que salgan 'Nov', 'Jue', etc., en español.
|
||||
try:
|
||||
locale.setlocale(locale.LC_TIME, 'es_ES.UTF-8')
|
||||
except locale.Error:
|
||||
# Si 'es_ES.UTF-8' falla, prueba otras configuraciones comunes para español
|
||||
try:
|
||||
locale.setlocale(locale.LC_TIME, 'es_ES')
|
||||
except locale.Error:
|
||||
print("Advertencia: No se pudo configurar la localización en español. Las abreviaturas de día/mes podrían salir en inglés.")
|
||||
|
||||
# 2. Definir el puerto y el manejador de peticiones
|
||||
PORT = 8000
|
||||
HOST = "127.0.0.1" # El servidor local
|
||||
|
||||
class DateHandler(http.server.SimpleHTTPRequestHandler):
|
||||
"""Manejador personalizado para devolver la fecha formateada."""
|
||||
|
||||
def do_GET(self):
|
||||
"""Maneja las peticiones GET (las que hará Unreal Engine)."""
|
||||
|
||||
# Patrón de formato deseado: "ma. 13 fefb. 2024"
|
||||
#
|
||||
# Códigos de formato en Python:
|
||||
# %a : Nombre abreviado del día de la semana (e.g., 'Jue')
|
||||
# %d : Día del mes (con cero inicial si es necesario)
|
||||
# %b : Nombre abreviado del mes (e.g., 'Nov')
|
||||
# %Y : Año con siglo
|
||||
|
||||
# Usamos .lower() para asegurar las minúsculas, y luego ajustamos los puntos
|
||||
# La salida hoy sería: "jue. 06 nov. 2025" (la ajustamos un poco)
|
||||
|
||||
now = datetime.now()
|
||||
|
||||
# Formato base (ej: "Jue 06 Nov 2025")
|
||||
formatted_date_str = now.strftime("%a. %d %b. %Y")
|
||||
|
||||
# Convertir a minúsculas para emular "ma." y limpiar/ajustar puntos
|
||||
formatted_date_str = formatted_date_str.lower().replace('.', '').replace(' ', ' ')
|
||||
|
||||
# Ejemplo para hoy: "jue. 06 nov. 2025"
|
||||
final_response = f"{now.strftime('%a').lower().replace('.', '')}. {now.strftime('%d').replace('0', '')} {now.strftime('%b').lower().replace('.', '')}. {now.strftime('%Y')}"
|
||||
|
||||
# 3. Preparar la respuesta HTTP
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text/plain; charset=utf-8")
|
||||
self.end_headers()
|
||||
|
||||
# 4. Enviar la fecha formateada como respuesta
|
||||
self.wfile.write(final_response.encode('utf-8'))
|
||||
|
||||
|
||||
# 5. Levantar el servidor
|
||||
try:
|
||||
with socketserver.TCPServer((HOST, PORT), DateHandler) as httpd:
|
||||
print(f"✅ Servidor local Python levantado en http://{HOST}:{PORT}")
|
||||
print(f"URL de prueba para Unreal Engine: http://{HOST}:{PORT}/")
|
||||
print("Presiona Ctrl+C para detener el servidor.")
|
||||
httpd.serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
print("\nServidor detenido por el usuario.")
|
||||
except Exception as e:
|
||||
print(f"Error al levantar el servidor: {e}")
|
||||
Reference in New Issue
Block a user