crxsnake 1.3.3__tar.gz → 1.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crxsnake
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Home-page: https://discord.gg/EEp67FWQDP
5
5
  Author: CRX-DEV
6
6
  Author-email: cherniq66@gmail.com
@@ -5,7 +5,9 @@ from typing import List, Dict, Any, AsyncGenerator
5
5
 
6
6
  class IssueHotline:
7
7
  MAX_STACK = 100
8
-
8
+ """
9
+ Hotline issue class.
10
+ """
9
11
  async def __generate_code(self) -> str:
10
12
  part1 = "".join(choices(ascii_uppercase, k=2))
11
13
  part2 = "".join(choices(ascii_letters + digits, k=4))
@@ -16,10 +18,7 @@ class IssueHotline:
16
18
  self,
17
19
  items_list: List[Dict[str, Any]]
18
20
  ) -> AsyncGenerator[Dict[str, Any], None]:
19
- """
20
- Generate item counts based on the MAX_STACK value.
21
- Splits items into full stacks and the remainder.
22
- """
21
+
23
22
  for item in items_list:
24
23
  item_count = item.get("m_count", 0)
25
24
  item_name = item.get("m_item", "")
@@ -38,6 +37,8 @@ class IssueHotline:
38
37
  ) -> Dict[str, Any]:
39
38
  """
40
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}]
41
42
  """
42
43
  processed_items = [item async for item in self.__generate_count(items_list)]
43
44
  return {
@@ -47,8 +48,12 @@ class IssueHotline:
47
48
  "m_name": issue_name,
48
49
  "m_type": "item",
49
50
  "m_itemsArray": processed_items,
50
- "m_vehicles": {},
51
51
  "m_teleport_position": "",
52
+ "m_vehicles": {
53
+ "m_item": "",
54
+ "m_attachments": [],
55
+ "m_cargo": []
56
+ },
52
57
  "m_give_zone_positions": [],
53
58
  "m_give_zone_positions_forbidden": [],
54
59
  }
@@ -62,6 +67,8 @@ class IssueHotline:
62
67
  ) -> Dict[str, Any]:
63
68
  """
64
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}
65
72
  """
66
73
  return {
67
74
  "m_CodeArray": [
@@ -70,10 +77,39 @@ class IssueHotline:
70
77
  "m_name": issue_name,
71
78
  "m_type": "vehicle",
72
79
  "m_itemsArray": [],
73
- "m_vehicles": items_dict,
74
80
  "m_teleport_position": "",
81
+ "m_vehicles": items_dict,
75
82
  "m_give_zone_positions": [],
76
83
  "m_give_zone_positions_forbidden": [],
77
84
  }
78
85
  ]
79
86
  }
87
+
88
+ async def create_teleport(
89
+ self,
90
+ issue_name: str,
91
+ teleport_position: str
92
+ ) -> Dict[str, Any]:
93
+ """
94
+ Create a dictionary with generated code and teleport data.
95
+
96
+ teleport_position format: (x, y, z)
97
+ """
98
+ return {
99
+ "m_CodeArray": [
100
+ {
101
+ "m_code": await self.__generate_code(),
102
+ "m_name": issue_name,
103
+ "m_type": "teleport",
104
+ "m_itemsArray": [],
105
+ "m_teleport_position": teleport_position,
106
+ "m_vehicles": {
107
+ "m_item": "",
108
+ "m_attachments": []
109
+ },
110
+ "m_give_zone_position": "",
111
+ "m_give_zone_radius": 0,
112
+ "m_fresh_spawn_delay": 0
113
+ }
114
+ ]
115
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crxsnake
3
- Version: 1.3.3
3
+ Version: 1.3.4
4
4
  Home-page: https://discord.gg/EEp67FWQDP
5
5
  Author: CRX-DEV
6
6
  Author-email: cherniq66@gmail.com
@@ -17,7 +17,7 @@ urls = {
17
17
 
18
18
  setup(
19
19
  name="crxsnake",
20
- version="1.3.3",
20
+ version="1.3.4",
21
21
  long_description=long_description,
22
22
  long_description_content_type="text/markdown",
23
23
  author="CRX-DEV",
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