crxsnake 1.4.2__tar.gz → 1.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crxsnake-1.4.2 → crxsnake-1.4.4}/PKG-INFO +10 -2
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/__init__.py +21 -13
- crxsnake-1.4.4/crxsnake/files.py +50 -0
- crxsnake-1.4.4/crxsnake/utils/embed_log.py +48 -0
- crxsnake-1.4.4/crxsnake/utils/hotline.py +65 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake.egg-info/PKG-INFO +10 -2
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake.egg-info/SOURCES.txt +1 -2
- {crxsnake-1.4.2 → crxsnake-1.4.4}/setup.py +1 -1
- crxsnake-1.4.2/crxsnake/embed.py +0 -90
- crxsnake-1.4.2/crxsnake/files.py +0 -29
- crxsnake-1.4.2/crxsnake/utils/crx.py +0 -15
- crxsnake-1.4.2/crxsnake/utils/hotline.py +0 -118
- {crxsnake-1.4.2 → crxsnake-1.4.4}/LICENSE +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/README.md +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/cogs.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/logger.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/tortoise.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/utils/__init__.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/utils/convert.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake/utils/misc.py +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake.egg-info/dependency_links.txt +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake.egg-info/requires.txt +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/crxsnake.egg-info/top_level.txt +0 -0
- {crxsnake-1.4.2 → crxsnake-1.4.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: crxsnake
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.4
|
4
4
|
Home-page: https://discord.gg/EEp67FWQDP
|
5
5
|
Author: CRX-DEV
|
6
6
|
Author-email: cherniq66@gmail.com
|
@@ -14,6 +14,14 @@ Requires-Dist: tortoise-orm==0.24.0
|
|
14
14
|
Requires-Dist: disnake==2.10.1
|
15
15
|
Requires-Dist: aiofiles==23.2.1
|
16
16
|
Requires-Dist: loguru==0.7.2
|
17
|
+
Dynamic: author
|
18
|
+
Dynamic: author-email
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: home-page
|
22
|
+
Dynamic: license
|
23
|
+
Dynamic: project-url
|
24
|
+
Dynamic: requires-dist
|
17
25
|
|
18
26
|
# CRX-Snake
|
19
27
|
|
@@ -1,29 +1,37 @@
|
|
1
|
+
from .tortoise import Database
|
1
2
|
from .logger import log
|
2
3
|
from .cogs import load_cogs
|
3
|
-
|
4
|
-
from .
|
5
|
-
from .embed import EmbedMessage
|
4
|
+
|
5
|
+
from .files import *
|
6
6
|
|
7
7
|
from .utils.misc import *
|
8
|
-
from .utils.hotline import
|
9
|
-
from .utils.
|
10
|
-
from .utils.
|
8
|
+
from .utils.hotline import *
|
9
|
+
from .utils.convert import *
|
10
|
+
from .utils.embed_log import *
|
11
|
+
|
11
12
|
|
12
13
|
__all__ = [
|
13
14
|
"Database",
|
14
|
-
"
|
15
|
-
|
16
|
-
"
|
15
|
+
"EmbedLog",
|
16
|
+
|
17
|
+
"log",
|
17
18
|
"load_cogs",
|
18
|
-
|
19
|
-
"write_json",
|
19
|
+
|
20
20
|
"steam_to_be_guid",
|
21
21
|
"steam_to_dayz_guid",
|
22
|
-
|
22
|
+
|
23
23
|
"trans",
|
24
24
|
"green",
|
25
25
|
"red",
|
26
26
|
"blue",
|
27
27
|
"yellow",
|
28
|
-
"purple"
|
28
|
+
"purple",
|
29
|
+
|
30
|
+
"restart",
|
31
|
+
"get_user_id",
|
32
|
+
|
33
|
+
"read_json",
|
34
|
+
"write_json",
|
35
|
+
"read_jsonc",
|
36
|
+
"IssueHotline"
|
29
37
|
]
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import re
|
2
|
+
import aiofiles
|
3
|
+
|
4
|
+
from typing import Optional, Any
|
5
|
+
from json import loads, dumps
|
6
|
+
|
7
|
+
|
8
|
+
async def read_json(path: str, *keys: str) -> Optional[Any]:
|
9
|
+
try:
|
10
|
+
async with aiofiles.open(path, "r", encoding="utf-8") as file:
|
11
|
+
file_content = await file.read()
|
12
|
+
file_data = loads(file_content)
|
13
|
+
|
14
|
+
for key in keys:
|
15
|
+
file_data = file_data.get(key)
|
16
|
+
if file_data is None:
|
17
|
+
return None
|
18
|
+
return file_data
|
19
|
+
|
20
|
+
except Exception:
|
21
|
+
raise
|
22
|
+
|
23
|
+
|
24
|
+
async def write_json(path: str, data: Any) -> bool:
|
25
|
+
try:
|
26
|
+
async with aiofiles.open(path, "w", encoding="utf-8") as file:
|
27
|
+
await file.write(dumps(data, ensure_ascii=False, indent=2))
|
28
|
+
return True
|
29
|
+
except Exception:
|
30
|
+
raise
|
31
|
+
|
32
|
+
|
33
|
+
async def read_jsonc(path: str, *keys: str) -> Optional[Any]:
|
34
|
+
try:
|
35
|
+
regex = re.compile(r"(\".*?\"|\'.*?\')|(/\*.*?\*/|//[^\r\n]*)", re.MULTILINE | re.DOTALL)
|
36
|
+
|
37
|
+
def __re_sub(match):
|
38
|
+
return match.group(1) or ""
|
39
|
+
|
40
|
+
async with aiofiles.open(path, "r", encoding="utf-8") as file:
|
41
|
+
file_content = regex.sub(__re_sub, await file.read())
|
42
|
+
file_data = loads(file_content)
|
43
|
+
|
44
|
+
for key in keys:
|
45
|
+
file_data = file_data.get(key)
|
46
|
+
if file_data is None:
|
47
|
+
return None
|
48
|
+
return file_data
|
49
|
+
except Exception:
|
50
|
+
raise
|
@@ -0,0 +1,48 @@
|
|
1
|
+
from typing import Optional, Tuple, List
|
2
|
+
from disnake import TextChannel, User, Embed, Forbidden, HTTPException
|
3
|
+
|
4
|
+
|
5
|
+
class EmbedLog:
|
6
|
+
|
7
|
+
@staticmethod
|
8
|
+
def build_embed(
|
9
|
+
title: Optional[str] = None,
|
10
|
+
color: Optional[int] = None,
|
11
|
+
fields: Optional[List[Tuple[str, str, bool]]] = None,
|
12
|
+
desc: Optional[str] = None,
|
13
|
+
url: Optional[str] = None,
|
14
|
+
thumbnail: Optional[str] = None,
|
15
|
+
image: Optional[str] = None,
|
16
|
+
footer: Optional[str] = None,
|
17
|
+
) -> Embed:
|
18
|
+
|
19
|
+
embed = Embed(title=title, description=desc, color=color, url=url)
|
20
|
+
|
21
|
+
if fields:
|
22
|
+
for name, value, inline in fields:
|
23
|
+
embed.add_field(name=name, value=value, inline=inline)
|
24
|
+
|
25
|
+
if thumbnail:
|
26
|
+
embed.set_thumbnail(url=thumbnail)
|
27
|
+
if image:
|
28
|
+
embed.set_image(url=image)
|
29
|
+
if footer:
|
30
|
+
embed.set_footer(text=footer)
|
31
|
+
|
32
|
+
return embed
|
33
|
+
|
34
|
+
async def send_channel(self, channel: TextChannel, **kwargs) -> None:
|
35
|
+
embed = self.build_embed(**kwargs)
|
36
|
+
try:
|
37
|
+
await channel.send(embed=embed)
|
38
|
+
except Forbidden:
|
39
|
+
print(f"[Ошибка] Нет прав на отправку сообщений в канал {channel.name}.")
|
40
|
+
except HTTPException as e:
|
41
|
+
print(f"[Ошибка] Не удалось отправить сообщение: {e}")
|
42
|
+
|
43
|
+
async def send_user(self, user: User, **kwargs) -> None:
|
44
|
+
embed = self.build_embed(**kwargs)
|
45
|
+
try:
|
46
|
+
await user.send(embed=embed)
|
47
|
+
except Exception:
|
48
|
+
pass
|
@@ -0,0 +1,65 @@
|
|
1
|
+
from random import choices
|
2
|
+
from dataclasses import dataclass, field
|
3
|
+
from string import ascii_uppercase, ascii_letters, digits
|
4
|
+
from typing import List, Dict, Any, Generator
|
5
|
+
|
6
|
+
|
7
|
+
@dataclass
|
8
|
+
class CodeArray:
|
9
|
+
m_code: str
|
10
|
+
m_name: str
|
11
|
+
m_type: str
|
12
|
+
m_itemsArray: List[Dict[str, Any]] = field(default_factory=list)
|
13
|
+
m_teleport_position: str = ""
|
14
|
+
m_vehicles: Dict[str, Any] = field(default_factory=lambda: {"m_item": "", "m_attachments": [], "m_cargo": []})
|
15
|
+
m_give_zone_positions: List[Dict[str, Any]] = field(default_factory=list)
|
16
|
+
m_give_zone_positions_forbidden: List[Dict[str, Any]] = field(default_factory=list)
|
17
|
+
|
18
|
+
|
19
|
+
class IssueHotline:
|
20
|
+
MAX_STACK = 100
|
21
|
+
|
22
|
+
@staticmethod
|
23
|
+
def __generate_code() -> str:
|
24
|
+
return "-".join([
|
25
|
+
"".join(choices(ascii_uppercase, k=2)),
|
26
|
+
"".join(choices(ascii_letters + digits, k=4)),
|
27
|
+
"".join(choices(ascii_letters + digits, k=4))
|
28
|
+
])
|
29
|
+
|
30
|
+
def __generate_count(self, items_list: List[Dict[str, Any]]) -> Generator[Dict[str, Any], None, None]:
|
31
|
+
for item in items_list:
|
32
|
+
item_count = item.get("m_count", 0)
|
33
|
+
item_name = item.get("m_item", "")
|
34
|
+
full_stacks, remainder = divmod(item_count, self.MAX_STACK)
|
35
|
+
|
36
|
+
for _ in range(full_stacks):
|
37
|
+
yield {"m_item": item_name, "m_count": self.MAX_STACK}
|
38
|
+
|
39
|
+
if remainder > 0:
|
40
|
+
yield {"m_item": item_name, "m_count": remainder}
|
41
|
+
|
42
|
+
async def create_items(self, issue_name: str, items_list: List[Dict[str, Any]]) -> Dict[str, Any]:
|
43
|
+
processed_items = [item for item in self.__generate_count(items_list)]
|
44
|
+
return {"m_CodeArray": [CodeArray(
|
45
|
+
m_code=self.__generate_code(),
|
46
|
+
m_name=issue_name,
|
47
|
+
m_type="item",
|
48
|
+
m_itemsArray=processed_items
|
49
|
+
).__dict__]}
|
50
|
+
|
51
|
+
async def create_vehicle(self, issue_name: str, items_dict: Dict[str, Any]) -> Dict[str, Any]:
|
52
|
+
return {"m_CodeArray": [CodeArray(
|
53
|
+
m_code=self.__generate_code(),
|
54
|
+
m_name=issue_name,
|
55
|
+
m_type="vehicle",
|
56
|
+
m_vehicles=items_dict
|
57
|
+
).__dict__]}
|
58
|
+
|
59
|
+
async def create_teleport(self, issue_name: str, teleport_position: str) -> Dict[str, Any]:
|
60
|
+
return {"m_CodeArray": [CodeArray(
|
61
|
+
m_code=self.__generate_code(),
|
62
|
+
m_name=issue_name,
|
63
|
+
m_type="teleport",
|
64
|
+
m_teleport_position=teleport_position
|
65
|
+
).__dict__]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: crxsnake
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.4
|
4
4
|
Home-page: https://discord.gg/EEp67FWQDP
|
5
5
|
Author: CRX-DEV
|
6
6
|
Author-email: cherniq66@gmail.com
|
@@ -14,6 +14,14 @@ Requires-Dist: tortoise-orm==0.24.0
|
|
14
14
|
Requires-Dist: disnake==2.10.1
|
15
15
|
Requires-Dist: aiofiles==23.2.1
|
16
16
|
Requires-Dist: loguru==0.7.2
|
17
|
+
Dynamic: author
|
18
|
+
Dynamic: author-email
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: home-page
|
22
|
+
Dynamic: license
|
23
|
+
Dynamic: project-url
|
24
|
+
Dynamic: requires-dist
|
17
25
|
|
18
26
|
# CRX-Snake
|
19
27
|
|
@@ -3,7 +3,6 @@ README.md
|
|
3
3
|
setup.py
|
4
4
|
crxsnake/__init__.py
|
5
5
|
crxsnake/cogs.py
|
6
|
-
crxsnake/embed.py
|
7
6
|
crxsnake/files.py
|
8
7
|
crxsnake/logger.py
|
9
8
|
crxsnake/tortoise.py
|
@@ -14,6 +13,6 @@ crxsnake.egg-info/requires.txt
|
|
14
13
|
crxsnake.egg-info/top_level.txt
|
15
14
|
crxsnake/utils/__init__.py
|
16
15
|
crxsnake/utils/convert.py
|
17
|
-
crxsnake/utils/
|
16
|
+
crxsnake/utils/embed_log.py
|
18
17
|
crxsnake/utils/hotline.py
|
19
18
|
crxsnake/utils/misc.py
|
crxsnake-1.4.2/crxsnake/embed.py
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
from typing import Optional, Dict, Any
|
2
|
-
|
3
|
-
from disnake import Embed, Forbidden, Colour
|
4
|
-
from disnake.ext import commands
|
5
|
-
from crxsnake.utils.misc import trans
|
6
|
-
|
7
|
-
|
8
|
-
class EmbedMessage:
|
9
|
-
|
10
|
-
def __init__(self, bot: commands.Bot):
|
11
|
-
self.bot = bot
|
12
|
-
|
13
|
-
async def send_channel(
|
14
|
-
self,
|
15
|
-
channel_id: int,
|
16
|
-
title: Optional[str] = None,
|
17
|
-
description: Optional[str] = None,
|
18
|
-
color: Optional[Colour] = trans,
|
19
|
-
url: Optional[str] = None,
|
20
|
-
image: Optional[str] = None,
|
21
|
-
footer: Optional[str] = None,
|
22
|
-
fields: Optional[Dict[str, Any]] = None
|
23
|
-
) -> None:
|
24
|
-
"""Send an Embed message to the channel"""
|
25
|
-
channel = await self.bot.fetch_channel(channel_id)
|
26
|
-
if channel:
|
27
|
-
embed = self.__create_embed(
|
28
|
-
title,
|
29
|
-
description,
|
30
|
-
color,
|
31
|
-
url,
|
32
|
-
image,
|
33
|
-
footer,
|
34
|
-
fields
|
35
|
-
)
|
36
|
-
await channel.send(embed=embed)
|
37
|
-
|
38
|
-
async def send_user(
|
39
|
-
self,
|
40
|
-
user_id: int,
|
41
|
-
title: Optional[str] = None,
|
42
|
-
description: Optional[str] = None,
|
43
|
-
color: Optional[Colour] = trans,
|
44
|
-
url: Optional[str] = None,
|
45
|
-
image: Optional[str] = None,
|
46
|
-
footer: Optional[str] = None,
|
47
|
-
fields: Optional[Dict[str, Any]] = None
|
48
|
-
) -> None:
|
49
|
-
"""Send an Embed message to the user"""
|
50
|
-
try:
|
51
|
-
user = await self.bot.fetch_user(user_id)
|
52
|
-
if user:
|
53
|
-
embed = self.__create_embed(
|
54
|
-
title,
|
55
|
-
description,
|
56
|
-
color,
|
57
|
-
url,
|
58
|
-
image,
|
59
|
-
footer,
|
60
|
-
fields
|
61
|
-
)
|
62
|
-
await user.send(embed=embed)
|
63
|
-
except Forbidden:
|
64
|
-
pass
|
65
|
-
|
66
|
-
@staticmethod
|
67
|
-
def __create_embed(
|
68
|
-
title: Optional[str] = None,
|
69
|
-
description: Optional[str] = None,
|
70
|
-
color: Optional[Colour] = trans,
|
71
|
-
url: Optional[str] = None,
|
72
|
-
image: Optional[str] = None,
|
73
|
-
footer: Optional[str] = None,
|
74
|
-
fields: Optional[Dict[str, Any]] = None
|
75
|
-
) -> Embed:
|
76
|
-
"""Return Embed"""
|
77
|
-
embed = Embed(
|
78
|
-
title=title,
|
79
|
-
description=description,
|
80
|
-
url=url,
|
81
|
-
color=color
|
82
|
-
)
|
83
|
-
if image:
|
84
|
-
embed.set_image(url=image)
|
85
|
-
if footer:
|
86
|
-
embed.set_footer(text=footer)
|
87
|
-
if fields:
|
88
|
-
for name, value in fields.items():
|
89
|
-
embed.add_field(name=name, value=value, inline=False)
|
90
|
-
return embed
|
crxsnake-1.4.2/crxsnake/files.py
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
from typing import Optional, Any
|
2
|
-
from json import loads, dumps
|
3
|
-
from aiofiles import open
|
4
|
-
|
5
|
-
|
6
|
-
async def read_json(path: str, *keys: str) -> Optional[Any]:
|
7
|
-
try:
|
8
|
-
async with open(path, "r", encoding="utf-8") as file:
|
9
|
-
file_content = await file.read()
|
10
|
-
file_data = loads(file_content)
|
11
|
-
|
12
|
-
for key in keys:
|
13
|
-
if key not in file_data:
|
14
|
-
return None
|
15
|
-
file_data = file_data[key]
|
16
|
-
|
17
|
-
return file_data
|
18
|
-
|
19
|
-
except Exception:
|
20
|
-
raise
|
21
|
-
|
22
|
-
|
23
|
-
async def write_json(path: str, data: Any) -> bool:
|
24
|
-
try:
|
25
|
-
async with open(path, "w", encoding="utf-8") as file:
|
26
|
-
await file.write(dumps(data, ensure_ascii=False, indent=2))
|
27
|
-
return True
|
28
|
-
except Exception:
|
29
|
-
raise
|
@@ -1,15 +0,0 @@
|
|
1
|
-
from typing import List, Dict, Any
|
2
|
-
|
3
|
-
|
4
|
-
class IssueCRX:
|
5
|
-
|
6
|
-
|
7
|
-
async def create_items(
|
8
|
-
self, issue_type: str, items_list: List[Dict[str, Any]]
|
9
|
-
) -> Dict[str, List[Dict[str, Any]]]:
|
10
|
-
"""
|
11
|
-
Create a dictionary with generated codes and processed items.
|
12
|
-
"""
|
13
|
-
issue_dict = {"items": [], "cars": [], "sets": []}
|
14
|
-
issue_dict[issue_type].extend(items_list)
|
15
|
-
return issue_dict
|
@@ -1,118 +0,0 @@
|
|
1
|
-
from random import choices
|
2
|
-
from string import ascii_uppercase, ascii_letters, digits
|
3
|
-
from typing import List, Dict, Any, AsyncGenerator
|
4
|
-
|
5
|
-
|
6
|
-
class IssueHotline:
|
7
|
-
MAX_STACK = 100
|
8
|
-
"""
|
9
|
-
Hotline issue class.
|
10
|
-
"""
|
11
|
-
async def __generate_code(self) -> str:
|
12
|
-
part1 = "".join(choices(ascii_uppercase, k=2))
|
13
|
-
part2 = "".join(choices(ascii_letters + digits, k=4))
|
14
|
-
part3 = "".join(choices(ascii_letters + digits, k=4))
|
15
|
-
return f"{part1}-{part2}-{part3}"
|
16
|
-
|
17
|
-
async def __generate_count(
|
18
|
-
self,
|
19
|
-
items_list: List[Dict[str, Any]]
|
20
|
-
) -> AsyncGenerator[Dict[str, Any], None]:
|
21
|
-
|
22
|
-
for item in items_list:
|
23
|
-
item_count = item.get("m_count", 0)
|
24
|
-
item_name = item.get("m_item", "")
|
25
|
-
full_stacks, remainder = divmod(item_count, self.MAX_STACK)
|
26
|
-
|
27
|
-
for _ in range(full_stacks):
|
28
|
-
yield {"m_item": item_name, "m_count": self.MAX_STACK}
|
29
|
-
|
30
|
-
if remainder > 0:
|
31
|
-
yield {"m_item": item_name, "m_count": remainder}
|
32
|
-
|
33
|
-
async def create_items(
|
34
|
-
self,
|
35
|
-
issue_name: str,
|
36
|
-
items_list: List[Dict[str, Any]]
|
37
|
-
) -> Dict[str, Any]:
|
38
|
-
"""
|
39
|
-
Create a dictionary with generated codes and processed items.
|
40
|
-
|
41
|
-
items_list example: [{"m_item": "item1", "m_count": 10}, {"m_item": "item2", "m_count": 20}]
|
42
|
-
"""
|
43
|
-
processed_items = [item async for item in self.__generate_count(items_list)]
|
44
|
-
return {
|
45
|
-
"m_CodeArray": [
|
46
|
-
{
|
47
|
-
"m_code": await self.__generate_code(),
|
48
|
-
"m_name": issue_name,
|
49
|
-
"m_type": "item",
|
50
|
-
"m_itemsArray": processed_items,
|
51
|
-
"m_teleport_position": "",
|
52
|
-
"m_vehicles": {
|
53
|
-
"m_item": "",
|
54
|
-
"m_attachments": [],
|
55
|
-
"m_cargo": []
|
56
|
-
},
|
57
|
-
"m_give_zone_positions": [],
|
58
|
-
"m_give_zone_positions_forbidden": [],
|
59
|
-
}
|
60
|
-
]
|
61
|
-
}
|
62
|
-
|
63
|
-
async def create_vehicle(
|
64
|
-
self,
|
65
|
-
issue_name: str,
|
66
|
-
items_dict: Dict[str, Any]
|
67
|
-
) -> Dict[str, Any]:
|
68
|
-
"""
|
69
|
-
Create a dictionary with generated code and vehicle data.
|
70
|
-
|
71
|
-
items_dict example: {"m_item": "class_name", "m_attachments": ["class_name"], "m_cargo": null}
|
72
|
-
"""
|
73
|
-
return {
|
74
|
-
"m_CodeArray": [
|
75
|
-
{
|
76
|
-
"m_code": await self.__generate_code(),
|
77
|
-
"m_name": issue_name,
|
78
|
-
"m_type": "vehicle",
|
79
|
-
"m_itemsArray": [],
|
80
|
-
"m_teleport_position": "",
|
81
|
-
"m_vehicles": items_dict,
|
82
|
-
"m_give_zone_position": "",
|
83
|
-
"m_give_zone_radius": 0,
|
84
|
-
"m_give_zone_positions": [],
|
85
|
-
"m_give_zone_positions_forbidden": [],
|
86
|
-
"m_fresh_spawn_delay": 0
|
87
|
-
}
|
88
|
-
]
|
89
|
-
}
|
90
|
-
|
91
|
-
async def create_teleport(
|
92
|
-
self,
|
93
|
-
issue_name: str,
|
94
|
-
teleport_position: str
|
95
|
-
) -> Dict[str, Any]:
|
96
|
-
"""
|
97
|
-
Create a dictionary with generated code and teleport data.
|
98
|
-
|
99
|
-
teleport_position format: (x, y, z)
|
100
|
-
"""
|
101
|
-
return {
|
102
|
-
"m_CodeArray": [
|
103
|
-
{
|
104
|
-
"m_code": await self.__generate_code(),
|
105
|
-
"m_name": issue_name,
|
106
|
-
"m_type": "teleport",
|
107
|
-
"m_itemsArray": [],
|
108
|
-
"m_teleport_position": teleport_position,
|
109
|
-
"m_vehicles": {
|
110
|
-
"m_item": "",
|
111
|
-
"m_attachments": []
|
112
|
-
},
|
113
|
-
"m_give_zone_position": "",
|
114
|
-
"m_give_zone_radius": 0,
|
115
|
-
"m_fresh_spawn_delay": 0
|
116
|
-
}
|
117
|
-
]
|
118
|
-
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|