Site/Django

- some change for skin in requests
This commit is contained in:
Kum1ta
2024-09-25 13:10:49 +02:00
parent 7b49d011df
commit 799b298625
8 changed files with 37 additions and 20 deletions

View File

@ -6,7 +6,7 @@
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/09/13 16:20:58 by tomoron #+# #+# #
# Updated: 2024/09/22 16:10:51 by tomoron ### ########.fr #
# Updated: 2024/09/25 13:02:29 by edbernar ### ########.fr #
# #
# **************************************************************************** #
@ -44,8 +44,18 @@ class Game:
{ "type":1, "pos":{"x": 1.5, "y": 0.2, "z": -mapLength / 4}, "isUp": False },
{ "type":1, "pos":{"x": 1.5, "y": 3.2, "z": -mapLength / 4}, "isUp": True }
]
skins = [
{id: 0, 'color': 0xff53aa, 'texture': None},
{id: 1, 'color': 0xaa24ea, 'texture': None},
{id: 2, 'color': 0x2c9c49, 'texture': None},
{id: 3, 'color': 0x101099, 'texture': None},
{id: 4, 'color': None, 'texture': '/static/img/skin/1.jpg'},
{id: 5, 'color': None, 'texture': '/static/img/skin/2.jpg'},
{id: 6, 'color': None, 'texture': '/static/img/skin/3.jpg'},
{id: 7, 'color': None, 'texture': '/static/img/skin/4.jpg'},
]
def __init__(self, socket, withBot):
def __init__(self, socket, withBot, skinId):
self.p1 = None
self.p2 = None
self.p1Ready = False

View File

@ -76,7 +76,9 @@
<h1>Chat</h1>
<div id="topChatCross"><span>&times;</span></div>
</div>
<p id="infoChat">You are not connected to the chat</p>
<div id="messageListChatHome">
<p id="infoChat">You are not connected to the chat</p>
</div>
</div>
<section class="homeSection">
</section>

View File

@ -3,10 +3,10 @@
# ::: :::::::: #
# ready.py :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42.fr> +#+ +:+ +#+ #
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/09/13 23:41:12 by tomoron #+# #+# #
# Updated: 2024/09/15 13:37:23 by tomoron ### ########.fr #
# Updated: 2024/09/25 09:19:46 by edbernar ### ########.fr #
# #
# **************************************************************************** #

View File

@ -3,10 +3,10 @@
# ::: :::::::: #
# start.py :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42.fr> +#+ +:+ +#+ #
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/09/11 17:07:08 by tomoron #+# #+# #
# Updated: 2024/09/15 13:33:53 by tomoron ### ########.fr #
# Updated: 2024/09/25 09:23:02 by edbernar ### ########.fr #
# #
# **************************************************************************** #
@ -16,5 +16,5 @@ async def start(socket, content):
if(socket.game != None):
socket.sendError("Game already started", 9102)
return;
Game(socket, content.get("with_bot", False))
Game(socket, content.get("with_bot", False), content.get("skinId", 0))