-
Notifications
You must be signed in to change notification settings - Fork 0
/
conflict.py
46 lines (34 loc) · 1.22 KB
/
conflict.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from .mod import Mod, File
class Conflict:
def name(self):
return "conflict"
def create_parser(self, sp):
p = sp.add_parser(
self.name(),
help="creates three mods with conflicting files",
description="creates three mods with conflicting files")
return p
def run(self, cx):
cx.clear_directory(cx.mods_directory())
a = Mod("mod-1")
b = Mod("mod-2")
c = Mod("mod-3")
a.add_file(File("1.txt", "mod-1 1"))
a.add_file(File("1-2.txt", "mod-1 1-2"))
a.add_file(File("1-2-3.txt", "mod-1 1-2-3"))
b.add_file(File("2.txt", "mod-2 2"))
b.add_file(File("1-2.txt", "mod-2 1-2"))
b.add_file(File("2-3.txt", "mod-2 2-3"))
b.add_file(File("1-2-3.txt", "mod-2 1-2-3"))
c.add_file(File("3.txt", "mod-3 3"))
c.add_file(File("2-3.txt", "mod-3 2-3"))
c.add_file(File("1-2-3.txt", "mod-3 1-2-3"))
for i in range(5):
a.add_file(File(str(i), str(i)))
c.add_file(File(str(i + 10), str(i + 10)))
for i in range(15):
b.add_file(File(str(i), str(i)))
a.create(cx)
b.create(cx)
c.create(cx)
return 0