mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Compare commits
1780 Commits
prototype-
...
v0.125.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de81199037 | ||
|
|
4af1728da4 | ||
|
|
11fed18c47 | ||
|
|
bdb781d680 | ||
|
|
e08dac2be9 | ||
|
|
7a04c81fe1 | ||
|
|
035b1a510d | ||
|
|
4a27df0166 | ||
|
|
478fa8e6de | ||
|
|
23abb6177d | ||
|
|
7b23729f94 | ||
|
|
cf86c7a8b5 | ||
|
|
e2830c9ad8 | ||
|
|
d95c1aef05 | ||
|
|
46ae16718e | ||
|
|
102c24d5d8 | ||
|
|
9dacf63e36 | ||
|
|
cec071f907 | ||
|
|
5e08553af6 | ||
|
|
540febc75b | ||
|
|
0f8231b069 | ||
|
|
7e912cf4ce | ||
|
|
467914e115 | ||
|
|
5d67041a0c | ||
|
|
52fc800398 | ||
|
|
3164b58300 | ||
|
|
1ca68a89e7 | ||
|
|
8ad25f2a9f | ||
|
|
6dc33e4fe0 | ||
|
|
0ebdd4ac1d | ||
|
|
24be915ef1 | ||
|
|
8b48b54575 | ||
|
|
d389e30c87 | ||
|
|
f8f14dc817 | ||
|
|
d9a5f9c4dd | ||
|
|
fbcbcecae6 | ||
|
|
768377f59b | ||
|
|
34adf454c5 | ||
|
|
9af00eea03 | ||
|
|
a6c487f8b7 | ||
|
|
5b7d686de9 | ||
|
|
3a42e8e07a | ||
|
|
115a3f12c7 | ||
|
|
ccec1cbdf3 | ||
|
|
36a124a3aa | ||
|
|
7836130bef | ||
|
|
06f5c78152 | ||
|
|
57ddf81fc4 | ||
|
|
0e7863650b | ||
|
|
a04ad5eeab | ||
|
|
435b252c86 | ||
|
|
4e72ddffbd | ||
|
|
c99059e8ba | ||
|
|
d8aa0b68c9 | ||
|
|
ebfa44cc2c | ||
|
|
a3ef7fa3c9 | ||
|
|
f398ad8a22 | ||
|
|
f06beeb6f6 | ||
|
|
3e2e764f89 | ||
|
|
a42d6f51a8 | ||
|
|
7cb01b8a85 | ||
|
|
022a668266 | ||
|
|
529b529073 | ||
|
|
46b4d57a8c | ||
|
|
369b2de052 | ||
|
|
c86ab63010 | ||
|
|
b692ed2437 | ||
|
|
c077bbc2fd | ||
|
|
7ccef97287 | ||
|
|
905ace3681 | ||
|
|
004b185e73 | ||
|
|
a1dd01a23c | ||
|
|
8d25792752 | ||
|
|
4335f00e28 | ||
|
|
0b14aec199 | ||
|
|
eceefa1308 | ||
|
|
109e685d55 | ||
|
|
b87d1a0a73 | ||
|
|
b422d8d3ca | ||
|
|
5f5a2bade0 | ||
|
|
45135eb416 | ||
|
|
eb7886bff4 | ||
|
|
f08344f60e | ||
|
|
b37f9e827c | ||
|
|
bbd8cd3cf9 | ||
|
|
ce086833b6 | ||
|
|
f7eebce14e | ||
|
|
394bfda92f | ||
|
|
c70a3d6f4b | ||
|
|
12237db4d7 | ||
|
|
9526bb773b | ||
|
|
ff35b921aa | ||
|
|
8511fe4d3b | ||
|
|
dea195be4a | ||
|
|
945c3dada9 | ||
|
|
3d3d6d38e0 | ||
|
|
7bc65a38fc | ||
|
|
2aaa41252a | ||
|
|
538535db9a | ||
|
|
c4c2e84936 | ||
|
|
1678a26d0c | ||
|
|
6afd67acea | ||
|
|
e2bac1b3df | ||
|
|
474f4f09b9 | ||
|
|
e979673d54 | ||
|
|
048e01e409 | ||
|
|
071e211cfe | ||
|
|
f0211ca445 | ||
|
|
5d9d47a2a5 | ||
|
|
25c1346dd9 | ||
|
|
af1fc3cf6b | ||
|
|
99cd739b39 | ||
|
|
ccffd44f40 | ||
|
|
7c4303c9a4 | ||
|
|
a52719b53f | ||
|
|
1449302701 | ||
|
|
d2b3fc737b | ||
|
|
dc5d9a881e | ||
|
|
ee8f95650b | ||
|
|
ebc12410d4 | ||
|
|
89b4062eb6 | ||
|
|
6846b71e43 | ||
|
|
5697800922 | ||
|
|
37b8c49a44 | ||
|
|
4577d5d3d5 | ||
|
|
4a65111dda | ||
|
|
b24e6d0673 | ||
|
|
1ce5be2774 | ||
|
|
6ea8e5fae1 | ||
|
|
45734a2bdd | ||
|
|
b5ebc11d26 | ||
|
|
b8081a335a | ||
|
|
381c856dd4 | ||
|
|
2efed72eba | ||
|
|
4d26202cf5 | ||
|
|
3aa4bd1448 | ||
|
|
179da34be8 | ||
|
|
0581dbe99f | ||
|
|
1b5c5befa9 | ||
|
|
c5ecc426d0 | ||
|
|
2618bc7a36 | ||
|
|
4c282b00d1 | ||
|
|
c5282afbb7 | ||
|
|
5e276d3112 | ||
|
|
d7d22d9cd4 | ||
|
|
adca56b111 | ||
|
|
69cdf6f727 | ||
|
|
a65ccd7c24 | ||
|
|
4f840da5d6 | ||
|
|
96ef013095 | ||
|
|
4efc04a167 | ||
|
|
7cdd45b4ff | ||
|
|
365fad488c | ||
|
|
c1e7aca3fe | ||
|
|
3f7fce2f02 | ||
|
|
105aa13eb1 | ||
|
|
7d8d6ebd20 | ||
|
|
1bb2d39d71 | ||
|
|
0a5375d1c7 | ||
|
|
c9042f188c | ||
|
|
cea74c63cd | ||
|
|
37420b253b | ||
|
|
c4dead2c99 | ||
|
|
f917748809 | ||
|
|
f25a728a36 | ||
|
|
be9f0a988a | ||
|
|
eae1e7c108 | ||
|
|
6f4e31d6c4 | ||
|
|
d52759f4fb | ||
|
|
4242591b56 | ||
|
|
276c1f6ff8 | ||
|
|
19df65188b | ||
|
|
9223c79ca3 | ||
|
|
693a73549d | ||
|
|
c7c21a34e7 | ||
|
|
d8ba637502 | ||
|
|
b638a784cf | ||
|
|
733c0e7a45 | ||
|
|
62aa9bfb49 | ||
|
|
fcb34ed8c6 | ||
|
|
e718e119f4 | ||
|
|
eb711e44b5 | ||
|
|
ac66038bb5 | ||
|
|
17ca016791 | ||
|
|
4c8be516cf | ||
|
|
2089e9b749 | ||
|
|
9f9900751d | ||
|
|
8a6cadd38f | ||
|
|
b582b317c1 | ||
|
|
e84523359a | ||
|
|
d646403068 | ||
|
|
6fb8df41e5 | ||
|
|
2a7980965e | ||
|
|
c458892467 | ||
|
|
c67151b9c9 | ||
|
|
ef64828613 | ||
|
|
c82364df7b | ||
|
|
f89d6fc73f | ||
|
|
9fb28b5f2a | ||
|
|
d6a3e1e286 | ||
|
|
8958b2123e | ||
|
|
6550ece258 | ||
|
|
fc9526092b | ||
|
|
bb26e243d6 | ||
|
|
ad66e31d6e | ||
|
|
e357330409 | ||
|
|
f3877f3d6a | ||
|
|
2705e2a56a | ||
|
|
4fd5f2bb64 | ||
|
|
1163a445cd | ||
|
|
56d15c8ef0 | ||
|
|
abd3a8b47e | ||
|
|
c21a062bcb | ||
|
|
0ff270c625 | ||
|
|
7a35a859d9 | ||
|
|
23f397fd6b | ||
|
|
2ac3c0824b | ||
|
|
c90907ba92 | ||
|
|
5032c883b8 | ||
|
|
951e01af5a | ||
|
|
42a4227efe | ||
|
|
ebb2a65e6d | ||
|
|
6cf0756f27 | ||
|
|
40c8a3ccf7 | ||
|
|
a9a3af320e | ||
|
|
410957be46 | ||
|
|
ff4bebd806 | ||
|
|
ff276a3c9f | ||
|
|
93dca22ee5 | ||
|
|
85547a9be7 | ||
|
|
b31876ff03 | ||
|
|
6092e39303 | ||
|
|
9ad9fccb22 | ||
|
|
f5cf39907a | ||
|
|
dae4761b72 | ||
|
|
2fdb4e30ac | ||
|
|
07192c4294 | ||
|
|
eb65a45ed4 | ||
|
|
68fe69ef24 | ||
|
|
42e50798b9 | ||
|
|
d570bcef9a | ||
|
|
7b60f5bd06 | ||
|
|
9b0139032b | ||
|
|
d4ccbfc72b | ||
|
|
fe8a1d2632 | ||
|
|
fde8a4a91a | ||
|
|
a7b41b3457 | ||
|
|
179845d9b1 | ||
|
|
de837b1b03 | ||
|
|
4f0daa8143 | ||
|
|
400bdb43aa | ||
|
|
69bb4f9237 | ||
|
|
dc5f9302cd | ||
|
|
58b8e27eea | ||
|
|
23d827e4ef | ||
|
|
2d51bf4d1b | ||
|
|
26efbb4b81 | ||
|
|
0ff5bb862a | ||
|
|
7d98e5cea5 | ||
|
|
0d04200c55 | ||
|
|
6983f3b1a1 | ||
|
|
a284159a18 | ||
|
|
521a97939d | ||
|
|
795dd6149c | ||
|
|
27877820ed | ||
|
|
2cbb1a17e7 | ||
|
|
605d9737f0 | ||
|
|
2662985ce2 | ||
|
|
b31836f674 | ||
|
|
231d08ae1a | ||
|
|
d8b97ee242 | ||
|
|
71e84d82f8 | ||
|
|
dc30e35615 | ||
|
|
eb3dfeaa7b | ||
|
|
124c627fe2 | ||
|
|
0b3a4821fa | ||
|
|
1aec754308 | ||
|
|
dbf01e6b75 | ||
|
|
c10b00fc1b | ||
|
|
e2b7c11750 | ||
|
|
105dc0ac1f | ||
|
|
69dc5aaad4 | ||
|
|
2e5ba99d5f | ||
|
|
014dd37594 | ||
|
|
14a9583a3e | ||
|
|
07ad8cf4ed | ||
|
|
bfa9965056 | ||
|
|
9a06a5727e | ||
|
|
4e02f12e19 | ||
|
|
471da9aace | ||
|
|
5924d9d017 | ||
|
|
443664fc3f | ||
|
|
4ecd58dbfe | ||
|
|
cfdd9862df | ||
|
|
302af71764 | ||
|
|
e851cea6b2 | ||
|
|
b4df9c49d8 | ||
|
|
477e7820cd | ||
|
|
80b6f5e01f | ||
|
|
0a4813225d | ||
|
|
d9280fdd1c | ||
|
|
52ba22f645 | ||
|
|
357755a65e | ||
|
|
466f565e44 | ||
|
|
ba97f9c116 | ||
|
|
4c81bf164c | ||
|
|
2e9f0275d7 | ||
|
|
f9042b3c9f | ||
|
|
1688b2d9c3 | ||
|
|
9b438620ee | ||
|
|
2f7a652e22 | ||
|
|
abecc554f4 | ||
|
|
8a827b37e6 | ||
|
|
460b7c9804 | ||
|
|
fb949730ba | ||
|
|
3bce8d82e5 | ||
|
|
bbe034173f | ||
|
|
9df78f5e11 | ||
|
|
b83aca188f | ||
|
|
220bc49488 | ||
|
|
4cbe50c33d | ||
|
|
d6f70857d1 | ||
|
|
23fd4e1843 | ||
|
|
fb3c783fc4 | ||
|
|
c713b6e062 | ||
|
|
4601f67ebc | ||
|
|
de00d2aca2 | ||
|
|
674fc0d1c0 | ||
|
|
7521ed060b | ||
|
|
e56501649b | ||
|
|
7d412985ec | ||
|
|
e711b71fe9 | ||
|
|
049efad065 | ||
|
|
6bdb7c040f | ||
|
|
48874b2773 | ||
|
|
d6cbdd221c | ||
|
|
59a8a98703 | ||
|
|
ecc673b972 | ||
|
|
06c64b3be8 | ||
|
|
211dfb4b11 | ||
|
|
357a6ba1ad | ||
|
|
00814e8608 | ||
|
|
fae26daf3b | ||
|
|
6e6c18e31c | ||
|
|
ae27023283 | ||
|
|
3fa7d25ecd | ||
|
|
69ccacbd50 | ||
|
|
82c31e5710 | ||
|
|
4c9f4a4a11 | ||
|
|
24cca86813 | ||
|
|
f00b568c9c | ||
|
|
ed6b73c413 | ||
|
|
7bf493f127 | ||
|
|
224a5e024d | ||
|
|
00a2916da5 | ||
|
|
1a8c5ed6d4 | ||
|
|
70d0d7d1a1 | ||
|
|
a2822f78ab | ||
|
|
82035524b9 | ||
|
|
efe7bd9dfd | ||
|
|
f29f57aa7c | ||
|
|
ef6a34e1a7 | ||
|
|
c7ef3dda4e | ||
|
|
5d5348abca | ||
|
|
6a9cbe1f1b | ||
|
|
f569f8e334 | ||
|
|
04590f8723 | ||
|
|
b95f37f93c | ||
|
|
c0472b8aff | ||
|
|
4980d00a67 | ||
|
|
c549ae34e8 | ||
|
|
84676a9346 | ||
|
|
37b4378a06 | ||
|
|
d7f239f40b | ||
|
|
d52cbca984 | ||
|
|
d165a93fbe | ||
|
|
d06832c473 | ||
|
|
af1b3c956b | ||
|
|
206a0d488f | ||
|
|
807bf3ff10 | ||
|
|
9aea0ed78c | ||
|
|
b587052396 | ||
|
|
2e7193b11e | ||
|
|
ce86891741 | ||
|
|
e99fadf501 | ||
|
|
41990fd4a9 | ||
|
|
10dea3f3a3 | ||
|
|
9ee754720e | ||
|
|
0dfa754c59 | ||
|
|
0dbd2e139c | ||
|
|
d80522633d | ||
|
|
024b6ef16d | ||
|
|
72b5735349 | ||
|
|
0d8032e3df | ||
|
|
de20ad8a8f | ||
|
|
49e4fe8c4c | ||
|
|
7040d75687 | ||
|
|
1aa9ced157 | ||
|
|
579e2bf3d7 | ||
|
|
a0a0601b2a | ||
|
|
bf18ee5ef0 | ||
|
|
2f6333ff89 | ||
|
|
87c9f77b5a | ||
|
|
46e6413b40 | ||
|
|
2bb6c826c9 | ||
|
|
1f1f58a182 | ||
|
|
f143ee6358 | ||
|
|
67a34a142d | ||
|
|
9a73e78540 | ||
|
|
dffd28a31c | ||
|
|
42c17faa98 | ||
|
|
d8d2993d7f | ||
|
|
0eba350eb1 | ||
|
|
a7d79eed2d | ||
|
|
a4a7e754af | ||
|
|
4c48a2b378 | ||
|
|
58c79b2c7b | ||
|
|
fa0d852286 | ||
|
|
9a1ad8ee5a | ||
|
|
7983a523de | ||
|
|
8223df3486 | ||
|
|
d33f26e503 | ||
|
|
4b6ad732b1 | ||
|
|
1ebc485e14 | ||
|
|
250ebd71f6 | ||
|
|
e939e5a18c | ||
|
|
a9e0d9d629 | ||
|
|
dd3c96b81c | ||
|
|
1bd1409192 | ||
|
|
12980a6437 | ||
|
|
2bfd149fd4 | ||
|
|
67eeb75231 | ||
|
|
b139394020 | ||
|
|
b1e184bfec | ||
|
|
77c3566d9b | ||
|
|
1e89ff95e4 | ||
|
|
893d6a7e94 | ||
|
|
ae2dfdffcb | ||
|
|
0cb1cd4896 | ||
|
|
b8a254db3b | ||
|
|
0a9c428ad2 | ||
|
|
35b2649c06 | ||
|
|
2440eb168b | ||
|
|
0ddcadbdbc | ||
|
|
fc985f07bf | ||
|
|
f8ba9fe517 | ||
|
|
9e40ec8869 | ||
|
|
b562fba520 | ||
|
|
06fba240b7 | ||
|
|
8495011f29 | ||
|
|
fc2931a1f6 | ||
|
|
e729f71aa9 | ||
|
|
f0e77b49f9 | ||
|
|
21873459fe | ||
|
|
e479b85dbb | ||
|
|
b969cee2a6 | ||
|
|
895cd6e03e | ||
|
|
3d039118c6 | ||
|
|
884ac75e42 | ||
|
|
5df840db2d | ||
|
|
9a89c3d352 | ||
|
|
d21883d6c3 | ||
|
|
b106672228 | ||
|
|
76e5269716 | ||
|
|
4a8be4fc9e | ||
|
|
d79ad9717b | ||
|
|
525e1d56c1 | ||
|
|
4daf199aa5 | ||
|
|
6cc8fb8aa5 | ||
|
|
ca3fdcb294 | ||
|
|
35d4a5c255 | ||
|
|
32c8a36164 | ||
|
|
1c36d919e4 | ||
|
|
cdefd3051b | ||
|
|
39920f5fd3 | ||
|
|
9528d6dc8f | ||
|
|
8400c827fd | ||
|
|
2a957f1423 | ||
|
|
87ce6dd4b5 | ||
|
|
f5c06a9c3b | ||
|
|
81e02c3baa | ||
|
|
f83153e0cc | ||
|
|
6f789ea870 | ||
|
|
91f1edfc81 | ||
|
|
fff8a7b9d8 | ||
|
|
da378ea15f | ||
|
|
0fd9b8236a | ||
|
|
fd2a0f97eb | ||
|
|
eaf74f11d1 | ||
|
|
64a6fc9b03 | ||
|
|
8e6bc1651e | ||
|
|
fde83f0838 | ||
|
|
c67d8ba795 | ||
|
|
08d47feb97 | ||
|
|
4c2ea93624 | ||
|
|
d430df07f7 | ||
|
|
3f0dfe7f73 | ||
|
|
95ef1853b6 | ||
|
|
2e456a6bc0 | ||
|
|
50de6b4866 | ||
|
|
191519932e | ||
|
|
cb11afd777 | ||
|
|
3ef6af58da | ||
|
|
8a1d092af5 | ||
|
|
90708000f5 | ||
|
|
45295d4b49 | ||
|
|
59d40eb56c | ||
|
|
18a579947f | ||
|
|
c74c99d3e3 | ||
|
|
cfd7e5575b | ||
|
|
74445de12b | ||
|
|
8361162959 | ||
|
|
8ec32eb6bb | ||
|
|
9bbd1d28b1 | ||
|
|
3d1ca2eed9 | ||
|
|
4cff5774d2 | ||
|
|
d9c0c84efa | ||
|
|
a323f2ef84 | ||
|
|
987d76b53d | ||
|
|
2776b4caa4 | ||
|
|
d90a365fa5 | ||
|
|
0c9fe010b1 | ||
|
|
af7e9150bb | ||
|
|
fb0907a1a4 | ||
|
|
7522737d90 | ||
|
|
ec5f07b372 | ||
|
|
a015e8722e | ||
|
|
8cf3b519e7 | ||
|
|
d56bf7739b | ||
|
|
084cc1a073 | ||
|
|
9125d99ec1 | ||
|
|
d9f602ee91 | ||
|
|
d518d55897 | ||
|
|
01e96ebcb9 | ||
|
|
cb69facebf | ||
|
|
c9b942635a | ||
|
|
7857e3a195 | ||
|
|
e0cfb24f1b | ||
|
|
24622eb548 | ||
|
|
66577acd1f | ||
|
|
f3364a196c | ||
|
|
504f3f16d8 | ||
|
|
0a2735a60d | ||
|
|
6c4b71e06b | ||
|
|
360db24f0a | ||
|
|
e0878096f4 | ||
|
|
f73babd869 | ||
|
|
61e193466c | ||
|
|
6836816649 | ||
|
|
054a908efd | ||
|
|
ace8500240 | ||
|
|
d8d68480c3 | ||
|
|
5284f3c2fb | ||
|
|
5c1d753a8d | ||
|
|
27e0c22fe2 | ||
|
|
b9f7733c67 | ||
|
|
b09ddf986c | ||
|
|
589d56fe67 | ||
|
|
fdbb85dfe0 | ||
|
|
d33076b782 | ||
|
|
91f5cfdf35 | ||
|
|
037f702097 | ||
|
|
e5dde1c7ad | ||
|
|
272c3f8e84 | ||
|
|
9c831b3bda | ||
|
|
9573e4e6c7 | ||
|
|
3330870a43 | ||
|
|
1c86d2a6ea | ||
|
|
5ec72082bb | ||
|
|
ce4a0eb8bb | ||
|
|
fdfe0949ab | ||
|
|
bafbdb6363 | ||
|
|
a0b067a062 | ||
|
|
ef0c0d0082 | ||
|
|
3393658953 | ||
|
|
78a75daea2 | ||
|
|
1bbfd6b38f | ||
|
|
20bbe30a23 | ||
|
|
8c5e790cb5 | ||
|
|
ddbd34aee2 | ||
|
|
7e2a05ab65 | ||
|
|
e3108d22ac | ||
|
|
4f7f43e193 | ||
|
|
84733a335c | ||
|
|
2aafb21772 | ||
|
|
20c8eca6bf | ||
|
|
be72dd4107 | ||
|
|
187c158e6b | ||
|
|
53fb9d01e0 | ||
|
|
bcf825d112 | ||
|
|
ab07c75966 | ||
|
|
b5747f7003 | ||
|
|
44da2fe738 | ||
|
|
2995baca6f | ||
|
|
a86a539c15 | ||
|
|
de486207b3 | ||
|
|
d1eb70da07 | ||
|
|
52588bee92 | ||
|
|
ec26ef1e42 | ||
|
|
67381c369c | ||
|
|
b05b9949e6 | ||
|
|
89ac6f0a43 | ||
|
|
3bcd53d7c5 | ||
|
|
248e9240c1 | ||
|
|
e64d499000 | ||
|
|
5f03465879 | ||
|
|
2a7920adaf | ||
|
|
a16731c957 | ||
|
|
0688cd0202 | ||
|
|
0c5b43d5af | ||
|
|
8e70afd235 | ||
|
|
7623c8357b | ||
|
|
2e7dce5f08 | ||
|
|
2b03a2c550 | ||
|
|
b39adf0095 | ||
|
|
3c168f5a31 | ||
|
|
fef963e77a | ||
|
|
b39f92f1fa | ||
|
|
f6d4389f52 | ||
|
|
23233c59df | ||
|
|
a243c4c795 | ||
|
|
349438358c | ||
|
|
9a844ae413 | ||
|
|
6b076645db | ||
|
|
445a3aa8fb | ||
|
|
ca83543f9e | ||
|
|
9b42527de3 | ||
|
|
f98d8707c9 | ||
|
|
55fd79eb36 | ||
|
|
509aca8c03 | ||
|
|
1e2756e4f7 | ||
|
|
7175f49fa6 | ||
|
|
31c4a331ab | ||
|
|
e71cab167b | ||
|
|
c2de890441 | ||
|
|
6fe3d7cff5 | ||
|
|
f51b7bbd99 | ||
|
|
a3e9dea8d8 | ||
|
|
6db41a05c2 | ||
|
|
ea2aab739f | ||
|
|
17a623222d | ||
|
|
55d2c4a066 | ||
|
|
db1e85e69d | ||
|
|
22fe99ac99 | ||
|
|
be46a97849 | ||
|
|
9307298313 | ||
|
|
a12233ea4a | ||
|
|
3f86f5f5dd | ||
|
|
342d9ed2cd | ||
|
|
36f781d05b | ||
|
|
1799ecaa68 | ||
|
|
f573143e29 | ||
|
|
5e08ef69aa | ||
|
|
5d2cfcff66 | ||
|
|
e112938998 | ||
|
|
5aa8aa120c | ||
|
|
dd2697fbe5 | ||
|
|
fa94ef0df2 | ||
|
|
af7d8c4601 | ||
|
|
c0f384ac96 | ||
|
|
6c1f8a86d7 | ||
|
|
5cdae85e9f | ||
|
|
89331f6948 | ||
|
|
cf6f52c1fa | ||
|
|
86ffed9afb | ||
|
|
cb29e6e19d | ||
|
|
5fed38fecd | ||
|
|
ada056dcdf | ||
|
|
3a05a82934 | ||
|
|
e6f2d36d50 | ||
|
|
f856ac0efa | ||
|
|
c34cbcdfa7 | ||
|
|
b791a5e815 | ||
|
|
be8147a722 | ||
|
|
c5ebe2c252 | ||
|
|
e418ab96b9 | ||
|
|
025fa95854 | ||
|
|
32bdc152d7 | ||
|
|
fef46f7856 | ||
|
|
11492ff62f | ||
|
|
b7d460cee6 | ||
|
|
c62d0ecfd0 | ||
|
|
1dfa6587b1 | ||
|
|
78bea7312e | ||
|
|
03363296db | ||
|
|
7e9f3dd5e6 | ||
|
|
54a29a030e | ||
|
|
733097c1f4 | ||
|
|
187d8865db | ||
|
|
9841b74936 | ||
|
|
d5faceca21 | ||
|
|
5b62ddeca4 | ||
|
|
8a4f186fd5 | ||
|
|
b14d461e9b | ||
|
|
3bfb23f35d | ||
|
|
846cc3fa48 | ||
|
|
01673fb155 | ||
|
|
15d30eacd0 | ||
|
|
615b1ae2af | ||
|
|
85f99e6303 | ||
|
|
5e3a5a0d0c | ||
|
|
8dfc779611 | ||
|
|
3ba7238076 | ||
|
|
7b59fbd3ef | ||
|
|
d87963206c | ||
|
|
9dd13245ef | ||
|
|
1c3905a8f4 | ||
|
|
762cd786ea | ||
|
|
120c90862b | ||
|
|
4e0deb2e42 | ||
|
|
6bc831eb05 | ||
|
|
e0be355707 | ||
|
|
ec3485e741 | ||
|
|
fb0ed471a0 | ||
|
|
509ba2ec4b | ||
|
|
8121c3c41b | ||
|
|
4a003eaec0 | ||
|
|
47f7b73ea0 | ||
|
|
8a898adaa2 | ||
|
|
031dceeb48 | ||
|
|
bf6928703f | ||
|
|
75288ba5e7 | ||
|
|
96938ca85a | ||
|
|
a60011d612 | ||
|
|
60e0c0b804 | ||
|
|
a0c23c7fee | ||
|
|
46183aa41a | ||
|
|
3f175a8d2a | ||
|
|
fac1b2c469 | ||
|
|
bb137d69a2 | ||
|
|
1723be3d5b | ||
|
|
a35632d89e | ||
|
|
f956ad2008 | ||
|
|
1646297039 | ||
|
|
c26c8fb81e | ||
|
|
38f2808816 | ||
|
|
7994935b23 | ||
|
|
7120000ef5 | ||
|
|
7c3fd3eaa9 | ||
|
|
8bd47cd7f8 | ||
|
|
1068458beb | ||
|
|
54db524e53 | ||
|
|
9265af75bf | ||
|
|
037bff9099 | ||
|
|
6de1b41d9c | ||
|
|
0ab9f34046 | ||
|
|
2746dccfc6 | ||
|
|
eae54d0327 | ||
|
|
c1195d1f1d | ||
|
|
5a02c5c03f | ||
|
|
d9c59164f2 | ||
|
|
72a952fbdd | ||
|
|
45e58c1ed8 | ||
|
|
127d1d7eaf | ||
|
|
18c9c6bf0a | ||
|
|
89ec06468f | ||
|
|
9920e409ca | ||
|
|
f1681b2128 | ||
|
|
490a4efff8 | ||
|
|
a416eedff0 | ||
|
|
2fe0c94d84 | ||
|
|
2f22de4eff | ||
|
|
2017d943fb | ||
|
|
e34935c9e2 | ||
|
|
db95c6284b | ||
|
|
6255ee6e96 | ||
|
|
d1b16d9a52 | ||
|
|
708b3b2acf | ||
|
|
2e471366b7 | ||
|
|
ca9ce7c7ed | ||
|
|
81cd43f988 | ||
|
|
cf5c72e7ea | ||
|
|
2629fd3efb | ||
|
|
338fcd5fcb | ||
|
|
b5395c0bc0 | ||
|
|
97bdc1edee | ||
|
|
8a0464ed35 | ||
|
|
31d68dcd49 | ||
|
|
3b337bf88d | ||
|
|
f3e0706488 | ||
|
|
3378f1ff98 | ||
|
|
f160508da3 | ||
|
|
1ba5c9120f | ||
|
|
701606c75a | ||
|
|
efa0fa3f1b | ||
|
|
63b9b56006 | ||
|
|
4b082baf37 | ||
|
|
698d65c5af | ||
|
|
c9dd27658e | ||
|
|
266223c3fd | ||
|
|
521e4746c6 | ||
|
|
72efbe543c | ||
|
|
b69ccc2241 | ||
|
|
656992ae5f | ||
|
|
947f04ebb9 | ||
|
|
603b88c77a | ||
|
|
108e270f9e | ||
|
|
d3edd10714 | ||
|
|
125d138e16 | ||
|
|
f5c210b990 | ||
|
|
4521dc37f5 | ||
|
|
adcdb9f736 | ||
|
|
2116230f58 | ||
|
|
dd0d186314 | ||
|
|
329e2b0cdc | ||
|
|
a562675553 | ||
|
|
89a1d32e1d | ||
|
|
05fb110f40 | ||
|
|
c6896e9bd9 | ||
|
|
2678fad629 | ||
|
|
7d0e9f9635 | ||
|
|
7a5df9a718 | ||
|
|
856fbd0480 | ||
|
|
828ac48f7c | ||
|
|
d0e11a755c | ||
|
|
b637967163 | ||
|
|
50dce4d56b | ||
|
|
e9af594448 | ||
|
|
b5662007d5 | ||
|
|
03acded657 | ||
|
|
6b0e2deede | ||
|
|
ffe1689be6 | ||
|
|
2f3f7976f1 | ||
|
|
df7933b890 | ||
|
|
5778ca87e7 | ||
|
|
af8a21df53 | ||
|
|
cd02dddd5d | ||
|
|
e44805cd20 | ||
|
|
635387a23e | ||
|
|
2b594f6356 | ||
|
|
cec14ae861 | ||
|
|
a12a973a26 | ||
|
|
45a315bb69 | ||
|
|
1e843bf3a2 | ||
|
|
26c85725a5 | ||
|
|
467d391ec8 | ||
|
|
601feb7cc0 | ||
|
|
cd1466cdc0 | ||
|
|
94aeb309b2 | ||
|
|
3fba59eb6c | ||
|
|
508754f4bc | ||
|
|
3f4ae0f02a | ||
|
|
b0daf64d94 | ||
|
|
c4223f015d | ||
|
|
33ebb99b9c | ||
|
|
dad176aca1 | ||
|
|
cac1f3e018 | ||
|
|
49dfb2d2f1 | ||
|
|
4e0821c6c1 | ||
|
|
39800d57d1 | ||
|
|
52b9729bb8 | ||
|
|
5a49ce1812 | ||
|
|
c3d27fb338 | ||
|
|
07378f4503 | ||
|
|
ae2f3fe70c | ||
|
|
6edd5d8a63 | ||
|
|
08c6e52806 | ||
|
|
f13a066bdd | ||
|
|
c478ef3a4b | ||
|
|
1d3bf8d072 | ||
|
|
12f40d951d | ||
|
|
c98e409ad8 | ||
|
|
ef6efd3c68 | ||
|
|
c4b0534240 | ||
|
|
ff0dbecbee | ||
|
|
b0d59e5e3f | ||
|
|
e3d29ae28f | ||
|
|
9aebaa3749 | ||
|
|
2bae6abbc0 | ||
|
|
880160e7af | ||
|
|
801b513cde | ||
|
|
bd284cc945 | ||
|
|
c481b50a8b | ||
|
|
c889c2b2aa | ||
|
|
60c150269e | ||
|
|
8dffeef261 | ||
|
|
6943693d3f | ||
|
|
964ab60020 | ||
|
|
8fad4d291f | ||
|
|
d3adcb83db | ||
|
|
3c046b5f6f | ||
|
|
dd567a4cc8 | ||
|
|
fe78883a93 | ||
|
|
1d0c9e9512 | ||
|
|
1a61f1925c | ||
|
|
18567c7051 | ||
|
|
4932487859 | ||
|
|
506f0b0a1e | ||
|
|
ae2e6bca82 | ||
|
|
0b19d04c1c | ||
|
|
8344e8ba10 | ||
|
|
5dd1b58357 | ||
|
|
537e1ab4f9 | ||
|
|
7247171b4b | ||
|
|
155a35ab06 | ||
|
|
3c50db8b5e | ||
|
|
78ba02432e | ||
|
|
32f8b6f4b8 | ||
|
|
97d52393ed | ||
|
|
576abe7adb | ||
|
|
d404494018 | ||
|
|
80e390a74b | ||
|
|
cf912d8c07 | ||
|
|
ae8a7481bc | ||
|
|
dbcb9bde3d | ||
|
|
6dc06e7690 | ||
|
|
f2cbfbf705 | ||
|
|
ca79d1fc13 | ||
|
|
2bcfca3d78 | ||
|
|
74c86bf08c | ||
|
|
b8397a1a27 | ||
|
|
4c2da94a58 | ||
|
|
42c6b9976a | ||
|
|
cd40916df0 | ||
|
|
95525a549a | ||
|
|
07c5c0ca0e | ||
|
|
c8e36eadf7 | ||
|
|
b3df54d2bb | ||
|
|
007bfe4447 | ||
|
|
ea1691c7f5 | ||
|
|
f82e3e8432 | ||
|
|
59d8cb37f0 | ||
|
|
cf52985eaf | ||
|
|
aa412c2b47 | ||
|
|
917280b4d7 | ||
|
|
51c6ff934e | ||
|
|
e534fcd800 | ||
|
|
6105be4b14 | ||
|
|
205147c0f0 | ||
|
|
f6d722f7c3 | ||
|
|
d1c1bffc4f | ||
|
|
54316b7255 | ||
|
|
2d7cd49dbc | ||
|
|
5832cb3866 | ||
|
|
818ea1a629 | ||
|
|
58c0f7796b | ||
|
|
55217c982d | ||
|
|
036951ae62 | ||
|
|
ebaa8d9ac3 | ||
|
|
e222f82059 | ||
|
|
d867661c24 | ||
|
|
ac7c44ab2e | ||
|
|
b861182846 | ||
|
|
1f3e42b013 | ||
|
|
7b0c4dd7fb | ||
|
|
2898e1413b | ||
|
|
ba3525c0c0 | ||
|
|
5ff11980b7 | ||
|
|
29274986f8 | ||
|
|
57d862f9fc | ||
|
|
31da2557d5 | ||
|
|
9752996497 | ||
|
|
7c7c8d23fb | ||
|
|
e1dc83a573 | ||
|
|
520461ff95 | ||
|
|
7c2a010c71 | ||
|
|
c17faedccf | ||
|
|
36495fe81b | ||
|
|
9e3851b847 | ||
|
|
582e705088 | ||
|
|
cf893c3c32 | ||
|
|
3a5cc20a88 | ||
|
|
cb209df0e5 | ||
|
|
eb64f55ce5 | ||
|
|
00ab9c6474 | ||
|
|
26eaa38e89 | ||
|
|
42bc16d4c9 | ||
|
|
498ce86176 | ||
|
|
3104678140 | ||
|
|
c63984eaca | ||
|
|
078b81d495 | ||
|
|
4c341f0289 | ||
|
|
bb4461587e | ||
|
|
fe45af151a | ||
|
|
ae2b0e9d8f | ||
|
|
ddf4828bf9 | ||
|
|
b1d0dbf03c | ||
|
|
a91b134c5d | ||
|
|
660b0b05d3 | ||
|
|
e14493246e | ||
|
|
d93a35b620 | ||
|
|
2e12a712fa | ||
|
|
29a84a6621 | ||
|
|
51f00d4b3b | ||
|
|
a67b22cce8 | ||
|
|
cfbfdbf420 | ||
|
|
a76d053818 | ||
|
|
1587ee3c93 | ||
|
|
662808d0d3 | ||
|
|
9d88857b55 | ||
|
|
3c92794aed | ||
|
|
527879c048 | ||
|
|
d2494bcdc7 | ||
|
|
486aa1423b | ||
|
|
20659789b0 | ||
|
|
d87d6f7f8c | ||
|
|
fa5fdcb5a5 | ||
|
|
e6af084c22 | ||
|
|
de01b9d8cb | ||
|
|
c9aa2c61bd | ||
|
|
8200f1d942 | ||
|
|
1af0ebca6c | ||
|
|
fe5957bb91 | ||
|
|
be08f1787f | ||
|
|
ea35e6c03f | ||
|
|
a6c6b22393 | ||
|
|
5e6e5cb5ea | ||
|
|
64d2a3ca28 | ||
|
|
bee4e499a8 | ||
|
|
55da2dc5e5 | ||
|
|
177eca0f90 | ||
|
|
ae229a03d8 | ||
|
|
2dc8093660 | ||
|
|
071acbc818 | ||
|
|
3f5982cac0 | ||
|
|
6f387402fe | ||
|
|
363e28561c | ||
|
|
4d63b54259 | ||
|
|
7fa05c7db3 | ||
|
|
c466f5f17f | ||
|
|
b6f302b71e | ||
|
|
7d9db6f7b2 | ||
|
|
8bedba2da7 | ||
|
|
837dde78c9 | ||
|
|
a01629969d | ||
|
|
15e13c7f92 | ||
|
|
3dd80b90eb | ||
|
|
cb8e295ad9 | ||
|
|
909163a923 | ||
|
|
6aa2408364 | ||
|
|
afc1eed7ae | ||
|
|
85c8dc05fe | ||
|
|
710371d7d1 | ||
|
|
9f651646d7 | ||
|
|
d2860c80a9 | ||
|
|
e1b9ae22b6 | ||
|
|
5d64f35c96 | ||
|
|
5cfea0cd97 | ||
|
|
a165556bf5 | ||
|
|
dee2881203 | ||
|
|
da0891a5f4 | ||
|
|
1ed9796700 | ||
|
|
578a967a31 | ||
|
|
14c0c58e87 | ||
|
|
766d909a08 | ||
|
|
9c50a217da | ||
|
|
4f9db0cdb7 | ||
|
|
3c19937750 | ||
|
|
c509764014 | ||
|
|
75e06e4060 | ||
|
|
1b909f71a1 | ||
|
|
1a8764f54b | ||
|
|
9152c97de7 | ||
|
|
45cb04f928 | ||
|
|
a700750d9e | ||
|
|
07d327eb8b | ||
|
|
2275ec9573 | ||
|
|
5848b449f6 | ||
|
|
67aa32e694 | ||
|
|
dbd2961b9f | ||
|
|
b77b49c667 | ||
|
|
0eabe62bdb | ||
|
|
31e2ea2770 | ||
|
|
7a636b3b87 | ||
|
|
98ce017b4a | ||
|
|
26b04f0d66 | ||
|
|
f4f2dea688 | ||
|
|
e9a0f9a4c1 | ||
|
|
de438ae94c | ||
|
|
9ec77f20ee | ||
|
|
da01040b52 | ||
|
|
dce2a5ddb2 | ||
|
|
5c99fbabf2 | ||
|
|
9d0846c0e9 | ||
|
|
035ecfb098 | ||
|
|
3693f5aee7 | ||
|
|
b859815b07 | ||
|
|
3701ca83e4 | ||
|
|
1473f1d34c | ||
|
|
889c140fb9 | ||
|
|
c8259915f8 | ||
|
|
a2a25fb296 | ||
|
|
938a9929ea | ||
|
|
7726075b9b | ||
|
|
03b3d1bbe7 | ||
|
|
17ec51b74c | ||
|
|
e92998d1ec | ||
|
|
6691512136 | ||
|
|
a80f4ad76c | ||
|
|
2c6f4cd80c | ||
|
|
51a4c6dcf2 | ||
|
|
1f402e581a | ||
|
|
17ea92bfda | ||
|
|
6a8266af7e | ||
|
|
f6b7606648 | ||
|
|
9cd8adae93 | ||
|
|
c5ba8b75c8 | ||
|
|
3d73cc7289 | ||
|
|
11aa062ee0 | ||
|
|
b4358a9e33 | ||
|
|
0cce4714a1 | ||
|
|
9c4e6a6595 | ||
|
|
1ddd541fe9 | ||
|
|
e45aa3f2fe | ||
|
|
99efdb6061 | ||
|
|
32f0ffdc79 | ||
|
|
cf166483c9 | ||
|
|
49631867f4 | ||
|
|
9f56eaec9a | ||
|
|
04f2b732a5 | ||
|
|
b8cfabc339 | ||
|
|
1cdd39202f | ||
|
|
3290720b4c | ||
|
|
49badb06cb | ||
|
|
2c6941e73b | ||
|
|
5e5883cb88 | ||
|
|
02c504445e | ||
|
|
4d5075a792 | ||
|
|
25212cbb4d | ||
|
|
c56cc24804 | ||
|
|
cf9250f25d | ||
|
|
a105e02131 | ||
|
|
cebdca87df | ||
|
|
bbabee3949 | ||
|
|
f16d41704b | ||
|
|
6f557ac821 | ||
|
|
ba70a7c95e | ||
|
|
f3796ee69d | ||
|
|
b2a71e5ef8 | ||
|
|
c253130c4a | ||
|
|
f03826b5ec | ||
|
|
69cf93a425 | ||
|
|
a4ea7fed6a | ||
|
|
7046152ec8 | ||
|
|
f6f1f76980 | ||
|
|
a98a214fa3 | ||
|
|
faadb70de7 | ||
|
|
7a6d6c83b1 | ||
|
|
9e32eb46e5 | ||
|
|
bea91d119e | ||
|
|
9ec725d848 | ||
|
|
790d523ebd | ||
|
|
147ca286ea | ||
|
|
bc25f5d727 | ||
|
|
c65740eba6 | ||
|
|
59e6a797f1 | ||
|
|
663d901e6b | ||
|
|
585126bf52 | ||
|
|
e27ed228ad | ||
|
|
ef35187624 | ||
|
|
1cf31fbea6 | ||
|
|
c7a3c43a4f | ||
|
|
01b55494e8 | ||
|
|
be9ab89b29 | ||
|
|
d4c8631587 | ||
|
|
3d43fc510e | ||
|
|
931c38a97d | ||
|
|
53c496fe27 | ||
|
|
c696ac1c73 | ||
|
|
57e5ceef1a | ||
|
|
b5279f3f89 | ||
|
|
fc424309c1 | ||
|
|
19aac6c461 | ||
|
|
2decf31a78 | ||
|
|
f33ba17148 | ||
|
|
752d4dfe8b | ||
|
|
92d40cded3 | ||
|
|
11f8bf794a | ||
|
|
0604464dcc | ||
|
|
9f25c14707 | ||
|
|
2c50e4f219 | ||
|
|
e97d8b9b14 | ||
|
|
f129bd45c5 | ||
|
|
f812b307b5 | ||
|
|
436cb98d53 | ||
|
|
1c1ced0f8a | ||
|
|
97015569f6 | ||
|
|
ee2d266d6b | ||
|
|
786ecdb8b1 | ||
|
|
488260cc64 | ||
|
|
6ee96873a4 | ||
|
|
2220f3e346 | ||
|
|
137723357c | ||
|
|
db3f3e5b32 | ||
|
|
fc10adfb03 | ||
|
|
812809bbfd | ||
|
|
ec70abe928 | ||
|
|
0ec6995542 | ||
|
|
1c28782d5d | ||
|
|
45472fa342 | ||
|
|
18a5335373 | ||
|
|
86590ceb1f | ||
|
|
e518abd2be | ||
|
|
13ae59dbf6 | ||
|
|
0ded41ebe1 | ||
|
|
3eb295e3ef | ||
|
|
1782792d30 | ||
|
|
d5c0776278 | ||
|
|
0822b41155 | ||
|
|
7a81c7f64a | ||
|
|
a925b7f84d | ||
|
|
557de01532 | ||
|
|
a38cbc7188 | ||
|
|
5146b1b3c6 | ||
|
|
0e97e3000f | ||
|
|
0c4a05dcbf | ||
|
|
565fa9f046 | ||
|
|
2783e89d1f | ||
|
|
d9d08dcbe3 | ||
|
|
6abeedae97 | ||
|
|
7bc1eaabfd | ||
|
|
526997639b | ||
|
|
9dc030c764 | ||
|
|
35308975db | ||
|
|
7649c120e9 | ||
|
|
610f6d88af | ||
|
|
0fb5b59eba | ||
|
|
77b1fd933c | ||
|
|
4ec019078d | ||
|
|
fe022d4100 | ||
|
|
1d4eec4855 | ||
|
|
84fceb587b | ||
|
|
a4ad98519e | ||
|
|
8f55a21cc4 | ||
|
|
4e40184c4a | ||
|
|
8bea8237f8 | ||
|
|
00c4d68db8 | ||
|
|
93e26fd88a | ||
|
|
312b879b06 | ||
|
|
852d1874db | ||
|
|
9e14a7e0d3 | ||
|
|
5700969945 | ||
|
|
6feb8b69ee | ||
|
|
1ab14fa6b7 | ||
|
|
445b13791e | ||
|
|
5605149a63 | ||
|
|
162b069de3 | ||
|
|
1c65686ee0 | ||
|
|
278755d938 | ||
|
|
64b356a9bf | ||
|
|
9681dc705e | ||
|
|
fa2b0233c3 | ||
|
|
392e2fefca | ||
|
|
47c56ffcf4 | ||
|
|
dd602fd6d0 | ||
|
|
2059d37c8f | ||
|
|
6b73b765b2 | ||
|
|
fb32b55584 | ||
|
|
045aebfc9e | ||
|
|
449418b1d4 | ||
|
|
06cf2208f4 | ||
|
|
ffbfdfe0b2 | ||
|
|
d7caa93cf5 | ||
|
|
0665781dfe | ||
|
|
a91413f1a6 | ||
|
|
6b9eeac228 | ||
|
|
c86e4e1ab9 | ||
|
|
269d229c2d | ||
|
|
7e86065c67 | ||
|
|
dcb0c2eb92 | ||
|
|
fd667a67e7 | ||
|
|
bf966ee49b | ||
|
|
2f75b74f1e | ||
|
|
a05b864952 | ||
|
|
2d96e0cda1 | ||
|
|
cd1d6ee598 | ||
|
|
09d7ad9d62 | ||
|
|
0c9c1366b0 | ||
|
|
8470cf43b1 | ||
|
|
62a24a320c | ||
|
|
578066511f | ||
|
|
2821492885 | ||
|
|
3806481f81 | ||
|
|
e610b8a286 | ||
|
|
d283043a56 | ||
|
|
4171b3ec4e | ||
|
|
f90872b085 | ||
|
|
077faebfc5 | ||
|
|
526b37804e | ||
|
|
b8cb9e6b1d | ||
|
|
0dfd71c990 | ||
|
|
18232e946b | ||
|
|
c06f3f003c | ||
|
|
72cf2f6334 | ||
|
|
e0e47ad545 | ||
|
|
70157265b8 | ||
|
|
1e5068f057 | ||
|
|
2bdea420ae | ||
|
|
be906faf42 | ||
|
|
a03eecaa36 | ||
|
|
bc12a0af87 | ||
|
|
d347641d00 | ||
|
|
221dbf945e | ||
|
|
24c900aeae | ||
|
|
76aaca6260 | ||
|
|
d3519d799a | ||
|
|
1ea18b9448 | ||
|
|
1e7956eaa8 | ||
|
|
7655aec413 | ||
|
|
a36a10c814 | ||
|
|
26cdae6877 | ||
|
|
c96eae620c | ||
|
|
9591d16aed | ||
|
|
05bb361eb2 | ||
|
|
776669b789 | ||
|
|
8d5fa58e1a | ||
|
|
dda544223f | ||
|
|
34106195b0 | ||
|
|
5bf3067342 | ||
|
|
ebeb504347 | ||
|
|
0b824f2170 | ||
|
|
0d04d8a82a | ||
|
|
b360c4439b | ||
|
|
d2cb4d102a | ||
|
|
b44524cd10 | ||
|
|
7f0feef97c | ||
|
|
82a67ecd99 | ||
|
|
42ad734a46 | ||
|
|
ac949a4bee | ||
|
|
60ca5beffa | ||
|
|
a6ab044582 | ||
|
|
d46fb519d5 | ||
|
|
832672149b | ||
|
|
3941930c2f | ||
|
|
4ab43cc923 | ||
|
|
cb0cb37e3c | ||
|
|
df4ebd6c8c | ||
|
|
647aa7ecf2 | ||
|
|
6aaf18cb27 | ||
|
|
08e295972c | ||
|
|
b4a7c5d47a | ||
|
|
4226976821 | ||
|
|
38bc58e77c | ||
|
|
386b0bc232 | ||
|
|
487471c2d1 | ||
|
|
e46cfe1601 | ||
|
|
fc4eb664e2 | ||
|
|
6c92d246c8 | ||
|
|
e86bd33a29 | ||
|
|
c4787b63a8 | ||
|
|
6b305349c9 | ||
|
|
3c16779d68 | ||
|
|
38fcadf649 | ||
|
|
6cc50013be | ||
|
|
bb7c9ad7fa | ||
|
|
b53d838b14 | ||
|
|
e03831586e | ||
|
|
6acb8f8b1b | ||
|
|
29bf2cbbc4 | ||
|
|
4fc238864b | ||
|
|
cb8d2727f4 | ||
|
|
9ef433d3ed | ||
|
|
02de3cd437 | ||
|
|
e7211063e7 | ||
|
|
e32ee1a58e | ||
|
|
1eb5859f01 | ||
|
|
ff7c3dc45c | ||
|
|
655b5974a3 | ||
|
|
47d7c7cf6c | ||
|
|
1c39deae6c | ||
|
|
6c4dc7fc72 | ||
|
|
3c5618364c | ||
|
|
bf1cc8fd7c | ||
|
|
72d4d50788 | ||
|
|
6a86fcdeeb | ||
|
|
dad95ad73a | ||
|
|
77f915acf5 | ||
|
|
6fc1daf978 | ||
|
|
934f589778 | ||
|
|
305ea97d5b | ||
|
|
e3b26e80bf | ||
|
|
810ef119b0 | ||
|
|
393b27679d | ||
|
|
a592134caf | ||
|
|
2389df7c6f | ||
|
|
422202348e | ||
|
|
284e08ffd9 | ||
|
|
2ce3d04bba | ||
|
|
8e67bfe990 | ||
|
|
27dc9510a3 | ||
|
|
d4708cb144 | ||
|
|
986de32043 | ||
|
|
4e90c291b3 | ||
|
|
7775767687 | ||
|
|
5624476e2b | ||
|
|
9ef80864b7 | ||
|
|
c32ef136a1 | ||
|
|
b2ea0fe1e2 | ||
|
|
be86b12b14 | ||
|
|
8b8e499615 | ||
|
|
36b0d38b70 | ||
|
|
78ef6921da | ||
|
|
f6ab67e92c | ||
|
|
44ffdcf429 | ||
|
|
53f4d3fab6 | ||
|
|
7dcf543443 | ||
|
|
4e445ee313 | ||
|
|
c6be3e145a | ||
|
|
f90526be22 | ||
|
|
df09bc2cf0 | ||
|
|
a1affcfd3f | ||
|
|
a402f3a880 | ||
|
|
b0fe9fb1a4 | ||
|
|
5057c91dcd | ||
|
|
84a80db21f | ||
|
|
8657e5516b | ||
|
|
6b24da6990 | ||
|
|
0ee87bc771 | ||
|
|
6e35c89740 | ||
|
|
9d69b330b5 | ||
|
|
22b3f3148c | ||
|
|
b73b3007f2 | ||
|
|
37dd4b0893 | ||
|
|
07c5a38582 | ||
|
|
c866c6b59b | ||
|
|
c3e97cb97e | ||
|
|
52ffb97369 | ||
|
|
bad5657725 | ||
|
|
f8dc3c8a0e | ||
|
|
77493b5d14 | ||
|
|
b1ceafbe4f | ||
|
|
41e9d9b08b | ||
|
|
dc32549c75 | ||
|
|
17dd3af3c7 | ||
|
|
32bdc19fe9 | ||
|
|
70fbefbe62 | ||
|
|
64cd6ea9be | ||
|
|
aa92c2444d | ||
|
|
9b19626f1b | ||
|
|
2bbe5193ee | ||
|
|
d11318f082 | ||
|
|
237f948d99 | ||
|
|
f3449be1e9 | ||
|
|
b95ffda711 | ||
|
|
0932fa0058 | ||
|
|
da2e46b81b | ||
|
|
d4a1fcc9c6 | ||
|
|
c7e7f4f28f | ||
|
|
87e191b8d7 | ||
|
|
05b21fcfcc | ||
|
|
48e4ae87d8 | ||
|
|
8b090034f1 | ||
|
|
41c183ac09 | ||
|
|
4380b95451 | ||
|
|
90fc486a20 | ||
|
|
f254153962 | ||
|
|
a2538d1905 | ||
|
|
5d7a2879a7 | ||
|
|
986adf6494 | ||
|
|
15932fb9aa | ||
|
|
3ae4bb03f5 | ||
|
|
7f47478997 | ||
|
|
a2923450ea | ||
|
|
5366b9a35b | ||
|
|
5ca37c68e2 | ||
|
|
22aa274d03 | ||
|
|
54bbe55bb9 | ||
|
|
9706576e66 | ||
|
|
b2ccd65da4 | ||
|
|
c587cd2e12 | ||
|
|
ba23a989a9 | ||
|
|
c6c69668c8 | ||
|
|
b0a4593f44 | ||
|
|
2d6e699e2c | ||
|
|
4307509402 | ||
|
|
ed165b1e4c | ||
|
|
3503300a23 | ||
|
|
3ab3d255ed | ||
|
|
fd625e0b30 | ||
|
|
53af37cd56 | ||
|
|
6bf4945181 | ||
|
|
868320c513 | ||
|
|
577b836420 | ||
|
|
4a36b52657 | ||
|
|
8dc944d22d | ||
|
|
0a10170155 | ||
|
|
dfa2c222d1 | ||
|
|
e288af162c | ||
|
|
6280820c86 | ||
|
|
102b31f83d | ||
|
|
37ca9ca19a | ||
|
|
0c151ad456 | ||
|
|
55e3f749b4 | ||
|
|
16902d7fbc | ||
|
|
c37f53e083 | ||
|
|
4cc499afdf | ||
|
|
48895efad7 | ||
|
|
eb46b04c0e | ||
|
|
442de12b99 | ||
|
|
712c1f3559 | ||
|
|
5a5cfa1eba | ||
|
|
7988386bc3 | ||
|
|
76bfe2905d | ||
|
|
23893bcacd | ||
|
|
c1da159e8f | ||
|
|
13889acb37 | ||
|
|
ffb3de3f2c | ||
|
|
87cd45fc64 | ||
|
|
1cf914813c | ||
|
|
86d61f8d03 | ||
|
|
8f638fbf9e | ||
|
|
95ac134a07 | ||
|
|
4e65f9b2a1 | ||
|
|
d60bbe9fe9 | ||
|
|
dec1495e1e | ||
|
|
dc72c6fe22 | ||
|
|
141b1205c6 | ||
|
|
65f4a09ad5 | ||
|
|
3d1545c0b9 | ||
|
|
ec26dd622b | ||
|
|
0ab3131964 | ||
|
|
588a9e9f63 | ||
|
|
f2fa930edd | ||
|
|
ec47229a37 | ||
|
|
bf5d1d58a8 | ||
|
|
8b4da24ee7 | ||
|
|
3fba108d70 | ||
|
|
35029f0eed | ||
|
|
b66ab9d7c6 | ||
|
|
5e0b745ba9 | ||
|
|
45d906ba7e | ||
|
|
24b124fb17 | ||
|
|
7cb0978468 | ||
|
|
44cb135a1d | ||
|
|
146b673203 | ||
|
|
b0d23c5665 | ||
|
|
68f89c8958 | ||
|
|
1327d6bf25 | ||
|
|
237e37ff30 | ||
|
|
4d707c86cb | ||
|
|
c7027c6e00 | ||
|
|
81ec61bcc8 | ||
|
|
649178fa54 | ||
|
|
9ff46b9aad | ||
|
|
cdcbb60ca7 | ||
|
|
d8cdb2b312 | ||
|
|
fa1c1b8e6e | ||
|
|
2ded835602 | ||
|
|
a43f04818d | ||
|
|
278dc60119 | ||
|
|
8a202be0cf | ||
|
|
58940a3cd7 | ||
|
|
aa9721d146 | ||
|
|
79f114ad5b | ||
|
|
197a6ddd9d | ||
|
|
4a4fb15e06 | ||
|
|
e7e83ce6e8 | ||
|
|
a82b293452 | ||
|
|
bb483a3a38 | ||
|
|
2ca3d0e395 | ||
|
|
bda79b1e82 | ||
|
|
4f4b754e2d | ||
|
|
214cabac43 | ||
|
|
7b6229c222 | ||
|
|
1a14a75897 | ||
|
|
76b75fd9b3 | ||
|
|
b969fd22f7 | ||
|
|
8d27d091af | ||
|
|
1eb7393a60 | ||
|
|
4cf88507c2 | ||
|
|
3565d8b321 | ||
|
|
7094c29b2e | ||
|
|
63004b270f | ||
|
|
6714a99b38 | ||
|
|
4c3b8df1e7 | ||
|
|
4bb695121f | ||
|
|
09fd47c421 | ||
|
|
d201d9c688 | ||
|
|
fd1e25c584 | ||
|
|
6bb66ae70e | ||
|
|
cc82d6b1d9 | ||
|
|
956be749b6 | ||
|
|
6585a00608 | ||
|
|
c0525f710f | ||
|
|
d3672807d2 | ||
|
|
60f18d5f36 | ||
|
|
e72d3de256 | ||
|
|
ba9846b9c4 | ||
|
|
09586284dc | ||
|
|
a1ee4374b2 | ||
|
|
4de6f25f11 | ||
|
|
582d8a5587 | ||
|
|
ec53b04f99 | ||
|
|
950fc94408 | ||
|
|
58d12e6e09 | ||
|
|
94323005c4 | ||
|
|
4989842057 | ||
|
|
80172636a8 | ||
|
|
8491f7be24 | ||
|
|
de8c2c14bb | ||
|
|
baebfff321 | ||
|
|
24191404aa | ||
|
|
990842f5c2 | ||
|
|
2c2bd3f330 | ||
|
|
1ae14c4bfa | ||
|
|
61a1701dc9 | ||
|
|
c6ea11346e | ||
|
|
ad7c871e28 | ||
|
|
c77b3f8022 | ||
|
|
b263f4a1df | ||
|
|
1a11d41bba | ||
|
|
14d0a77644 | ||
|
|
b75045ce1a | ||
|
|
1d8a8e15ef | ||
|
|
28a087c267 | ||
|
|
8dc849b6bb | ||
|
|
7e56f46f35 | ||
|
|
4453a23069 | ||
|
|
57be0bc845 | ||
|
|
430910ff36 | ||
|
|
4c95807e2d | ||
|
|
92fd04552d | ||
|
|
9c7e244821 | ||
|
|
41f64b5c3c | ||
|
|
4003003580 | ||
|
|
f49341b53c | ||
|
|
61d9d9a832 | ||
|
|
c0b7dd053f | ||
|
|
f642e10acc | ||
|
|
2fb64480db | ||
|
|
075b5ec203 | ||
|
|
21f2fe6b1b | ||
|
|
89080ef7c7 | ||
|
|
f5d36dc9ca | ||
|
|
ef87610b36 | ||
|
|
c89f1e4d31 | ||
|
|
c4805d89e0 | ||
|
|
659ffb028a | ||
|
|
a14c956ccc | ||
|
|
facb3914a4 | ||
|
|
aab8f7876b | ||
|
|
1f199ea71c | ||
|
|
00b557b77a | ||
|
|
eac536cffe | ||
|
|
bf75c6f247 | ||
|
|
1518c79291 | ||
|
|
aae2f72d1a | ||
|
|
273aa3d6ea | ||
|
|
756c4510eb | ||
|
|
cd50e89aec | ||
|
|
25b648b929 | ||
|
|
1dbbb08250 | ||
|
|
5432f7311e | ||
|
|
e662802b4c | ||
|
|
bae2c390bb | ||
|
|
7976926eaf | ||
|
|
4aee730753 | ||
|
|
e87c342aa2 | ||
|
|
d335d74d8f | ||
|
|
bc68b0e3ec | ||
|
|
b1eadbc58f | ||
|
|
2d3165a16f | ||
|
|
d99d25de37 | ||
|
|
be035ab002 | ||
|
|
12c8883eea | ||
|
|
758c7c1869 | ||
|
|
72ab1f5a1a | ||
|
|
6b9c1369c0 | ||
|
|
fd1f1dc64a | ||
|
|
e211368bc4 | ||
|
|
39307f916d | ||
|
|
7378cc50a1 | ||
|
|
867b9ad932 | ||
|
|
03064255f6 | ||
|
|
c9ccd0b873 | ||
|
|
650eceea7e | ||
|
|
452ad5a6e5 | ||
|
|
7c292c75d4 | ||
|
|
cab4113697 | ||
|
|
f1a5de79b5 | ||
|
|
191e80c175 | ||
|
|
241bce56c8 | ||
|
|
b105639b31 | ||
|
|
419e63ecd5 | ||
|
|
46e632bf9d | ||
|
|
a8871f4ff4 | ||
|
|
65f28c023d | ||
|
|
e506f6aba2 | ||
|
|
93ae74b5a7 | ||
|
|
7b25fa98ee | ||
|
|
e320b7abb4 | ||
|
|
6b9b56ca83 | ||
|
|
4d19790b3d | ||
|
|
2027863d4c | ||
|
|
4a4444a1ee | ||
|
|
f10316d384 | ||
|
|
778be40c86 | ||
|
|
2046323c71 | ||
|
|
71bb5cd58e | ||
|
|
71c6e437fa | ||
|
|
26e1474179 | ||
|
|
89a7459fda | ||
|
|
a61adf5631 | ||
|
|
97db1712f3 | ||
|
|
ea7012d114 | ||
|
|
d3eaea5697 | ||
|
|
4ca3fbe4bf | ||
|
|
81fea7595a | ||
|
|
2e0806cc1f | ||
|
|
5325650e92 | ||
|
|
31764d3c2d | ||
|
|
9df5152610 | ||
|
|
c6cd780ab5 | ||
|
|
023f845c48 | ||
|
|
5e977da9bc | ||
|
|
fa1de04df7 | ||
|
|
33251222cd | ||
|
|
70c1e8680f | ||
|
|
0d214769e6 | ||
|
|
495bbe891a | ||
|
|
5f68f569c3 | ||
|
|
52c883cb1f | ||
|
|
4b20bae597 | ||
|
|
64ff046ceb | ||
|
|
5f2566a97d | ||
|
|
c3735d1d5e | ||
|
|
749e547773 | ||
|
|
af8a010f43 | ||
|
|
a8a29e814f | ||
|
|
c3cb5406f6 | ||
|
|
73f26d93ca | ||
|
|
5e86a99060 | ||
|
|
ce9070b966 | ||
|
|
aa5bcefaf2 | ||
|
|
2df267fc28 | ||
|
|
306fcce337 | ||
|
|
3683b66ef8 | ||
|
|
08a52fb892 | ||
|
|
fd3c54b373 | ||
|
|
adee05b009 | ||
|
|
a66d40eb19 | ||
|
|
d065a96e01 | ||
|
|
ef7709aa78 | ||
|
|
305b330075 | ||
|
|
bec4297ce1 | ||
|
|
18b21b3d60 | ||
|
|
9b263417b9 | ||
|
|
13da0a7925 | ||
|
|
bb28db2412 | ||
|
|
489d150ae0 | ||
|
|
077dbaf933 | ||
|
|
26f83ac7a2 | ||
|
|
822009b429 | ||
|
|
e07a4e516c | ||
|
|
9ec38b5538 | ||
|
|
97da770978 | ||
|
|
3acbc8235d | ||
|
|
a32359d5d4 | ||
|
|
78fd39aee2 | ||
|
|
fca5c14c67 | ||
|
|
f60e3a14ef | ||
|
|
503a7032f9 | ||
|
|
918bbd3f01 | ||
|
|
a1441d5051 | ||
|
|
58d6189c40 | ||
|
|
58defed1d2 | ||
|
|
27a94384d0 | ||
|
|
4b8f5815db | ||
|
|
d830eef435 | ||
|
|
e7c4bf7341 | ||
|
|
162e646404 | ||
|
|
93049fcacf | ||
|
|
5b90db4beb | ||
|
|
7692ff736b | ||
|
|
f25ad8ece9 | ||
|
|
1aaf3b9250 | ||
|
|
11f6cff6df | ||
|
|
c2ea57c95a | ||
|
|
f61ae5da6b | ||
|
|
8ae9a5f2da | ||
|
|
3f7e89e006 | ||
|
|
cee4e4d62e | ||
|
|
14a3783760 | ||
|
|
b4607f7b1f | ||
|
|
5a28c16cae | ||
|
|
9e8bf861ea | ||
|
|
4cfb9210d0 | ||
|
|
681f77a796 | ||
|
|
2a7f1cbf48 | ||
|
|
c4e63cfdc7 |
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@@ -1,9 +1,7 @@
|
||||
# Last match in file takes precedence.
|
||||
|
||||
# Ping for all PRs
|
||||
* @Acruid @PJB3005 @Silvertorch5
|
||||
|
||||
/Robust.*/Audio/Midi/ @Zumorica
|
||||
* @Acruid @PJB3005 @ZoldorfTheWizard
|
||||
|
||||
/Robust.Client.NameGenerator @PaulRitter
|
||||
/Robust.Client.Injectors @PaulRitter
|
||||
@@ -11,7 +9,7 @@
|
||||
/Robust.Analyzers @PaulRitter
|
||||
/Robust.*/GameStates @PaulRitter
|
||||
/Robust.Shared/Analyzers @PaulRitter
|
||||
/Robust.*/Serialization @PaulRitter
|
||||
/Robust.*/Serialization @PaulRitter @DrSmugleaf
|
||||
/Robust.*/Prototypes @PaulRitter
|
||||
/Robust.Shared/GameObjects/ComponentDependencies @PaulRitter
|
||||
/Robust.*/Containers @PaulRitter
|
||||
|
||||
41
.github/workflows/benchmarks.yml
vendored
Normal file
41
.github/workflows/benchmarks.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Benchmarks
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
concurrency: benchmarks
|
||||
|
||||
jobs:
|
||||
benchmark:
|
||||
name: Run Benchmarks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run script on centcomm
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: centcomm.spacestation14.io
|
||||
username: robust-benchmark-runner
|
||||
key: ${{ secrets.CENTCOMM_ROBUST_BENCHMARK_RUNNER_KEY }}
|
||||
command_timeout: 100000m
|
||||
script: |
|
||||
mkdir benchmark_run_${{ github.sha }}
|
||||
cd benchmark_run_${{ github.sha }}
|
||||
git clone https://github.com/space-wizards/RobustToolbox.git repo_dir --recursive
|
||||
cd repo_dir
|
||||
git checkout ${{ github.sha }}
|
||||
cd Robust.Benchmarks
|
||||
dotnet restore
|
||||
export ROBUST_BENCHMARKS_ENABLE_SQL=1
|
||||
export ROBUST_BENCHMARKS_SQL_ADDRESS="${{ secrets.BENCHMARKS_WRITE_ADDRESS }}"
|
||||
export ROBUST_BENCHMARKS_SQL_PORT="${{ secrets.BENCHMARKS_WRITE_PORT }}"
|
||||
export ROBUST_BENCHMARKS_SQL_USER="${{ secrets.BENCHMARKS_WRITE_USER }}"
|
||||
export ROBUST_BENCHMARKS_SQL_PASSWORD="${{ secrets.BENCHMARKS_WRITE_PASSWORD }}"
|
||||
export ROBUST_BENCHMARKS_SQL_DATABASE="benchmarks"
|
||||
export GITHUB_SHA="${{ github.sha }}"
|
||||
dotnet run --filter '*' --configuration Release
|
||||
cd ../../..
|
||||
rm -rf benchmark_run_${{ github.sha }}
|
||||
34
.github/workflows/build-docfx.yml
vendored
Normal file
34
.github/workflows/build-docfx.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Build & Publish DocFX
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
jobs:
|
||||
docfx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build Project
|
||||
run: dotnet build --no-restore /p:WarningsAsErrors=nullable
|
||||
|
||||
- name: Build DocFX
|
||||
uses: nikeee/docfx-action@v1.0.0
|
||||
with:
|
||||
args: Robust.Docfx/docfx.json
|
||||
|
||||
- name: Publish Docfx Documentation on GitHub Pages
|
||||
uses: maxheld83/ghpages@master
|
||||
env:
|
||||
BUILD_DIR: Robust.Docfx/_robust-site
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
6
.github/workflows/build-test.yml
vendored
6
.github/workflows/build-test.yml
vendored
@@ -22,10 +22,12 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
dotnet-version: 7.0.x
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore /p:WarningsAsErrors=nullable
|
||||
- name: Test Engine
|
||||
run: dotnet test --no-build Robust.UnitTesting/Robust.UnitTesting.csproj -v n
|
||||
run: dotnet test --no-build Robust.UnitTesting/Robust.UnitTesting.csproj -- NUnit.ConsoleOut=0
|
||||
|
||||
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
|
||||
2
.github/workflows/publish-client.yml
vendored
2
.github/workflows/publish-client.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Package client
|
||||
run: Tools/package_client_build.py -p windows mac linux
|
||||
|
||||
4
.github/workflows/test-content.yml
vendored
4
.github/workflows/test-content.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100
|
||||
dotnet-version: 7.0.x
|
||||
- name: Disable submodule autoupdate
|
||||
run: touch BuildChecker/DISABLE_SUBMODULE_AUTOUPDATE
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
run: dotnet build --configuration Tools --no-restore
|
||||
- name: Content.Tests
|
||||
run: dotnet test --no-build Content.Tests/Content.Tests.csproj -v n
|
||||
- name: Content.IntegrationTests
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -76,3 +76,5 @@ MSBuild/Robust.Custom.targets
|
||||
|
||||
|
||||
release/
|
||||
Robust.Docfx/*-site
|
||||
Robust.Docfx/api
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -10,9 +10,6 @@
|
||||
[submodule "Robust.LoaderApi"]
|
||||
path = Robust.LoaderApi
|
||||
url = https://github.com/space-wizards/Robust.LoaderApi.git
|
||||
[submodule "ManagedHttpListener"]
|
||||
path = ManagedHttpListener
|
||||
url = https://github.com/space-wizards/ManagedHttpListener.git
|
||||
[submodule "cefglue"]
|
||||
path = cefglue
|
||||
url = https://github.com/space-wizards/cefglue.git
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\MSBuild\Robust.Engine.props" />
|
||||
</Project>
|
||||
|
||||
Submodule Lidgren.Network/Lidgren.Network updated: 1dd5c1f333...13bd6f1ad2
@@ -1,18 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>SpaceWizards.Lidgren.Network</AssemblyName>
|
||||
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<DefaultItemExcludes>Lidgren.Network/**/*</DefaultItemExcludes>
|
||||
<DefineConstants>$(DefineConstants);USE_RELEASE_STATISTICS</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<SkipRobustAnalyzer>true</SkipRobustAnalyzer>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Lidgren.Network\Lidgren.Network\**\*.cs">
|
||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||
</Compile>
|
||||
<Compile Remove="Lidgren.Network\Lidgren.Network\obj\**\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="../MSBuild/Robust.Properties.targets" />
|
||||
</Project>
|
||||
|
||||
5
MSBuild/Robust.CompNetworkGenerator.targets
Normal file
5
MSBuild/Robust.CompNetworkGenerator.targets
Normal file
@@ -0,0 +1,5 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\Robust.Shared.CompNetworkGenerator\Robust.Shared.CompNetworkGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
37
MSBuild/Robust.Configurations.props
Normal file
37
MSBuild/Robust.Configurations.props
Normal file
@@ -0,0 +1,37 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Build configurations -->
|
||||
<PropertyGroup>
|
||||
<!-- Avoid SDK defining DEBUG/RELEASE/DEBUGOPT/TOOLS itself. -->
|
||||
<DisableImplicitConfigurationDefines>true</DisableImplicitConfigurationDefines>
|
||||
|
||||
<!-- Project configurations -->
|
||||
<Configurations>Debug;Release;Tools;DebugOpt</Configurations>
|
||||
<Platforms>AnyCPU</Platforms>
|
||||
</PropertyGroup>
|
||||
<!-- Debug configuration: asserts, tools, no optimizations -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
|
||||
<RobustToolsBuild Condition="'$(RobustToolsBuild)' == ''">true</RobustToolsBuild>
|
||||
<DefineConstants>DEBUG;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- DebugOpt configuration: asserts, tools, optimizations -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'DebugOpt'">
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
||||
<RobustToolsBuild Condition="'$(RobustToolsBuild)' == ''">true</RobustToolsBuild>
|
||||
<DefineConstants>DEBUG;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- Tools configuration: no asserts, tools, optimizations -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Tools'">
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
||||
<RobustToolsBuild Condition="'$(RobustToolsBuild)' == ''">true</RobustToolsBuild>
|
||||
</PropertyGroup>
|
||||
<!-- Release configuration: no asserts, no tools, optimizations -->
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
||||
<RobustToolsBuild Condition="'$(RobustToolsBuild)' == ''">false</RobustToolsBuild>
|
||||
<DefineConstants>RELEASE;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -20,10 +20,19 @@
|
||||
<PropertyGroup Condition="'$(FullRelease)' == 'True'">
|
||||
<DefineConstants>$(DefineConstants);FULL_RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(FullRelease)' != 'True'">
|
||||
<DefineConstants>$(DefineConstants);DEVELOPMENT</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<DefineConstants>$(DefineConstants);EXCEPTION_TOLERANCE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(EnableClientScripting)' == 'True'">
|
||||
<DefineConstants>$(DefineConstants);CLIENT_SCRIPTING</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(UseSystemSqlite)' == 'True'">
|
||||
<DefineConstants>$(DefineConstants);USE_SYSTEM_SQLITE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(RobustToolsBuild)' == 'true'">
|
||||
<DefineConstants>$(DefineConstants);TOOLS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project>
|
||||
<!-- This file automatically reset by Tools/version.py -->
|
||||
<PropertyGroup><Version>0.8.52</Version></PropertyGroup>
|
||||
</Project>
|
||||
<Project>
|
||||
|
||||
<!-- This file automatically reset by Tools/version.py -->
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project>
|
||||
<!-- Engine-specific properties. Content should not use this file. -->
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<LangVersion>10</LangVersion>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<LangVersion>11</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<WarningsAsErrors>nullable</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
35
MSBuild/Robust.Platform.props
Normal file
35
MSBuild/Robust.Platform.props
Normal file
@@ -0,0 +1,35 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- MSBuild hurts and I can't find a foolproof way to detect platform. -->
|
||||
<PropertyGroup>
|
||||
<OS Condition="'$(OS)' == ''">Windows_NT</OS>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(OS)' != 'Unix'">
|
||||
<PropertyGroup>
|
||||
<ActualOS>Windows</ActualOS>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<!-- Folders that *probably* only exist on MacOS and not Linux. -->
|
||||
<When Condition="Exists('/Volumes') And Exists('/System') And Exists('/Library')" >
|
||||
<PropertyGroup>
|
||||
<ActualOS>MacOS</ActualOS>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="$([MSBuild]::IsOSPlatform('FreeBSD'))">
|
||||
<PropertyGroup>
|
||||
<ActualOS>FreeBSD</ActualOS>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<ActualOS>Linux</ActualOS>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<PropertyGroup>
|
||||
<TargetOS Condition="'$(TargetOS)' == ''">$(ActualOS)</TargetOS>
|
||||
<Python>python3</Python>
|
||||
<Python Condition="'$(ActualOS)' == 'Windows'">py -3</Python>
|
||||
<UseSystemSqlite Condition="'$(TargetOS)' == 'FreeBSD'">True</UseSystemSqlite>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,34 +1,28 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Properties for both engine and content. -->
|
||||
<!-- Import this at the end of any project files in Robust and Content. -->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Robust.Custom.targets" Condition="Exists('Robust.Custom.targets')"/>
|
||||
<!-- MSBuild hurts and I can't find a foolproof way to detect platform. -->
|
||||
|
||||
<!-- Configuration logic -->
|
||||
<Import Project="Robust.Configurations.props" />
|
||||
|
||||
<!-- Some platform management logic -->
|
||||
<Import Project="Robust.Platform.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<OS Condition="'$(OS)' == ''">Windows_NT</OS>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(OS)' != 'Unix'">
|
||||
<PropertyGroup>
|
||||
<ActualOS>Windows</ActualOS>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<!-- Folders that *probably* only exist on MacOS and not Linux. -->
|
||||
<When Condition="Exists('/Volumes') And Exists('/System') And Exists('/Library')" >
|
||||
<PropertyGroup>
|
||||
<ActualOS>MacOS</ActualOS>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<ActualOS>Linux</ActualOS>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<PropertyGroup>
|
||||
<TargetOS Condition="'$(TargetOS)' == ''">$(ActualOS)</TargetOS>
|
||||
<Python>python3</Python>
|
||||
<Python Condition="'$(ActualOS)' == 'Windows'">py -3</Python>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<EnableClientScripting>True</EnableClientScripting>
|
||||
<!-- Client scripting is disabled on full release builds for security and size reasons. -->
|
||||
<EnableClientScripting Condition="'$(FullRelease)' == 'True'">False</EnableClientScripting>
|
||||
<EnableClientScripting>False</EnableClientScripting>
|
||||
<!-- Client scripting is only enabled on tools builds for security and size reasons. -->
|
||||
<EnableClientScripting Condition="'$(RobustToolsBuild)' == 'true'">True</EnableClientScripting>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- built-in define constants -->
|
||||
<Import Project="Robust.DefineConstants.targets" />
|
||||
|
||||
<!-- analyzer -->
|
||||
<Import Project="Robust.Analyzers.targets" Condition="'$(SkipRobustAnalyzer)' != 'true'" />
|
||||
</Project>
|
||||
|
||||
@@ -19,10 +19,17 @@
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)\..\Robust.Client.Injectors\Robust.Client.Injectors.csproj" ReferenceOutputAssembly="false"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- XamlIL does not make use of special Robust configurations like DebugOpt. Convert these down. -->
|
||||
<PropertyGroup>
|
||||
<RobustInjectorsConfiguration>$(Configuration)</RobustInjectorsConfiguration>
|
||||
<RobustInjectorsConfiguration Condition="'$(Configuration)' == 'DebugOpt'">Debug</RobustInjectorsConfiguration>
|
||||
<RobustInjectorsConfiguration Condition="'$(Configuration)' == 'Tools'">Release</RobustInjectorsConfiguration>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask
|
||||
Condition="'$(_RobustUseExternalMSBuild)' != 'true' And $(DesignTimeBuild) != true"
|
||||
TaskName="CompileRobustXamlTask"
|
||||
AssemblyFile="$(MSBuildThisFileDirectory)\..\Robust.Client.Injectors\bin\$(Configuration)\netstandard2.0\Robust.Client.Injectors.dll"/>
|
||||
AssemblyFile="$(MSBuildThisFileDirectory)\..\Robust.Client.Injectors\bin\$(RobustInjectorsConfiguration)\netstandard2.0\Robust.Client.Injectors.dll"/>
|
||||
<Target
|
||||
Name="CompileRobustXaml"
|
||||
Condition="Exists('@(IntermediateAssembly)')"
|
||||
|
||||
Submodule ManagedHttpListener deleted from ae0539e66f
Submodule NetSerializer updated: 3b28e38d23...7224829e87
@@ -10,7 +10,6 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using static OpenToolkit.GraphicsLibraryFramework.GLFWNative;
|
||||
using static Robust.Shared.Utility.MarshalHelper;
|
||||
|
||||
namespace OpenToolkit.GraphicsLibraryFramework
|
||||
{
|
||||
@@ -211,7 +210,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// <seealso cref="GetVersion"/>
|
||||
public static unsafe string GetVersionString()
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetVersionString());
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetVersionString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -272,7 +271,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
{
|
||||
byte* desc;
|
||||
var code = glfwGetError(&desc);
|
||||
description = PtrToStringUTF8(desc);
|
||||
description = Marshal.PtrToStringUTF8((IntPtr) desc);
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -590,7 +589,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe string GetMonitorName(Monitor* monitor)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetMonitorName(monitor));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetMonitorName(monitor));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -902,7 +901,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe void WindowHint(WindowHintString hint, string value)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(value);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(value);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1364,7 +1363,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe string GetKeyName(Keys key, int scanCode)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetKeyName(key, scanCode));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetKeyName(key, scanCode));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2278,7 +2277,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe string GetJoystickName(int jid)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetJoystickName(jid));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetJoystickName(jid));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2351,7 +2350,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe string GetJoystickGUID(int jid)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetJoystickGUID(jid));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetJoystickGUID(jid));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2509,7 +2508,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe bool UpdateGamepadMappings(string newMapping)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(newMapping);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(newMapping);
|
||||
try
|
||||
{
|
||||
return glfwUpdateGamepadMappings((byte*)ptr) == GLFW_TRUE;
|
||||
@@ -2585,7 +2584,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe string GetGamepadName(int jid)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetGamepadName(jid));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetGamepadName(jid));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2854,7 +2853,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe bool ExtensionSupported(string extensionName)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(extensionName);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(extensionName);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -2893,7 +2892,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// <seealso cref="ExtensionSupported" />
|
||||
public static unsafe IntPtr GetProcAddress(string procName)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(procName);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(procName);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -3085,7 +3084,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe Window* CreateWindow(int width, int height, string title, Monitor* monitor, Window* share)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(title);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(title);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -3306,7 +3305,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// <seealso cref="SetClipboardString"/>
|
||||
public static unsafe string GetClipboardString(Window* window)
|
||||
{
|
||||
return PtrToStringUTF8(glfwGetClipboardString(window));
|
||||
return Marshal.PtrToStringUTF8((IntPtr) glfwGetClipboardString(window));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -3917,7 +3916,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// <seealso cref="GetClipboardString"/>
|
||||
public static unsafe void SetClipboardString(Window* window, string data)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(data);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(data);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -4751,7 +4750,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// </remarks>
|
||||
public static unsafe void SetWindowTitle(Window* window, string title)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(title);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(title);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -5340,7 +5339,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
var array = new string[count];
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = PtrToStringUTF8(ptr[i]);
|
||||
array[i] = Marshal.PtrToStringUTF8((IntPtr) ptr[i]);
|
||||
}
|
||||
|
||||
return array;
|
||||
@@ -5386,7 +5385,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
/// <returns>The address of the function, or <c>null</c> if an error occurred.</returns>
|
||||
public static unsafe IntPtr GetInstanceProcAddress(VkHandle instance, string procName)
|
||||
{
|
||||
var ptr = StringToCoTaskMemUTF8(procName);
|
||||
var ptr = Marshal.StringToCoTaskMemUTF8(procName);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
|
||||
}
|
||||
|
||||
string rName = null;
|
||||
if (OperatingSystem.IsLinux()) rName = "libglfw.so.3";
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsFreeBSD()) rName = "libglfw.so.3";
|
||||
else if (OperatingSystem.IsMacOS()) rName = "libglfw.3.dylib";
|
||||
|
||||
if ((rName != null) && NativeLibrary.TryLoad(rName, assembly, path, out var handle))
|
||||
|
||||
@@ -1,20 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\MSBuild\Robust.Properties.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<SkipRobustAnalyzer>true</SkipRobustAnalyzer>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\MSBuild\Robust.DefineConstants.targets" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Condition="'$(TargetFramework)' == 'net472'" Include="System.Memory" Version="4.5.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\MSBuild\Robust.Properties.targets" />
|
||||
</Project>
|
||||
|
||||
@@ -18,7 +18,7 @@ We are happy to accept contributions from anybody. Get in Discord or IRC if you
|
||||
|
||||
## Building
|
||||
|
||||
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Spacestation 13.
|
||||
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Space Station 13.
|
||||
|
||||
## Legal Info
|
||||
|
||||
|
||||
2150
RELEASE-NOTES.md
Normal file
2150
RELEASE-NOTES.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1546,6 +1546,31 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
- name: FastNoise
|
||||
license: |
|
||||
MIT License
|
||||
|
||||
Copyright(c) 2020 Jordan Peck (jordan.me2@gmail.com)
|
||||
Copyright(c) 2020 Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
- name: OpenAL soft
|
||||
license: |
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
|
||||
202
Resources/EngineFonts/NotoSans/LICENSE.txt
Normal file
202
Resources/EngineFonts/NotoSans/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
Resources/EngineFonts/NotoSans/NotoSans-Regular.ttf
Normal file
BIN
Resources/EngineFonts/NotoSans/NotoSans-Regular.ttf
Normal file
Binary file not shown.
34
Resources/EnginePrototypes/Debug/rotation.yml
Normal file
34
Resources/EnginePrototypes/Debug/rotation.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
- type: entity
|
||||
id: debugRotation
|
||||
abstract: true
|
||||
suffix: DEBUG
|
||||
components:
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
visible: true
|
||||
sprite: debugRotation.rsi
|
||||
state: direction1
|
||||
|
||||
- type: entity
|
||||
id: debugRotation1
|
||||
parent: debugRotation
|
||||
name: dbg_rotation1
|
||||
components:
|
||||
- type: Sprite
|
||||
state: direction1
|
||||
|
||||
- type: entity
|
||||
id: debugRotation4
|
||||
parent: debugRotation
|
||||
name: dbg_rotation4
|
||||
components:
|
||||
- type: Sprite
|
||||
state: direction4
|
||||
|
||||
- type: entity
|
||||
id: debugRotationTex
|
||||
parent: debugRotation
|
||||
name: dbg_rotationTex
|
||||
components:
|
||||
- type: Sprite
|
||||
state: direction1
|
||||
44
Resources/EnginePrototypes/UserInterface/uiThemes.yml
Normal file
44
Resources/EnginePrototypes/UserInterface/uiThemes.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
- type: uiTheme
|
||||
id: Default
|
||||
path: /Textures/Interface/Default
|
||||
colors:
|
||||
# Root
|
||||
rootBackground: "#000000"
|
||||
|
||||
# Windows
|
||||
windowBackground: "#111111"
|
||||
windowBorder: "#444444"
|
||||
windowHeader: "#001e3d"
|
||||
|
||||
windowCloseButton: "#FFFFFF"
|
||||
windowCloseButtonHover: "#FF7F7F"
|
||||
windowCloseButtonPressed: "#FF0000"
|
||||
|
||||
# Scrollbars
|
||||
scrollBarDefault: "#80808059"
|
||||
scrollBarHovered: "#8C8C8C59"
|
||||
scrollBarGrabbed: "#8C8C8C59"
|
||||
|
||||
# Buttons
|
||||
buttonBackground: "#171717"
|
||||
buttonBackgroundHovered: "#272727"
|
||||
buttonBackgroundPressed: "#173717"
|
||||
buttonBorder: "#444444"
|
||||
buttonBorderHovered: "#444444"
|
||||
buttonBorderPressed: "#447044"
|
||||
buttonBackgroundDisabled: "#333333"
|
||||
buttonBorderDisabled: "#222222"
|
||||
|
||||
# LineEdit
|
||||
lineEditUneditableText: "#444444"
|
||||
lineEditPlaceholderText: "#7d7d7d"
|
||||
lineEditBackground: "#000000"
|
||||
lineEditBorder: "#444444"
|
||||
|
||||
# TabContainer
|
||||
tabContainerBackground: "#000000"
|
||||
tabContainerBorder: "#444444"
|
||||
tabContainerActiveTabBackground: "#173717"
|
||||
tabContainerActiveTabBorder: "#447044"
|
||||
tabContainerInactiveTabBackground: "#171717"
|
||||
tabContainerInactiveTabBorder: "#444444"
|
||||
63
Resources/Locale/en-US/_engine_lib.ftl
Normal file
63
Resources/Locale/en-US/_engine_lib.ftl
Normal file
@@ -0,0 +1,63 @@
|
||||
# Used internally by the THE() function.
|
||||
zzzz-the = { PROPER($ent) ->
|
||||
*[false] the { $ent }
|
||||
[true] { $ent }
|
||||
}
|
||||
|
||||
# Used internally by the SUBJECT() function.
|
||||
zzzz-subject-pronoun = { GENDER($ent) ->
|
||||
[male] he
|
||||
[female] she
|
||||
[epicene] they
|
||||
*[neuter] it
|
||||
}
|
||||
|
||||
# Used internally by the OBJECT() function.
|
||||
zzzz-object-pronoun = { GENDER($ent) ->
|
||||
[male] him
|
||||
[female] her
|
||||
[epicene] them
|
||||
*[neuter] it
|
||||
}
|
||||
|
||||
# Used internally by the POSS-PRONOUN() function.
|
||||
zzzz-possessive-pronoun = { GENDER($ent) ->
|
||||
[male] his
|
||||
[female] hers
|
||||
[epicene] theirs
|
||||
*[neuter] its
|
||||
}
|
||||
|
||||
# Used internally by the POSS-ADJ() function.
|
||||
zzzz-possessive-adjective = { GENDER($ent) ->
|
||||
[male] his
|
||||
[female] her
|
||||
[epicene] their
|
||||
*[neuter] its
|
||||
}
|
||||
|
||||
# Used internally by the REFLEXIVE() function.
|
||||
zzzz-reflexive-pronoun = { GENDER($ent) ->
|
||||
[male] himself
|
||||
[female] herself
|
||||
[epicene] themselves
|
||||
*[neuter] itself
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-BE() function.
|
||||
zzzz-conjugate-be = { GENDER($ent) ->
|
||||
[epicene] are
|
||||
*[other] is
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-HAVE() function.
|
||||
zzzz-conjugate-have = { GENDER($ent) ->
|
||||
[epicene] have
|
||||
*[other] has
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-BASIC() function.
|
||||
zzzz-conjugate-basic = { GENDER($ent) ->
|
||||
[epicene] { $first }
|
||||
*[other] { $second }
|
||||
}
|
||||
16
Resources/Locale/en-US/client-state-commands.ftl
Normal file
16
Resources/Locale/en-US/client-state-commands.ftl
Normal file
@@ -0,0 +1,16 @@
|
||||
# Loc strings for various entity state & client-side PVS related commands
|
||||
|
||||
cmd-reset-ent-help = Usage: resetent <Entity UID>
|
||||
cmd-reset-ent-desc = Reset an entity to the most recently received server state. This will also reset entities that have been detached to null-space.
|
||||
|
||||
cmd-reset-all-ents-help = Usage: resetallents
|
||||
cmd-reset-all-ents-desc = Resets all entities to the most recently received server state. This only impacts entities that have not been detached to null-space.
|
||||
|
||||
cmd-detach-ent-help = Usage: detachent <Entity UID>
|
||||
cmd-detach-ent-desc = Detach an entity to null-space, as if it had left PVS range.
|
||||
|
||||
cmd-local-delete-help = Usage: localdelete <Entity UID>
|
||||
cmd-local-delete-desc = Deletes an entity. Unlike the normal delete command, this is CLIENT-SIDE. Unless the entity is a client-side entity, this will likely cause errors.
|
||||
|
||||
cmd-full-state-reset-help = Usage: fullstatereset
|
||||
cmd-full-state-reset-desc = Discards any entity state information and requests a full-state from the server.
|
||||
560
Resources/Locale/en-US/commands.ftl
Normal file
560
Resources/Locale/en-US/commands.ftl
Normal file
@@ -0,0 +1,560 @@
|
||||
### Localization for engine console commands
|
||||
|
||||
## generic command errors
|
||||
|
||||
cmd-invalid-arg-number-error = Invalid number of arguments.
|
||||
|
||||
cmd-parse-failure-integer = {$arg} is not a valid integer.
|
||||
cmd-parse-failure-float = {$arg} is not a valid float.
|
||||
cmd-parse-failure-bool = {$arg} is not a valid bool.
|
||||
cmd-parse-failure-uid = {$arg} is not a valid entity UID.
|
||||
cmd-parse-failure-mapid = {$arg} is not a valid MapId.
|
||||
cmd-parse-failure-entity-exist = UID {$arg} does not correspond to an existing entity.
|
||||
|
||||
cmd-error-file-not-found = Could not find file: {$file}.
|
||||
cmd-error-dir-not-found = Could not find directory: {$dir}.
|
||||
|
||||
cmd-failure-no-attached-entity = There is no entity attached to this shell.
|
||||
|
||||
## 'help' command
|
||||
cmd-help-desc = Display general help or help text for a specific command
|
||||
cmd-help-help = Usage: help [command name]
|
||||
When no command name is provided, displays general-purpose help text. If a command name is provided, displays help text for that command.
|
||||
|
||||
cmd-help-no-args = To display help for a specific command, write 'help <command>'. To list all available commands, write 'list'. To search for commands, use 'list <filter>'.
|
||||
cmd-help-unknown = Unknown command: { $command }
|
||||
cmd-help-top = { $command } - { $description }
|
||||
cmd-help-invalid-args = Invalid amount of arguments.
|
||||
cmd-help-arg-cmdname = [command name]
|
||||
|
||||
## 'cvar' command
|
||||
cmd-cvar-desc = Gets or sets a CVar.
|
||||
cmd-cvar-help = Usage: cvar <name | ?> [value]
|
||||
If a value is passed, the value is parsed and stored as the new value of the CVar.
|
||||
If not, the current value of the CVar is displayed.
|
||||
Use 'cvar ?' to get a list of all registered CVars.
|
||||
|
||||
cmd-cvar-invalid-args = Must provide exactly one or two arguments.
|
||||
cmd-cvar-not-registered = CVar '{ $cvar }' is not registered. Use 'cvar ?' to get a list of all registered CVars.
|
||||
cmd-cvar-parse-error = Input value is in incorrect format for type { $type }
|
||||
cmd-cvar-compl-list = List available CVars
|
||||
cmd-cvar-arg-name = <name | ?>
|
||||
cmd-cvar-value-hidden = <value hidden>
|
||||
|
||||
## 'list' command
|
||||
cmd-list-desc = Lists available commands, with optional search filter
|
||||
cmd-list-help = Usage: list [filter]
|
||||
Lists all available commands. If an argument is provided, it will be used to filter commands by name.
|
||||
|
||||
cmd-list-heading = SIDE NAME DESC{"\u000A"}-------------------------{"\u000A"}
|
||||
|
||||
cmd-list-arg-filter = [filter]
|
||||
|
||||
## '>' command, aka remote exec
|
||||
cmd-remoteexec-desc = Executes server-side commands
|
||||
cmd-remoteexec-help = Usage: > <command> [arg] [arg] [arg...]
|
||||
Executes a command on the server. This is necessary if a command with the same name exists on the client, as simply running the command would run the client command first.
|
||||
|
||||
## 'gc' command
|
||||
cmd-gc-desc = Run the GC (Garbage Collector)
|
||||
cmd-gc-help = Usage: gc [generation]
|
||||
Uses GC.Collect() to execute the Garbage Collector.
|
||||
If an argument is provided, it is parsed as a GC generation number and GC.Collect(int) is used.
|
||||
Use the 'gfc' command to do an LOH-compacting full GC.
|
||||
cmd-gc-failed-parse = Failed to parse argument.
|
||||
cmd-gc-arg-generation = [generation]
|
||||
|
||||
## 'gcf' command
|
||||
cmd-gcf-desc = Run the GC, fully, compacting LOH and everything.
|
||||
cmd-gcf-help = Usage: gcf
|
||||
Does a full GC.Collect(2, GCCollectionMode.Forced, true, true) while also compacting LOH.
|
||||
This will probably lock up for hundreds of milliseconds, be warned.
|
||||
|
||||
## 'gc_mode' command
|
||||
cmd-gc_mode-desc = Change/Read the GC Latency mode
|
||||
cmd-gc_mode-help = Usage: gc_mode [type]
|
||||
If no argument is provided, returns the current GC latency mode.
|
||||
If an argument is passed, it is parsed as GCLatencyMode and set as the GC latency mode.
|
||||
|
||||
cmd-gc_mode-current = current gc latency mode: { $prevMode }
|
||||
cmd-gc_mode-possible = possible modes:
|
||||
cmd-gc_mode-option = - { $mode }
|
||||
cmd-gc_mode-unknown = unknown gc latency mode: { $arg }
|
||||
cmd-gc_mode-attempt = attempting gc latency mode change: { $prevMode } -> { $mode }
|
||||
cmd-gc_mode-result = resulting gc latency mode: { $mode }
|
||||
cmd-gc_mode-arg-type = [type]
|
||||
|
||||
## 'mem' command
|
||||
cmd-mem-desc = Prints managed memory info
|
||||
cmd-mem-help = Usage: mem
|
||||
|
||||
cmd-mem-report = Heap Size: { TOSTRING($heapSize, "N0") }
|
||||
Total Allocated: { TOSTRING($totalAllocated, "N0") }
|
||||
|
||||
## 'physics' command
|
||||
cmd-physics-overlay = {$overlay} is not a recognised overlay
|
||||
|
||||
## 'lsasm' command
|
||||
cmd-lsasm-desc = Lists loaded assemblies by load context
|
||||
cmd-lsasm-help = Usage: lsasm
|
||||
|
||||
## 'exec' command
|
||||
cmd-exec-desc = Executes a script file from the game's writeable user data
|
||||
cmd-exec-help = Usage: exec <fileName>
|
||||
Each line in the file is executed as a single command, unless it starts with a #
|
||||
|
||||
cmd-exec-arg-filename = <fileName>
|
||||
|
||||
## 'dump_net_comps' command
|
||||
cmd-dump_net_comps-desc = Prints the table of networked components.
|
||||
cmd-dump_net_comps-help = Usage: dump_net-comps
|
||||
|
||||
cmd-dump_net_comps-error-writeable = Registration still writeable, network ids have not been generated.
|
||||
cmd-dump_net_comps-header = Networked Component Registrations:
|
||||
|
||||
## 'dump_event_tables' command
|
||||
cmd-dump_event_tables-desc = Prints directed event tables for an entity.
|
||||
cmd-dump_event_tables-help = Usage: dump_event_tables <entityUid>
|
||||
|
||||
cmd-dump_event_tables-missing-arg-entity = Missing entity argument
|
||||
cmd-dump_event_tables-error-entity = Invalid entity
|
||||
cmd-dump_event_tables-arg-entity = <entityUid>
|
||||
|
||||
## 'monitor' command
|
||||
cmd-monitor-desc = Toggles a debug monitor in the F3 menu.
|
||||
cmd-monitor-help = Usage: monitor <name>
|
||||
Possible monitors are: { $monitors }
|
||||
You can also use the special values "-all" and "+all" to hide or show all monitors, respectively.
|
||||
|
||||
cmd-monitor-arg-monitor = <monitor>
|
||||
cmd-monitor-invalid-name = Invalid monitor name
|
||||
cmd-monitor-arg-count = Missing monitor argument
|
||||
cmd-monitor-minus-all-hint = Hides all monitors
|
||||
cmd-monitor-plus-all-hint = Shows all monitors
|
||||
|
||||
|
||||
## 'setambientlight' command
|
||||
cmd-set-ambient-light-desc = Allows you to set the ambient light for the specified map, in SRGB.
|
||||
cmd-set-ambient-light-help = setambientlight [mapid] [r g b a]
|
||||
cmd-set-ambient-light-parse = Unable to parse args as a byte values for a color.
|
||||
|
||||
## Mapping commands
|
||||
|
||||
cmd-savemap-desc = Serializes a map to disk. Will not save a post-init map unless forced.
|
||||
cmd-savemap-help = savemap <MapID> <Path> [force]
|
||||
cmd-savemap-not-exist = Target map does not exist.
|
||||
cmd-savemap-init-warning = Attempted to save a post-init map without forcing the save.
|
||||
cmd-savemap-attempt = Attempting to save map {$mapId} to {$path}.
|
||||
cmd-savemap-success = Map successfully saved.
|
||||
cmd-hint-savemap-id = <MapID>
|
||||
cmd-hint-savemap-path = <Path>
|
||||
cmd-hint-savemap-force = [bool]
|
||||
|
||||
cmd-loadmap-desc = Loads a map from disk into the game.
|
||||
cmd-loadmap-help = loadmap <MapID> <Path> [x] [y] [rotation] [consistentUids]
|
||||
cmd-loadmap-nullspace = You cannot load into map 0.
|
||||
cmd-loadmap-exists = Map {$mapId} already exists.
|
||||
cmd-loadmap-success = Map {$mapId} has been loaded from {$path}.
|
||||
cmd-loadmap-error = An error occurred while loading map from {$path}.
|
||||
cmd-hint-loadmap-x-position = [x-position]
|
||||
cmd-hint-loadmap-y-position = [y-position]
|
||||
cmd-hint-loadmap-rotation = [rotation]
|
||||
cmd-hint-loadmap-uids = [float]
|
||||
|
||||
cmd-hint-savebp-id = <Grid EntityID>
|
||||
|
||||
## 'flushcookies' command
|
||||
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
|
||||
|
||||
cmd-flushcookies-desc = Flush CEF cookie storage to disk
|
||||
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
|
||||
Note that the actual operation is asynchronous.
|
||||
|
||||
cmd-ldrsc-desc = Pre-caches a resource.
|
||||
cmd-ldrsc-help = Usage: ldrsc <path> <type>
|
||||
|
||||
cmd-rldrsc-desc = Reloads a resource.
|
||||
cmd-rldrsc-help = Usage: rldrsc <path> <type>
|
||||
|
||||
cmd-gridtc-desc = Gets the tile count of a grid.
|
||||
cmd-gridtc-help = Usage: gridtc <gridId>
|
||||
|
||||
|
||||
# Client-side commands
|
||||
cmd-guidump-desc = Dump GUI tree to /guidump.txt in user data.
|
||||
cmd-guidump-help = Usage: guidump
|
||||
|
||||
cmd-uitest-desc = Open a dummy UI testing window
|
||||
cmd-uitest-help = Usage: uitest
|
||||
|
||||
## 'uitest2' command
|
||||
cmd-uitest2-desc = Opens a UI control testing OS window
|
||||
cmd-uitest2-help = Usage: uitest2 <tab>
|
||||
cmd-uitest2-arg-tab = <tab>
|
||||
cmd-uitest2-error-args = Expected at most one argument
|
||||
cmd-uitest2-error-tab = Invalid tab: '{$value}'
|
||||
cmd-uitest2-title = UITest2
|
||||
|
||||
|
||||
cmd-setclipboard-desc = Sets the system clipboard
|
||||
cmd-setclipboard-help = Usage: setclipboard <text>
|
||||
|
||||
cmd-getclipboard-desc = Gets the system clipboard
|
||||
cmd-getclipboard-help = Usage: Getclipboard
|
||||
|
||||
cmd-togglelight-desc = Toggles light rendering.
|
||||
cmd-togglelight-help = Usage: togglelight
|
||||
|
||||
cmd-togglefov-desc = Toggles fov for client.
|
||||
cmd-togglefov-help = Usage: togglefov
|
||||
|
||||
cmd-togglehardfov-desc = Toggles hard fov for client. (for debugging space-station-14#2353)
|
||||
cmd-togglehardfov-help = Usage: togglehardfov
|
||||
|
||||
cmd-toggleshadows-desc = Toggles shadow rendering.
|
||||
cmd-toggleshadows-help = Usage: toggleshadows
|
||||
|
||||
cmd-togglelightbuf-desc = Toggles lighting rendering. This includes shadows but not FOV.
|
||||
cmd-togglelightbuf-help = Usage: togglelightbuf
|
||||
|
||||
cmd-chunkinfo-desc = Gets info about a chunk under your mouse cursor.
|
||||
cmd-chunkinfo-help = Usage: chunkinfo
|
||||
|
||||
cmd-rldshader-desc = Reloads all shaders.
|
||||
cmd-rldshader-help = Usage: rldshader
|
||||
|
||||
cmd-cldbglyr-desc = Toggle fov and light debug layers.
|
||||
cmd-cldbglyr-help= Usage: cldbglyr <layer>: Toggle <layer>
|
||||
cldbglyr: Turn all Layers off
|
||||
|
||||
cmd-key-info-desc = Keys key info for a key.
|
||||
cmd-key-info-help = Usage: keyinfo <Key>
|
||||
|
||||
## 'bind' command
|
||||
cmd-bind-desc = Binds an input key combination to an input command.
|
||||
cmd-bind-help = Usage: bind { cmd-bind-arg-key } { cmd-bind-arg-mode } { cmd-bind-arg-command }
|
||||
Note that this DOES NOT automatically save bindings.
|
||||
Use the 'svbind' command to save binding configuration.
|
||||
|
||||
cmd-bind-arg-key = <KeyName>
|
||||
cmd-bind-arg-mode = <BindMode>
|
||||
cmd-bind-arg-command = <InputCommand>
|
||||
|
||||
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net-draw-interp-help = Usage: net_draw_interp
|
||||
|
||||
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net-draw-interp-help = Usage: net_draw_interp
|
||||
|
||||
cmd-net-watch-ent-desc = Dumps all network updates for an EntityId to the console.
|
||||
cmd-net-watch-ent-help = Usage: net_watchent <0|EntityUid>
|
||||
|
||||
cmd-net-refresh-desc = Requests a full server state.
|
||||
cmd-net-refresh-help = Usage: net_refresh
|
||||
|
||||
cmd-net-entity-report-desc = Toggles the net entity report panel.
|
||||
cmd-net-entity-report-help = Usage: net_entityreport
|
||||
|
||||
cmd-fill-desc = Fill up the console for debugging.
|
||||
cmd-fill-help = Fills the console with some nonsense for debugging.
|
||||
|
||||
cmd-cls-desc = Clears the console.
|
||||
cmd-cls-help = Clears the debug console of all messages.
|
||||
|
||||
cmd-sendgarbage-desc = Sends garbage to the server.
|
||||
cmd-sendgarbage-help = The server will reply with 'no u'
|
||||
|
||||
cmd-loadgrid-desc = Loads a grid from a file into an existing map.
|
||||
cmd-loadgrid-help = loadgrid <MapID> <Path> [x y] [rotation] [storeUids]
|
||||
|
||||
cmd-loc-desc = Prints the absolute location of the player's entity to console.
|
||||
cmd-loc-help = loc
|
||||
|
||||
cmd-tpgrid-desc = Teleports a grid to a new location.
|
||||
cmd-tpgrid-help = tpgrid <gridId> <X> <Y> [<MapId>]
|
||||
|
||||
cmd-rmgrid-desc = Removes a grid from a map. You cannot remove the default grid.
|
||||
cmd-rmgrid-help = rmgrid <gridId>
|
||||
|
||||
cmd-mapinit-desc = Runs map init on a map.
|
||||
cmd-mapinit-help = mapinit <mapID>
|
||||
|
||||
cmd-lsmap-desc = Lists maps.
|
||||
cmd-lsmap-help = lsmap
|
||||
|
||||
cmd-lsgrid-desc = Lists grids.
|
||||
cmd-lsgrid-help = lsgrid
|
||||
|
||||
cmd-addmap-desc = Adds a new empty map to the round. If the mapID already exists, this command does nothing.
|
||||
cmd-addmap-help = addmap <mapID> [initialize]
|
||||
|
||||
cmd-rmmap-desc = Removes a map from the world. You cannot remove nullspace.
|
||||
cmd-rmmap-help = rmmap <mapId>
|
||||
|
||||
cmd-savegrid-desc = Serializes a grid to disk.
|
||||
cmd-savegrid-help = savegrid <gridID> <Path>
|
||||
|
||||
cmd-testbed-desc = Loads a physics testbed on the specified map.
|
||||
cmd-testbed-help = testbed <mapid> <test>
|
||||
|
||||
cmd-saveconfig-desc = Saves the client configuration to the config file.
|
||||
cmd-saveconfig-help = saveconfig
|
||||
|
||||
## 'flushcookies' command
|
||||
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
|
||||
|
||||
cmd-flushcookies-desc = Flush CEF cookie storage to disk
|
||||
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
|
||||
Note that the actual operation is asynchronous.
|
||||
|
||||
## 'addcomp' command
|
||||
cmd-addcomp-desc = Adds a component to an entity.
|
||||
cmd-addcomp-help = addcomp <uid> <componentName>
|
||||
cmd-addcompc-desc = Adds a component to an entity on the client.
|
||||
cmd-addcompc-help = addcompc <uid> <componentName>
|
||||
|
||||
## 'rmcomp' command
|
||||
cmd-rmcomp-desc = Removes a component from an entity.
|
||||
cmd-rmcomp-help = rmcomp <uid> <componentName>
|
||||
cmd-rmcompc-desc = Removes a component from an entity on the client.
|
||||
cmd-rmcompc-help = rmcomp <uid> <componentName>
|
||||
|
||||
## 'addview' command
|
||||
cmd-addview-desc = Allows you to subscribe to an entity's view for debugging purposes.
|
||||
cmd-addview-help = addview <entityUid>
|
||||
cmd-addviewc-desc = Allows you to subscribe to an entity's view for debugging purposes.
|
||||
cmd-addviewc-help = addview <entityUid>
|
||||
|
||||
## 'removeview' command
|
||||
cmd-removeview-desc = Allows you to unsubscribe to an entity's view for debugging purposes.
|
||||
cmd-removeview-help = removeview <entityUid>
|
||||
|
||||
## 'loglevel' command
|
||||
cmd-loglevel-desc = Changes the log level for a provided sawmill.
|
||||
cmd-loglevel-help = Usage: loglevel <sawmill> <level>
|
||||
sawmill: A label prefixing log messages. This is the one you're setting the level for.
|
||||
level: The log level. Must match one of the values of the LogLevel enum.
|
||||
|
||||
cmd-testlog-desc = Writes a test log to a sawmill.
|
||||
cmd-testlog-help = Usage: testlog <sawmill> <level> <message>
|
||||
sawmill: A label prefixing the logged message.
|
||||
level: The log level. Must match one of the values of the LogLevel enum.
|
||||
message: The message to be logged. Wrap this in double quotes if you want to use spaces.
|
||||
|
||||
## 'vv' command
|
||||
cmd-vv-desc = Opens View Variables.
|
||||
cmd-vv-help = Usage: vv <entity ID|IoC interface name|SIoC interface name>
|
||||
|
||||
## 'showvelocities' command
|
||||
cmd-showvelocities-desc = Displays your angular and linear velocities.
|
||||
cmd-showvelocities-help = Usage: showvelocities
|
||||
|
||||
## 'setinputcontext' command
|
||||
cmd-setinputcontext-desc = Sets the active input context.
|
||||
cmd-setinputcontext-help = Usage: setinputcontext <context>
|
||||
|
||||
## 'forall' command
|
||||
cmd-forall-desc = Runs a command over all entities with a given component.
|
||||
cmd-forall-help = Usage: forall <bql query> do <command...>
|
||||
|
||||
## 'delete' command
|
||||
cmd-delete-desc = Deletes the entity with the specified ID.
|
||||
cmd-delete-help = delete <entity UID>
|
||||
|
||||
# System commands
|
||||
cmd-showtime-desc = Shows the server time.
|
||||
cmd-showtime-help = showtime
|
||||
|
||||
cmd-restart-desc = Gracefully restarts the server (not just the round).
|
||||
cmd-restart-help = restart
|
||||
|
||||
cmd-shutdown-desc = Gracefully shuts down the server.
|
||||
cmd-shutdown-help = shutdown
|
||||
|
||||
cmd-saveconfig-desc = Saves the server configuration to the config file.
|
||||
cmd-saveconfig-help = saveconfig
|
||||
|
||||
cmd-netaudit-desc = Prints into about NetMsg security.
|
||||
cmd-netaudit-help = netaudit
|
||||
|
||||
# Player commands
|
||||
cmd-tp-desc = Teleports a player to any location in the round.
|
||||
cmd-tp-help = tp <x> <y> [<mapID>]
|
||||
|
||||
cmd-tpto-desc = Teleports the current player or the specified players/entities to the location of the first player/entity.
|
||||
cmd-tpto-help = tpto <username|uid> [username|uid]...
|
||||
cmd-tpto-destination-hint = destination (uid or username)
|
||||
cmd-tpto-victim-hint = entity to teleport (uid or username)
|
||||
cmd-tpto-parse-error = Cant resolve entity or player: {$str}
|
||||
|
||||
cmd-listplayers-desc = Lists all players currently connected.
|
||||
cmd-listplayers-help = listplayers
|
||||
|
||||
cmd-kick-desc = Kicks a connected player out of the server, disconnecting them.
|
||||
cmd-kick-help = kick <PlayerIndex> [<Reason>]
|
||||
|
||||
# Spin command
|
||||
cmd-spin-desc = Causes an entity to spin. Default entity is the attached player's parent.
|
||||
cmd-spin-help = spin velocity [drag] [entityUid]
|
||||
|
||||
# Localization command
|
||||
cmd-rldloc-desc = Reloads localization (client & server).
|
||||
cmd-rldloc-help = Usage: rldloc
|
||||
|
||||
# Debug entity controls
|
||||
cmd-spawn-desc = Spawns an entity with specific type.
|
||||
cmd-spawn-help = spawn <prototype> OR spawn <prototype> <relative entity ID> OR spawn <prototype> <x> <y>
|
||||
cmd-cspawn-desc = Spawns a client-side entity with specific type at your feet.
|
||||
cmd-cspawn-help = cspawn <entity type>
|
||||
|
||||
cmd-scale-desc = Increases or decreases an entity's size naively.
|
||||
cmd-scale-help = scale <entityUid> <float>
|
||||
|
||||
cmd-dumpentities-desc = Dump entity list.
|
||||
cmd-dumpentities-help = Dumps entity list of UIDs and prototype.
|
||||
|
||||
cmd-getcomponentregistration-desc = Gets component registration information.
|
||||
cmd-getcomponentregistration-help = Usage: getcomponentregistration <componentName>
|
||||
|
||||
cmd-showrays-desc = Toggles debug drawing of physics rays. An integer for <raylifetime> must be provided.
|
||||
cmd-showrays-help = Usage: showrays <raylifetime>
|
||||
|
||||
cmd-disconnect-desc = Immediately disconnect from the server and go back to the main menu.
|
||||
cmd-disconnect-help = Usage: disconnect
|
||||
|
||||
cmd-entfo-desc = Displays verbose diagnostics for an entity.
|
||||
cmd-entfo-help = Usage: entfo <entityuid>
|
||||
The entity UID can be prefixed with 'c' to convert it to a client entity UID.
|
||||
|
||||
cmd-fuck-desc = Throws an exception
|
||||
cmd-fuck-help = Throws an exception
|
||||
|
||||
cmd-showpos-desc = Enables debug drawing over all entity positions in the game.
|
||||
cmd-showpos-help = Usage: showpos
|
||||
|
||||
cmd-sggcell-desc = Lists entities on a snap grid cell.
|
||||
cmd-sggcell-help = Usage: sggcell <gridID> <vector2i>\nThat vector2i param is in the form x<int>,y<int>.
|
||||
|
||||
cmd-overrideplayername-desc = Changes the name used when attempting to connect to the server.
|
||||
cmd-overrideplayername-help = Usage: overrideplayername <name>
|
||||
|
||||
cmd-showanchored-desc = Shows anchored entities on a particular tile
|
||||
cmd-showanchored-help = Usage: showanchored
|
||||
|
||||
cmd-dmetamem-desc = Dumps a type's members in a format suitable for the sandbox configuration file.
|
||||
cmd-dmetamem-help = Usage: dmetamem <type>
|
||||
|
||||
cmd-dmetamem-desc = Displays chunk bounds for the purposes of rendering.
|
||||
cmd-dmetamem-help = Usage: showchunkbb <type>
|
||||
|
||||
cmd-launchauth-desc = Load authentication tokens from launcher data to aid in testing of live servers.
|
||||
cmd-launchauth-help = Usage: launchauth <account name>
|
||||
|
||||
cmd-lightbb-desc = Toggles whether to show light bounding boxes.
|
||||
cmd-lightbb-help = Usage: lightbb
|
||||
|
||||
cmd-monitorinfo-desc = Monitors info
|
||||
cmd-monitorinfo-help = Usage: monitorinfo <id>
|
||||
|
||||
cmd-setmonitor-desc = Set monitor
|
||||
cmd-setmonitor-help = Usage: setmonitor <id>
|
||||
|
||||
cmd-physics-desc = Shows a debug physics overlay. The arg supplied specifies the overlay.
|
||||
cmd-physics-help = Usage: physics <aabbs / com / contactnormals / contactpoints / distance / joints / shapeinfo / shapes>
|
||||
|
||||
cmd-hardquit-desc = Kills the game client instantly.
|
||||
cmd-hardquit-help = Kills the game client instantly, leaving no traces. No telling the server goodbye.
|
||||
|
||||
cmd-quit-desc = Shuts down the game client gracefully.
|
||||
cmd-quit-help = Properly shuts down the game client, notifying the connected server and such.
|
||||
|
||||
cmd-csi-desc = Opens a C# interactive console.
|
||||
cmd-csi-help = Usage: csi
|
||||
|
||||
cmd-scsi-desc = Opens a C# interactive console on the server.
|
||||
cmd-scsi-help = Usage: scsi
|
||||
|
||||
cmd-watch-desc = Opens a variable watch window.
|
||||
cmd-watch-help = Usage: watch
|
||||
|
||||
cmd-showspritebb-desc = Toggle whether sprite bounds are shown
|
||||
cmd-showspritebb-help = Usage: showspritebb
|
||||
|
||||
cmd-togglelookup-desc = Shows / hides entitylookup bounds via an overlay.
|
||||
cmd-togglelookup-help = Usage: togglelookup
|
||||
|
||||
cmd-net_entityreport-desc = Toggles the net entity report panel.
|
||||
cmd-net_entityreport-help = Usage: net_entityreport
|
||||
|
||||
cmd-net_refresh-desc = Requests a full server state.
|
||||
cmd-net_refresh-help = Usage: net_refresh
|
||||
|
||||
cmd-net_graph-desc = Toggles the net statistics pannel.
|
||||
cmd-net_graph-help = Usage: net_graph
|
||||
|
||||
cmd-net_watchent-desc = Dumps all network updates for an EntityId to the console.
|
||||
cmd-net_watchent-help = Usage: net_watchent <0|EntityUid>
|
||||
|
||||
cmd-net_draw_interp-desc = Toggles the debug drawing of the network interpolation.
|
||||
cmd-net_draw_interp-help = Usage: net_draw_interp <0|EntityUid>
|
||||
|
||||
cmd-vram-desc = Displays video memory usage statics by the game.
|
||||
cmd-vram-help = Usage: vram
|
||||
|
||||
cmd-showislands-desc = Shows the current physics bodies involved in each physics island.
|
||||
cmd-showislands-help = Usage: showislands
|
||||
|
||||
cmd-showgridnodes-desc = Shows the nodes for grid split purposes.
|
||||
cmd-showgridnodes-help = Usage: showgridnodes
|
||||
|
||||
cmd-profsnap-desc = Make a profiling snapshot.
|
||||
cmd-profsnap-help = Usage: profsnap
|
||||
|
||||
cmd-devwindow-desc = Dev Window
|
||||
cmd-devwindow-help = Usage: devwindow
|
||||
|
||||
cmd-devwindow-desc = Open file
|
||||
cmd-devwindow-help = Usage: testopenfile
|
||||
|
||||
cmd-scene-desc = Immediately changes the UI scene/state.
|
||||
cmd-scene-help = Usage: scene <className>
|
||||
|
||||
cmd-szr_stats-desc = Report serializer statistics.
|
||||
cmd-szr_stats-help = Usage: szr_stats
|
||||
|
||||
cmd-hwid-desc = Returns the current HWID (HardWare ID).
|
||||
cmd-hwid-help = Usage: hwid
|
||||
|
||||
cmd-vvread-desc = Retrieve a path's value using VV (View Variables).
|
||||
cmd-vvread-desc = Usage: vvread <path>
|
||||
|
||||
cmd-vvwrite-desc = Modify a path's value using VV (View Variables).
|
||||
cmd-vvwrite-help = Usage: vvwrite <path>
|
||||
|
||||
cmd-vv-desc = Opens View Variables (VV).
|
||||
cmd-vv-help = Usage: vv <path|entity ID|guihover>
|
||||
|
||||
cmd-vvinvoke-desc = Invoke/Call a path with arguments using VV.
|
||||
cmd-vvinvoke-help = Usage: vvinvoke <path> [arguments...]
|
||||
|
||||
cmd-dump_dependency_injectors-desc = Dump IoCManager's dependency injector cache.
|
||||
cmd-dump_dependency_injectors-help = Usage: dump_dependency_injectors
|
||||
cmd-dump_dependency_injectors-total-count = Total count: { $total }
|
||||
|
||||
cmd-dump_netserializer_type_map-desc = Dump NetSerializer's type map and serializer hash.
|
||||
cmd-dump_netserializer_type_map-help = Usage: dump_netserializer_type_map
|
||||
|
||||
cmd-hub_advertise_now-desc = Immediately advertise to the master hub server
|
||||
cmd-hub_advertise_now-help = Usage: hub_advertise_now
|
||||
|
||||
cmd-echo-desc = Echo arguments back to the console
|
||||
cmd-echo-help = Usage: echo "<message>"
|
||||
|
||||
## 'vfs_ls' command
|
||||
cmd-vfs_ls-desc = List directory contents in the VFS.
|
||||
cmd-vfs_ls-help = Usage: vfs_list <path>
|
||||
Example:
|
||||
vfs_list /Assemblies
|
||||
|
||||
cmd-vfs_ls-err-args = Need exactly 1 argument.
|
||||
cmd-vfs_ls-hint-path = <path>
|
||||
10
Resources/Locale/en-US/controls.ftl
Normal file
10
Resources/Locale/en-US/controls.ftl
Normal file
@@ -0,0 +1,10 @@
|
||||
color-selector-sliders-red = R
|
||||
color-selector-sliders-green = G
|
||||
color-selector-sliders-blue = B
|
||||
color-selector-sliders-hue = H
|
||||
color-selector-sliders-saturation = S
|
||||
color-selector-sliders-value = V
|
||||
color-selector-sliders-alpha = A
|
||||
|
||||
color-selector-sliders-rgb = RGB
|
||||
color-selector-sliders-hsv = HSV
|
||||
@@ -3,6 +3,7 @@
|
||||
entity-spawn-window-title = Entity Spawn Panel
|
||||
entity-spawn-window-search-bar-placeholder = search
|
||||
entity-spawn-window-clear-button = Clear
|
||||
entity-spawn-window-replace-button-text = Replace
|
||||
entity-spawn-window-erase-button-text = Erase Mode
|
||||
entity-spawn-window-override-menu-tooltip = Override placement
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
debug-builtin-connection-screen-invalid-username-with-reason = The given username is invalid: {$invalidreason}
|
||||
debug-builtin-connection-screen-invalid-username = Invalid Username.
|
||||
debug-builtin-connection-screen-failed-to-connect = Failed to connect: {$reason}
|
||||
4
Resources/Locale/en-US/discordRPC.ftl
Normal file
4
Resources/Locale/en-US/discordRPC.ftl
Normal file
@@ -0,0 +1,4 @@
|
||||
discord-rpc-in-main-menu = In Main Menu
|
||||
discord-rpc-character = Username: {$username}
|
||||
discord-rpc-on-server = On Server: {$servername}
|
||||
discord-rpc-players = Players: {$players}/{$maxplayers}
|
||||
@@ -25,7 +25,22 @@ input-key-Down = Down
|
||||
input-key-Right = Right
|
||||
input-key-Space = Space
|
||||
input-key-Return = Return
|
||||
input-key-NumpadEnter = Num Enter
|
||||
input-key-NumpadEnter = Numpad Enter
|
||||
input-key-NumpadNum0 = Numpad 0
|
||||
input-key-NumpadNum1 = Numpad 1
|
||||
input-key-NumpadNum2 = Numpad 2
|
||||
input-key-NumpadNum3 = Numpad 3
|
||||
input-key-NumpadNum4 = Numpad 4
|
||||
input-key-NumpadNum5 = Numpad 5
|
||||
input-key-NumpadNum6 = Numpad 6
|
||||
input-key-NumpadNum7 = Numpad 7
|
||||
input-key-NumpadNum8 = Numpad 8
|
||||
input-key-NumpadNum9 = Numpad 9
|
||||
input-key-NumpadAdd = Numpad Add
|
||||
input-key-NumpadSubtract = Numpad Subtract
|
||||
input-key-NumpadDivide = Numpad Divide
|
||||
input-key-NumpadMultiply = Numpad Multiply
|
||||
input-key-NumpadDecimal = Numpad Decimal
|
||||
input-key-BackSpace = Backspace
|
||||
input-key-Tab = Tab
|
||||
input-key-PageUp = Page Up
|
||||
|
||||
1
Resources/Locale/en-US/midi-commands.ftl
Normal file
1
Resources/Locale/en-US/midi-commands.ftl
Normal file
@@ -0,0 +1 @@
|
||||
cmd-midipanic-desc = Turns off every note for every active MIDI renderer.
|
||||
59
Resources/Locale/en-US/replays.ftl
Normal file
59
Resources/Locale/en-US/replays.ftl
Normal file
@@ -0,0 +1,59 @@
|
||||
# Playback Commands
|
||||
|
||||
cmd-replay-play-desc = Resume replay playback.
|
||||
cmd-replay-play-help = replay_play
|
||||
|
||||
cmd-replay-pause-desc = Pause replay playback
|
||||
cmd-replay-pause-help = replay_pause
|
||||
|
||||
cmd-replay-toggle-desc = Resume or pause replay playback.
|
||||
cmd-replay-toggle-help = replay_toggle
|
||||
|
||||
cmd-replay-stop-desc = Stop and unload a replay.
|
||||
cmd-replay-stop-help = replay_stop
|
||||
|
||||
cmd-replay-load-desc = Load and start a replay.
|
||||
cmd-replay-load-help = replay_load <replay folder>
|
||||
cmd-replay-load-hint = Replay folder
|
||||
|
||||
cmd-replay-skip-desc = Skip forwards or backwards in time.
|
||||
cmd-replay-skip-help = replay_skip <tick or timespan>
|
||||
cmd-replay-skip-hint = Ticks or timespan (HH:MM:SS).
|
||||
|
||||
cmd-replay-set-time-desc = Jump forwards or backwards to some specific time.
|
||||
cmd-replay-set-time-help = replay_set <tick or time>
|
||||
cmd-replay-set-time-hint = Tick or timespan (HH:MM:SS), starting from
|
||||
|
||||
cmd-replay-error-time = "{$time}" is not an integer or timespan.
|
||||
cmd-replay-error-args = Wrong number of arguments.
|
||||
cmd-replay-error-no-replay = Not currently playing a replay.
|
||||
cmd-replay-error-already-loaded = A replay is already loaded.
|
||||
cmd-replay-error-run-level = You cannot load a replay while connected to a server.
|
||||
|
||||
# Recording commands
|
||||
|
||||
cmd-replay-recording-start-desc = Starts a replay recording, optionally with some time limit.
|
||||
cmd-replay-recording-start-help = Usage: replay_recording_start [time limit (minutes)] [path] [overwrite bool]
|
||||
cmd-replay-recording-start-success = Started recording a replay.
|
||||
cmd-replay-recording-start-already-recording = Already recording a replay.
|
||||
cmd-replay-recording-start-error = An error occurred while trying to start the recording.
|
||||
cmd-replay-recording-start-hint-time = [optional time limit (minutes)]
|
||||
cmd-replay-recording-start-hint-name = [optional path]
|
||||
cmd-replay-recording-start-hint-overwrite = [overwrite path (bool)]
|
||||
|
||||
cmd-replay-recording-stop-desc = Stops a replay recording.
|
||||
cmd-replay-recording-stop-help = Usage: replay_recording_stop
|
||||
cmd-replay-recording-stop-success = Stopped recording a replay.
|
||||
cmd-replay-recording-stop-not-recording = Not currently recording a replay.
|
||||
|
||||
cmd-replay-recording-stats-desc = Displays information about the current replay recording.
|
||||
cmd-replay-recording-stats-help = Usage: replay_recording_stats
|
||||
cmd-replay-recording-stats-result = Duration: {$time} min, Ticks: {$ticks}, Size: {$size} mb, rate: {$rate} mb/min.
|
||||
|
||||
|
||||
# Time Control UI
|
||||
replay-time-box-scrubbing-label = Dynamic Scrubbing
|
||||
replay-time-box-replay-time-label = Recording Time: {$current} / {$end} ({$percentage}%)
|
||||
replay-time-box-server-time-label = Server Time: {$current} / {$end}
|
||||
replay-time-box-index-label = Index: {$current} / {$total}
|
||||
replay-time-box-tick-label = Tick: {$current} / {$total}
|
||||
7
Resources/Locale/en-US/uploadfolder.ftl
Normal file
7
Resources/Locale/en-US/uploadfolder.ftl
Normal file
@@ -0,0 +1,7 @@
|
||||
uploadfolder-command-description = Uploads a folder from your UserData folder recursively to the server contentDB.
|
||||
uploadfolder-command-help = uploadfolder [folder you want to upload in userdata/UploadFolder]
|
||||
uploadfolder-command-wrong-args = Wrong number of arguments!
|
||||
uploadfolder-command-folder-not-found = Folder {$folder} not found!
|
||||
uploadfolder-command-resource-upload-disabled = Network Resource Uploading is currently disabled. check Server CVars.
|
||||
uploadfolder-command-file-too-big = File {$filename} above the current size limit! It must be smaller than {$sizeLimit} MB. skipping.
|
||||
uploadfolder-command-success = Uploaded {$fileCount} files
|
||||
63
Resources/Locale/pt-BR/_engine_lib.ftl
Normal file
63
Resources/Locale/pt-BR/_engine_lib.ftl
Normal file
@@ -0,0 +1,63 @@
|
||||
# Used internally by the THE() function.
|
||||
zzzz-the = { PROPER($ent) ->
|
||||
*[false] a { $ent }
|
||||
[true] { $ent }
|
||||
}
|
||||
|
||||
# Used internally by the SUBJECT() function.
|
||||
zzzz-subject-pronoun = { GENDER($ent) ->
|
||||
[male] ele
|
||||
[female] ela
|
||||
[epicene] eles
|
||||
*[neuter] ele
|
||||
}
|
||||
|
||||
# Used internally by the OBJECT() function.
|
||||
zzzz-object-pronoun = { GENDER($ent) ->
|
||||
[male] ele
|
||||
[female] ela
|
||||
[epicene] eles
|
||||
*[neuter] isso
|
||||
}
|
||||
|
||||
# Used internally by the POSS-PRONOUN() function.
|
||||
zzzz-possessive-pronoun = { GENDER($ent) ->
|
||||
[male] dele
|
||||
[female] dela
|
||||
[epicene] deles
|
||||
*[neuter] dele
|
||||
}
|
||||
|
||||
# Used internally by the POSS-ADJ() function.
|
||||
zzzz-possessive-adjective = { GENDER($ent) ->
|
||||
[male] dele
|
||||
[female] dela
|
||||
[epicene] deles
|
||||
*[neuter] dele
|
||||
}
|
||||
|
||||
# Used internally by the REFLEXIVE() function.
|
||||
zzzz-reflexive-pronoun = { GENDER($ent) ->
|
||||
[male] ele mesmo
|
||||
[female] ela mesmo
|
||||
[epicene] eles mesmos
|
||||
*[neuter] ele mesmo
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-BE() function.
|
||||
zzzz-conjugate-be = { GENDER($ent) ->
|
||||
[epicene] é
|
||||
*[other] é
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-HAVE() function.
|
||||
zzzz-conjugate-have = { GENDER($ent) ->
|
||||
[epicene] tenho
|
||||
*[other] tem
|
||||
}
|
||||
|
||||
# Used internally by the CONJUGATE-BASIC() function.
|
||||
zzzz-conjugate-basic = { GENDER($ent) ->
|
||||
[epicene] { $first }
|
||||
*[other] { $second }
|
||||
}
|
||||
16
Resources/Locale/pt-BR/client-state-commands.ftl
Normal file
16
Resources/Locale/pt-BR/client-state-commands.ftl
Normal file
@@ -0,0 +1,16 @@
|
||||
# Strings Loc para vários comandos relacionados ao estado da entidade e ao PVS do lado do cliente
|
||||
|
||||
cmd-reset-ent-help = Uso: resetent <Entity UID>
|
||||
cmd-reset-ent-desc = Redefina uma entidade para o estado do servidor recebido mais recentemente. Isso também redefinirá as entidades que foram desanexadas para espaço nulo.
|
||||
|
||||
cmd-reset-all-ents-help = Uso: resetallents
|
||||
cmd-reset-all-ents-desc = Redefine todas as entidades para o estado do servidor recebido mais recentemente. Isso afeta apenas as entidades que não foram desanexadas ao espaço nulo.
|
||||
|
||||
cmd-detach-ent-help = Uso: detachent <Entity UID>
|
||||
cmd-detach-ent-desc = Desanexar uma entidade para espaço nulo, como se tivesse saído do intervalo PVS.
|
||||
|
||||
cmd-local-delete-help = Uso: localdelete <Entity UID>
|
||||
cmd-local-delete-desc = Exclui uma entidade. Ao contrário do comando delete normal, este é CLIENT-SIDE. A menos que a entidade seja uma entidade do lado do cliente, isso provavelmente causará erros.
|
||||
|
||||
cmd-full-state-reset-help = Uso: fullstatereset
|
||||
cmd-full-state-reset-desc = Descarta qualquer informação de estado da entidade e solicita um estado completo do servidor.
|
||||
161
Resources/Locale/pt-BR/commands.ftl
Normal file
161
Resources/Locale/pt-BR/commands.ftl
Normal file
@@ -0,0 +1,161 @@
|
||||
### Localization for engine console commands
|
||||
|
||||
## generic
|
||||
|
||||
cmd-invalid-arg-number-error = Número inválido de argumentos.
|
||||
|
||||
cmd-parse-failure-integer = {$arg} não é um inteiro válido.
|
||||
cmd-parse-failure-float = {$arg} não é um float válido.
|
||||
cmd-parse-failure-bool = {$arg} não é um booleano válido.
|
||||
cmd-parse-failure-uid = {$arg} não é um UID de entidade válido.
|
||||
cmd-parse-failure-entity-exist = UID {$arg} não corresponde a uma entidade existente.
|
||||
|
||||
|
||||
## 'help' command
|
||||
cmd-help-desc = Exibir ajuda geral ou texto de ajuda para um comando específico
|
||||
cmd-help-help = Uso: help [command name]
|
||||
Quando nenhum nome de comando é fornecido, exibe o texto de ajuda geral. Se um nome de comando for fornecido, exibe o texto de ajuda para esse comando.
|
||||
|
||||
cmd-help-no-args = Para exibir a ajuda de um comando específico, escreva 'help <command>'. Para listar todos os comandos disponíveis, escreva 'list'. Para procurar comandos, use 'list <filter>'.
|
||||
cmd-help-unknown = Comando desconhecido: { $command }
|
||||
cmd-help-top = { $command } - { $description }
|
||||
cmd-help-invalid-args = Quantidade de argumentos inválida.
|
||||
cmd-help-arg-cmdname = [command name]
|
||||
|
||||
## 'cvar' command
|
||||
cmd-cvar-desc = Obtém ou define um CVar.
|
||||
cmd-cvar-help = Uso: cvar <name | ?> [value]
|
||||
Se um valor for passado, o valor será analisado e armazenado como o novo valor do CVar.
|
||||
Caso contrário, o valor atual do CVar é exibido.
|
||||
Use 'cvar ?' para obter uma lista de todos os CVars registrados.
|
||||
|
||||
cmd-cvar-invalid-args = Deve fornecer exatamente um ou dois argumentos.
|
||||
cmd-cvar-not-registered = CVar '{ $cvar }' não está registrado. Use 'cvar ?' para obter uma lista de todos os CVars registrados.
|
||||
cmd-cvar-parse-error = O valor de entrada está no formato incorreto para o tipo { $type }
|
||||
cmd-cvar-compl-list = Listar CVars disponíveis
|
||||
cmd-cvar-arg-name = <name | ?>
|
||||
cmd-cvar-value-hidden = <value hidden>
|
||||
|
||||
## 'list' command
|
||||
cmd-list-desc = Lista os comandos disponíveis, com filtro de pesquisa opcional
|
||||
cmd-list-help = Uso: list [filter]
|
||||
Lista todos os comandos disponíveis. Se um argumento for fornecido, ele será usado para filtrar comandos por nome.
|
||||
|
||||
cmd-list-heading = NOME DESC{"\u000A"}-------------------------{"\u000A"}
|
||||
|
||||
cmd-list-arg-filter = [filter]
|
||||
|
||||
## '>' command, aka remote exec
|
||||
cmd-remoteexec-desc = Executa comandos do lado do servidor
|
||||
cmd-remoteexec-help = Uso: > <command> [arg] [arg] [arg...]
|
||||
Executa um comando no servidor. Isso é necessário se um comando com o mesmo nome existir no cliente, pois a simples execução do comando executaria o comando do cliente primeiro.
|
||||
|
||||
## 'gc' command
|
||||
cmd-gc-desc = Execute o GC (coletor de lixo)
|
||||
cmd-gc-help = Uso: gc [generation]
|
||||
Usa GC.Collect() para executar o Garbage Collector.
|
||||
Se um argumento for fornecido, ele será analisado como um número de geração do GC e GC.Collect(int) será usado.
|
||||
Use o comando 'gfc' para fazer um GC completo compactando LOH.
|
||||
cmd-gc-failed-parse = Falha ao analisar o argumento.
|
||||
cmd-gc-arg-generation = [generation]
|
||||
|
||||
## 'gcf' command
|
||||
cmd-gcf-desc = Execute o GC, totalmente, compactando LOH e tudo.
|
||||
cmd-gcf-help = Uso: gcf
|
||||
Faz um GC.Collect(2, GCCollectionMode.Forced, true, true) completo enquanto também compacta LOH.
|
||||
Isso provavelmente será bloqueado por centenas de milissegundos, esteja avisado.
|
||||
|
||||
## 'gc_mode' command
|
||||
cmd-gc_mode-desc = Alterar/ler o modo de latência do GC
|
||||
cmd-gc_mode-help = Uso: gc_mode [type]
|
||||
Se nenhum argumento for fornecido, retornará o modo de latência do GC atual.
|
||||
Se um argumento for passado, ele será analisado como GCLatencyMode e definido como o modo de latência do GC.
|
||||
|
||||
cmd-gc_mode-current = modo de latência atual do gc: { $prevMode }
|
||||
cmd-gc_mode-possible = modos possíveis:
|
||||
cmd-gc_mode-option = - { $mode }
|
||||
cmd-gc_mode-unknown = modo de latência gc desconhecido: { $arg }
|
||||
cmd-gc_mode-attempt = tentando alterar o modo de latência do gc: { $prevMode } -> { $mode }
|
||||
cmd-gc_mode-result = modo de latência gc resultante: { $mode }
|
||||
cmd-gc_mode-arg-type = [type]
|
||||
|
||||
## 'mem' command
|
||||
cmd-mem-desc = Imprime informações de memória gerenciada
|
||||
cmd-mem-help = Uso: mem
|
||||
|
||||
cmd-mem-report = Tamanho da pilha: { TOSTRING($heapSize, "N0") }
|
||||
Total alocado: { TOSTRING($totalAllocated, "N0") }
|
||||
|
||||
## 'physics' command
|
||||
cmd-physics-overlay = {$overlay} não é uma sobreposição reconhecida
|
||||
|
||||
## 'lsasm' command
|
||||
cmd-lsasm-desc = Lista assemblies carregados por contexto de carregamento
|
||||
cmd-lsasm-help = Uso: lsasm
|
||||
|
||||
## 'exec' command
|
||||
cmd-exec-desc = Executa um arquivo de script dos dados de usuário graváveis do jogo
|
||||
cmd-exec-help = Uso: exec <fileName>
|
||||
Cada linha no arquivo é executada como um único comando, a menos que comece com um #
|
||||
|
||||
cmd-exec-arg-filename = <fileName>
|
||||
|
||||
## 'dump_net_comps' command
|
||||
cmd-dump_net_comps-desc = Imprime a tabela de componentes em rede.
|
||||
cmd-dump_net_comps-help = Uso: dump_net-comps
|
||||
|
||||
cmd-dump_net_comps-error-writeable = Registro ainda gravável, IDs de rede não foram gerados.
|
||||
cmd-dump_net_comps-header = Registros de componentes em rede:
|
||||
|
||||
## 'dump_event_tables' command
|
||||
cmd-dump_event_tables-desc = Imprime tabelas de eventos direcionados para uma entidade.
|
||||
cmd-dump_event_tables-help = Uso: dump_event_tables <entityUid>
|
||||
|
||||
cmd-dump_event_tables-missing-arg-entity = Argumento de entidade ausente
|
||||
cmd-dump_event_tables-error-entity = Entidade inválida
|
||||
cmd-dump_event_tables-arg-entity = <entityUid>
|
||||
|
||||
## 'monitor' command
|
||||
cmd-monitor-desc = Alterna um monitor de depuração no menu F3.
|
||||
cmd-monitor-help = Uso: monitor <name>
|
||||
Os monitores possíveis são: { $monitors }
|
||||
Você também pode usar os valores especiais "-all" e "+all" para ocultar ou mostrar todos os monitores, respectivamente.
|
||||
|
||||
cmd-monitor-arg-monitor = <monitor>
|
||||
cmd-monitor-invalid-name = Nome do monitor inválido
|
||||
cmd-monitor-arg-count = Argumento do monitor ausente
|
||||
cmd-monitor-minus-all-hint = Esconde todos os monitores
|
||||
cmd-monitor-plus-all-hint = Mostra todos os monitores
|
||||
|
||||
|
||||
## Mapping commands
|
||||
|
||||
cmd-savemap-desc = Serializa um mapa para o disco. Não salvará um mapa pós-inicialização a menos que seja forçado.
|
||||
cmd-savemap-help = savemap <MapID> <Path> [force]
|
||||
cmd-savemap-not-exist = O mapa de destino não existe.
|
||||
cmd-savemap-init-warning = Tentativa de salvar um mapa pós-inicialização sem forçar o salvamento.
|
||||
cmd-savemap-attempt = Tentando salvar o mapa {$mapId} em {$path}.
|
||||
cmd-savemap-success = Mapa salvo com sucesso.
|
||||
cmd-hint-savemap-id = <MapID>
|
||||
cmd-hint-savemap-path = <Path>
|
||||
cmd-hint-savemap-force = [bool]
|
||||
|
||||
cmd-loadmap-desc = Carrega um mapa do disco para o jogo.
|
||||
cmd-loadmap-help = loadmap <MapID> <Path> [x] [y] [rotation] [consistentUids]
|
||||
cmd-loadmap-nullspace = Você não pode carregar no mapa 0.
|
||||
cmd-loadmap-exists = Mapa {$mapId} já existe.
|
||||
cmd-loadmap-success = Mapa {$mapId} foi carregado em {$path}.
|
||||
cmd-loadmap-error = Ocorreu um erro ao carregar o mapa de {$path}.
|
||||
cmd-hint-loadmap-x-position = [x-position]
|
||||
cmd-hint-loadmap-y-position = [y-position]
|
||||
cmd-hint-loadmap-rotation = [rotation]
|
||||
cmd-hint-loadmap-uids = [float]
|
||||
|
||||
cmd-hint-savebp-id = <Grid EntityID>
|
||||
|
||||
## 'flushcookies' command
|
||||
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
|
||||
|
||||
cmd-flushcookies-desc = Liberar o armazenamento de cookies CEF para o disco
|
||||
cmd-flushcookies-help = Isso garante que os cookies sejam salvos corretamente no disco no caso de desligamentos impróprios.
|
||||
Observe que a operação real é assíncrona.
|
||||
10
Resources/Locale/pt-BR/controls.ftl
Normal file
10
Resources/Locale/pt-BR/controls.ftl
Normal file
@@ -0,0 +1,10 @@
|
||||
color-selector-sliders-red = R
|
||||
color-selector-sliders-green = G
|
||||
color-selector-sliders-blue = B
|
||||
color-selector-sliders-hue = H
|
||||
color-selector-sliders-saturation = S
|
||||
color-selector-sliders-value = V
|
||||
color-selector-sliders-alpha = A
|
||||
|
||||
color-selector-sliders-rgb = RGB
|
||||
color-selector-sliders-hsv = HSV
|
||||
11
Resources/Locale/pt-BR/custom-controls.ftl
Normal file
11
Resources/Locale/pt-BR/custom-controls.ftl
Normal file
@@ -0,0 +1,11 @@
|
||||
## EntitySpawnWindow
|
||||
|
||||
entity-spawn-window-title = Painel de Criação de Entidade
|
||||
entity-spawn-window-search-bar-placeholder = pesquisar
|
||||
entity-spawn-window-clear-button = Limpar
|
||||
entity-spawn-window-erase-button-text = Modo Apagar
|
||||
entity-spawn-window-override-menu-tooltip = Substituir posicionamento
|
||||
|
||||
## Console
|
||||
|
||||
console-line-edit-placeholder = Comando aqui
|
||||
1
Resources/Locale/pt-BR/defaultwindow.ftl
Normal file
1
Resources/Locale/pt-BR/defaultwindow.ftl
Normal file
@@ -0,0 +1 @@
|
||||
defaultwindow-placeholder-title = Exemplo de título de janela aqui
|
||||
54
Resources/Locale/pt-BR/input.ftl
Normal file
54
Resources/Locale/pt-BR/input.ftl
Normal file
@@ -0,0 +1,54 @@
|
||||
input-key-Escape = Escape
|
||||
input-key-Control = Control
|
||||
input-key-Shift = Shift
|
||||
input-key-Alt = Alt
|
||||
input-key-Menu = Menu
|
||||
input-key-F1 = F1
|
||||
input-key-F2 = F2
|
||||
input-key-F3 = F3
|
||||
input-key-F4 = F4
|
||||
input-key-F5 = F5
|
||||
input-key-F6 = F6
|
||||
input-key-F7 = F7
|
||||
input-key-F8 = F8
|
||||
input-key-F9 = F9
|
||||
input-key-F10 = F10
|
||||
input-key-F11 = F11
|
||||
input-key-F12 = F12
|
||||
input-key-F13 = F13
|
||||
input-key-F14 = F14
|
||||
input-key-F15 = F15
|
||||
input-key-Pause = Pause
|
||||
input-key-Left = Left
|
||||
input-key-Up = Up
|
||||
input-key-Down = Down
|
||||
input-key-Right = Right
|
||||
input-key-Space = Space
|
||||
input-key-Return = Return
|
||||
input-key-NumpadEnter = Num Enter
|
||||
input-key-BackSpace = Backspace
|
||||
input-key-Tab = Tab
|
||||
input-key-PageUp = Page Up
|
||||
input-key-PageDown = Page Down
|
||||
input-key-End = End
|
||||
input-key-Home = Home
|
||||
input-key-Insert = Insert
|
||||
input-key-Delete = Delete
|
||||
input-key-MouseLeft = Mouse Left
|
||||
input-key-MouseRight = Mouse Right
|
||||
input-key-MouseMiddle = Mouse Middle
|
||||
input-key-MouseButton4 = Mouse 4
|
||||
input-key-MouseButton5 = Mouse 5
|
||||
input-key-MouseButton6 = Mouse 6
|
||||
input-key-MouseButton7 = Mouse 7
|
||||
input-key-MouseButton8 = Mouse 8
|
||||
input-key-MouseButton9 = Mouse 9
|
||||
|
||||
input-key-LSystem-win = Left Win
|
||||
input-key-RSystem-win = Right Win
|
||||
input-key-LSystem-mac = Left Cmd
|
||||
input-key-RSystem-mac = Right Cmd
|
||||
input-key-LSystem-linux = Left Meta
|
||||
input-key-RSystem-linux = Right Meta
|
||||
|
||||
input-key-unknown = <unknown key>
|
||||
1
Resources/Locale/pt-BR/midi-commands.ftl
Normal file
1
Resources/Locale/pt-BR/midi-commands.ftl
Normal file
@@ -0,0 +1 @@
|
||||
cmd-midipanic-desc = Desliga cada nota para cada renderizador MIDI ativo.
|
||||
1
Resources/Locale/pt-BR/tab-container.ftl
Normal file
1
Resources/Locale/pt-BR/tab-container.ftl
Normal file
@@ -0,0 +1 @@
|
||||
tab-container-not-tab-title-provided = Sem título
|
||||
11
Resources/Locale/pt-BR/view-variables.ftl
Normal file
11
Resources/Locale/pt-BR/view-variables.ftl
Normal file
@@ -0,0 +1,11 @@
|
||||
## ViewVariablesInstanceEntity
|
||||
|
||||
view-variable-instance-entity-server-components-add-component-button-placeholder = Adicionar Componente
|
||||
view-variable-instance-entity-client-variables-tab-title = Variávies do Cliente
|
||||
view-variable-instance-entity-client-components-tab-title = Componentes do Cliente
|
||||
view-variable-instance-entity-server-variables-tab-title = Variávies do Servidor
|
||||
view-variable-instance-entity-server-components-tab-title = Componentes do Servidor
|
||||
view-variable-instance-entity-client-components-search-bar-placeholder = Pesquisar
|
||||
view-variable-instance-entity-server-components-search-bar-placeholder = Pesquisar
|
||||
view-variable-instance-entity-add-window-server-components = Adicionar Componente [S]
|
||||
view-variable-instance-entity-add-window-client-components = Adicionar Componente [C]
|
||||
@@ -5,6 +5,7 @@ preset raw;
|
||||
#include "/Shaders/Internal/fov_shared.swsl"
|
||||
|
||||
const highp float g_MinVariance = 0.0;
|
||||
uniform highp vec4 occludeColor;
|
||||
|
||||
void fragment()
|
||||
{
|
||||
@@ -19,5 +20,5 @@ void fragment()
|
||||
discard;
|
||||
}
|
||||
|
||||
COLOR = vec4(0.0, 0.0, 0.0, 1.0 - occlusion);
|
||||
COLOR = vec4(occludeColor.rgb, 1.0 - occlusion);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ preset raw;
|
||||
#include "/Shaders/Internal/fov_shared.swsl"
|
||||
|
||||
const highp float g_MinVariance = 0.0;
|
||||
uniform highp vec4 occludeColor;
|
||||
|
||||
void fragment()
|
||||
{
|
||||
@@ -18,5 +19,5 @@ void fragment()
|
||||
discard;
|
||||
}
|
||||
|
||||
COLOR = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
COLOR = vec4(occludeColor.rgb, 1.0);
|
||||
}
|
||||
|
||||
BIN
Resources/Textures/Interface/Default/cross.png
Normal file
BIN
Resources/Textures/Interface/Default/cross.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
BIN
Resources/Textures/noTile.png
Normal file
BIN
Resources/Textures/noTile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
822
Robust.Analyzers.Tests/AccessAnalyzer_Test.cs
Normal file
822
Robust.Analyzers.Tests/AccessAnalyzer_Test.cs
Normal file
@@ -0,0 +1,822 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.CodeAnalysis.CSharp.Testing;
|
||||
using Microsoft.CodeAnalysis.Testing;
|
||||
using Microsoft.CodeAnalysis.Testing.Verifiers;
|
||||
using NUnit.Framework;
|
||||
using Robust.Analyzers;
|
||||
|
||||
using VerifyCS = Microsoft.CodeAnalysis.CSharp.Testing.NUnit.AnalyzerVerifier<Robust.Analyzers.AccessAnalyzer>;
|
||||
using static Microsoft.CodeAnalysis.Testing.DiagnosticResult;
|
||||
|
||||
namespace Robust.Analyzers.Tests;
|
||||
|
||||
[Parallelizable(ParallelScope.All | ParallelScope.Fixtures)]
|
||||
[TestFixture]
|
||||
public sealed class AccessAnalyzer_Test
|
||||
{
|
||||
public Task Verifier(string code, params DiagnosticResult[] expected)
|
||||
{
|
||||
var test = new CSharpAnalyzerTest<AccessAnalyzer, NUnitVerifier>()
|
||||
{
|
||||
TestState =
|
||||
{
|
||||
AdditionalReferences = { typeof(AccessAnalyzer).Assembly },
|
||||
Sources = { code }
|
||||
},
|
||||
};
|
||||
|
||||
// ExpectedDiagnostics cannot be set, so we need to AddRange here...
|
||||
test.TestState.ExpectedDiagnostics.AddRange(expected);
|
||||
|
||||
return test.RunAsync();
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
[Test]
|
||||
public async Task ReadTest()
|
||||
{
|
||||
const string code = @"
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
// ReSharper disable RedundantAssignment
|
||||
// ReSharper disable UnusedVariable
|
||||
// ReSharper disable ArrangeThisQualifier
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedType.Global
|
||||
|
||||
public struct MyData
|
||||
{
|
||||
public int MyField;
|
||||
|
||||
public static bool operator ==(MyData lhs, MyData rhs) => lhs.MyField == rhs.MyField;
|
||||
public static bool operator !=(MyData lhs, MyData rhs) => lhs.MyField != rhs.MyField;
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public sealed class TypeNobodyCanRead
|
||||
{
|
||||
public MyData Data = default;
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Read,
|
||||
Friend = AccessPermissions.Read,
|
||||
Other = AccessPermissions.Read)]
|
||||
public MyData Data2 = default;
|
||||
|
||||
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
var copy = Data;
|
||||
var copy2 = this.Data;
|
||||
var copy3 = obj.Data;
|
||||
|
||||
copy = Data;
|
||||
copy = this.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy4 = Data.MyField;
|
||||
var copy5 = this.Data.MyField;
|
||||
var copy6 = obj.Data.MyField;
|
||||
|
||||
if (Data == copy) {}
|
||||
if (this.Data == copy) {}
|
||||
if (obj.Data == copy) {}
|
||||
|
||||
if(Data.MyField == 0) {}
|
||||
if(this.Data.MyField == 0) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// All of these accesses should be fine.
|
||||
var copy7 = Data2;
|
||||
var copy8 = this.Data2;
|
||||
var copy9 = obj.Data2;
|
||||
|
||||
copy = Data2;
|
||||
copy = this.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy10 = Data2.MyField;
|
||||
var copy11 = this.Data2.MyField;
|
||||
var copy12 = obj.Data2.MyField;
|
||||
|
||||
if (Data2 == copy) {}
|
||||
if (this.Data2 == copy) {}
|
||||
if (obj.Data2 == copy) {}
|
||||
|
||||
if(Data2.MyField == 0) {}
|
||||
if(this.Data2.MyField == 0) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Read,
|
||||
Friend = AccessPermissions.Read,
|
||||
Other = AccessPermissions.Read)]
|
||||
public sealed class MemberNobodyCanRead
|
||||
{
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public MyData Data = default;
|
||||
|
||||
public MyData Data2 = default;
|
||||
|
||||
public void TestMemberNobodyCanRead(TypeNobodyCanRead obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
var copy = Data;
|
||||
var copy2 = this.Data;
|
||||
var copy3 = obj.Data;
|
||||
|
||||
copy = Data;
|
||||
copy = this.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy4 = Data.MyField;
|
||||
var copy5 = this.Data.MyField;
|
||||
var copy6 = obj.Data.MyField;
|
||||
|
||||
if (Data == copy) {}
|
||||
if (this.Data == copy) {}
|
||||
if (obj.Data == copy) {}
|
||||
|
||||
if(Data.MyField == 0) {}
|
||||
if(this.Data.MyField == 0) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// All of these accesses should be fine.
|
||||
var copy7 = Data2;
|
||||
var copy8 = this.Data2;
|
||||
var copy9 = obj.Data2;
|
||||
|
||||
copy = Data2;
|
||||
copy = this.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy10 = Data2.MyField;
|
||||
var copy11 = this.Data2.MyField;
|
||||
var copy12 = obj.Data2.MyField;
|
||||
|
||||
if (Data2 == copy) {}
|
||||
if (this.Data2 == copy) {}
|
||||
if (obj.Data2 == copy) {}
|
||||
|
||||
if(Data2.MyField == 0) {}
|
||||
if(this.Data2.MyField == 0) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class FriendlyClass
|
||||
{
|
||||
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
var copy = obj.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy2 = obj.Data.MyField;
|
||||
copy2 = obj.Data.MyField;
|
||||
|
||||
if (obj.Data == copy) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
var copy3 = obj.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy4 = obj.Data2.MyField;
|
||||
copy4 = obj.Data2.MyField;
|
||||
|
||||
if(obj.Data2 == copy) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanRead(MemberNobodyCanRead obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
var copy = obj.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy2 = obj.Data.MyField;
|
||||
copy2 = obj.Data.MyField;
|
||||
|
||||
if (obj.Data == copy) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
var copy3 = obj.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy4 = obj.Data2.MyField;
|
||||
copy4 = obj.Data2.MyField;
|
||||
|
||||
if(obj.Data2 == copy) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class OtherClass
|
||||
{
|
||||
public void TestTypeNobodyCanRead(TypeNobodyCanRead obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
var copy = obj.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy2 = obj.Data.MyField;
|
||||
copy2 = obj.Data.MyField;
|
||||
|
||||
if (obj.Data == copy) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// We should be allowed to access all of these, they let others read it!
|
||||
var copy3 = obj.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy4 = obj.Data2.MyField;
|
||||
copy4 = obj.Data2.MyField;
|
||||
|
||||
if(obj.Data2 == copy) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanRead(MemberNobodyCanRead obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
var copy = obj.Data;
|
||||
copy = obj.Data;
|
||||
|
||||
var copy2 = obj.Data.MyField;
|
||||
copy2 = obj.Data.MyField;
|
||||
|
||||
if (obj.Data == copy) {}
|
||||
if(obj.Data.MyField == 0) {}
|
||||
|
||||
// We should be allowed to access all of these, they let others read it!
|
||||
var copy3 = obj.Data2;
|
||||
copy = obj.Data2;
|
||||
|
||||
var copy4 = obj.Data2.MyField;
|
||||
copy4 = obj.Data2.MyField;
|
||||
|
||||
if(obj.Data2 == copy) {}
|
||||
if(obj.Data2.MyField == 0) {}
|
||||
}
|
||||
}";
|
||||
|
||||
await Verifier(code,
|
||||
// AUTO-GENERATED DIAGNOSTICS BELOW //
|
||||
// /0/Test0.cs(35,20): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(35, 20, 35, 24).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(36,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(36, 21, 36, 30).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(37,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(37, 21, 37, 29).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(39,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(39, 16, 39, 20).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(40,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(40, 16, 40, 25).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(41,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(41, 16, 41, 24).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(43,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(43, 21, 43, 25).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(44,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(44, 21, 44, 30).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(45,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(45, 21, 45, 29).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(47,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(47, 13, 47, 17).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(48,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(48, 13, 48, 22).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(49,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(49, 13, 49, 21).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(51,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(51, 12, 51, 16).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(52,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(52, 12, 52, 21).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(53,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(53, 12, 53, 20).WithArguments("a 'Read' same-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(95,20): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(95, 20, 95, 24).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(96,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(96, 21, 96, 30).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(97,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(97, 21, 97, 29).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(99,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(99, 16, 99, 20).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(100,16): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(100, 16, 100, 25).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(101,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(101, 16, 101, 24).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(103,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(103, 21, 103, 25).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(104,21): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(104, 21, 104, 30).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(105,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(105, 21, 105, 29).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(107,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(107, 13, 107, 17).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(108,13): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(108, 13, 108, 22).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(109,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(109, 13, 109, 21).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(111,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(111, 12, 111, 16).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(112,12): error RA0002: Tried to perform a 'Read' same-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(112, 12, 112, 21).WithArguments("a 'Read' same-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(113,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(113, 12, 113, 20).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(143,20): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(143, 20, 143, 28).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(144,16): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(144, 16, 144, 24).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(146,21): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(146, 21, 146, 29).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(147,17): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(147, 17, 147, 25).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(149,13): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(149, 13, 149, 21).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(150,12): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(150, 12, 150, 20).WithArguments("a 'Read' friend-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(166,20): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(166, 20, 166, 28).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(167,16): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(167, 16, 167, 24).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(169,21): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(169, 21, 169, 29).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(170,17): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(170, 17, 170, 25).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(172,13): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(172, 13, 172, 21).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(173,12): error RA0002: Tried to perform a 'Read' friend-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(173, 12, 173, 20).WithArguments("a 'Read' friend-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(192,20): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(192, 20, 192, 28).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(193,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(193, 16, 193, 24).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(195,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(195, 21, 195, 29).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(196,17): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(196, 17, 196, 25).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(198,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(198, 13, 198, 21).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(199,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'TypeNobodyCanRead', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(199, 12, 199, 20).WithArguments("a 'Read' other-type", "Data", "TypeNobodyCanRead", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(215,20): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(215, 20, 215, 28).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(216,16): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(216, 16, 216, 24).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(218,21): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(218, 21, 218, 29).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(219,17): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(219, 17, 219, 25).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(221,13): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(221, 13, 221, 21).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(222,12): error RA0002: Tried to perform a 'Read' other-type access to member 'Data' in type 'MemberNobodyCanRead', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(222, 12, 222, 20).WithArguments("a 'Read' other-type", "Data", "MemberNobodyCanRead", "having no", "Member Permissions: ---------")
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task WriteTest()
|
||||
{
|
||||
const string code = @"
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
// ReSharper disable RedundantAssignment
|
||||
// ReSharper disable UnusedVariable
|
||||
// ReSharper disable ArrangeThisQualifier
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedType.Global
|
||||
// ReSharper disable NotAccessedField.Global
|
||||
// ReSharper disable RedundantDefaultMemberInitializer
|
||||
|
||||
public struct MyData
|
||||
{
|
||||
public int MyField;
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public sealed class TypeNobodyCanWrite
|
||||
{
|
||||
public MyData Data = default;
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Write,
|
||||
Friend = AccessPermissions.Write,
|
||||
Other = AccessPermissions.Write)]
|
||||
public MyData Data2 = default;
|
||||
|
||||
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
Data = default;
|
||||
this.Data = default;
|
||||
obj.Data = default;
|
||||
|
||||
Data.MyField = 0;
|
||||
this.Data.MyField = 0;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// All of these accesses should be fine.
|
||||
Data2 = default;
|
||||
this.Data2 = default;
|
||||
obj.Data2 = default;
|
||||
|
||||
Data2.MyField = 0;
|
||||
this.Data2.MyField = 0;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Write,
|
||||
Friend = AccessPermissions.Write,
|
||||
Other = AccessPermissions.Write)]
|
||||
public sealed class MemberNobodyCanWrite
|
||||
{
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public MyData Data = default;
|
||||
|
||||
public MyData Data2 = default;
|
||||
|
||||
public void TestMemberNobodyCanWrite(TypeNobodyCanWrite obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
Data = default;
|
||||
this.Data = default;
|
||||
obj.Data = default;
|
||||
|
||||
Data.MyField = 0;
|
||||
this.Data.MyField = 0;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// All of these accesses should be fine.
|
||||
Data2 = default;
|
||||
this.Data2 = default;
|
||||
obj.Data2 = default;
|
||||
|
||||
Data2.MyField = 0;
|
||||
this.Data2.MyField = 0;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class FriendlyClass
|
||||
{
|
||||
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
obj.Data = default;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
obj.Data2 = default;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanWrite(MemberNobodyCanWrite obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
obj.Data = default;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
obj.Data2 = default;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class OtherClass
|
||||
{
|
||||
public void TestTypeNobodyCanWrite(TypeNobodyCanWrite obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
obj.Data = default;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// We should be allowed to access all of these, they let others write!
|
||||
obj.Data2 = default;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanWrite(MemberNobodyCanWrite obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
obj.Data = default;
|
||||
obj.Data.MyField = 0;
|
||||
|
||||
// We should be allowed to access all of these, they let others write!
|
||||
obj.Data2 = default;
|
||||
obj.Data2.MyField = 0;
|
||||
}
|
||||
}";
|
||||
|
||||
await Verifier(code,
|
||||
// AUTO-GENERATED DIAGNOSTICS BELOW //
|
||||
// /0/Test0.cs(34,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(34, 9, 34, 13).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(35,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(35, 9, 35, 18).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(36,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(36, 9, 36, 17).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(38,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(38, 9, 38, 13).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(39,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(39, 9, 39, 18).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(40,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(40, 9, 40, 17).WithArguments("a 'Write' same-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(70,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(70, 9, 70, 13).WithArguments("a 'Write' same-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(71,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(71, 9, 71, 18).WithArguments("a 'Write' same-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(72,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(72, 9, 72, 17).WithArguments("a 'Write' other-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(74,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(74, 9, 74, 13).WithArguments("a 'Write' same-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(75,9): error RA0002: Tried to perform a 'Write' same-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(75, 9, 75, 18).WithArguments("a 'Write' same-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(76,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(76, 9, 76, 17).WithArguments("a 'Write' other-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(94,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(94, 9, 94, 17).WithArguments("a 'Write' friend-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(95,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(95, 9, 95, 17).WithArguments("a 'Write' friend-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(105,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(105, 9, 105, 17).WithArguments("a 'Write' friend-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(106,9): error RA0002: Tried to perform a 'Write' friend-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(106, 9, 106, 17).WithArguments("a 'Write' friend-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(119,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(119, 9, 119, 17).WithArguments("a 'Write' other-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(120,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'TypeNobodyCanWrite', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(120, 9, 120, 17).WithArguments("a 'Write' other-type", "Data", "TypeNobodyCanWrite", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(130,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(130, 9, 130, 17).WithArguments("a 'Write' other-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(131,9): error RA0002: Tried to perform a 'Write' other-type access to member 'Data' in type 'MemberNobodyCanWrite', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(131, 9, 131, 17).WithArguments("a 'Write' other-type", "Data", "MemberNobodyCanWrite", "having no", "Member Permissions: ---------")
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ExecuteTest()
|
||||
{
|
||||
const string code = @"
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
// ReSharper disable RedundantAssignment
|
||||
// ReSharper disable UnusedVariable
|
||||
// ReSharper disable ArrangeThisQualifier
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedType.Global
|
||||
// ReSharper disable NotAccessedField.Global
|
||||
// ReSharper disable RedundantDefaultMemberInitializer
|
||||
// ReSharper disable ReturnValueOfPureMethodIsNotUsed
|
||||
|
||||
public struct MyData
|
||||
{
|
||||
public int MyField;
|
||||
public void MyMethod() {}
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public sealed class TypeNobodyCanExecute
|
||||
{
|
||||
public MyData Data = default;
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Execute,
|
||||
Friend = AccessPermissions.Execute,
|
||||
Other = AccessPermissions.Execute)]
|
||||
public MyData Data2 = default;
|
||||
|
||||
public void MyMethod() {}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Execute,
|
||||
Friend = AccessPermissions.Execute,
|
||||
Other = AccessPermissions.Execute)]
|
||||
public void MyMethod2() {}
|
||||
|
||||
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
MyMethod();
|
||||
this.MyMethod();
|
||||
obj.MyMethod();
|
||||
|
||||
Data.MyMethod();
|
||||
this.Data.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
|
||||
Data.MyField.ToString();
|
||||
this.Data.MyField.ToString();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// All of these accesses should be fine.
|
||||
MyMethod2();
|
||||
this.MyMethod2();
|
||||
obj.MyMethod2();
|
||||
|
||||
Data2.MyMethod();
|
||||
this.Data2.MyMethod();
|
||||
obj.Data2.MyMethod();
|
||||
|
||||
Data2.MyField.ToString();
|
||||
this.Data2.ToString();
|
||||
obj.Data2.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.Execute,
|
||||
Friend = AccessPermissions.Execute,
|
||||
Other = AccessPermissions.Execute)]
|
||||
public sealed class MemberNobodyCanExecute
|
||||
{
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public MyData Data = default;
|
||||
|
||||
public MyData Data2 = default;
|
||||
|
||||
[Access(typeof(FriendlyClass),
|
||||
Self = AccessPermissions.None,
|
||||
Friend = AccessPermissions.None,
|
||||
Other = AccessPermissions.None)]
|
||||
public void MyMethod() {}
|
||||
|
||||
public void MyMethod2() {}
|
||||
|
||||
public void TestMemberNobodyCanExecute(TypeNobodyCanExecute obj)
|
||||
{
|
||||
// None of these accesses should be allowed.
|
||||
MyMethod();
|
||||
this.MyMethod();
|
||||
obj.MyMethod();
|
||||
|
||||
Data.MyMethod();
|
||||
this.Data.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
|
||||
Data.MyField.ToString();
|
||||
this.Data.MyField.ToString();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// All of these accesses should be fine.
|
||||
MyMethod2();
|
||||
this.MyMethod2();
|
||||
obj.MyMethod2();
|
||||
|
||||
Data2.MyMethod();
|
||||
this.Data2.MyMethod();
|
||||
obj.Data2.MyMethod();
|
||||
|
||||
Data2.MyField.ToString();
|
||||
this.Data2.ToString();
|
||||
obj.Data2.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class FriendlyClass
|
||||
{
|
||||
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
obj.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
obj.MyMethod2();
|
||||
obj.Data2.MyMethod();
|
||||
obj.Data2.MyField.ToString();
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanExecute(MemberNobodyCanExecute obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, even if we're a friend..
|
||||
obj.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// We should be allowed to access all of these, we're friends!
|
||||
obj.MyMethod2();
|
||||
obj.Data2.MyMethod();
|
||||
obj.Data2.MyField.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class OtherClass
|
||||
{
|
||||
public void TestTypeNobodyCanExecute(TypeNobodyCanExecute obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
obj.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// We should be allowed to access all of these, they let others Execute!
|
||||
obj.MyMethod2();
|
||||
obj.Data2.MyMethod();
|
||||
obj.Data2.MyField.ToString();
|
||||
}
|
||||
|
||||
public void TestMemberNobodyCanExecute(MemberNobodyCanExecute obj)
|
||||
{
|
||||
// We shouldn't be able to access any of these, as 'other types' can't..
|
||||
obj.MyMethod();
|
||||
obj.Data.MyMethod();
|
||||
obj.Data.MyField.ToString();
|
||||
|
||||
// We should be allowed to access all of these, they let others Execute!
|
||||
obj.MyMethod2();
|
||||
obj.Data2.MyMethod();
|
||||
obj.Data2.MyField.ToString();
|
||||
}
|
||||
}";
|
||||
|
||||
await Verifier(code,
|
||||
// AUTO-GENERATED DIAGNOSTICS BELOW //
|
||||
// /0/Test0.cs(44,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(44, 9, 44, 19).WithArguments("an 'Execute' same-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(45,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(45, 9, 45, 24).WithArguments("an 'Execute' same-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(46,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(46, 9, 46, 23).WithArguments("an 'Execute' same-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(48,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(48, 9, 48, 13).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(49,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(49, 9, 49, 18).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(50,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(50, 9, 50, 17).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(52,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(52, 9, 52, 13).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(53,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(53, 9, 53, 18).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(54,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(54, 9, 54, 17).WithArguments("an 'Execute' same-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(96,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(96, 9, 96, 19).WithArguments("an 'Execute' same-type", "MyMethod", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(97,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(97, 9, 97, 24).WithArguments("an 'Execute' same-type", "MyMethod", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(98,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(98, 9, 98, 23).WithArguments("an 'Execute' other-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(100,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(100, 9, 100, 13).WithArguments("an 'Execute' same-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(101,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(101, 9, 101, 18).WithArguments("an 'Execute' same-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(102,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(102, 9, 102, 17).WithArguments("an 'Execute' other-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(104,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(104, 9, 104, 13).WithArguments("an 'Execute' same-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(105,9): error RA0002: Tried to perform an 'Execute' same-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(105, 9, 105, 18).WithArguments("an 'Execute' same-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(106,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(106, 9, 106, 17).WithArguments("an 'Execute' other-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(128,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(128, 9, 128, 23).WithArguments("an 'Execute' friend-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(129,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(129, 9, 129, 17).WithArguments("an 'Execute' friend-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(130,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(130, 9, 130, 17).WithArguments("an 'Execute' friend-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(141,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(141, 9, 141, 23).WithArguments("an 'Execute' friend-type", "MyMethod", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(142,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(142, 9, 142, 17).WithArguments("an 'Execute' friend-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(143,9): error RA0002: Tried to perform an 'Execute' friend-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(143, 9, 143, 17).WithArguments("an 'Execute' friend-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(157,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(157, 9, 157, 23).WithArguments("an 'Execute' other-type", "MyMethod", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(158,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(158, 9, 158, 17).WithArguments("an 'Execute' other-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(159,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'TypeNobodyCanExecute', despite having no access. Type Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(159, 9, 159, 17).WithArguments("an 'Execute' other-type", "Data", "TypeNobodyCanExecute", "having no", "Type Permissions: ---------"),
|
||||
// /0/Test0.cs(170,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'MyMethod' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(170, 9, 170, 23).WithArguments("an 'Execute' other-type", "MyMethod", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(171,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(171, 9, 171, 17).WithArguments("an 'Execute' other-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------"),
|
||||
// /0/Test0.cs(172,9): error RA0002: Tried to perform an 'Execute' other-type access to member 'Data' in type 'MemberNobodyCanExecute', despite having no access. Member Permissions: ---------
|
||||
VerifyCS.Diagnostic().WithSpan(172, 9, 172, 17).WithArguments("an 'Execute' other-type", "Data", "MemberNobodyCanExecute", "having no", "Member Permissions: ---------")
|
||||
);
|
||||
}
|
||||
}
|
||||
24
Robust.Analyzers.Tests/Robust.Analyzers.Tests.csproj
Normal file
24
Robust.Analyzers.Tests/Robust.Analyzers.Tests.csproj
Normal file
@@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\MSBuild\Robust.Properties.targets" />
|
||||
<Import Project="..\MSBuild\Robust.Engine.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzer.Testing" Version="1.1.1"/>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1"/>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.NUnit" Version="1.1.1"/>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1"/>
|
||||
<PackageReference Include="NUnit" Version="3.13.2"/>
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.0"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1"/>
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.3.0"/>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Robust.Analyzers\Robust.Analyzers.csproj"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
264
Robust.Analyzers/AccessAnalyzer.cs
Normal file
264
Robust.Analyzers/AccessAnalyzer.cs
Normal file
@@ -0,0 +1,264 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Microsoft.CodeAnalysis.Operations;
|
||||
using Robust.Shared.Analyzers.Implementation;
|
||||
|
||||
namespace Robust.Analyzers
|
||||
{
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public class AccessAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
private const string AccessAttributeType = "Robust.Shared.Analyzers.AccessAttribute";
|
||||
private const string RobustAutoGeneratedAttributeType = "Robust.Shared.Analyzers.RobustAutoGeneratedAttribute";
|
||||
private const string PureAttributeType = "System.Diagnostics.Contracts.PureAttribute";
|
||||
|
||||
[SuppressMessage("ReSharper", "RS2008")]
|
||||
private static readonly DiagnosticDescriptor AccessRule = new (
|
||||
Diagnostics.IdAccess,
|
||||
"Invalid access",
|
||||
"Tried to perform {0} access to member '{1}' in type '{2}', despite {3} access. {4}.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure to give the accessing type the correct access permissions.");
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
|
||||
ImmutableArray.Create(AccessRule);
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterOperationAction(CheckFriendship,
|
||||
OperationKind.FieldReference,
|
||||
OperationKind.PropertyReference,
|
||||
OperationKind.MethodReference,
|
||||
OperationKind.Invocation);
|
||||
}
|
||||
|
||||
private void CheckFriendship(OperationAnalysisContext context)
|
||||
{
|
||||
var operation = context.Operation;
|
||||
|
||||
// The symbol representing the member being accessed.
|
||||
ISymbol member;
|
||||
|
||||
// The operation to target when determining access type.
|
||||
IOperation targetAccess;
|
||||
|
||||
switch (operation)
|
||||
{
|
||||
case IMemberReferenceOperation memberRef:
|
||||
{
|
||||
member = memberRef.Member;
|
||||
targetAccess = memberRef.Parent;
|
||||
break;
|
||||
}
|
||||
|
||||
case IInvocationOperation invocation:
|
||||
{
|
||||
member = invocation.TargetMethod;
|
||||
targetAccess = invocation;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the info of the type defining the member, so we can check the attributes later...
|
||||
var accessedType = member.ContainingType;
|
||||
|
||||
// Get the attributes
|
||||
var friendAttribute = context.Compilation.GetTypeByMetadataName(AccessAttributeType);
|
||||
var autoGenAttribute = context.Compilation.GetTypeByMetadataName(RobustAutoGeneratedAttributeType);
|
||||
|
||||
// Get the type that is containing this expression, or, the type where this is happening.
|
||||
if (context.ContainingSymbol?.ContainingType is not {} accessingType)
|
||||
return;
|
||||
|
||||
// Should we ignore the access attempt due to the accessing type being auto-generated?
|
||||
if (accessingType.GetAttributes().FirstOrDefault(a =>
|
||||
a.AttributeClass != null &&
|
||||
a.AttributeClass.Equals(autoGenAttribute, SymbolEqualityComparer.Default)) is { } attr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine which type of access is happening here... Read, write or execute?
|
||||
var accessAttempt = DetermineAccess(context, targetAccess, operation);
|
||||
|
||||
// Check whether this is a "self" access, including inheritors.
|
||||
var selfAccess = InheritsFromOrEquals(accessingType, accessedType);
|
||||
|
||||
// Helper function to deduplicate attribute-checking code.
|
||||
bool CheckAttributeFriendship(AttributeData attribute, bool isMemberAttribute)
|
||||
{
|
||||
// If the attribute isn't the friend attribute, we don't care about it.
|
||||
if (!SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, friendAttribute))
|
||||
return false;
|
||||
|
||||
var self = AccessAttribute.SelfDefaultPermissions;
|
||||
var friends = AccessAttribute.FriendDefaultPermissions;
|
||||
var others = AccessAttribute.OtherDefaultPermissions;
|
||||
|
||||
foreach (var kv in attribute.NamedArguments)
|
||||
{
|
||||
if (kv.Value.Value is not byte value)
|
||||
continue;
|
||||
|
||||
var permissions = (AccessPermissions) value;
|
||||
|
||||
switch (kv.Key)
|
||||
{
|
||||
case nameof(AccessAttribute.Self):
|
||||
{
|
||||
self = permissions;
|
||||
break;
|
||||
}
|
||||
|
||||
case nameof(AccessAttribute.Friend):
|
||||
{
|
||||
friends = permissions;
|
||||
break;
|
||||
}
|
||||
|
||||
case nameof(AccessAttribute.Other):
|
||||
{
|
||||
others = permissions;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// By default, we will check the "other" permissions unless we find we're dealing with a friend or self.
|
||||
var permissionCheck = others;
|
||||
|
||||
// Human-readable relation between accessing and accessed types.
|
||||
var accessingRelation = "other-type";
|
||||
|
||||
if (!selfAccess)
|
||||
{
|
||||
// This is not a self-access, so we need to determine whether the accessing type is a friend.
|
||||
// Check all types allowed in the friend attribute. (We assume there's only one constructor arg.)
|
||||
var types = attribute.ConstructorArguments[0].Values;
|
||||
|
||||
foreach (var constant in types)
|
||||
{
|
||||
// Check if the value is a type...
|
||||
if (constant.Value is not INamedTypeSymbol friendType)
|
||||
continue;
|
||||
|
||||
// Check if the accessing type is specified in the attribute...
|
||||
if (!InheritsFromOrEquals(accessingType, friendType))
|
||||
continue;
|
||||
|
||||
// Set the permissions check to the friend permissions!
|
||||
permissionCheck = friends;
|
||||
accessingRelation = "friend-type";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Self-access, so simply set the permissions check to self.
|
||||
permissionCheck = self;
|
||||
accessingRelation = "same-type";
|
||||
}
|
||||
|
||||
// If we allow this access, return! All is good.
|
||||
if ((accessAttempt & permissionCheck) != 0)
|
||||
return true;
|
||||
|
||||
// Access denied! Report an error.
|
||||
context.ReportDiagnostic(
|
||||
Diagnostic.Create(AccessRule, operation.Syntax.GetLocation(),
|
||||
$"a{(accessAttempt == AccessPermissions.Execute ? "n" : "")} '{accessAttempt}' {accessingRelation}",
|
||||
$"{member.Name}",
|
||||
$"{accessedType.Name}",
|
||||
$"{(permissionCheck == AccessPermissions.None ? "having no" : $"only having '{permissionCheck}'")}",
|
||||
$"{(isMemberAttribute ? "Member" : "Type")} Permissions: {self.ToUnixPermissions()}{friends.ToUnixPermissions()}{others.ToUnixPermissions()}"));
|
||||
|
||||
// Only return ONE error.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check attributes in the member first, since they take priority and can override type restrictions.
|
||||
foreach (var attribute in member.GetAttributes())
|
||||
{
|
||||
if(CheckAttributeFriendship(attribute, true))
|
||||
return;
|
||||
}
|
||||
|
||||
// Check attributes in the type containing the member last.
|
||||
foreach (var attribute in accessedType.GetAttributes())
|
||||
{
|
||||
if(CheckAttributeFriendship(attribute, false))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static AccessPermissions DetermineAccess(OperationAnalysisContext context, IOperation operation, IOperation original)
|
||||
{
|
||||
switch (operation)
|
||||
{
|
||||
case IAssignmentOperation assign:
|
||||
{
|
||||
return assign.Target.Equals(original) ? AccessPermissions.Write : AccessPermissions.Read;
|
||||
}
|
||||
|
||||
case IInvocationOperation invoke:
|
||||
{
|
||||
var pureAttribute = context.Compilation.GetTypeByMetadataName(PureAttributeType);
|
||||
|
||||
foreach (var attribute in invoke.TargetMethod.GetAttributes())
|
||||
{
|
||||
// Pure methods are treated as read accesses.
|
||||
if (SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, pureAttribute))
|
||||
return AccessPermissions.Read;
|
||||
}
|
||||
|
||||
return AccessPermissions.Execute;
|
||||
}
|
||||
|
||||
case IMemberReferenceOperation member:
|
||||
{
|
||||
return DetermineAccess(context, member.Parent, operation);
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return AccessPermissions.Read;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool InheritsFromOrEquals(INamedTypeSymbol type, INamedTypeSymbol baseType)
|
||||
{
|
||||
foreach (var otherType in GetBaseTypesAndThis(type))
|
||||
{
|
||||
if (SymbolEqualityComparer.Default.Equals(otherType, baseType))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private IEnumerable<INamedTypeSymbol> GetBaseTypesAndThis(INamedTypeSymbol namedType)
|
||||
{
|
||||
var current = namedType;
|
||||
while (current != null)
|
||||
{
|
||||
yield return current;
|
||||
current = current.BaseType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
206
Robust.Analyzers/ByRefEventAnalyzer.cs
Normal file
206
Robust.Analyzers/ByRefEventAnalyzer.cs
Normal file
@@ -0,0 +1,206 @@
|
||||
#nullable enable
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Microsoft.CodeAnalysis.Operations;
|
||||
using static Microsoft.CodeAnalysis.SymbolEqualityComparer;
|
||||
|
||||
namespace Robust.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public sealed class ByRefEventAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
private const string ByRefAttribute = "Robust.Shared.GameObjects.ByRefEventAttribute";
|
||||
|
||||
private static readonly DiagnosticDescriptor ByRefEventSubscribedByValueRule = new(
|
||||
Diagnostics.IdByRefEventSubscribedByValue,
|
||||
"By-ref event subscribed to by value",
|
||||
"Tried to subscribe to a by-ref event '{0}' by value.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure that methods subscribing to a ref event have the ref keyword for the event argument."
|
||||
);
|
||||
|
||||
private static readonly DiagnosticDescriptor ByValueEventSubscribedByRefRule = new(
|
||||
Diagnostics.IdValueEventRaisedByRef,
|
||||
"Value event subscribed to by-ref",
|
||||
"Tried to subscribe to a value event '{0}' by-ref.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure that methods subscribing to value events do not have the ref keyword for the event argument."
|
||||
);
|
||||
|
||||
private static readonly DiagnosticDescriptor ByRefEventRaisedByValueRule = new(
|
||||
Diagnostics.IdByRefEventRaisedByValue,
|
||||
"By-ref event raised by value",
|
||||
"Tried to raise a by-ref event '{0}' by value.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure to use the ref keyword when raising ref events."
|
||||
);
|
||||
|
||||
private static readonly DiagnosticDescriptor ByValueEventRaisedByRefRule = new(
|
||||
Diagnostics.IdValueEventRaisedByRef,
|
||||
"Value event raised by-ref",
|
||||
"Tried to raise a value event '{0}' by-ref.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure to not use the ref keyword when raising value events."
|
||||
);
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
|
||||
ByRefEventSubscribedByValueRule,
|
||||
ByValueEventSubscribedByRefRule,
|
||||
ByRefEventRaisedByValueRule,
|
||||
ByValueEventRaisedByRefRule
|
||||
);
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterOperationAction(CheckEventSubscription, OperationKind.Invocation);
|
||||
context.RegisterOperationAction(CheckEventRaise, OperationKind.Invocation);
|
||||
}
|
||||
|
||||
private void CheckEventSubscription(OperationAnalysisContext context)
|
||||
{
|
||||
if (context.Operation is not IInvocationOperation operation)
|
||||
return;
|
||||
|
||||
var subscribeMethods = context.Compilation
|
||||
.GetTypeByMetadataName("Robust.Shared.GameObjects.EntitySystem")?
|
||||
.GetMembers()
|
||||
.Where(m => m.Name.Contains("SubscribeLocalEvent"))
|
||||
.Cast<IMethodSymbol>();
|
||||
|
||||
if (subscribeMethods == null)
|
||||
return;
|
||||
|
||||
if (!subscribeMethods.Any(m => m.Equals(operation.TargetMethod.OriginalDefinition, Default)))
|
||||
return;
|
||||
|
||||
var typeArguments = operation.TargetMethod.TypeArguments;
|
||||
if (typeArguments.Length < 1 || typeArguments.Length > 2)
|
||||
return;
|
||||
|
||||
if (operation.Arguments.First().Value is not IDelegateCreationOperation delegateCreation)
|
||||
return;
|
||||
|
||||
if (delegateCreation.Target is not IMethodReferenceOperation methodReference)
|
||||
return;
|
||||
|
||||
var eventParameter = methodReference.Method.Parameters.LastOrDefault();
|
||||
if (eventParameter == null)
|
||||
return;
|
||||
|
||||
ITypeSymbol eventArgument;
|
||||
switch (typeArguments.Length)
|
||||
{
|
||||
case 1:
|
||||
eventArgument = typeArguments[0];
|
||||
break;
|
||||
case 2:
|
||||
eventArgument = typeArguments[1];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
var byRefAttribute = context.Compilation.GetTypeByMetadataName(ByRefAttribute);
|
||||
if (byRefAttribute == null)
|
||||
return;
|
||||
|
||||
var isByRefEventType = eventArgument
|
||||
.GetAttributes()
|
||||
.Any(attribute => attribute.AttributeClass?.Equals(byRefAttribute, Default) ?? false);
|
||||
var parameterIsRef = eventParameter.RefKind == RefKind.Ref;
|
||||
|
||||
if (isByRefEventType != parameterIsRef)
|
||||
{
|
||||
var descriptor = isByRefEventType ? ByRefEventSubscribedByValueRule : ByValueEventSubscribedByRefRule;
|
||||
var diagnostic = Diagnostic.Create(descriptor, operation.Syntax.GetLocation(), eventArgument);
|
||||
context.ReportDiagnostic(diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckEventRaise(OperationAnalysisContext context)
|
||||
{
|
||||
if (context.Operation is not IInvocationOperation operation)
|
||||
return;
|
||||
|
||||
var raiseMethods = context.Compilation
|
||||
.GetTypeByMetadataName("Robust.Shared.GameObjects.EntitySystem")?
|
||||
.GetMembers()
|
||||
.Where(m => m.Name.Contains("RaiseLocalEvent") && m.Kind == SymbolKind.Method)
|
||||
.Cast<IMethodSymbol>();
|
||||
|
||||
var busRaiseMethods = context.Compilation
|
||||
.GetTypeByMetadataName("Robust.Shared.GameObjects.EntityEventBus")?
|
||||
.GetMembers()
|
||||
.Where(m => m.Name.Contains("RaiseLocalEvent") && m.Kind == SymbolKind.Method)
|
||||
.Cast<IMethodSymbol>();
|
||||
|
||||
if (raiseMethods == null)
|
||||
return;
|
||||
|
||||
if (busRaiseMethods != null)
|
||||
raiseMethods = raiseMethods.Concat(busRaiseMethods);
|
||||
|
||||
if (!raiseMethods.Any(m => m.Equals(operation.TargetMethod.OriginalDefinition, Default)))
|
||||
{
|
||||
// If you try to do this normally by concatenating like busRaiseMethods above
|
||||
// the analyzer does not run without any errors
|
||||
// I don't know man
|
||||
const string directedBusMethod = "Robust.Shared.GameObjects.IDirectedEventBus.RaiseLocalEvent";
|
||||
if (!operation.TargetMethod.ToString().StartsWith(directedBusMethod))
|
||||
return;
|
||||
}
|
||||
|
||||
var arguments = operation.Arguments;
|
||||
IArgumentOperation eventArgument;
|
||||
switch (arguments.Length)
|
||||
{
|
||||
case 1:
|
||||
eventArgument = arguments[0];
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
eventArgument = arguments[1];
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
var eventParameter = eventArgument.Parameter;
|
||||
// TODO have a way to check generic type parameters
|
||||
if (eventParameter == null ||
|
||||
eventParameter.Type.SpecialType == SpecialType.System_Object ||
|
||||
eventParameter.Type.TypeKind == TypeKind.TypeParameter)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var byRefAttribute = context.Compilation.GetTypeByMetadataName(ByRefAttribute);
|
||||
if (byRefAttribute == null)
|
||||
return;
|
||||
|
||||
var isByRefEventType = eventParameter.Type
|
||||
.GetAttributes()
|
||||
.Any(attribute => attribute.AttributeClass?.Equals(byRefAttribute, Default) ?? false);
|
||||
|
||||
var parameterIsRef = eventParameter.RefKind == RefKind.Ref;
|
||||
|
||||
if (isByRefEventType != parameterIsRef)
|
||||
{
|
||||
var descriptor = isByRefEventType ? ByRefEventRaisedByValueRule : ByValueEventRaisedByRefRule;
|
||||
var diagnostic = Diagnostic.Create(descriptor, eventArgument.Syntax.GetLocation(), eventParameter.Type);
|
||||
context.ReportDiagnostic(diagnostic);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,21 @@ public static class Diagnostics
|
||||
{
|
||||
public const string IdExplicitInterface = "RA0000";
|
||||
public const string IdSerializable = "RA0001";
|
||||
public const string IdFriend = "RA0002";
|
||||
public const string IdAccess = "RA0002";
|
||||
public const string IdExplicitVirtual = "RA0003";
|
||||
public const string IdTaskResult = "RA0004";
|
||||
public const string IdUseGenericVariant = "RA0005";
|
||||
public const string IdUseGenericVariantInvalidUsage = "RA0006";
|
||||
public const string IdUseGenericVariantAttributeValueError = "RA0007";
|
||||
public const string IdNotNullableFlagNotSet = "RA0008";
|
||||
public const string IdInvalidNotNullableFlagValue = "RA0009";
|
||||
public const string IdInvalidNotNullableFlagImplementation = "RA0010";
|
||||
public const string IdInvalidNotNullableFlagType = "RA0011";
|
||||
public const string IdNotNullableFlagValueType = "RA0012";
|
||||
public const string IdByRefEventSubscribedByValue = "RA0013";
|
||||
public const string IdValueEventSubscribedByRef = "RA0014";
|
||||
public const string IdByRefEventRaisedByValue = "RA0015";
|
||||
public const string IdValueEventRaisedByRef = "RA0016";
|
||||
|
||||
public static SuppressionDescriptor MeansImplicitAssignment =>
|
||||
new SuppressionDescriptor("RADC1000", "CS0649", "Marked as implicitly assigned.");
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
|
||||
namespace Robust.Analyzers
|
||||
{
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public class FriendAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
const string FriendAttribute = "Robust.Shared.Analyzers.FriendAttribute";
|
||||
|
||||
[SuppressMessage("ReSharper", "RS2008")]
|
||||
private static readonly DiagnosticDescriptor Rule = new (
|
||||
Diagnostics.IdFriend,
|
||||
"Tried to access friend-only member",
|
||||
"Tried to access member \"{0}\" in class \"{1}\" which can only be accessed by friend classes",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Make sure to specify the accessing class in the friends attribute.");
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterSyntaxNodeAction(CheckFriendship, SyntaxKind.SimpleMemberAccessExpression);
|
||||
}
|
||||
|
||||
private void CheckFriendship(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
if (context.Node is not MemberAccessExpressionSyntax memberAccess)
|
||||
return;
|
||||
|
||||
// We only do something if our parent is one of a few types.
|
||||
switch (context.Node.Parent)
|
||||
{
|
||||
// If we're being assigned...
|
||||
case AssignmentExpressionSyntax assignParent:
|
||||
{
|
||||
if (assignParent.Left != memberAccess)
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
// If we're being invoked...
|
||||
case InvocationExpressionSyntax:
|
||||
break;
|
||||
|
||||
// Otherwise, do nothing.
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the friend attribute
|
||||
var friendAttr = context.Compilation.GetTypeByMetadataName(FriendAttribute);
|
||||
|
||||
// Get the type that is containing this expression, or, the class where this is happening.
|
||||
if (context.ContainingSymbol?.ContainingType is not { } containingType)
|
||||
return;
|
||||
|
||||
// We check all of our children and get only the identifiers.
|
||||
foreach (var identifier in memberAccess.ChildNodes().Select(node => node as IdentifierNameSyntax))
|
||||
{
|
||||
if (identifier == null) continue;
|
||||
|
||||
// Get the type info of the identifier, so we can check the attributes...
|
||||
if (context.SemanticModel.GetTypeInfo(identifier).ConvertedType is not { } type)
|
||||
continue;
|
||||
|
||||
// Same-type access is always fine.
|
||||
if (SymbolEqualityComparer.Default.Equals(type, containingType))
|
||||
continue;
|
||||
|
||||
// Finally, get all attributes of the type, to check if we have any friend classes.
|
||||
foreach (var attribute in type.GetAttributes())
|
||||
{
|
||||
// If the attribute isn't the friend attribute, continue.
|
||||
if (!SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, friendAttr))
|
||||
continue;
|
||||
|
||||
// Check all types allowed in the friend attribute. (We assume there's only one constructor arg.)
|
||||
foreach (var constant in attribute.ConstructorArguments[0].Values)
|
||||
{
|
||||
// Check if the value is a type...
|
||||
if (constant.Value is not INamedTypeSymbol t)
|
||||
continue;
|
||||
|
||||
// If we find that the containing class is specified in the attribute, return! All is good.
|
||||
if (InheritsFromOrEquals(containingType, t))
|
||||
return;
|
||||
}
|
||||
|
||||
// Not in a friend class! Report an error.
|
||||
context.ReportDiagnostic(
|
||||
Diagnostic.Create(Rule, context.Node.GetLocation(),
|
||||
$"{context.Node.ToString().Split('.').LastOrDefault()}", $"{type.Name}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool InheritsFromOrEquals(INamedTypeSymbol type, INamedTypeSymbol baseType)
|
||||
{
|
||||
foreach (var otherType in GetBaseTypesAndThis(type))
|
||||
{
|
||||
if (SymbolEqualityComparer.Default.Equals(otherType, baseType))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private IEnumerable<INamedTypeSymbol> GetBaseTypesAndThis(INamedTypeSymbol namedType)
|
||||
{
|
||||
var current = namedType;
|
||||
while (current != null)
|
||||
{
|
||||
yield return current;
|
||||
current = current.BaseType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
171
Robust.Analyzers/NotNullableFlagAnalyzer.cs
Normal file
171
Robust.Analyzers/NotNullableFlagAnalyzer.cs
Normal file
@@ -0,0 +1,171 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Microsoft.CodeAnalysis.Operations;
|
||||
|
||||
namespace Robust.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public sealed class NotNullableFlagAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
private const string Attribute = "Robust.Shared.Analyzers.NotNullableFlagAttribute";
|
||||
|
||||
private static readonly DiagnosticDescriptor NotNullableNotSetRule = new (
|
||||
Diagnostics.IdNotNullableFlagNotSet,
|
||||
"Not Nullable Flag not set",
|
||||
"Class type parameter {0} is not annotated as nullable and notNullableOverride is not set to true",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Assign true to notNullableOverride or specify the type parameter as nullable.");
|
||||
|
||||
private static readonly DiagnosticDescriptor InvalidNotNullableValueRule = new (
|
||||
Diagnostics.IdInvalidNotNullableFlagValue,
|
||||
"Not Nullable Flag wrongfully set",
|
||||
"Class type parameter {0} is annotated as nullable but notNullableOverride is set to true",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Remove the true assignment to notNullableOverride or remove the nullable specifier of the type parameter.");
|
||||
|
||||
private static readonly DiagnosticDescriptor InvalidNotNullableImplementationRule = new (
|
||||
Diagnostics.IdInvalidNotNullableFlagImplementation,
|
||||
"Invalid NotNullable flag implementation.",
|
||||
"NotNullable flag is either not typed as bool, or does not have a default value equaling false",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Ensure that the notNullable flag is typed bool and has false set as a default value.");
|
||||
|
||||
private static readonly DiagnosticDescriptor InvalidNotNullableTypeRule = new (
|
||||
Diagnostics.IdInvalidNotNullableFlagType,
|
||||
"Failed to resolve type parameter",
|
||||
"Failed to resolve type parameter \"{0}\".",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Use nameof to avoid typos.");
|
||||
|
||||
private static readonly DiagnosticDescriptor NotNullableFlagValueTypeRule = new (
|
||||
Diagnostics.IdNotNullableFlagValueType,
|
||||
"NotNullable flag not supported for value types.",
|
||||
"Value types as generic arguments are not supported for NotNullable flags",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Nullable value types are distinct at runtime when inspected with reflection. Therefore they are not supported for NotNullable flags.");
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
|
||||
ImmutableArray.Create(
|
||||
NotNullableNotSetRule,
|
||||
InvalidNotNullableValueRule,
|
||||
InvalidNotNullableImplementationRule,
|
||||
InvalidNotNullableTypeRule,
|
||||
NotNullableFlagValueTypeRule);
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterOperationAction(CheckNotNullableFlag, OperationKind.Invocation);
|
||||
}
|
||||
|
||||
private bool TryGetTypeArgument(IMethodSymbol methodSymbol, string typeParamName, out ITypeSymbol typeArgument)
|
||||
{
|
||||
for (var index = 0; index < methodSymbol.TypeParameters.Length; index++)
|
||||
{
|
||||
if (methodSymbol.TypeParameters[index].Name != typeParamName)
|
||||
continue;
|
||||
|
||||
typeArgument = methodSymbol.TypeArguments[index];
|
||||
return true;
|
||||
}
|
||||
|
||||
typeArgument = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
private void CheckNotNullableFlag(OperationAnalysisContext context)
|
||||
{
|
||||
if (context.Operation is not IInvocationOperation invocationOperation || !invocationOperation.TargetMethod.IsGenericMethod)
|
||||
return;
|
||||
|
||||
var attribute = context.Compilation.GetTypeByMetadataName(Attribute);
|
||||
var @bool = context.Compilation.GetSpecialType(SpecialType.System_Boolean);
|
||||
|
||||
foreach (var argument in invocationOperation.Arguments)
|
||||
{
|
||||
if(argument.Parameter == null) continue;
|
||||
|
||||
foreach (var attributeData in argument.Parameter.GetAttributes())
|
||||
{
|
||||
if (!SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attribute))
|
||||
continue;
|
||||
|
||||
if (!SymbolEqualityComparer.Default.Equals(argument.Parameter.Type, @bool) ||
|
||||
!argument.Parameter.HasExplicitDefaultValue ||
|
||||
argument.Parameter.ExplicitDefaultValue as bool? != false)
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(
|
||||
InvalidNotNullableImplementationRule,
|
||||
argument.Parameter.Locations[0]));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!TryGetTypeArgument(invocationOperation.TargetMethod,
|
||||
attributeData.ConstructorArguments[0].Value as string, out var typeArgument))
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(
|
||||
InvalidNotNullableTypeRule,
|
||||
argument.Parameter.Locations[0],
|
||||
attributeData.ConstructorArguments[0].Value as string));
|
||||
break;
|
||||
}
|
||||
|
||||
//until i find a way to implement it sanely, generic calls are exempt from this attribute
|
||||
if(typeArgument is ITypeParameterSymbol) break;
|
||||
|
||||
//dont ask me why, argument.ConstantValue just straight up doesnt work.
|
||||
//i still kept it in here as a fallback, incase it ever starts working again lol -<paul
|
||||
var constantValue = (argument.Value as ILiteralOperation)?.ConstantValue ?? argument.ConstantValue;
|
||||
|
||||
if (typeArgument.IsValueType)
|
||||
{
|
||||
if (argument.ArgumentKind != ArgumentKind.DefaultValue)
|
||||
{
|
||||
//todo diagnostic only use for struct types
|
||||
context.ReportDiagnostic(Diagnostic.Create(
|
||||
NotNullableFlagValueTypeRule,
|
||||
argument.Syntax.GetLocation()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (typeArgument.NullableAnnotation == NullableAnnotation.None ||
|
||||
(argument.ArgumentKind != ArgumentKind.DefaultValue && !constantValue.HasValue))
|
||||
break;
|
||||
|
||||
var flagValue = argument.ArgumentKind != ArgumentKind.DefaultValue ||
|
||||
constantValue.Value as bool? == true;
|
||||
|
||||
var nullable = typeArgument.NullableAnnotation == NullableAnnotation.Annotated;
|
||||
|
||||
if (nullable && flagValue)
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(InvalidNotNullableValueRule,
|
||||
argument.Syntax.GetLocation(),
|
||||
typeArgument));
|
||||
}
|
||||
else if (!nullable && !flagValue)
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(NotNullableNotSetRule,
|
||||
argument.Syntax.GetLocation(),
|
||||
typeArgument));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
238
Robust.Analyzers/PreferGenericVariantAnalyzer.cs
Normal file
238
Robust.Analyzers/PreferGenericVariantAnalyzer.cs
Normal file
@@ -0,0 +1,238 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CodeActions;
|
||||
using Microsoft.CodeAnalysis.CodeFixes;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Microsoft.CodeAnalysis.Operations;
|
||||
|
||||
namespace Robust.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public sealed class PreferGenericVariantAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
private const string AttributeType = "Robust.Shared.Analyzers.PreferGenericVariantAttribute";
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
|
||||
UseGenericVariantDescriptor, UseGenericVariantInvalidUsageDescriptor,
|
||||
UseGenericVariantAttributeValueErrorDescriptor);
|
||||
|
||||
private static readonly DiagnosticDescriptor UseGenericVariantDescriptor = new(
|
||||
Diagnostics.IdUseGenericVariant,
|
||||
"Consider using the generic variant of this method",
|
||||
"Consider using the generic variant of this method to avoid potential allocations",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Warning,
|
||||
true,
|
||||
"Consider using the generic variant of this method to avoid potential allocations.");
|
||||
|
||||
private static readonly DiagnosticDescriptor UseGenericVariantInvalidUsageDescriptor = new(
|
||||
Diagnostics.IdUseGenericVariantInvalidUsage,
|
||||
"Invalid generic variant provided",
|
||||
"Generic variant provided mismatches the amount of type parameters of non-generic variant",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"The non-generic variant should have at least as many type parameter at the beginning of the method as there are generic type parameters on the generic variant.");
|
||||
|
||||
private static readonly DiagnosticDescriptor UseGenericVariantAttributeValueErrorDescriptor = new(
|
||||
Diagnostics.IdUseGenericVariantAttributeValueError,
|
||||
"Failed resolving generic variant value",
|
||||
"Failed resolving generic variant value: {0}",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true,
|
||||
"Consider using nameof to avoid any typos.");
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.ReportDiagnostics | GeneratedCodeAnalysisFlags.Analyze);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterOperationAction(CheckForGenericVariant, OperationKind.Invocation);
|
||||
}
|
||||
|
||||
private void CheckForGenericVariant(OperationAnalysisContext obj)
|
||||
{
|
||||
if(obj.Operation is not IInvocationOperation invocationOperation) return;
|
||||
|
||||
var preferGenericAttribute = obj.Compilation.GetTypeByMetadataName(AttributeType);
|
||||
|
||||
string genericVariant = null;
|
||||
AttributeData foundAttribute = null;
|
||||
foreach (var attribute in invocationOperation.TargetMethod.GetAttributes())
|
||||
{
|
||||
if (!SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, preferGenericAttribute))
|
||||
continue;
|
||||
|
||||
genericVariant = attribute.ConstructorArguments[0].Value as string ?? invocationOperation.TargetMethod.Name;
|
||||
foundAttribute = attribute;
|
||||
break;
|
||||
}
|
||||
|
||||
if(genericVariant == null) return;
|
||||
|
||||
var maxTypeParams = 0;
|
||||
var typeTypeSymbol = obj.Compilation.GetTypeByMetadataName("System.Type");
|
||||
foreach (var parameter in invocationOperation.TargetMethod.Parameters)
|
||||
{
|
||||
if(!SymbolEqualityComparer.Default.Equals(parameter.Type, typeTypeSymbol)) break;
|
||||
|
||||
maxTypeParams++;
|
||||
}
|
||||
|
||||
if (maxTypeParams == 0)
|
||||
{
|
||||
obj.ReportDiagnostic(
|
||||
Diagnostic.Create(UseGenericVariantInvalidUsageDescriptor,
|
||||
foundAttribute.ApplicationSyntaxReference?.GetSyntax().GetLocation()));
|
||||
return;
|
||||
}
|
||||
|
||||
IMethodSymbol genericVariantMethod = null;
|
||||
foreach (var member in invocationOperation.TargetMethod.ContainingType.GetMembers())
|
||||
{
|
||||
if (member is not IMethodSymbol methodSymbol
|
||||
|| methodSymbol.Name != genericVariant
|
||||
|| !methodSymbol.IsGenericMethod
|
||||
|| methodSymbol.TypeParameters.Length > maxTypeParams
|
||||
|| methodSymbol.Parameters.Length > invocationOperation.TargetMethod.Parameters.Length - methodSymbol.TypeParameters.Length
|
||||
) continue;
|
||||
|
||||
var typeParamCount = methodSymbol.TypeParameters.Length;
|
||||
var failedParamComparison = false;
|
||||
var objType = obj.Compilation.GetSpecialType(SpecialType.System_Object);
|
||||
for (int i = 0; i < methodSymbol.Parameters.Length; i++)
|
||||
{
|
||||
if (methodSymbol.Parameters[i].Type is ITypeParameterSymbol && SymbolEqualityComparer.Default.Equals(invocationOperation.TargetMethod.Parameters[i + typeParamCount].Type, objType))
|
||||
continue;
|
||||
|
||||
if (!SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[i].Type,
|
||||
invocationOperation.TargetMethod.Parameters[i + typeParamCount].Type))
|
||||
{
|
||||
failedParamComparison = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(failedParamComparison) continue;
|
||||
|
||||
genericVariantMethod = methodSymbol;
|
||||
}
|
||||
|
||||
if (genericVariantMethod == null)
|
||||
{
|
||||
obj.ReportDiagnostic(Diagnostic.Create(
|
||||
UseGenericVariantAttributeValueErrorDescriptor,
|
||||
foundAttribute.ApplicationSyntaxReference?.GetSyntax().GetLocation(),
|
||||
genericVariant));
|
||||
return;
|
||||
}
|
||||
|
||||
var typeOperands = new string[genericVariantMethod.TypeParameters.Length];
|
||||
for (var i = 0; i < genericVariantMethod.TypeParameters.Length; i++)
|
||||
{
|
||||
switch (invocationOperation.Arguments[i].Value)
|
||||
{
|
||||
//todo figure out if ILocalReferenceOperation, IPropertyReferenceOperation or IFieldReferenceOperation is referencing static typeof assignments
|
||||
case ITypeOfOperation typeOfOperation:
|
||||
typeOperands[i] = typeOfOperation.TypeOperand.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
|
||||
continue;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
obj.ReportDiagnostic(Diagnostic.Create(
|
||||
UseGenericVariantDescriptor,
|
||||
invocationOperation.Syntax.GetLocation(),
|
||||
ImmutableDictionary.CreateRange(new Dictionary<string, string>()
|
||||
{
|
||||
{"typeOperands", string.Join(",", typeOperands)}
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
[ExportCodeFixProvider(LanguageNames.CSharp)]
|
||||
public class PreferGenericVariantCodeFixProvider : CodeFixProvider
|
||||
{
|
||||
private static string Title(string method, string[] types) => $"Use {method}<{string.Join(",", types)}>.";
|
||||
|
||||
public override FixAllProvider GetFixAllProvider()
|
||||
{
|
||||
return WellKnownFixAllProviders.BatchFixer;
|
||||
}
|
||||
|
||||
public override async Task RegisterCodeFixesAsync(CodeFixContext context)
|
||||
{
|
||||
var root = await context.Document.GetSyntaxRootAsync();
|
||||
if(root == null) return;
|
||||
|
||||
foreach (var diagnostic in context.Diagnostics)
|
||||
{
|
||||
if (!diagnostic.Properties.TryGetValue("typeOperands", out var typeOperandsRaw)
|
||||
|| typeOperandsRaw == null) continue;
|
||||
|
||||
var node = root.FindNode(diagnostic.Location.SourceSpan);
|
||||
if (node is ArgumentSyntax argumentSyntax)
|
||||
node = argumentSyntax.Expression;
|
||||
|
||||
if(node is not InvocationExpressionSyntax invocationExpression)
|
||||
continue;
|
||||
|
||||
var typeOperands = typeOperandsRaw.Split(',');
|
||||
|
||||
context.RegisterCodeFix(
|
||||
CodeAction.Create(
|
||||
Title(invocationExpression.Expression.ToString(), typeOperands),
|
||||
c => FixAsync(context.Document, invocationExpression, typeOperands, c),
|
||||
Title(invocationExpression.Expression.ToString(), typeOperands)),
|
||||
diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<Document> FixAsync(
|
||||
Document contextDocument,
|
||||
InvocationExpressionSyntax invocationExpression,
|
||||
string[] typeOperands,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var memberAccess = (MemberAccessExpressionSyntax)invocationExpression.Expression;
|
||||
|
||||
var root = (CompilationUnitSyntax) await contextDocument.GetSyntaxRootAsync(cancellationToken);
|
||||
|
||||
var arguments = new ArgumentSyntax[invocationExpression.ArgumentList.Arguments.Count - typeOperands.Length];
|
||||
var types = new TypeSyntax[typeOperands.Length];
|
||||
|
||||
for (int i = 0; i < typeOperands.Length; i++)
|
||||
{
|
||||
types[i] = ((TypeOfExpressionSyntax)invocationExpression.ArgumentList.Arguments[i].Expression).Type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Array.Copy(
|
||||
invocationExpression.ArgumentList.Arguments.ToArray(),
|
||||
typeOperands.Length,
|
||||
arguments,
|
||||
0,
|
||||
arguments.Length);
|
||||
|
||||
memberAccess = memberAccess.WithName(SyntaxFactory.GenericName(memberAccess.Name.Identifier,
|
||||
SyntaxFactory.TypeArgumentList(SyntaxFactory.SeparatedList(types))));
|
||||
|
||||
root = root!.ReplaceNode(invocationExpression,
|
||||
invocationExpression.WithArgumentList(invocationExpression.ArgumentList.WithArguments(SyntaxFactory.SeparatedList(arguments)))
|
||||
.WithExpression(memberAccess));
|
||||
|
||||
return contextDocument.WithSyntaxRoot(root);
|
||||
}
|
||||
|
||||
public override ImmutableArray<string> FixableDiagnosticIds =>
|
||||
ImmutableArray.Create(Diagnostics.IdUseGenericVariant);
|
||||
}
|
||||
@@ -6,9 +6,25 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.8.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Needed for NotNullableFlagAnalyzer. -->
|
||||
<Compile Include="..\Robust.Shared\Analyzers\NotNullableFlagAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Needed for FriendAnalyzer. -->
|
||||
<Compile Include="..\Robust.Shared\Analyzers\AccessAttribute.cs" />
|
||||
<Compile Include="..\Robust.Shared\Analyzers\AccessPermissions.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Needed for PreferGenericVariantAnalyzer. -->
|
||||
<Compile Include="..\Robust.Shared\Analyzers\PreferGenericVariantAttribute.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
44
Robust.Analyzers/TaskResultAnalyzer.cs
Normal file
44
Robust.Analyzers/TaskResultAnalyzer.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Microsoft.CodeAnalysis.Operations;
|
||||
|
||||
namespace Robust.Analyzers;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public sealed class TaskResultAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
[SuppressMessage("ReSharper", "RS2008")]
|
||||
private static readonly DiagnosticDescriptor ResultRule = new DiagnosticDescriptor(
|
||||
Diagnostics.IdTaskResult,
|
||||
"Risk of deadlock from accessing Task<T>.Result",
|
||||
"Accessing Task<T>.Result is dangerous and can cause deadlocks in some contexts. If you understand how this works and are certain that you aren't causing a deadlock here, mute this error with #pragma.",
|
||||
"Usage",
|
||||
DiagnosticSeverity.Error,
|
||||
true);
|
||||
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
|
||||
ImmutableArray.Create(ResultRule);
|
||||
|
||||
public override void Initialize(AnalysisContext context)
|
||||
{
|
||||
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
|
||||
context.EnableConcurrentExecution();
|
||||
context.RegisterOperationAction(Check, OperationKind.PropertyReference);
|
||||
}
|
||||
|
||||
private static void Check(OperationAnalysisContext context)
|
||||
{
|
||||
var taskType = context.Compilation.GetTypeByMetadataName("System.Threading.Tasks.Task`1");
|
||||
|
||||
var operation = (IPropertyReferenceOperation) context.Operation;
|
||||
var member = operation.Member;
|
||||
|
||||
if (member.Name == "Result" && taskType.Equals(member.ContainingType.ConstructedFrom, SymbolEqualityComparer.Default))
|
||||
{
|
||||
var diag = Diagnostic.Create(ResultRule, operation.Syntax.GetLocation());
|
||||
context.ReportDiagnostic(diag);
|
||||
}
|
||||
}
|
||||
}
|
||||
53
Robust.Benchmarks/Configs/DefaultSQLConfig.cs
Normal file
53
Robust.Benchmarks/Configs/DefaultSQLConfig.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using BenchmarkDotNet.Analysers;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Exporters;
|
||||
using BenchmarkDotNet.Filters;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Order;
|
||||
using BenchmarkDotNet.Reports;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
namespace Robust.Benchmarks.Configs;
|
||||
|
||||
public sealed class DefaultSQLConfig : IConfig
|
||||
{
|
||||
public static readonly IConfig Instance = new DefaultSQLConfig();
|
||||
|
||||
private DefaultSQLConfig(){}
|
||||
|
||||
public IEnumerable<IExporter> GetExporters()
|
||||
{
|
||||
yield return SQLExporter.Default;
|
||||
}
|
||||
|
||||
public IEnumerable<IColumnProvider> GetColumnProviders() => DefaultConfig.Instance.GetColumnProviders();
|
||||
|
||||
public IEnumerable<ILogger> GetLoggers() => DefaultConfig.Instance.GetLoggers();
|
||||
|
||||
public IEnumerable<IDiagnoser> GetDiagnosers() => DefaultConfig.Instance.GetDiagnosers();
|
||||
|
||||
public IEnumerable<IAnalyser> GetAnalysers() => DefaultConfig.Instance.GetAnalysers();
|
||||
|
||||
public IEnumerable<Job> GetJobs() => DefaultConfig.Instance.GetJobs();
|
||||
|
||||
public IEnumerable<IValidator> GetValidators() => DefaultConfig.Instance.GetValidators();
|
||||
|
||||
public IEnumerable<HardwareCounter> GetHardwareCounters() => DefaultConfig.Instance.GetHardwareCounters();
|
||||
|
||||
public IEnumerable<IFilter> GetFilters() => DefaultConfig.Instance.GetFilters();
|
||||
|
||||
public IEnumerable<BenchmarkLogicalGroupRule> GetLogicalGroupRules() => DefaultConfig.Instance.GetLogicalGroupRules();
|
||||
|
||||
public IOrderer Orderer => DefaultConfig.Instance.Orderer!;
|
||||
public SummaryStyle SummaryStyle => DefaultConfig.Instance.SummaryStyle;
|
||||
public ConfigUnionRule UnionRule => DefaultConfig.Instance.UnionRule;
|
||||
public string ArtifactsPath => DefaultConfig.Instance.ArtifactsPath;
|
||||
public CultureInfo CultureInfo => DefaultConfig.Instance.CultureInfo!;
|
||||
public ConfigOptions Options => DefaultConfig.Instance.Options;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.UnitTesting.Server;
|
||||
|
||||
namespace Robust.Benchmarks.EntityManager;
|
||||
|
||||
[Virtual]
|
||||
public class AddRemoveComponentBenchmark
|
||||
{
|
||||
private ISimulation _simulation = default!;
|
||||
private IEntityManager _entityManager = default!;
|
||||
|
||||
[UsedImplicitly]
|
||||
[Params(1, 10, 100, 1000)]
|
||||
public int N;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
_simulation = RobustServerSimulation
|
||||
.NewSimulation()
|
||||
.RegisterComponents(f => f.RegisterClass<A>())
|
||||
.InitializeInstance();
|
||||
|
||||
_entityManager = _simulation.Resolve<IEntityManager>();
|
||||
|
||||
var coords = new MapCoordinates(0, 0, new MapId(1));
|
||||
_simulation.AddMap(coords.MapId);
|
||||
|
||||
for (var i = 0; i < N; i++)
|
||||
{
|
||||
_entityManager.SpawnEntity(null, coords);
|
||||
}
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void AddRemoveComponent()
|
||||
{
|
||||
for (var i = 2; i <= N+1; i++)
|
||||
{
|
||||
var uid = new EntityUid(i);
|
||||
_entityManager.AddComponent<A>(uid);
|
||||
_entityManager.RemoveComponent<A>(uid);
|
||||
}
|
||||
}
|
||||
|
||||
[ComponentProtoName("A")]
|
||||
public sealed class A : Component
|
||||
{
|
||||
}
|
||||
}
|
||||
1081
Robust.Benchmarks/EntityManager/ArchetypeComponentAccessBenchmark.cs
Normal file
1081
Robust.Benchmarks/EntityManager/ArchetypeComponentAccessBenchmark.cs
Normal file
File diff suppressed because it is too large
Load Diff
225
Robust.Benchmarks/EntityManager/ComponentIndexBenchmark.cs
Normal file
225
Robust.Benchmarks/EntityManager/ComponentIndexBenchmark.cs
Normal file
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Robust.Benchmarks.EntityManager;
|
||||
|
||||
public class ComponentIndexBenchmark
|
||||
{
|
||||
// Just a bunch of types to bloat the test lists.
|
||||
|
||||
private readonly CompIndexFetcher _compIndexFetcherDirect;
|
||||
private readonly IFetcher _compIndexFetcher;
|
||||
private readonly DictFetcher _dictFetcherDirect;
|
||||
private readonly IFetcher _dictFetcher;
|
||||
|
||||
|
||||
public ComponentIndexBenchmark()
|
||||
{
|
||||
_compIndexFetcherDirect = new CompIndexFetcher();
|
||||
_compIndexFetcher = _compIndexFetcherDirect;
|
||||
_dictFetcherDirect = new DictFetcher();
|
||||
_dictFetcher = _dictFetcherDirect;
|
||||
}
|
||||
|
||||
[GlobalSetup]
|
||||
public void Setup()
|
||||
{
|
||||
var types = typeof(ComponentIndexBenchmark)
|
||||
.GetNestedTypes(BindingFlags.NonPublic)
|
||||
.Where(t => t.Name.StartsWith("TestType"))
|
||||
.ToArray();
|
||||
|
||||
_compIndexFetcher.Init(types);
|
||||
_dictFetcher.Init(types);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchCompIndex() => _compIndexFetcher.Get<TestType50>();
|
||||
|
||||
[Benchmark]
|
||||
public int BenchDict() => _dictFetcher.Get<TestType50>();
|
||||
|
||||
[Benchmark]
|
||||
public int BenchCompIndexDirect() => _compIndexFetcherDirect.Get<TestType50>();
|
||||
|
||||
[Benchmark]
|
||||
public int BenchDictDirect() => _dictFetcherDirect.Get<TestType50>();
|
||||
|
||||
private static CompIdx ArrayIndexFor<T>() => CompArrayIndex<T>.Idx;
|
||||
|
||||
private static int _compIndexMaster = -1;
|
||||
|
||||
private static class CompArrayIndex<T>
|
||||
{
|
||||
// ReSharper disable once StaticMemberInGenericType
|
||||
public static readonly CompIdx Idx = new(Interlocked.Increment(ref _compIndexMaster));
|
||||
}
|
||||
|
||||
private static CompIdx GetCompIdIndex(Type type)
|
||||
{
|
||||
return (CompIdx)typeof(CompArrayIndex<>)
|
||||
.MakeGenericType(type)
|
||||
.GetField(nameof(CompArrayIndex<int>.Idx), BindingFlags.Static | BindingFlags.Public)!
|
||||
.GetValue(null)!;
|
||||
}
|
||||
|
||||
private interface IFetcher
|
||||
{
|
||||
void Init(Type[] types);
|
||||
|
||||
int Get<T>();
|
||||
}
|
||||
|
||||
private sealed class CompIndexFetcher : IFetcher
|
||||
{
|
||||
private int[] _values = Array.Empty<int>();
|
||||
|
||||
public void Init(Type[] types)
|
||||
{
|
||||
var max = types.Max(t => GetCompIdIndex(t).Value);
|
||||
|
||||
_values = new int[max + 1];
|
||||
|
||||
var i = 0;
|
||||
foreach (var type in types)
|
||||
{
|
||||
_values[GetCompIdIndex(type).Value] = i++;
|
||||
}
|
||||
}
|
||||
|
||||
public int Get<T>()
|
||||
{
|
||||
return _values[CompArrayIndex<T>.Idx.Value];
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class DictFetcher : IFetcher
|
||||
{
|
||||
private readonly Dictionary<Type, int> _values = new();
|
||||
|
||||
public void Init(Type[] types)
|
||||
{
|
||||
var i = 0;
|
||||
foreach (var type in types)
|
||||
{
|
||||
_values[type] = i++;
|
||||
}
|
||||
}
|
||||
|
||||
public int Get<T>()
|
||||
{
|
||||
return _values[typeof(T)];
|
||||
}
|
||||
}
|
||||
|
||||
// Just a bunch of types to pad the size of the arrays and such.
|
||||
|
||||
// @formatter:off
|
||||
// ReSharper disable UnusedType.Local
|
||||
private sealed class TestType1{}
|
||||
private sealed class TestType2{}
|
||||
private sealed class TestType3{}
|
||||
private sealed class TestType4{}
|
||||
private sealed class TestType5{}
|
||||
private sealed class TestType6{}
|
||||
private sealed class TestType7{}
|
||||
private sealed class TestType8{}
|
||||
private sealed class TestType9{}
|
||||
private sealed class TestType10{}
|
||||
private sealed class TestType11{}
|
||||
private sealed class TestType12{}
|
||||
private sealed class TestType13{}
|
||||
private sealed class TestType14{}
|
||||
private sealed class TestType15{}
|
||||
private sealed class TestType16{}
|
||||
private sealed class TestType17{}
|
||||
private sealed class TestType18{}
|
||||
private sealed class TestType19{}
|
||||
private sealed class TestType20{}
|
||||
private sealed class TestType21{}
|
||||
private sealed class TestType22{}
|
||||
private sealed class TestType23{}
|
||||
private sealed class TestType24{}
|
||||
private sealed class TestType25{}
|
||||
private sealed class TestType26{}
|
||||
private sealed class TestType27{}
|
||||
private sealed class TestType28{}
|
||||
private sealed class TestType29{}
|
||||
private sealed class TestType30{}
|
||||
private sealed class TestType31{}
|
||||
private sealed class TestType32{}
|
||||
private sealed class TestType33{}
|
||||
private sealed class TestType34{}
|
||||
private sealed class TestType35{}
|
||||
private sealed class TestType36{}
|
||||
private sealed class TestType37{}
|
||||
private sealed class TestType38{}
|
||||
private sealed class TestType39{}
|
||||
private sealed class TestType40{}
|
||||
private sealed class TestType41{}
|
||||
private sealed class TestType42{}
|
||||
private sealed class TestType43{}
|
||||
private sealed class TestType44{}
|
||||
private sealed class TestType45{}
|
||||
private sealed class TestType46{}
|
||||
private sealed class TestType47{}
|
||||
private sealed class TestType48{}
|
||||
private sealed class TestType49{}
|
||||
private sealed class TestType50{}
|
||||
private sealed class TestType51{}
|
||||
private sealed class TestType52{}
|
||||
private sealed class TestType53{}
|
||||
private sealed class TestType54{}
|
||||
private sealed class TestType55{}
|
||||
private sealed class TestType56{}
|
||||
private sealed class TestType57{}
|
||||
private sealed class TestType58{}
|
||||
private sealed class TestType59{}
|
||||
private sealed class TestType60{}
|
||||
private sealed class TestType61{}
|
||||
private sealed class TestType62{}
|
||||
private sealed class TestType63{}
|
||||
private sealed class TestType64{}
|
||||
private sealed class TestType65{}
|
||||
private sealed class TestType66{}
|
||||
private sealed class TestType67{}
|
||||
private sealed class TestType68{}
|
||||
private sealed class TestType69{}
|
||||
private sealed class TestType70{}
|
||||
private sealed class TestType71{}
|
||||
private sealed class TestType72{}
|
||||
private sealed class TestType73{}
|
||||
private sealed class TestType74{}
|
||||
private sealed class TestType75{}
|
||||
private sealed class TestType76{}
|
||||
private sealed class TestType77{}
|
||||
private sealed class TestType78{}
|
||||
private sealed class TestType79{}
|
||||
private sealed class TestType80{}
|
||||
private sealed class TestType81{}
|
||||
private sealed class TestType82{}
|
||||
private sealed class TestType83{}
|
||||
private sealed class TestType84{}
|
||||
private sealed class TestType85{}
|
||||
private sealed class TestType86{}
|
||||
private sealed class TestType87{}
|
||||
private sealed class TestType88{}
|
||||
private sealed class TestType89{}
|
||||
private sealed class TestType90{}
|
||||
private sealed class TestType91{}
|
||||
private sealed class TestType92{}
|
||||
private sealed class TestType93{}
|
||||
private sealed class TestType94{}
|
||||
private sealed class TestType95{}
|
||||
private sealed class TestType96{}
|
||||
private sealed class TestType97{}
|
||||
private sealed class TestType98{}
|
||||
private sealed class TestType99{}
|
||||
// ReSharper restore UnusedType.Local
|
||||
// @formatter:on
|
||||
}
|
||||
53
Robust.Benchmarks/EntityManager/ComponentPassingBenchmark.cs
Normal file
53
Robust.Benchmarks/EntityManager/ComponentPassingBenchmark.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Shared.Analyzers;
|
||||
using static Robust.Benchmarks.EntityManager.ArchetypeComponentAccessBenchmark;
|
||||
|
||||
namespace Robust.Benchmarks.EntityManager;
|
||||
|
||||
[MemoryDiagnoser]
|
||||
[Virtual]
|
||||
public class ArrayAccessBenchmark
|
||||
{
|
||||
[Params(new[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9})]
|
||||
public int[] Array = default!;
|
||||
|
||||
[Params(5)]
|
||||
public int Element;
|
||||
|
||||
[Params(500)]
|
||||
public int Handle;
|
||||
|
||||
public Archetype<int, int, int, int, int, int, int, int, int, int> Archetype = default!;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
Archetype = new Archetype<int, int, int, int, int, int, int, int, int, int>(1000);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int? GetArrayElement()
|
||||
{
|
||||
return Consume();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int? GetExisting()
|
||||
{
|
||||
return Consume(Element);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int? GetArchetype()
|
||||
{
|
||||
return Consume(Archetype.GetComponentUnsafeHandle<int>(Handle));
|
||||
}
|
||||
|
||||
private int? Consume(int? value = null)
|
||||
{
|
||||
if (value == null)
|
||||
value = Array[5];
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
61
Robust.Benchmarks/EntityManager/GetComponentBenchmark.cs
Normal file
61
Robust.Benchmarks/EntityManager/GetComponentBenchmark.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.UnitTesting.Server;
|
||||
|
||||
namespace Robust.Benchmarks.EntityManager;
|
||||
|
||||
[Virtual]
|
||||
public class GetComponentBenchmark
|
||||
{
|
||||
private ISimulation _simulation = default!;
|
||||
private IEntityManager _entityManager = default!;
|
||||
|
||||
[UsedImplicitly]
|
||||
[Params(1, 10, 100, 1000)]
|
||||
public int N;
|
||||
|
||||
public A[] Comps = default!;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
_simulation = RobustServerSimulation
|
||||
.NewSimulation()
|
||||
.RegisterComponents(f => f.RegisterClass<A>())
|
||||
.InitializeInstance();
|
||||
|
||||
_entityManager = _simulation.Resolve<IEntityManager>();
|
||||
|
||||
Comps = new A[N+2];
|
||||
|
||||
var coords = new MapCoordinates(0, 0, new MapId(1));
|
||||
_simulation.AddMap(coords.MapId);
|
||||
|
||||
for (var i = 0; i < N; i++)
|
||||
{
|
||||
var uid = _entityManager.SpawnEntity(null, coords);
|
||||
_entityManager.AddComponent<A>(uid);
|
||||
}
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public A[] GetComponent()
|
||||
{
|
||||
for (var i = 2; i <= N+1; i++)
|
||||
{
|
||||
Comps[i] = _entityManager.GetComponent<A>(new EntityUid(i));
|
||||
}
|
||||
|
||||
// Return something so the JIT doesn't optimize out all the GetComponent calls.
|
||||
return Comps;
|
||||
}
|
||||
|
||||
[ComponentProtoName("A")]
|
||||
public sealed class A : Component
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.UnitTesting.Server;
|
||||
|
||||
namespace Robust.Benchmarks.EntityManager;
|
||||
|
||||
[Virtual]
|
||||
public class SpawnDeleteEntityBenchmark
|
||||
{
|
||||
private ISimulation _simulation = default!;
|
||||
private IEntityManager _entityManager = default!;
|
||||
|
||||
private MapCoordinates _mapCoords = MapCoordinates.Nullspace;
|
||||
private EntityCoordinates _entCoords = EntityCoordinates.Invalid;
|
||||
|
||||
[UsedImplicitly]
|
||||
[Params(1, 10, 100, 1000)]
|
||||
public int N;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
_simulation = RobustServerSimulation
|
||||
.NewSimulation()
|
||||
.RegisterComponents(f => f.RegisterClass<A>())
|
||||
.InitializeInstance();
|
||||
|
||||
_entityManager = _simulation.Resolve<IEntityManager>();
|
||||
|
||||
_mapCoords = new MapCoordinates(0, 0, new MapId(1));
|
||||
var uid = _simulation.AddMap(_mapCoords.MapId);
|
||||
_entCoords = new EntityCoordinates(uid, 0, 0);
|
||||
}
|
||||
|
||||
[Benchmark(Baseline = true)]
|
||||
public void SpawnDeleteEntityMapCoords()
|
||||
{
|
||||
for (var i = 0; i < N; i++)
|
||||
{
|
||||
var uid = _entityManager.SpawnEntity(null, _mapCoords);
|
||||
_entityManager.DeleteEntity(uid);
|
||||
}
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void SpawnDeleteEntityEntCoords()
|
||||
{
|
||||
for (var i = 0; i < N; i++)
|
||||
{
|
||||
var uid = _entityManager.SpawnEntity(null, _entCoords);
|
||||
_entityManager.DeleteEntity(uid);
|
||||
}
|
||||
}
|
||||
|
||||
[ComponentProtoName("A")]
|
||||
public sealed class A : Component
|
||||
{
|
||||
}
|
||||
}
|
||||
227
Robust.Benchmarks/Exporters/SQLExporter.cs
Normal file
227
Robust.Benchmarks/Exporters/SQLExporter.cs
Normal file
@@ -0,0 +1,227 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using BenchmarkDotNet.Exporters;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Mathematics;
|
||||
using BenchmarkDotNet.Parameters;
|
||||
using BenchmarkDotNet.Reports;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Npgsql;
|
||||
using Npgsql.Internal;
|
||||
using Npgsql.Internal.TypeHandlers;
|
||||
using Npgsql.Internal.TypeHandling;
|
||||
|
||||
namespace Robust.Benchmarks.Exporters;
|
||||
|
||||
public sealed class SQLExporter : IExporter
|
||||
{
|
||||
private static readonly JsonSerializerOptions JsonSerializerOptions = new JsonSerializerOptions
|
||||
{
|
||||
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals
|
||||
};
|
||||
|
||||
public static readonly IExporter Default = new SQLExporter();
|
||||
|
||||
private SQLExporter(){}
|
||||
|
||||
public void ExportToLog(Summary summary, ILogger logger)
|
||||
{
|
||||
Export(summary, logger);
|
||||
}
|
||||
|
||||
public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
|
||||
{
|
||||
Export(summary, consoleLogger);
|
||||
return Array.Empty<string>();
|
||||
}
|
||||
|
||||
private bool TryGetEnvironmentVariable(string name, ILogger logger, [NotNullWhen(true)] out string? value)
|
||||
{
|
||||
value = Environment.GetEnvironmentVariable(name);
|
||||
if (value == null)
|
||||
logger.WriteError($"ROBUST_BENCHMARKS_ENABLE_SQL is set, but {name} is missing.");
|
||||
return value != null;
|
||||
}
|
||||
|
||||
private void Export(Summary summary, ILogger logger)
|
||||
{
|
||||
if (!TryGetEnvironmentVariable("ROBUST_BENCHMARKS_SQL_ADDRESS", logger, out var address) ||
|
||||
!TryGetEnvironmentVariable("ROBUST_BENCHMARKS_SQL_PORT", logger, out var rawPort) ||
|
||||
!TryGetEnvironmentVariable("ROBUST_BENCHMARKS_SQL_USER", logger, out var user) ||
|
||||
!TryGetEnvironmentVariable("ROBUST_BENCHMARKS_SQL_PASSWORD", logger, out var password) ||
|
||||
!TryGetEnvironmentVariable("ROBUST_BENCHMARKS_SQL_DATABASE", logger, out var db) ||
|
||||
!TryGetEnvironmentVariable("GITHUB_SHA", logger, out var gitHash))
|
||||
return;
|
||||
|
||||
if (!int.TryParse(rawPort, out var port))
|
||||
{
|
||||
logger.WriteError("Failed parsing ROBUST_BENCHMARKS_SQL_PORT to int.");
|
||||
return;
|
||||
}
|
||||
|
||||
var builder = new DbContextOptionsBuilder<BenchmarkContext>();
|
||||
var connectionString = new NpgsqlConnectionStringBuilder
|
||||
{
|
||||
Host = address,
|
||||
Port = port,
|
||||
Database = db,
|
||||
Username = user,
|
||||
Password = password
|
||||
}.ConnectionString;
|
||||
builder.UseNpgsql(connectionString);
|
||||
using var ctx = new BenchmarkContext(builder.Options);
|
||||
try
|
||||
{
|
||||
ctx.Database.OpenConnection();
|
||||
var con = (NpgsqlConnection) ctx.Database.GetDbConnection();
|
||||
con.TypeMapper.AddTypeResolverFactory(new JsonOverrideTypeHandlerResolverFactory(JsonSerializerOptions));
|
||||
|
||||
ctx.Database.Migrate();
|
||||
foreach (var run in BenchmarkRun.FromSummary(summary, gitHash))
|
||||
{
|
||||
ctx.BenchmarkRuns.Add(run);
|
||||
}
|
||||
ctx.SaveChanges();
|
||||
}
|
||||
finally
|
||||
{
|
||||
ctx.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public string Name => "sql";
|
||||
}
|
||||
|
||||
// https://github.com/npgsql/efcore.pg/issues/1107#issuecomment-945126627
|
||||
class JsonOverrideTypeHandlerResolverFactory : TypeHandlerResolverFactory
|
||||
{
|
||||
private readonly JsonSerializerOptions _options;
|
||||
|
||||
public JsonOverrideTypeHandlerResolverFactory(JsonSerializerOptions options)
|
||||
=> _options = options;
|
||||
|
||||
public override TypeHandlerResolver Create(NpgsqlConnector connector)
|
||||
=> new JsonOverrideTypeHandlerResolver(connector, _options);
|
||||
|
||||
public override string? GetDataTypeNameByClrType(Type clrType)
|
||||
=> null;
|
||||
|
||||
public override TypeMappingInfo? GetMappingByDataTypeName(string dataTypeName)
|
||||
=> null;
|
||||
|
||||
class JsonOverrideTypeHandlerResolver : TypeHandlerResolver
|
||||
{
|
||||
readonly JsonHandler _jsonbHandler;
|
||||
|
||||
internal JsonOverrideTypeHandlerResolver(NpgsqlConnector connector, JsonSerializerOptions options)
|
||||
=> _jsonbHandler ??= new JsonHandler(
|
||||
connector.DatabaseInfo.GetPostgresTypeByName("jsonb"),
|
||||
connector.TextEncoding,
|
||||
isJsonb: true,
|
||||
options);
|
||||
|
||||
public override NpgsqlTypeHandler? ResolveByDataTypeName(string typeName)
|
||||
=> typeName == "jsonb" ? _jsonbHandler : null;
|
||||
|
||||
public override NpgsqlTypeHandler? ResolveByClrType(Type type)
|
||||
// You can add any user-defined CLR types which you want mapped to jsonb
|
||||
=> type == typeof(JsonDocument) ? _jsonbHandler : null;
|
||||
|
||||
public override TypeMappingInfo? GetMappingByDataTypeName(string dataTypeName)
|
||||
=> null; // Let the built-in resolver do this
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class DesignTimeContextFactoryPostgres : IDesignTimeDbContextFactory<BenchmarkContext>
|
||||
{
|
||||
public BenchmarkContext CreateDbContext(string[] args)
|
||||
{
|
||||
var optionsBuilder = new DbContextOptionsBuilder<BenchmarkContext>();
|
||||
optionsBuilder.UseNpgsql("Server=localhost");
|
||||
return new BenchmarkContext(optionsBuilder.Options);
|
||||
}
|
||||
}
|
||||
|
||||
public class BenchmarkContext : DbContext
|
||||
{
|
||||
public DbSet<BenchmarkRun> BenchmarkRuns { get; set; } = default!;
|
||||
|
||||
public BenchmarkContext() { }
|
||||
public BenchmarkContext(DbContextOptions<BenchmarkContext> options) : base(options) { }
|
||||
}
|
||||
|
||||
public class BenchmarkRun
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string GitHash { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "timestamptz")] public DateTime RunDate { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string? ParameterMapping { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public BenchmarkRunParameter[]? ParameterMappingJson { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public Statistics Statistics { get; set; } = default!;
|
||||
|
||||
public static IEnumerable<BenchmarkRun> FromSummary(Summary summary, string gitHash)
|
||||
{
|
||||
var runDate = DateTime.UtcNow;
|
||||
|
||||
foreach (var benchmarkReport in summary.Reports)
|
||||
{
|
||||
var paramString = new StringBuilder();
|
||||
var parametersItems = benchmarkReport.BenchmarkCase.Parameters.Items;
|
||||
var runParameters = new BenchmarkRunParameter[parametersItems.Count];
|
||||
for (var i = 0; i < parametersItems.Count; i++)
|
||||
{
|
||||
runParameters[i] = new BenchmarkRunParameter(parametersItems[i]);
|
||||
paramString.Append(runParameters[i].ToString());
|
||||
if (i < parametersItems.Count - 1) paramString.Append(',');
|
||||
}
|
||||
|
||||
if (benchmarkReport.ResultStatistics == null)
|
||||
{
|
||||
Console.WriteLine($"err: No statistics available for {benchmarkReport.BenchmarkCase.Descriptor.DisplayInfo}!");
|
||||
continue;
|
||||
}
|
||||
|
||||
yield return new BenchmarkRun
|
||||
{
|
||||
Name = benchmarkReport.BenchmarkCase.Descriptor.DisplayInfo,
|
||||
RunDate = runDate,
|
||||
GitHash = gitHash,
|
||||
ParameterMapping = runParameters.Length > 0 ? paramString.ToString() : null,
|
||||
ParameterMappingJson = runParameters.Length > 0 ? runParameters : null,
|
||||
Statistics = benchmarkReport.ResultStatistics
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct BenchmarkRunParameter
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public object Value { get; set; } = default!;
|
||||
|
||||
public BenchmarkRunParameter(ParameterInstance instance)
|
||||
{
|
||||
Name = instance.Name;
|
||||
Value = instance.Value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Name}={Value}";
|
||||
}
|
||||
}
|
||||
55
Robust.Benchmarks/Migrations/20220328231938_InitialCreate.Designer.cs
generated
Normal file
55
Robust.Benchmarks/Migrations/20220328231938_InitialCreate.Designer.cs
generated
Normal file
@@ -0,0 +1,55 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
[DbContext(typeof(BenchmarkContext))]
|
||||
[Migration("20220328231938_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
|
||||
{
|
||||
b.Property<decimal>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("numeric(20,0)");
|
||||
|
||||
b.Property<string>("GitHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<BenchmarkRunReport[]>("Reports")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<DateTime>("RunDate")
|
||||
.HasColumnType("Date");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BenchmarkRuns");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Robust.Benchmarks/Migrations/20220328231938_InitialCreate.cs
Normal file
35
Robust.Benchmarks/Migrations/20220328231938_InitialCreate.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BenchmarkRuns",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
||||
GitHash = table.Column<string>(type: "text", nullable: false),
|
||||
RunDate = table.Column<DateTime>(type: "Date", nullable: false),
|
||||
Name = table.Column<string>(type: "text", nullable: false),
|
||||
Reports = table.Column<BenchmarkRunReport[]>(type: "jsonb", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BenchmarkRuns", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "BenchmarkRuns");
|
||||
}
|
||||
}
|
||||
}
|
||||
57
Robust.Benchmarks/Migrations/20220510131430_fix-pk.Designer.cs
generated
Normal file
57
Robust.Benchmarks/Migrations/20220510131430_fix-pk.Designer.cs
generated
Normal file
@@ -0,0 +1,57 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
[DbContext(typeof(BenchmarkContext))]
|
||||
[Migration("20220510131430_fix-pk")]
|
||||
partial class FixPK
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("GitHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<BenchmarkRunReport[]>("Reports")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<DateTime>("RunDate")
|
||||
.HasColumnType("timestamptz");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BenchmarkRuns");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Robust.Benchmarks/Migrations/20220510131430_fix-pk.cs
Normal file
51
Robust.Benchmarks/Migrations/20220510131430_fix-pk.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
public partial class FixPK : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "RunDate",
|
||||
table: "BenchmarkRuns",
|
||||
type: "timestamptz",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "Date");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Id",
|
||||
table: "BenchmarkRuns",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
oldClrType: typeof(decimal),
|
||||
oldType: "numeric(20,0)")
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "RunDate",
|
||||
table: "BenchmarkRuns",
|
||||
type: "Date",
|
||||
nullable: false,
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamptz");
|
||||
|
||||
migrationBuilder.AlterColumn<decimal>(
|
||||
name: "Id",
|
||||
table: "BenchmarkRuns",
|
||||
type: "numeric(20,0)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "integer")
|
||||
.OldAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Robust.Benchmarks/Migrations/20221009235705_db.Designer.cs
generated
Normal file
62
Robust.Benchmarks/Migrations/20221009235705_db.Designer.cs
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BenchmarkDotNet.Mathematics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
[DbContext(typeof(BenchmarkContext))]
|
||||
[Migration("20221009235705_db")]
|
||||
partial class DB
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("GitHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParameterMapping")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("RunDate")
|
||||
.HasColumnType("timestamptz");
|
||||
|
||||
b.Property<Statistics>("Statistics")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BenchmarkRuns");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Robust.Benchmarks/Migrations/20221009235705_db.cs
Normal file
36
Robust.Benchmarks/Migrations/20221009235705_db.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
public partial class DB : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Reports",
|
||||
table: "BenchmarkRuns",
|
||||
newName: "Statistics");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ParameterMapping",
|
||||
table: "BenchmarkRuns",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ParameterMapping",
|
||||
table: "BenchmarkRuns");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Statistics",
|
||||
table: "BenchmarkRuns",
|
||||
newName: "Reports");
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Robust.Benchmarks/Migrations/20221010144620_param_work.Designer.cs
generated
Normal file
64
Robust.Benchmarks/Migrations/20221010144620_param_work.Designer.cs
generated
Normal file
@@ -0,0 +1,64 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BenchmarkDotNet.Mathematics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
[DbContext(typeof(BenchmarkContext))]
|
||||
[Migration("20221010144620_param_work")]
|
||||
partial class ParamWork
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("GitHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParameterMapping")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<BenchmarkRunParameter[]>("ParameterMappingJson")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<DateTime>("RunDate")
|
||||
.HasColumnType("timestamptz");
|
||||
|
||||
b.Property<Statistics>("Statistics")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BenchmarkRuns");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Robust.Benchmarks/Migrations/20221010144620_param_work.cs
Normal file
44
Robust.Benchmarks/Migrations/20221010144620_param_work.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
public partial class ParamWork : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ParameterMapping",
|
||||
table: "BenchmarkRuns",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AddColumn<BenchmarkRunParameter[]>(
|
||||
name: "ParameterMappingJson",
|
||||
table: "BenchmarkRuns",
|
||||
type: "jsonb",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ParameterMappingJson",
|
||||
table: "BenchmarkRuns");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ParameterMapping",
|
||||
table: "BenchmarkRuns",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BenchmarkDotNet.Mathematics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Robust.Benchmarks.Migrations
|
||||
{
|
||||
[DbContext(typeof(BenchmarkContext))]
|
||||
partial class BenchmarkContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "6.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("GitHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParameterMapping")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<BenchmarkRunParameter[]>("ParameterMappingJson")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<DateTime>("RunDate")
|
||||
.HasColumnType("timestamptz");
|
||||
|
||||
b.Property<Statistics>("Statistics")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("BenchmarkRuns");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Robust.Benchmarks/Migrations/TypeIApparentlyHaveToKeep.cs
Normal file
11
Robust.Benchmarks/Migrations/TypeIApparentlyHaveToKeep.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using BenchmarkDotNet.Mathematics;
|
||||
using Robust.Benchmarks.Exporters;
|
||||
|
||||
namespace Robust.Benchmarks.Migrations;
|
||||
|
||||
public class BenchmarkRunReport
|
||||
{
|
||||
public BenchmarkRunParameter[] Parameters { get; set; } = Array.Empty<BenchmarkRunParameter>();
|
||||
public Statistics Statistics { get; set; } = default!;
|
||||
}
|
||||
@@ -9,6 +9,9 @@ namespace Robust.Benchmarks.NumericsHelpers
|
||||
[Params(32, 128)]
|
||||
public int N { get; set; }
|
||||
|
||||
[Params(1,2)]
|
||||
public int T { get; set; }
|
||||
|
||||
private float[] _inputA = default!;
|
||||
private float[] _inputB = default!;
|
||||
private float[] _output = default!;
|
||||
|
||||
26
Robust.Benchmarks/NumericsHelpers/HorizontalAddBenchmark.cs
Normal file
26
Robust.Benchmarks/NumericsHelpers/HorizontalAddBenchmark.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Shared.Analyzers;
|
||||
|
||||
namespace Robust.Benchmarks.NumericsHelpers;
|
||||
|
||||
[Virtual]
|
||||
[DisassemblyDiagnoser()]
|
||||
public class HorizontalAddBenchmark
|
||||
{
|
||||
[Params(8, 32, 128)]
|
||||
public int N { get; set; }
|
||||
|
||||
private float[] _inputA = default!;
|
||||
|
||||
[GlobalSetup]
|
||||
public void Setup()
|
||||
{
|
||||
_inputA = new float[N];
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public float Bench()
|
||||
{
|
||||
return Shared.Maths.NumericsHelpers.HorizontalAdd(_inputA);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Running;
|
||||
#if DEBUG
|
||||
using BenchmarkDotNet.Configs;
|
||||
#endif
|
||||
using System;
|
||||
using BenchmarkDotNet.Running;
|
||||
using Robust.Benchmarks.Configs;
|
||||
|
||||
namespace Robust.Benchmarks
|
||||
{
|
||||
@@ -16,7 +19,8 @@ namespace Robust.Benchmarks
|
||||
Console.WriteLine("THE DEBUG BUILD IS ONLY GOOD FOR FIXING A CRASHING BENCHMARK\n");
|
||||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, new DebugInProcessConfig());
|
||||
#else
|
||||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
|
||||
var config = Environment.GetEnvironmentVariable("ROBUST_BENCHMARKS_ENABLE_SQL") != null ? DefaultSQLConfig.Instance : null;
|
||||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\MSBuild\Robust.Properties.targets" />
|
||||
<Import Project="..\MSBuild\Robust.Engine.props" />
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>../bin/Benchmarks</OutputPath>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Robust.Server\Robust.Server.csproj" />
|
||||
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\MSBuild\Robust.Engine.targets" />
|
||||
<Import Project="..\MSBuild\Robust.Engine.props" />
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>../bin/Benchmarks</OutputPath>
|
||||
<OutputType>Exe</OutputType>
|
||||
<NoWarn>RA0003</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Robust.Server\Robust.Server.csproj" />
|
||||
<ProjectReference Include="..\Robust.Shared\Robust.Shared.csproj" />
|
||||
<ProjectReference Include="..\Robust.UnitTesting\Robust.UnitTesting.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\MSBuild\Robust.Properties.targets" />
|
||||
</Project>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Globalization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Robust.Shared.Serialization.Manager.Result;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Validation;
|
||||
using Robust.Shared.Serialization.Markdown.Value;
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.Serialization.TypeSerializers.Interfaces;
|
||||
|
||||
namespace Robust.Benchmarks.Serialization
|
||||
{
|
||||
public sealed class BenchmarkIntSerializer : ITypeSerializer<int, ValueDataNode>
|
||||
public sealed class BenchmarkIntSerializer : ITypeSerializer<int, ValueDataNode>, ITypeCopyCreator<int>
|
||||
{
|
||||
public ValidationNode Validate(ISerializationManager serializationManager, ValueDataNode node,
|
||||
IDependencyCollection dependencies, ISerializationContext? context = null)
|
||||
@@ -19,20 +19,22 @@ namespace Robust.Benchmarks.Serialization
|
||||
: new ErrorNode(node, $"Failed parsing int value: {node.Value}");
|
||||
}
|
||||
|
||||
public DeserializationResult Read(ISerializationManager serializationManager, ValueDataNode node,
|
||||
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null)
|
||||
public int Read(ISerializationManager serializationManager, ValueDataNode node,
|
||||
IDependencyCollection dependencies, SerializationHookContext hookCtx, ISerializationContext? context = null,
|
||||
ISerializationManager.InstantiationDelegate<int>? instanceProvider = null)
|
||||
{
|
||||
return new DeserializedValue<int>(int.Parse(node.Value, CultureInfo.InvariantCulture));
|
||||
return int.Parse(node.Value, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public DataNode Write(ISerializationManager serializationManager, int value, bool alwaysWrite = false,
|
||||
public DataNode Write(ISerializationManager serializationManager, int value, IDependencyCollection dependencies,
|
||||
bool alwaysWrite = false,
|
||||
ISerializationContext? context = null)
|
||||
{
|
||||
return new ValueDataNode(value.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
public int Copy(ISerializationManager serializationManager, int source, int target, bool skipHook,
|
||||
ISerializationContext? context = null)
|
||||
public int CreateCopy(ISerializationManager serializationManager, int source,
|
||||
IDependencyCollection dependencies, SerializationHookContext hookCtx, ISerializationContext? context = null)
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Linq;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Benchmarks.Serialization.Definitions;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
using Robust.Shared.Serialization.Markdown.Sequence;
|
||||
@@ -28,7 +27,7 @@ namespace Robust.Benchmarks.Serialization.Copy
|
||||
|
||||
var seedMapping = yamlStream.Documents[0].RootNode.ToDataNodeCast<SequenceDataNode>().Cast<MappingDataNode>(0);
|
||||
|
||||
Seed = SerializationManager.ReadValueOrThrow<SeedDataDefinition>(seedMapping);
|
||||
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping, notNullableOverride: true);
|
||||
}
|
||||
|
||||
private const string String = "ABC";
|
||||
@@ -46,7 +45,7 @@ namespace Robust.Benchmarks.Serialization.Copy
|
||||
[Benchmark]
|
||||
public string? CreateCopyString()
|
||||
{
|
||||
return SerializationManager.CreateCopy(String);
|
||||
return SerializationManager.CreateCopy(String, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
@@ -58,13 +57,13 @@ namespace Robust.Benchmarks.Serialization.Copy
|
||||
[Benchmark]
|
||||
public DataDefinitionWithString? CreateCopyDataDefinitionWithString()
|
||||
{
|
||||
return SerializationManager.CreateCopy(DataDefinitionWithString);
|
||||
return SerializationManager.CreateCopy(DataDefinitionWithString, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public SeedDataDefinition? CreateCopySeedDataDefinition()
|
||||
{
|
||||
return SerializationManager.CreateCopy(Seed);
|
||||
return SerializationManager.CreateCopy(Seed, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
@@ -109,9 +108,7 @@ namespace Robust.Benchmarks.Serialization.Copy
|
||||
copy.Potency = Seed.Potency;
|
||||
copy.Ligneous = Seed.Ligneous;
|
||||
|
||||
copy.PlantRsi = Seed.PlantRsi == null
|
||||
? null!
|
||||
: new ResourcePath(Seed.PlantRsi.ToString(), Seed.PlantRsi.Separator);
|
||||
copy.PlantRsi = new ResPath(Seed.PlantRsi.ToString());
|
||||
copy.PlantIconState = Seed.PlantIconState;
|
||||
copy.Bioluminescent = Seed.Bioluminescent;
|
||||
copy.BioluminescentColor = Seed.BioluminescentColor;
|
||||
@@ -124,30 +121,21 @@ namespace Robust.Benchmarks.Serialization.Copy
|
||||
[BenchmarkCategory("flag")]
|
||||
public object? CopyFlagZero()
|
||||
{
|
||||
return SerializationManager.CopyWithTypeSerializer(
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
(int) FlagZero,
|
||||
(int) FlagZero);
|
||||
return SerializationManager.CreateCopy<int, FlagSerializer<BenchmarkFlags>>((int) FlagZero);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("flag")]
|
||||
public object? CopyFlagThirtyOne()
|
||||
{
|
||||
return SerializationManager.CopyWithTypeSerializer(
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
(int) FlagThirtyOne,
|
||||
(int) FlagThirtyOne);
|
||||
return SerializationManager.CreateCopy<int, FlagSerializer<BenchmarkFlags>>((int) FlagThirtyOne);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("customTypeSerializer")]
|
||||
public object? CopyIntegerCustomSerializer()
|
||||
{
|
||||
return SerializationManager.CopyWithTypeSerializer(
|
||||
typeof(BenchmarkIntSerializer),
|
||||
Integer,
|
||||
Integer);
|
||||
return SerializationManager.CreateCopy<int, BenchmarkIntSerializer>(Integer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Robust.Benchmarks.Serialization.Definitions
|
||||
name: tobacco
|
||||
seedName: tobacco
|
||||
displayName: tobacco plant
|
||||
plantRsi: Objects/Specific/Hydroponics/tobacco.rsi
|
||||
productPrototypes:
|
||||
- LeavesTobacco
|
||||
harvestRepeat: Repeat
|
||||
@@ -36,7 +37,7 @@ namespace Robust.Benchmarks.Serialization.Definitions
|
||||
Max: 10
|
||||
PotencyDivisor: 10";
|
||||
|
||||
[DataField("id", required: true)] public string ID { get; set; } = default!;
|
||||
[IdDataFieldAttribute] public string ID { get; set; } = default!;
|
||||
|
||||
#region Tracking
|
||||
[DataField("name")] public string Name { get; set; } = string.Empty;
|
||||
@@ -86,7 +87,7 @@ namespace Robust.Benchmarks.Serialization.Definitions
|
||||
#endregion
|
||||
|
||||
#region Cosmetics
|
||||
[DataField("plantRsi", required: true)] public ResourcePath PlantRsi { get; set; } = default!;
|
||||
[DataField("plantRsi", required: true)] public ResPath PlantRsi { get; set; } = default!;
|
||||
[DataField("plantIconState")] public string PlantIconState { get; set; } = "produce";
|
||||
[DataField("bioluminescent")] public bool Bioluminescent { get; set; }
|
||||
[DataField("bioluminescentColor")] public Color BioluminescentColor { get; set; } = Color.White;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Benchmarks.Serialization.Definitions;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.Serialization.Manager.Result;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
using Robust.Shared.Serialization.Markdown.Sequence;
|
||||
@@ -42,57 +41,48 @@ namespace Robust.Benchmarks.Serialization.Read
|
||||
private ValueDataNode FlagThirtyOne { get; } = new("ThirtyOne");
|
||||
|
||||
[Benchmark]
|
||||
public string? ReadString()
|
||||
public string ReadString()
|
||||
{
|
||||
return SerializationManager.ReadValue<string>(StringNode);
|
||||
return SerializationManager.Read<string>(StringNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int? ReadInteger()
|
||||
public int ReadInteger()
|
||||
{
|
||||
return SerializationManager.ReadValue<int>(IntNode);
|
||||
return SerializationManager.Read<int>(IntNode);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public DataDefinitionWithString? ReadDataDefinitionWithString()
|
||||
public DataDefinitionWithString ReadDataDefinitionWithString()
|
||||
{
|
||||
return SerializationManager.ReadValue<DataDefinitionWithString>(StringDataDefNode);
|
||||
return SerializationManager.Read<DataDefinitionWithString>(StringDataDefNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public SeedDataDefinition? ReadSeedDataDefinition()
|
||||
public SeedDataDefinition ReadSeedDataDefinition()
|
||||
{
|
||||
return SerializationManager.ReadValue<SeedDataDefinition>(SeedNode);
|
||||
return SerializationManager.Read<SeedDataDefinition>(SeedNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("flag")]
|
||||
public DeserializationResult ReadFlagZero()
|
||||
public object? ReadFlagZero()
|
||||
{
|
||||
return SerializationManager.ReadWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
FlagZero);
|
||||
return SerializationManager.Read<int, ValueDataNode, FlagSerializer<BenchmarkFlags>>(FlagZero);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("flag")]
|
||||
public DeserializationResult ReadThirtyOne()
|
||||
public object? ReadThirtyOne()
|
||||
{
|
||||
return SerializationManager.ReadWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
FlagThirtyOne);
|
||||
return SerializationManager.Read<int, ValueDataNode, FlagSerializer<BenchmarkFlags>>(FlagThirtyOne);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("customTypeSerializer")]
|
||||
public DeserializationResult ReadIntegerCustomSerializer()
|
||||
public object? ReadIntegerCustomSerializer()
|
||||
{
|
||||
return SerializationManager.ReadWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(BenchmarkIntSerializer),
|
||||
IntNode);
|
||||
return SerializationManager.Read<int, ValueDataNode, BenchmarkIntSerializer>(IntNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,84 +46,84 @@ namespace Robust.Benchmarks.Serialization
|
||||
[BenchmarkCategory("read")]
|
||||
public string[]? ReadEmptyString()
|
||||
{
|
||||
return SerializationManager.ReadValue<string[]>(EmptyNode);
|
||||
return SerializationManager.Read<string[]>(EmptyNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public string[]? ReadOneString()
|
||||
{
|
||||
return SerializationManager.ReadValue<string[]>(OneIntNode);
|
||||
return SerializationManager.Read<string[]>(OneIntNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public string[]? ReadTenStrings()
|
||||
{
|
||||
return SerializationManager.ReadValue<string[]>(TenIntsNode);
|
||||
return SerializationManager.Read<string[]>(TenIntsNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public int[]? ReadEmptyInt()
|
||||
{
|
||||
return SerializationManager.ReadValue<int[]>(EmptyNode);
|
||||
return SerializationManager.Read<int[]>(EmptyNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public int[]? ReadOneInt()
|
||||
{
|
||||
return SerializationManager.ReadValue<int[]>(OneIntNode);
|
||||
return SerializationManager.Read<int[]>(OneIntNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public int[]? ReadTenInts()
|
||||
{
|
||||
return SerializationManager.ReadValue<int[]>(TenIntsNode);
|
||||
return SerializationManager.Read<int[]>(TenIntsNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public DataDefinitionWithString[]? ReadEmptyStringDataDef()
|
||||
{
|
||||
return SerializationManager.ReadValue<DataDefinitionWithString[]>(EmptyNode);
|
||||
return SerializationManager.Read<DataDefinitionWithString[]>(EmptyNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public DataDefinitionWithString[]? ReadOneStringDataDef()
|
||||
{
|
||||
return SerializationManager.ReadValue<DataDefinitionWithString[]>(OneStringDefNode);
|
||||
return SerializationManager.Read<DataDefinitionWithString[]>(OneStringDefNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public DataDefinitionWithString[]? ReadTenStringDataDefs()
|
||||
{
|
||||
return SerializationManager.ReadValue<DataDefinitionWithString[]>(TenStringDefsNode);
|
||||
return SerializationManager.Read<DataDefinitionWithString[]>(TenStringDefsNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public SealedDataDefinitionWithString[]? ReadEmptySealedStringDataDef()
|
||||
{
|
||||
return SerializationManager.ReadValue<SealedDataDefinitionWithString[]>(EmptyNode);
|
||||
return SerializationManager.Read<SealedDataDefinitionWithString[]>(EmptyNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public SealedDataDefinitionWithString[]? ReadOneSealedStringDataDef()
|
||||
{
|
||||
return SerializationManager.ReadValue<SealedDataDefinitionWithString[]>(OneStringDefNode);
|
||||
return SerializationManager.Read<SealedDataDefinitionWithString[]>(OneStringDefNode, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("read")]
|
||||
public SealedDataDefinitionWithString[]? ReadTenSealedStringDataDefs()
|
||||
{
|
||||
return SerializationManager.ReadValue<SealedDataDefinitionWithString[]>(TenStringDefsNode);
|
||||
return SerializationManager.Read<SealedDataDefinitionWithString[]>(TenStringDefsNode, notNullableOverride: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Robust.Benchmarks.Serialization
|
||||
{
|
||||
public SerializationBenchmark()
|
||||
{
|
||||
IoCManager.InitThread();
|
||||
ServerIoC.RegisterIoC();
|
||||
IoCManager.BuildGraph();
|
||||
var deps = IoCManager.InitThread();
|
||||
ServerIoC.RegisterIoC(deps);
|
||||
deps.BuildGraph();
|
||||
|
||||
var assemblies = new[]
|
||||
{
|
||||
@@ -25,12 +25,12 @@ namespace Robust.Benchmarks.Serialization
|
||||
|
||||
foreach (var assembly in assemblies)
|
||||
{
|
||||
IoCManager.Resolve<IConfigurationManagerInternal>().LoadCVarsFromAssembly(assembly);
|
||||
deps.Resolve<IConfigurationManagerInternal>().LoadCVarsFromAssembly(assembly);
|
||||
}
|
||||
|
||||
IoCManager.Resolve<IReflectionManager>().LoadAssemblies(assemblies);
|
||||
deps.Resolve<IReflectionManager>().LoadAssemblies(assemblies);
|
||||
|
||||
SerializationManager = IoCManager.Resolve<ISerializationManager>();
|
||||
SerializationManager = deps.Resolve<ISerializationManager>();
|
||||
}
|
||||
|
||||
protected ISerializationManager SerializationManager { get; }
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.IO;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Benchmarks.Serialization.Definitions;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.Serialization.Manager;
|
||||
using Robust.Shared.Serialization.Markdown;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
using Robust.Shared.Serialization.Markdown.Sequence;
|
||||
@@ -28,7 +27,7 @@ namespace Robust.Benchmarks.Serialization.Write
|
||||
|
||||
var seedMapping = yamlStream.Documents[0].RootNode.ToDataNodeCast<SequenceDataNode>().Cast<MappingDataNode>(0);
|
||||
|
||||
Seed = SerializationManager.ReadValueOrThrow<SeedDataDefinition>(seedMapping);
|
||||
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping, notNullableOverride: true);
|
||||
}
|
||||
|
||||
private const string String = "ABC";
|
||||
@@ -46,7 +45,7 @@ namespace Robust.Benchmarks.Serialization.Write
|
||||
[Benchmark]
|
||||
public DataNode WriteString()
|
||||
{
|
||||
return SerializationManager.WriteValue(String);
|
||||
return SerializationManager.WriteValue(String, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
@@ -58,13 +57,13 @@ namespace Robust.Benchmarks.Serialization.Write
|
||||
[Benchmark]
|
||||
public DataNode WriteDataDefinitionWithString()
|
||||
{
|
||||
return SerializationManager.WriteValue(DataDefinitionWithString);
|
||||
return SerializationManager.WriteValue(DataDefinitionWithString, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public DataNode WriteSeedDataDefinition()
|
||||
{
|
||||
return SerializationManager.WriteValue(Seed);
|
||||
return SerializationManager.WriteValue(Seed, notNullableOverride: true);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
@@ -107,30 +106,21 @@ namespace Robust.Benchmarks.Serialization.Write
|
||||
[BenchmarkCategory("flag")]
|
||||
public DataNode WriteFlagZero()
|
||||
{
|
||||
return SerializationManager.WriteWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
FlagZero);
|
||||
return SerializationManager.WriteValue<int, FlagSerializer<BenchmarkFlags>>((int)FlagZero);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("flag")]
|
||||
public DataNode WriteThirtyOne()
|
||||
{
|
||||
return SerializationManager.WriteWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(FlagSerializer<BenchmarkFlags>),
|
||||
FlagThirtyOne);
|
||||
return SerializationManager.WriteValue<int, FlagSerializer<BenchmarkFlags>>((int)FlagThirtyOne);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("customTypeSerializer")]
|
||||
public DataNode WriteIntegerCustomSerializer()
|
||||
{
|
||||
return SerializationManager.WriteWithTypeSerializer(
|
||||
typeof(int),
|
||||
typeof(BenchmarkIntSerializer),
|
||||
Integer);
|
||||
return SerializationManager.WriteValue<int, BenchmarkIntSerializer>(Integer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
71
Robust.Benchmarks/TypeMatching/TypeSwitchBenchmark.cs
Normal file
71
Robust.Benchmarks/TypeMatching/TypeSwitchBenchmark.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using Robust.Shared.Analyzers;
|
||||
|
||||
namespace Robust.Benchmarks.TypeMatching;
|
||||
|
||||
[MemoryDiagnoser]
|
||||
[Virtual]
|
||||
public class TypeSwitchBenchmark
|
||||
{
|
||||
private readonly Matcher<Struct> _matcher = new();
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkInt()
|
||||
{
|
||||
return _matcher.TypeToInt<int>();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkString()
|
||||
{
|
||||
return _matcher.TypeToInt<string>();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkStruct()
|
||||
{
|
||||
return _matcher.TypeToInt<Struct>();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkDouble()
|
||||
{
|
||||
return _matcher.TypeToInt<double>();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkFloat()
|
||||
{
|
||||
return _matcher.TypeToInt<float>();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public int BenchmarkClass()
|
||||
{
|
||||
return _matcher.TypeToInt<Class>();
|
||||
}
|
||||
|
||||
private class Matcher<T1>
|
||||
{
|
||||
public int TypeToInt<T>(T val = default!)
|
||||
{
|
||||
return val switch
|
||||
{
|
||||
int => 1,
|
||||
string => 2,
|
||||
double => 3,
|
||||
T1 => 4,
|
||||
Class => 5,
|
||||
_ => 6
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private struct Struct
|
||||
{
|
||||
}
|
||||
|
||||
private class Class
|
||||
{
|
||||
}
|
||||
}
|
||||
36
Robust.Benchmarks/Utility/ResourcePathBench.cs
Normal file
36
Robust.Benchmarks/Utility/ResourcePathBench.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
#pragma warning disable CS0612
|
||||
namespace Robust.Benchmarks.Utility;
|
||||
|
||||
[Virtual]
|
||||
public class ResourcePathBench
|
||||
{
|
||||
private string _path = default!;
|
||||
|
||||
[UsedImplicitly]
|
||||
[Params(10, 100, 1000)]
|
||||
public int N;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
_path = "/a/b/c/../test";
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public ResPath CreateWithSeparatorResPath()
|
||||
{
|
||||
ResPath res = default;
|
||||
for (var i = 0; i < N; i++)
|
||||
{
|
||||
res = new ResPath(_path);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
#pragma warning restore CS0612
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user