You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.sleep_error="Error: Sleep mode not activated!"
33
30
self.scenes_count=0
34
31
self.scenes= []
35
32
#self.sound = Sound()
36
33
self.sleep=sleep
37
-
self.version="2.3"
34
+
self.version="2.4"
38
35
self.system_lang=locale.getdefaultlocale()[0]
39
-
40
36
defversion(self):
41
37
returnself.version
42
38
43
39
deflenght(self):
44
-
returnself.scenes_count*self.sleep
45
-
40
+
ifself.sleep_modeisTrue:
41
+
returnself.scenes_count*self.sleep
42
+
else:
43
+
print(self.sleep_error)
44
+
defcreate_config(self, filename):
45
+
withopen(filename, "w") asfile:
46
+
file.write(f"""
47
+
{
48
+
"sleep": "{self.sleep}",
49
+
"sleep_mode": "{self.sleep_mode}"
50
+
"scenes_count": "{self.scenes_count}",
51
+
"author": "{getpass.getuser()}",
52
+
"boip_ver": "{self.version}"
53
+
}
54
+
""")
46
55
defscence_from_file(self, file, encoding="utf8"):
47
56
"""add new scene from file"""
48
57
withopen(file, "r", encoding=encoding) asfile:
@@ -59,7 +68,7 @@ def scene(self, scene):
59
68
"""add new scene"""
60
69
self.scenes.append(scene)
61
70
self.scenes_count+=1
62
-
71
+
63
72
defshape(self, shape, position=None):
64
73
"""return shape"""
65
74
square="##\n##"
@@ -108,8 +117,12 @@ def scenes_count(self):
108
117
"""NOT:Sahne içinde kullanılırsa bulunduğu sahneyi eklemez örnek: eğer projenizde 6 sahne varsa 5 sahne gösterecektir eğer sahnenin içinde kullanmazsanız sahne sayınızı normal bir şekilde gösterecektir"""
print("Yapmak istediğiniz işlem Kritik bir işlemdir\nEğer sahne sayısı fazla bir animasyonun çıktısını almak istiyorsanız bu yöntem öenerilmez\nBilgisayarınızın hızını düşürebilir ayrıca diskte baya yer kaplar")
0 commit comments