mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 07:23:37 +08:00
updates for latest pylint and lang updates
This commit is contained in:
parent
b2e5243a22
commit
d1603831ae
98
.efrocachemap
generated
98
.efrocachemap
generated
@ -421,13 +421,13 @@
|
|||||||
"build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26",
|
"build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26",
|
||||||
"build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8",
|
"build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8",
|
||||||
"build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55",
|
"build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55",
|
||||||
"build/assets/ba_data/data/langdata.json": "fa2cb506dd6628e30b775ca44604e4f8",
|
"build/assets/ba_data/data/langdata.json": "a3d27b587a1b206a3338ef820a802313",
|
||||||
"build/assets/ba_data/data/languages/arabic.json": "609f5d698a488e40e61787b62ee8ea5e",
|
"build/assets/ba_data/data/languages/arabic.json": "609f5d698a488e40e61787b62ee8ea5e",
|
||||||
"build/assets/ba_data/data/languages/belarussian.json": "3d5523d0004293aa2df02f3f6f3b84f8",
|
"build/assets/ba_data/data/languages/belarussian.json": "3d5523d0004293aa2df02f3f6f3b84f8",
|
||||||
"build/assets/ba_data/data/languages/chinese.json": "d03ed49486d41cfbdf770e5a54f974a1",
|
"build/assets/ba_data/data/languages/chinese.json": "57d199cfd2a5cf493e777dd96cc12f7c",
|
||||||
"build/assets/ba_data/data/languages/chinesetraditional.json": "d85c58cc1e0e4bd0b09b2bc768cb1971",
|
"build/assets/ba_data/data/languages/chinesetraditional.json": "d85c58cc1e0e4bd0b09b2bc768cb1971",
|
||||||
"build/assets/ba_data/data/languages/croatian.json": "b23619cb396ac16640c47458f884b16a",
|
"build/assets/ba_data/data/languages/croatian.json": "b23619cb396ac16640c47458f884b16a",
|
||||||
"build/assets/ba_data/data/languages/czech.json": "61bcfce75c0d53d2f2af709cee42187a",
|
"build/assets/ba_data/data/languages/czech.json": "be5d536a1160607dfa158e59ecc1c324",
|
||||||
"build/assets/ba_data/data/languages/danish.json": "8e57db30c5250df2abff14a822f83ea7",
|
"build/assets/ba_data/data/languages/danish.json": "8e57db30c5250df2abff14a822f83ea7",
|
||||||
"build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343",
|
"build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343",
|
||||||
"build/assets/ba_data/data/languages/english.json": "5a73dea22df1117d58a79459def62ff5",
|
"build/assets/ba_data/data/languages/english.json": "5a73dea22df1117d58a79459def62ff5",
|
||||||
@ -443,7 +443,7 @@
|
|||||||
"build/assets/ba_data/data/languages/italian.json": "d9eb41f6eafb19040f8d5c0608790b62",
|
"build/assets/ba_data/data/languages/italian.json": "d9eb41f6eafb19040f8d5c0608790b62",
|
||||||
"build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597",
|
"build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597",
|
||||||
"build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f",
|
"build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f",
|
||||||
"build/assets/ba_data/data/languages/persian.json": "ededb9c015afb58b1324a096ea740f72",
|
"build/assets/ba_data/data/languages/persian.json": "fc25780341e0dfebc393e4c1c846b7a9",
|
||||||
"build/assets/ba_data/data/languages/polish.json": "89333fb207f9eb2f22fff5a95b022c35",
|
"build/assets/ba_data/data/languages/polish.json": "89333fb207f9eb2f22fff5a95b022c35",
|
||||||
"build/assets/ba_data/data/languages/portuguese.json": "eb2563e245e1ea00b870264dced3ebd7",
|
"build/assets/ba_data/data/languages/portuguese.json": "eb2563e245e1ea00b870264dced3ebd7",
|
||||||
"build/assets/ba_data/data/languages/romanian.json": "55a8744e466801013ea131266a856924",
|
"build/assets/ba_data/data/languages/romanian.json": "55a8744e466801013ea131266a856924",
|
||||||
@ -455,7 +455,7 @@
|
|||||||
"build/assets/ba_data/data/languages/tamil.json": "ead39b864228696a9b0d19344bc4b5ec",
|
"build/assets/ba_data/data/languages/tamil.json": "ead39b864228696a9b0d19344bc4b5ec",
|
||||||
"build/assets/ba_data/data/languages/thai.json": "1d665629361f302693dead39de8fa945",
|
"build/assets/ba_data/data/languages/thai.json": "1d665629361f302693dead39de8fa945",
|
||||||
"build/assets/ba_data/data/languages/turkish.json": "6153ca5248b8e4743e9501ac72378493",
|
"build/assets/ba_data/data/languages/turkish.json": "6153ca5248b8e4743e9501ac72378493",
|
||||||
"build/assets/ba_data/data/languages/ukrainian.json": "23a98e5722d3e71e809a8a0063daa603",
|
"build/assets/ba_data/data/languages/ukrainian.json": "3a5b8132690fcd583d280879876c85b7",
|
||||||
"build/assets/ba_data/data/languages/venetian.json": "a1315f5233ebbee1464683ac55d5d9d5",
|
"build/assets/ba_data/data/languages/venetian.json": "a1315f5233ebbee1464683ac55d5d9d5",
|
||||||
"build/assets/ba_data/data/languages/vietnamese.json": "5ae84265600b6cfda45c9bed18724e1d",
|
"build/assets/ba_data/data/languages/vietnamese.json": "5ae84265600b6cfda45c9bed18724e1d",
|
||||||
"build/assets/ba_data/data/maps/big_g.json": "1dd301d490643088a435ce75df971054",
|
"build/assets/ba_data/data/maps/big_g.json": "1dd301d490643088a435ce75df971054",
|
||||||
@ -4096,50 +4096,50 @@
|
|||||||
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
|
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
|
||||||
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
|
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
|
||||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "fad0592c63dbf5623fd085b1f94dc5b5",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "aa72881174380859e777358af1da8d1f",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "b18b7d1073b180dd2b0ed563e3befda7",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "bb5c1ca60d9683f2d24d4d8d35af9121",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "2ea095b28288927982060509174ed625",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "89a73b9312c48ed182d54263707a0982",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "bdd91ad1d25228813e6123adecc16031",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f8e25d00480757c6fef0d125fbabe7d3",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "354635e2cdb27b523c229ee3c723e136",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "116a9fff16cc5cefd91d24415e9b09e7",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "6a3ecdf84a34549f451cfa43e87bae28",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "01a542f1515ee659f99550c34ca2f749",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "5e01a1b583a53c3d475013363b6e0372",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "16aa91530f2abea70f8c648db20872b9",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "179905fc0b716c99c57b56179f84166e",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "5c19c58e3163c2b4c21eb1cde8f2712a",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "be15731bcd223a8723f146d8e3153b53",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f3e54e879fe538a6f0e52c1833e03739",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "dfc1d123a5517302f5869b151a436a7f",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "36b20cfad166d7229684cd0b88be0ca0",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "b1ef6725fdcf9071aba0f0f5e038727d",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "64bdc98a71e9bcb63999e7fb1c57722f",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "24ac52a8b44b2b815cce76a150f38629",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "583086e11d495f3439bdd6029bde0466",
|
||||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "488119eac17785da1bf534702e8ed51f",
|
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "701f03b8ba74493d935f795a84c13455",
|
||||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "cb59173e8b176b98206b7f69b9a08972",
|
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "3e9f1feaf14d30f740d84280432cb236",
|
||||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "60700ee6b7ed262215fca2c02ec5561b",
|
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "31da2a14cc69755f3a8f68b17482832f",
|
||||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "972c6e59e59ca24c7d1739b1d7530a30",
|
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "8ef21c1df9040fb8e2d38258dc80a4d5",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "b04c87e6dec8916aaf3666fe0aa4d158",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "74a0b75b877954015798a6289d26c26c",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "04ddbccf8268c1199d196b3dc4559e1b",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "ed2b2f673f2ed41fc24613a937a954d9",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "02c9824a5e1951e8298c75196ae154e2",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "16824b0155479f54293cb2230553d174",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "da0705f8cc9e9eece02592fd1295ea40",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "379f72d2ce79111490ba9c87087488f3",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "fa659b5d6119acba6570c92ce4d35ae2",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "086a2ce72497e44079ad6b747fc5439f",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
|
||||||
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "fa659b5d6119acba6570c92ce4d35ae2",
|
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "086a2ce72497e44079ad6b747fc5439f",
|
||||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "ab8467107ed371eb542e0317a7e7395d",
|
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "d562f21a435b7a888028689ffdf06d02",
|
||||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "4a4c19120f810ff5b4c7afbf11c23cf6",
|
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "226df279a267c72853b7242fd1507dd1",
|
||||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "ab8467107ed371eb542e0317a7e7395d",
|
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "d562f21a435b7a888028689ffdf06d02",
|
||||||
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "4a4c19120f810ff5b4c7afbf11c23cf6",
|
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "226df279a267c72853b7242fd1507dd1",
|
||||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "f4c36e72fa8d9d06f8a00684a3fc4679",
|
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "5a17ee891f9113060a2f462cd9d04dc7",
|
||||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "3168e8377498df85a4adacede63d126a",
|
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "46f23c6890b06fa29f97604b42113c5e",
|
||||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "f4c36e72fa8d9d06f8a00684a3fc4679",
|
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "5a17ee891f9113060a2f462cd9d04dc7",
|
||||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "3168e8377498df85a4adacede63d126a",
|
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "46f23c6890b06fa29f97604b42113c5e",
|
||||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "427a392c291aa9562e93c570c9f1b92c",
|
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "ecb7fec32ddd75652e657c2076ff2b69",
|
||||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "3f50101eed1a5178d5630064dbafb3ee",
|
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
|
||||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "78cf6a2069ab46f5f0be3f5b57a6ee70",
|
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "4c11b81a574aa9af593f54db4d998e61",
|
||||||
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "3f50101eed1a5178d5630064dbafb3ee",
|
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "4769b8b8a99ef0e08aa968af3072fa38",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "c6a3ce3f5dbfa705ef6d7e4b94bca8ed",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "f999d258cb8c7645c5b462ff81012289",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "61a4f8795d6cd96f90bc2bed25087bfe",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "aee027b5a96a835583d07ea95ac6d608",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "0af969c789949825652e6b09020867b5",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "3f7d65bf17deb2714862df46c6772e06",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "839ebfcfcbc87f4470b96f986485a4f6",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "d332af0eee1178cc7c00b6e3ed5ca8a2",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "b161b991f68d7fc5a23e1bbf3041693f",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "2c8f29b6b26f657c776fee12f81bd28e",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "48add2ca39f42cf1129fd56deac471e1",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "26a02edb690a0f9e5baaf0923cc1e57d",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "bd7faaa40c5b448554d524d2d5fddeb1",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "62d7688c402895869b794541366a3e20",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "d18d44e3e100240220523f4bc54f9d85",
|
||||||
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
||||||
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
|
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
|
||||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d",
|
"src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d",
|
||||||
|
|||||||
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,9 +1,17 @@
|
|||||||
### 1.7.37 (build 22007, api 9, 2024-09-19)
|
### 1.7.37 (build 22009, api 9, 2024-09-23)
|
||||||
- Bumping api version to 9. As you'll see below, there's some UI changes that
|
- Bumping api version to 9. As you'll see below, there's some UI changes that
|
||||||
will require a bit of work for any UI mods to adapt to. If your mods don't
|
will require a bit of work for any UI mods to adapt to. If your mods don't
|
||||||
touch UI stuff at all you can simply bump your api version and call it a day.
|
touch UI stuff at all you can simply bump your api version and call it a day.
|
||||||
I'm hopeful that api version won't need to be bumped again for along time (if
|
I'm hopeful that api version won't need to be bumped again for along time (if
|
||||||
ever).
|
ever).
|
||||||
|
- The newest Pylint update (3.3) added a check for
|
||||||
|
'too-many-positional-arguments'. This seems like a good idea, so I updated
|
||||||
|
various functions to conform to it and set some others to ignore it. Basically
|
||||||
|
if you see a function like `def dothing(a, b, *, c, d)` then everything after
|
||||||
|
the `*` needs to be passed as a keyword. So you can't do `dothing(val1, val2,
|
||||||
|
val3, val4)`; you need to do `dothing(val1, val2, c=val3, d=val4)`. Requiring
|
||||||
|
keywords for complex functions generally leads to more readable code and less
|
||||||
|
breakage if arguments are added or removed from the function.
|
||||||
- Playlist customization no longer requires pro.
|
- Playlist customization no longer requires pro.
|
||||||
- Soundtrack customization no longer requires pro.
|
- Soundtrack customization no longer requires pro.
|
||||||
- Campaign hard mode no longer requires pro.
|
- Campaign hard mode no longer requires pro.
|
||||||
|
|||||||
@ -6,7 +6,7 @@ mypy==1.11.2
|
|||||||
pbxproj==4.2.1
|
pbxproj==4.2.1
|
||||||
pdoc==14.7.0
|
pdoc==14.7.0
|
||||||
pur==7.3.2
|
pur==7.3.2
|
||||||
pylint==3.2.7
|
pylint==3.3.0
|
||||||
pylsp-mypy==0.6.9
|
pylsp-mypy==0.6.9
|
||||||
pytest==8.3.3
|
pytest==8.3.3
|
||||||
python-daemon==3.0.1
|
python-daemon==3.0.1
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class DevConsoleTab:
|
|||||||
pos: tuple[float, float],
|
pos: tuple[float, float],
|
||||||
size: tuple[float, float],
|
size: tuple[float, float],
|
||||||
call: Callable[[], Any] | None = None,
|
call: Callable[[], Any] | None = None,
|
||||||
|
*,
|
||||||
h_anchor: Literal['left', 'center', 'right'] = 'center',
|
h_anchor: Literal['left', 'center', 'right'] = 'center',
|
||||||
label_scale: float = 1.0,
|
label_scale: float = 1.0,
|
||||||
corner_radius: float = 8.0,
|
corner_radius: float = 8.0,
|
||||||
@ -57,6 +58,7 @@ class DevConsoleTab:
|
|||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
pos: tuple[float, float],
|
pos: tuple[float, float],
|
||||||
|
*,
|
||||||
h_anchor: Literal['left', 'center', 'right'] = 'center',
|
h_anchor: Literal['left', 'center', 'right'] = 'center',
|
||||||
h_align: Literal['left', 'center', 'right'] = 'center',
|
h_align: Literal['left', 'center', 'right'] = 'center',
|
||||||
v_align: Literal['top', 'center', 'bottom', 'none'] = 'center',
|
v_align: Literal['top', 'center', 'bottom', 'none'] = 'center',
|
||||||
|
|||||||
@ -657,6 +657,7 @@ class Achievement:
|
|||||||
award: int,
|
award: int,
|
||||||
hard_mode_only: bool = False,
|
hard_mode_only: bool = False,
|
||||||
):
|
):
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
self._name = name
|
self._name = name
|
||||||
self._icon_name = icon_name
|
self._icon_name = icon_name
|
||||||
self._icon_color: Sequence[float] = list(icon_color) + [1]
|
self._icon_color: Sequence[float] = list(icon_color) + [1]
|
||||||
@ -870,6 +871,7 @@ class Achievement:
|
|||||||
x: float,
|
x: float,
|
||||||
y: float,
|
y: float,
|
||||||
delay: float,
|
delay: float,
|
||||||
|
*,
|
||||||
outdelay: float | None = None,
|
outdelay: float | None = None,
|
||||||
color: Sequence[float] | None = None,
|
color: Sequence[float] | None = None,
|
||||||
style: str = 'post_game',
|
style: str = 'post_game',
|
||||||
|
|||||||
@ -543,6 +543,7 @@ class ClassicAppSubsystem(babase.AppSubsystem):
|
|||||||
|
|
||||||
def run_stress_test(
|
def run_stress_test(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
playlist_type: str = 'Random',
|
playlist_type: str = 'Random',
|
||||||
playlist_name: str = '__default__',
|
playlist_name: str = '__default__',
|
||||||
player_count: int = 8,
|
player_count: int = 8,
|
||||||
@ -694,6 +695,7 @@ class ClassicAppSubsystem(babase.AppSubsystem):
|
|||||||
def tournament_entry_window(
|
def tournament_entry_window(
|
||||||
self,
|
self,
|
||||||
tournament_id: str,
|
tournament_id: str,
|
||||||
|
*,
|
||||||
tournament_activity: bascenev1.Activity | None = None,
|
tournament_activity: bascenev1.Activity | None = None,
|
||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
delegate: Any = None,
|
delegate: Any = None,
|
||||||
|
|||||||
@ -35,6 +35,8 @@ class MasterServerV1CallThread(threading.Thread):
|
|||||||
callback: MasterServerCallback | None,
|
callback: MasterServerCallback | None,
|
||||||
response_type: MasterServerResponseType,
|
response_type: MasterServerResponseType,
|
||||||
):
|
):
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
|
|
||||||
# Set daemon=True so long-running requests don't keep us from
|
# Set daemon=True so long-running requests don't keep us from
|
||||||
# quitting the app.
|
# quitting the app.
|
||||||
super().__init__(daemon=True)
|
super().__init__(daemon=True)
|
||||||
@ -52,8 +54,9 @@ class MasterServerV1CallThread(threading.Thread):
|
|||||||
self._activity = weakref.ref(activity) if activity is not None else None
|
self._activity = weakref.ref(activity) if activity is not None else None
|
||||||
|
|
||||||
def _run_callback(self, arg: None | dict[str, Any]) -> None:
|
def _run_callback(self, arg: None | dict[str, Any]) -> None:
|
||||||
# If we were created in an activity context and that activity has
|
# If we were created in an activity context and that activity
|
||||||
# since died, do nothing.
|
# has since died, do nothing.
|
||||||
|
|
||||||
# FIXME: Should we just be using a ContextCall instead of doing
|
# FIXME: Should we just be using a ContextCall instead of doing
|
||||||
# this check manually?
|
# this check manually?
|
||||||
if self._activity is not None:
|
if self._activity is not None:
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
# Build number and version of the ballistica binary we expect to be
|
# Build number and version of the ballistica binary we expect to be
|
||||||
# using.
|
# using.
|
||||||
TARGET_BALLISTICA_BUILD = 22007
|
TARGET_BALLISTICA_BUILD = 22009
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||||
|
|
||||||
|
|
||||||
@ -156,6 +156,7 @@ def get_config() -> EnvConfig:
|
|||||||
|
|
||||||
|
|
||||||
def configure(
|
def configure(
|
||||||
|
*,
|
||||||
config_dir: str | None = None,
|
config_dir: str | None = None,
|
||||||
data_dir: str | None = None,
|
data_dir: str | None = None,
|
||||||
user_python_dir: str | None = None,
|
user_python_dir: str | None = None,
|
||||||
|
|||||||
@ -221,6 +221,7 @@ class PlusAppSubsystem(AppSubsystem):
|
|||||||
name: Any,
|
name: Any,
|
||||||
score: int | None,
|
score: int | None,
|
||||||
callback: Callable,
|
callback: Callable,
|
||||||
|
*,
|
||||||
order: str = 'increasing',
|
order: str = 'increasing',
|
||||||
tournament_id: str | None = None,
|
tournament_id: str | None = None,
|
||||||
score_type: str = 'points',
|
score_type: str = 'points',
|
||||||
|
|||||||
@ -1247,6 +1247,7 @@ class GameActivity(Activity[PlayerT, TeamT]):
|
|||||||
def show_zoom_message(
|
def show_zoom_message(
|
||||||
self,
|
self,
|
||||||
message: babase.Lstr,
|
message: babase.Lstr,
|
||||||
|
*,
|
||||||
color: Sequence[float] = (0.9, 0.4, 0.0),
|
color: Sequence[float] = (0.9, 0.4, 0.0),
|
||||||
scale: float = 0.8,
|
scale: float = 0.8,
|
||||||
duration: float = 2.0,
|
duration: float = 2.0,
|
||||||
|
|||||||
@ -112,6 +112,7 @@ def animate_array(
|
|||||||
attr: str,
|
attr: str,
|
||||||
size: int,
|
size: int,
|
||||||
keys: dict[float, Sequence[float]],
|
keys: dict[float, Sequence[float]],
|
||||||
|
*,
|
||||||
loop: bool = False,
|
loop: bool = False,
|
||||||
offset: float = 0,
|
offset: float = 0,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class Level:
|
|||||||
gametype: type[bascenev1.GameActivity],
|
gametype: type[bascenev1.GameActivity],
|
||||||
settings: dict,
|
settings: dict,
|
||||||
preview_texture_name: str,
|
preview_texture_name: str,
|
||||||
|
*,
|
||||||
displayname: str | None = None,
|
displayname: str | None = None,
|
||||||
):
|
):
|
||||||
self._name = name
|
self._name = name
|
||||||
|
|||||||
@ -241,6 +241,7 @@ class HitMessage:
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
srcnode: bascenev1.Node | None = None,
|
srcnode: bascenev1.Node | None = None,
|
||||||
pos: Sequence[float] | None = None,
|
pos: Sequence[float] | None = None,
|
||||||
velocity: Sequence[float] | None = None,
|
velocity: Sequence[float] | None = None,
|
||||||
|
|||||||
@ -21,6 +21,7 @@ PlaylistType = list[dict[str, Any]]
|
|||||||
def filter_playlist(
|
def filter_playlist(
|
||||||
playlist: PlaylistType,
|
playlist: PlaylistType,
|
||||||
sessiontype: type[Session],
|
sessiontype: type[Session],
|
||||||
|
*,
|
||||||
add_resolved_type: bool = False,
|
add_resolved_type: bool = False,
|
||||||
remove_unowned: bool = True,
|
remove_unowned: bool = True,
|
||||||
mark_unowned: bool = False,
|
mark_unowned: bool = False,
|
||||||
|
|||||||
@ -96,6 +96,7 @@ class Session:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
depsets: Sequence[bascenev1.DependencySet],
|
depsets: Sequence[bascenev1.DependencySet],
|
||||||
|
*,
|
||||||
team_names: Sequence[str] | None = None,
|
team_names: Sequence[str] | None = None,
|
||||||
team_colors: Sequence[Sequence[float]] | None = None,
|
team_colors: Sequence[Sequence[float]] | None = None,
|
||||||
min_players: int = 1,
|
min_players: int = 1,
|
||||||
|
|||||||
@ -196,6 +196,7 @@ class PlayerRecord:
|
|||||||
scale2: float,
|
scale2: float,
|
||||||
sound2: bascenev1.Sound | None,
|
sound2: bascenev1.Sound | None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
from bascenev1lib.actor.popuptext import PopupText
|
from bascenev1lib.actor.popuptext import PopupText
|
||||||
|
|
||||||
# Only award this if they're still alive and we can get
|
# Only award this if they're still alive and we can get
|
||||||
@ -341,6 +342,7 @@ class Stats:
|
|||||||
self,
|
self,
|
||||||
player: bascenev1.Player,
|
player: bascenev1.Player,
|
||||||
base_points: int = 1,
|
base_points: int = 1,
|
||||||
|
*,
|
||||||
target: Sequence[float] | None = None,
|
target: Sequence[float] | None = None,
|
||||||
kill: bool = False,
|
kill: bool = False,
|
||||||
victim_player: bascenev1.Player | None = None,
|
victim_player: bascenev1.Player | None = None,
|
||||||
|
|||||||
@ -145,6 +145,7 @@ class TeamVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
|
|||||||
kill_delay: float,
|
kill_delay: float,
|
||||||
shiftdelay: float,
|
shiftdelay: float,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
del kill_delay # Unused arg.
|
del kill_delay # Unused arg.
|
||||||
ZoomText(
|
ZoomText(
|
||||||
str(sessionteam.customdata['score']),
|
str(sessionteam.customdata['score']),
|
||||||
|
|||||||
@ -87,6 +87,7 @@ class FreeForAllVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
|
|||||||
extrascale: float,
|
extrascale: float,
|
||||||
flash: bool = False,
|
flash: bool = False,
|
||||||
) -> Text:
|
) -> Text:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
return Text(
|
return Text(
|
||||||
text,
|
text,
|
||||||
position=(
|
position=(
|
||||||
|
|||||||
@ -57,6 +57,7 @@ class MultiTeamScoreScreenActivity(bs.ScoreScreenActivity):
|
|||||||
|
|
||||||
def show_player_scores(
|
def show_player_scores(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
delay: float = 2.5,
|
delay: float = 2.5,
|
||||||
results: bs.GameResults | None = None,
|
results: bs.GameResults | None = None,
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
@ -134,6 +135,7 @@ class MultiTeamScoreScreenActivity(bs.ScoreScreenActivity):
|
|||||||
xoffs: float,
|
xoffs: float,
|
||||||
yoffs: float,
|
yoffs: float,
|
||||||
text: bs.Lstr,
|
text: bs.Lstr,
|
||||||
|
*,
|
||||||
h_align: Text.HAlign = Text.HAlign.RIGHT,
|
h_align: Text.HAlign = Text.HAlign.RIGHT,
|
||||||
extrascale: float = 1.0,
|
extrascale: float = 1.0,
|
||||||
maxwidth: float | None = 120.0,
|
maxwidth: float | None = 120.0,
|
||||||
|
|||||||
@ -333,6 +333,7 @@ class Blast(bs.Actor):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
position: Sequence[float] = (0.0, 1.0, 0.0),
|
position: Sequence[float] = (0.0, 1.0, 0.0),
|
||||||
velocity: Sequence[float] = (0.0, 0.0, 0.0),
|
velocity: Sequence[float] = (0.0, 0.0, 0.0),
|
||||||
blast_radius: float = 2.0,
|
blast_radius: float = 2.0,
|
||||||
@ -715,6 +716,7 @@ class Bomb(bs.Actor):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
position: Sequence[float] = (0.0, 1.0, 0.0),
|
position: Sequence[float] = (0.0, 1.0, 0.0),
|
||||||
velocity: Sequence[float] = (0.0, 0.0, 0.0),
|
velocity: Sequence[float] = (0.0, 0.0, 0.0),
|
||||||
bomb_type: str = 'normal',
|
bomb_type: str = 'normal',
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class ControlsGuide(bs.Actor):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
position: tuple[float, float] = (390.0, 120.0),
|
position: tuple[float, float] = (390.0, 120.0),
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
delay: float = 0.0,
|
delay: float = 0.0,
|
||||||
|
|||||||
@ -169,6 +169,7 @@ class Flag(bs.Actor):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
position: Sequence[float] = (0.0, 1.0, 0.0),
|
position: Sequence[float] = (0.0, 1.0, 0.0),
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
materials: Sequence[bs.Material] | None = None,
|
materials: Sequence[bs.Material] | None = None,
|
||||||
|
|||||||
@ -37,6 +37,7 @@ class Image(bs.Actor):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
texture: bs.Texture | dict[str, Any],
|
texture: bs.Texture | dict[str, Any],
|
||||||
|
*,
|
||||||
position: tuple[float, float] = (0, 0),
|
position: tuple[float, float] = (0, 0),
|
||||||
transition: Transition | None = None,
|
transition: Transition | None = None,
|
||||||
transition_delay: float = 0.0,
|
transition_delay: float = 0.0,
|
||||||
|
|||||||
@ -46,6 +46,7 @@ class PlayerSpaz(Spaz):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
player: bs.Player,
|
player: bs.Player,
|
||||||
|
*,
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
highlight: Sequence[float] = (0.5, 0.5, 0.5),
|
highlight: Sequence[float] = (0.5, 0.5, 0.5),
|
||||||
character: str = 'Spaz',
|
character: str = 'Spaz',
|
||||||
@ -102,6 +103,7 @@ class PlayerSpaz(Spaz):
|
|||||||
|
|
||||||
def connect_controls_to_player(
|
def connect_controls_to_player(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
enable_jump: bool = True,
|
enable_jump: bool = True,
|
||||||
enable_punch: bool = True,
|
enable_punch: bool = True,
|
||||||
enable_pickup: bool = True,
|
enable_pickup: bool = True,
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class PopupText(bs.Actor):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str | bs.Lstr,
|
text: str | bs.Lstr,
|
||||||
|
*,
|
||||||
position: Sequence[float] = (0.0, 0.0, 0.0),
|
position: Sequence[float] = (0.0, 0.0, 0.0),
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0, 1.0),
|
||||||
random_offset: float = 0.5,
|
random_offset: float = 0.5,
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class _Entry:
|
|||||||
flash_length: float,
|
flash_length: float,
|
||||||
):
|
):
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
self._scoreboard = weakref.ref(scoreboard)
|
self._scoreboard = weakref.ref(scoreboard)
|
||||||
self._do_cover = do_cover
|
self._do_cover = do_cover
|
||||||
self._scale = scale
|
self._scale = scale
|
||||||
@ -277,6 +278,7 @@ class _Entry:
|
|||||||
def set_value(
|
def set_value(
|
||||||
self,
|
self,
|
||||||
score: float,
|
score: float,
|
||||||
|
*,
|
||||||
max_score: float | None = None,
|
max_score: float | None = None,
|
||||||
countdown: bool = False,
|
countdown: bool = False,
|
||||||
flash: bool = True,
|
flash: bool = True,
|
||||||
@ -399,6 +401,7 @@ class Scoreboard:
|
|||||||
team: bs.Team,
|
team: bs.Team,
|
||||||
score: float,
|
score: float,
|
||||||
max_score: float | None = None,
|
max_score: float | None = None,
|
||||||
|
*,
|
||||||
countdown: bool = False,
|
countdown: bool = False,
|
||||||
flash: bool = True,
|
flash: bool = True,
|
||||||
show_value: bool = True,
|
show_value: bool = True,
|
||||||
|
|||||||
@ -50,6 +50,7 @@ class Spawner:
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
data: Any = None,
|
data: Any = None,
|
||||||
pt: Sequence[float] = (0, 0, 0),
|
pt: Sequence[float] = (0, 0, 0),
|
||||||
spawn_time: float = 1.0,
|
spawn_time: float = 1.0,
|
||||||
|
|||||||
@ -71,6 +71,7 @@ class Spaz(bs.Actor):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
highlight: Sequence[float] = (0.5, 0.5, 0.5),
|
highlight: Sequence[float] = (0.5, 0.5, 0.5),
|
||||||
character: str = 'Spaz',
|
character: str = 'Spaz',
|
||||||
|
|||||||
@ -947,9 +947,9 @@ class SpazBotSet:
|
|||||||
on_spawn_call: Callable[[SpazBot], Any] | None = None,
|
on_spawn_call: Callable[[SpazBot], Any] | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Spawn a bot from this set."""
|
"""Spawn a bot from this set."""
|
||||||
from bascenev1lib.actor import spawner
|
from bascenev1lib.actor.spawner import Spawner
|
||||||
|
|
||||||
spawner.Spawner(
|
Spawner(
|
||||||
pt=pos,
|
pt=pos,
|
||||||
spawn_time=spawn_time,
|
spawn_time=spawn_time,
|
||||||
send_spawn_message=False,
|
send_spawn_message=False,
|
||||||
|
|||||||
@ -56,6 +56,7 @@ class Text(bs.Actor):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str | bs.Lstr,
|
text: str | bs.Lstr,
|
||||||
|
*,
|
||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
h_align: HAlign = HAlign.LEFT,
|
h_align: HAlign = HAlign.LEFT,
|
||||||
v_align: VAlign = VAlign.NONE,
|
v_align: VAlign = VAlign.NONE,
|
||||||
|
|||||||
@ -26,6 +26,7 @@ class ZoomText(bs.Actor):
|
|||||||
self,
|
self,
|
||||||
text: str | bs.Lstr,
|
text: str | bs.Lstr,
|
||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
|
*,
|
||||||
shiftposition: tuple[float, float] | None = None,
|
shiftposition: tuple[float, float] | None = None,
|
||||||
shiftdelay: float | None = None,
|
shiftdelay: float | None = None,
|
||||||
lifespan: float | None = None,
|
lifespan: float | None = None,
|
||||||
|
|||||||
@ -73,6 +73,7 @@ class Team(bs.Team[Player]):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
base_pos: Sequence[float],
|
base_pos: Sequence[float],
|
||||||
base_region_material: bs.Material,
|
base_region_material: bs.Material,
|
||||||
base_region: bs.Node,
|
base_region: bs.Node,
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class Icon(bs.Actor):
|
|||||||
player: Player,
|
player: Player,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
scale: float,
|
scale: float,
|
||||||
|
*,
|
||||||
show_lives: bool = True,
|
show_lives: bool = True,
|
||||||
show_death: bool = True,
|
show_death: bool = True,
|
||||||
name_scale: float = 1.0,
|
name_scale: float = 1.0,
|
||||||
|
|||||||
@ -805,6 +805,7 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
max_level: int,
|
max_level: int,
|
||||||
) -> list[list[tuple[int, int]]]:
|
) -> list[list[tuple[int, int]]]:
|
||||||
"""Calculate a distribution of bad guys given some params."""
|
"""Calculate a distribution of bad guys given some params."""
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
max_iterations = 10 + max_dudes * 2
|
max_iterations = 10 + max_dudes * 2
|
||||||
|
|
||||||
groups: list[list[tuple[int, int]]] = []
|
groups: list[list[tuple[int, int]]] = []
|
||||||
|
|||||||
@ -433,6 +433,7 @@ class MainMenuActivity(bs.Activity[bs.Player, bs.Team]):
|
|||||||
word: str,
|
word: str,
|
||||||
x: float,
|
x: float,
|
||||||
y: float,
|
y: float,
|
||||||
|
*,
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
delay: float = 0.0,
|
delay: float = 0.0,
|
||||||
vr_depth_offset: float = 0.0,
|
vr_depth_offset: float = 0.0,
|
||||||
@ -561,6 +562,7 @@ class MainMenuActivity(bs.Activity[bs.Player, bs.Team]):
|
|||||||
y: float,
|
y: float,
|
||||||
scale: float,
|
scale: float,
|
||||||
delay: float,
|
delay: float,
|
||||||
|
*,
|
||||||
custom_texture: str | None = None,
|
custom_texture: str | None = None,
|
||||||
jitter_scale: float = 1.0,
|
jitter_scale: float = 1.0,
|
||||||
rotate: float = 0.0,
|
rotate: float = 0.0,
|
||||||
|
|||||||
@ -515,6 +515,7 @@ class TutorialActivity(bs.Activity[Player, Team]):
|
|||||||
self,
|
self,
|
||||||
num: int,
|
num: int,
|
||||||
position: Sequence[float],
|
position: Sequence[float],
|
||||||
|
*,
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
make_current: bool = False,
|
make_current: bool = False,
|
||||||
relative_to: int | None = None,
|
relative_to: int | None = None,
|
||||||
@ -577,6 +578,7 @@ class TutorialActivity(bs.Activity[Player, Team]):
|
|||||||
self,
|
self,
|
||||||
num: int,
|
num: int,
|
||||||
position: Sequence[float],
|
position: Sequence[float],
|
||||||
|
*,
|
||||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
make_current: bool = False,
|
make_current: bool = False,
|
||||||
relative_to: int | None = None,
|
relative_to: int | None = None,
|
||||||
|
|||||||
@ -201,6 +201,7 @@ class UIV1AppSubsystem(babase.AppSubsystem):
|
|||||||
def set_main_window(
|
def set_main_window(
|
||||||
self,
|
self,
|
||||||
window: bauiv1.MainWindow,
|
window: bauiv1.MainWindow,
|
||||||
|
*,
|
||||||
from_window: bauiv1.MainWindow | None | bool = True,
|
from_window: bauiv1.MainWindow | None | bool = True,
|
||||||
is_back: bool = False,
|
is_back: bool = False,
|
||||||
is_top_level: bool = False,
|
is_top_level: bool = False,
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class AccountViewerWindow(PopupWindow):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
account_id: str,
|
account_id: str,
|
||||||
|
*,
|
||||||
profile_id: str | None = None,
|
profile_id: str | None = None,
|
||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
|
|||||||
@ -316,7 +316,7 @@ class BenchmarksAndStressTestsWindow(bui.MainWindow):
|
|||||||
label=bui.Lstr(resource=f'{self._r}.runStressTestText'),
|
label=bui.Lstr(resource=f'{self._r}.runStressTestText'),
|
||||||
on_activate_call=self._stress_test_pressed,
|
on_activate_call=self._stress_test_pressed,
|
||||||
)
|
)
|
||||||
bui.widget(btn, show_buffer_bottom=50)
|
bui.widget(edit=btn, show_buffer_bottom=50)
|
||||||
|
|
||||||
@override
|
@override
|
||||||
def get_main_window_state(self) -> bui.MainWindowState:
|
def get_main_window_state(self) -> bui.MainWindowState:
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class CharacterPicker(PopupWindow):
|
|||||||
selected_character: str | None = None,
|
selected_character: str | None = None,
|
||||||
):
|
):
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
from bascenev1lib.actor import spazappearance
|
from bascenev1lib.actor import spazappearance
|
||||||
|
|
||||||
assert bui.app.classic is not None
|
assert bui.app.classic is not None
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class ColorPicker(PopupWindow):
|
|||||||
self,
|
self,
|
||||||
parent: bui.Widget,
|
parent: bui.Widget,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
|
*,
|
||||||
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
delegate: Any = None,
|
delegate: Any = None,
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
@ -184,6 +185,7 @@ class ColorPickerExact(PopupWindow):
|
|||||||
self,
|
self,
|
||||||
parent: bui.Widget,
|
parent: bui.Widget,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
|
*,
|
||||||
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
delegate: Any = None,
|
delegate: Any = None,
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
|
|||||||
@ -28,6 +28,7 @@ class ConfigCheckBox:
|
|||||||
configkey: str,
|
configkey: str,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
size: tuple[float, float],
|
size: tuple[float, float],
|
||||||
|
*,
|
||||||
displayname: str | bui.Lstr | None = None,
|
displayname: str | bui.Lstr | None = None,
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
maxwidth: float | None = None,
|
maxwidth: float | None = None,
|
||||||
@ -85,6 +86,7 @@ class ConfigNumberEdit:
|
|||||||
parent: bui.Widget,
|
parent: bui.Widget,
|
||||||
configkey: str,
|
configkey: str,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
|
*,
|
||||||
minval: float = 0.0,
|
minval: float = 0.0,
|
||||||
maxval: float = 100.0,
|
maxval: float = 100.0,
|
||||||
increment: float = 1.0,
|
increment: float = 1.0,
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class ConfirmWindow:
|
|||||||
action: Callable[[], Any] | None = None,
|
action: Callable[[], Any] | None = None,
|
||||||
width: float = 360.0,
|
width: float = 360.0,
|
||||||
height: float = 100.0,
|
height: float = 100.0,
|
||||||
|
*,
|
||||||
cancel_button: bool = True,
|
cancel_button: bool = True,
|
||||||
cancel_is_selected: bool = False,
|
cancel_is_selected: bool = False,
|
||||||
color: tuple[float, float, float] = (1, 1, 1),
|
color: tuple[float, float, float] = (1, 1, 1),
|
||||||
|
|||||||
@ -26,6 +26,7 @@ class GameButton:
|
|||||||
select: bool,
|
select: bool,
|
||||||
row: str,
|
row: str,
|
||||||
):
|
):
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ class TournamentButton:
|
|||||||
select: bool,
|
select: bool,
|
||||||
on_pressed: Callable[[TournamentButton], None],
|
on_pressed: Callable[[TournamentButton], None],
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
self._r = 'coopSelectWindow'
|
self._r = 'coopSelectWindow'
|
||||||
sclx = 300
|
sclx = 300
|
||||||
scly = 195.0
|
scly = 195.0
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class FileSelectorWindow(bui.MainWindow):
|
|||||||
self,
|
self,
|
||||||
path: str,
|
path: str,
|
||||||
callback: Callable[[str | None], Any] | None = None,
|
callback: Callable[[str | None], Any] | None = None,
|
||||||
|
*,
|
||||||
show_base_path: bool = True,
|
show_base_path: bool = True,
|
||||||
valid_file_extensions: Sequence[str] | None = None,
|
valid_file_extensions: Sequence[str] | None = None,
|
||||||
allow_folders: bool = False,
|
allow_folders: bool = False,
|
||||||
|
|||||||
@ -44,6 +44,7 @@ class GatherTab:
|
|||||||
The tab should create and return a container widget covering the
|
The tab should create and return a container widget covering the
|
||||||
specified region.
|
specified region.
|
||||||
"""
|
"""
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
raise RuntimeError('Should not get here.')
|
raise RuntimeError('Should not get here.')
|
||||||
|
|
||||||
def on_deactivate(self) -> None:
|
def on_deactivate(self) -> None:
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class AboutGatherTab(GatherTab):
|
|||||||
region_bottom: float,
|
region_bottom: float,
|
||||||
) -> bui.Widget:
|
) -> bui.Widget:
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
|
|
||||||
plus = bui.app.plus
|
plus = bui.app.plus
|
||||||
assert plus is not None
|
assert plus is not None
|
||||||
|
|||||||
@ -114,6 +114,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
region_left: float,
|
region_left: float,
|
||||||
region_bottom: float,
|
region_bottom: float,
|
||||||
) -> bui.Widget:
|
) -> bui.Widget:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
c_width = region_width
|
c_width = region_width
|
||||||
c_height = region_height - 20
|
c_height = region_height - 20
|
||||||
|
|
||||||
|
|||||||
@ -115,6 +115,7 @@ class NearbyGatherTab(GatherTab):
|
|||||||
region_left: float,
|
region_left: float,
|
||||||
region_bottom: float,
|
region_bottom: float,
|
||||||
) -> bui.Widget:
|
) -> bui.Widget:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
c_width = region_width
|
c_width = region_width
|
||||||
c_height = region_height - 20
|
c_height = region_height - 20
|
||||||
sub_scroll_height = c_height - 85
|
sub_scroll_height = c_height - 85
|
||||||
|
|||||||
@ -99,6 +99,7 @@ class PrivateGatherTab(GatherTab):
|
|||||||
region_left: float,
|
region_left: float,
|
||||||
region_bottom: float,
|
region_bottom: float,
|
||||||
) -> bui.Widget:
|
) -> bui.Widget:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
self._c_width = region_width
|
self._c_width = region_width
|
||||||
self._c_height = region_height - 20
|
self._c_height = region_height - 20
|
||||||
self._container = bui.containerwidget(
|
self._container = bui.containerwidget(
|
||||||
|
|||||||
@ -96,6 +96,7 @@ class UIRow:
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Update for the given data."""
|
"""Update for the given data."""
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
|
|
||||||
plus = bui.app.plus
|
plus = bui.app.plus
|
||||||
assert plus is not None
|
assert plus is not None
|
||||||
@ -404,6 +405,7 @@ class PublicGatherTab(GatherTab):
|
|||||||
region_left: float,
|
region_left: float,
|
||||||
region_bottom: float,
|
region_bottom: float,
|
||||||
) -> bui.Widget:
|
) -> bui.Widget:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
c_width = region_width
|
c_width = region_width
|
||||||
c_height = region_height - 20
|
c_height = region_height - 20
|
||||||
self._container = bui.containerwidget(
|
self._container = bui.containerwidget(
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class IconPicker(PopupWindow):
|
|||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
delegate: Any = None,
|
delegate: Any = None,
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
|
*,
|
||||||
offset: tuple[float, float] = (0.0, 0.0),
|
offset: tuple[float, float] = (0.0, 0.0),
|
||||||
tint_color: Sequence[float] = (1.0, 1.0, 1.0),
|
tint_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
tint2_color: Sequence[float] = (1.0, 1.0, 1.0),
|
tint2_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class LeagueRankButton:
|
|||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
size: tuple[float, float],
|
size: tuple[float, float],
|
||||||
scale: float,
|
scale: float,
|
||||||
|
*,
|
||||||
on_activate_call: Callable[[], Any] | None = None,
|
on_activate_call: Callable[[], Any] | None = None,
|
||||||
transition_delay: float | None = None,
|
transition_delay: float | None = None,
|
||||||
color: tuple[float, float, float] | None = None,
|
color: tuple[float, float, float] | None = None,
|
||||||
|
|||||||
@ -1151,10 +1151,10 @@ class LeagueRankWindow(bui.MainWindow):
|
|||||||
def _show_account_info(
|
def _show_account_info(
|
||||||
self, account_id: str, textwidget: bui.Widget
|
self, account_id: str, textwidget: bui.Widget
|
||||||
) -> None:
|
) -> None:
|
||||||
from bauiv1lib.account import viewer
|
from bauiv1lib.account.viewer import AccountViewerWindow
|
||||||
|
|
||||||
bui.getsound('swish').play()
|
bui.getsound('swish').play()
|
||||||
viewer.AccountViewerWindow(
|
AccountViewerWindow(
|
||||||
account_id=account_id, position=textwidget.get_screen_space_center()
|
account_id=account_id, position=textwidget.get_screen_space_center()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class PartyQueueWindow(bui.Window):
|
|||||||
account_id: str,
|
account_id: str,
|
||||||
name: str,
|
name: str,
|
||||||
):
|
):
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
self.claimed = False
|
self.claimed = False
|
||||||
self._line_left = parent.get_line_left()
|
self._line_left = parent.get_line_left()
|
||||||
self._line_width = parent.get_line_width()
|
self._line_width = parent.get_line_width()
|
||||||
@ -351,12 +352,12 @@ class PartyQueueWindow(bui.Window):
|
|||||||
self, account_id: str | None, origin_widget: bui.Widget
|
self, account_id: str | None, origin_widget: bui.Widget
|
||||||
) -> None:
|
) -> None:
|
||||||
"""A dude was clicked so we should show his account info."""
|
"""A dude was clicked so we should show his account info."""
|
||||||
from bauiv1lib.account import viewer
|
from bauiv1lib.account.viewer import AccountViewerWindow
|
||||||
|
|
||||||
if account_id is None:
|
if account_id is None:
|
||||||
bui.getsound('error').play()
|
bui.getsound('error').play()
|
||||||
return
|
return
|
||||||
viewer.AccountViewerWindow(
|
AccountViewerWindow(
|
||||||
account_id=account_id,
|
account_id=account_id,
|
||||||
position=origin_widget.get_screen_space_center(),
|
position=origin_widget.get_screen_space_center(),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -632,6 +632,7 @@ class PlayWindow(bui.MainWindow):
|
|||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
color: tuple[float, float, float],
|
color: tuple[float, float, float],
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
h_extra = -100
|
h_extra = -100
|
||||||
v_extra = 130
|
v_extra = 130
|
||||||
eye_color = (
|
eye_color = (
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class PlaylistEditController:
|
|||||||
self,
|
self,
|
||||||
sessiontype: type[bs.Session],
|
sessiontype: type[bs.Session],
|
||||||
from_window: bui.MainWindow,
|
from_window: bui.MainWindow,
|
||||||
|
*,
|
||||||
existing_playlist_name: str | None = None,
|
existing_playlist_name: str | None = None,
|
||||||
playlist: list[dict[str, Any]] | None = None,
|
playlist: list[dict[str, Any]] | None = None,
|
||||||
playlist_name: str | None = None,
|
playlist_name: str | None = None,
|
||||||
|
|||||||
@ -31,6 +31,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
|||||||
edit_info: dict[str, Any] | None = None,
|
edit_info: dict[str, Any] | None = None,
|
||||||
):
|
):
|
||||||
# pylint: disable=too-many-branches
|
# pylint: disable=too-many-branches
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
from bascenev1 import (
|
from bascenev1 import (
|
||||||
@ -485,11 +486,11 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
|||||||
if prev_widgets is not None:
|
if prev_widgets is not None:
|
||||||
# Wire our rightmost to their rightmost.
|
# Wire our rightmost to their rightmost.
|
||||||
bui.widget(edit=prev_widgets[-1], down_widget=cwdg[-1])
|
bui.widget(edit=prev_widgets[-1], down_widget=cwdg[-1])
|
||||||
bui.widget(cwdg[-1], up_widget=prev_widgets[-1])
|
bui.widget(edit=cwdg[-1], up_widget=prev_widgets[-1])
|
||||||
|
|
||||||
# Wire our leftmost to their leftmost.
|
# Wire our leftmost to their leftmost.
|
||||||
bui.widget(edit=prev_widgets[0], down_widget=cwdg[0])
|
bui.widget(edit=prev_widgets[0], down_widget=cwdg[0])
|
||||||
bui.widget(cwdg[0], up_widget=prev_widgets[0])
|
bui.widget(edit=cwdg[0], up_widget=prev_widgets[0])
|
||||||
prev_widgets = cwdg
|
prev_widgets = cwdg
|
||||||
except Exception:
|
except Exception:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
@ -617,6 +618,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
|||||||
setting_type: type,
|
setting_type: type,
|
||||||
setting_name: str,
|
setting_name: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
if setting_type == float:
|
if setting_type == float:
|
||||||
val = float(cast(str, bui.textwidget(query=ctrl)))
|
val = float(cast(str, bui.textwidget(query=ctrl)))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class PlaylistMapSelectWindow(bui.MainWindow):
|
|||||||
select_get_more_maps_button: bool = False,
|
select_get_more_maps_button: bool = False,
|
||||||
):
|
):
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
|
|
||||||
from bascenev1 import get_filtered_map_name
|
from bascenev1 import get_filtered_map_name
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class PlayOptionsWindow(PopupWindow):
|
|||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
*,
|
||||||
sessiontype: type[bs.Session],
|
sessiontype: type[bs.Session],
|
||||||
playlist: str,
|
playlist: str,
|
||||||
scale_origin: tuple[float, float],
|
scale_origin: tuple[float, float],
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class PopupWindow:
|
|||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
size: tuple[float, float],
|
size: tuple[float, float],
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
|
*,
|
||||||
offset: tuple[float, float] = (0, 0),
|
offset: tuple[float, float] = (0, 0),
|
||||||
bg_color: tuple[float, float, float] = (0.35, 0.55, 0.15),
|
bg_color: tuple[float, float, float] = (0.35, 0.55, 0.15),
|
||||||
focus_position: tuple[float, float] = (0, 0),
|
focus_position: tuple[float, float] = (0, 0),
|
||||||
@ -116,6 +117,7 @@ class PopupMenuWindow(PopupWindow):
|
|||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
choices: Sequence[str],
|
choices: Sequence[str],
|
||||||
current_choice: str,
|
current_choice: str,
|
||||||
|
*,
|
||||||
delegate: Any = None,
|
delegate: Any = None,
|
||||||
width: float = 230.0,
|
width: float = 230.0,
|
||||||
maxwidth: float | None = None,
|
maxwidth: float | None = None,
|
||||||
@ -301,6 +303,7 @@ class PopupMenu:
|
|||||||
parent: bui.Widget,
|
parent: bui.Widget,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
choices: Sequence[str],
|
choices: Sequence[str],
|
||||||
|
*,
|
||||||
current_choice: str | None = None,
|
current_choice: str | None = None,
|
||||||
on_value_change_call: Callable[[str], Any] | None = None,
|
on_value_change_call: Callable[[str], Any] | None = None,
|
||||||
opening_call: Callable[[], Any] | None = None,
|
opening_call: Callable[[], Any] | None = None,
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class GamepadSettingsWindow(bui.MainWindow):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
inputdevice: bs.InputDevice,
|
inputdevice: bs.InputDevice,
|
||||||
|
*,
|
||||||
modal: bool = False,
|
modal: bool = False,
|
||||||
transition: str = 'in_right',
|
transition: str = 'in_right',
|
||||||
transition_out: str = 'out_right',
|
transition_out: str = 'out_right',
|
||||||
@ -744,6 +745,7 @@ class GamepadSettingsWindow(bui.MainWindow):
|
|||||||
color: tuple[float, float, float],
|
color: tuple[float, float, float],
|
||||||
texture: bui.Texture,
|
texture: bui.Texture,
|
||||||
button: str,
|
button: str,
|
||||||
|
*,
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
message: bui.Lstr | None = None,
|
message: bui.Lstr | None = None,
|
||||||
message2: bui.Lstr | None = None,
|
message2: bui.Lstr | None = None,
|
||||||
@ -955,6 +957,7 @@ class AwaitGamepadInputWindow(bui.Window):
|
|||||||
message: bui.Lstr | None = None,
|
message: bui.Lstr | None = None,
|
||||||
message2: bui.Lstr | None = None,
|
message2: bui.Lstr | None = None,
|
||||||
):
|
):
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
if message is None:
|
if message is None:
|
||||||
print('AwaitGamepadInputWindow message is None!')
|
print('AwaitGamepadInputWindow message is None!')
|
||||||
# Shouldn't get here.
|
# Shouldn't get here.
|
||||||
|
|||||||
@ -473,6 +473,7 @@ class GamepadAdvancedSettingsWindow(bui.Window):
|
|||||||
name: bui.Lstr,
|
name: bui.Lstr,
|
||||||
control: str,
|
control: str,
|
||||||
position: tuple[float, float],
|
position: tuple[float, float],
|
||||||
|
*,
|
||||||
min_val: float = 0.0,
|
min_val: float = 0.0,
|
||||||
max_val: float = 100.0,
|
max_val: float = 100.0,
|
||||||
increment: float = 1.0,
|
increment: float = 1.0,
|
||||||
|
|||||||
@ -271,6 +271,7 @@ class ConfigKeyboardWindow(bui.MainWindow):
|
|||||||
button: str,
|
button: str,
|
||||||
scale: float = 1.0,
|
scale: float = 1.0,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
base_size = 79
|
base_size = 79
|
||||||
btn = bui.buttonwidget(
|
btn = bui.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class SoundtrackEntryTypeSelectWindow(bui.MainWindow):
|
|||||||
callback: Callable[[Any], Any],
|
callback: Callable[[Any], Any],
|
||||||
current_entry: Any,
|
current_entry: Any,
|
||||||
selection_target_name: str,
|
selection_target_name: str,
|
||||||
|
*,
|
||||||
transition: str | None = 'in_right',
|
transition: str | None = 'in_right',
|
||||||
origin_widget: bui.Widget | None = None,
|
origin_widget: bui.Widget | None = None,
|
||||||
):
|
):
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class MacMusicAppPlaylistSelectWindow(bui.MainWindow):
|
|||||||
callback: Callable[[Any], Any],
|
callback: Callable[[Any], Any],
|
||||||
existing_playlist: str | None,
|
existing_playlist: str | None,
|
||||||
existing_entry: Any,
|
existing_entry: Any,
|
||||||
|
*,
|
||||||
transition: str | None = 'in_right',
|
transition: str | None = 'in_right',
|
||||||
origin_widget: bui.Widget | None = None,
|
origin_widget: bui.Widget | None = None,
|
||||||
):
|
):
|
||||||
|
|||||||
@ -23,6 +23,7 @@ class StoreButton:
|
|||||||
position: Sequence[float],
|
position: Sequence[float],
|
||||||
size: Sequence[float],
|
size: Sequence[float],
|
||||||
scale: float,
|
scale: float,
|
||||||
|
*,
|
||||||
on_activate_call: Callable[[], Any] | None = None,
|
on_activate_call: Callable[[], Any] | None = None,
|
||||||
transition_delay: float | None = None,
|
transition_delay: float | None = None,
|
||||||
color: Sequence[float] | None = None,
|
color: Sequence[float] | None = None,
|
||||||
|
|||||||
@ -19,6 +19,7 @@ def instantiate_store_item_display(
|
|||||||
b_pos: tuple[float, float],
|
b_pos: tuple[float, float],
|
||||||
b_width: float,
|
b_width: float,
|
||||||
b_height: float,
|
b_height: float,
|
||||||
|
*,
|
||||||
boffs_h: float = 0.0,
|
boffs_h: float = 0.0,
|
||||||
boffs_h2: float = 0.0,
|
boffs_h2: float = 0.0,
|
||||||
boffs_v2: float = 0,
|
boffs_v2: float = 0,
|
||||||
@ -26,6 +27,7 @@ def instantiate_store_item_display(
|
|||||||
button: bool = True,
|
button: bool = True,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""(internal)"""
|
"""(internal)"""
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
# pylint: disable=too-many-branches
|
# pylint: disable=too-many-branches
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
|||||||
@ -37,6 +37,7 @@ class TabRow(Generic[T]):
|
|||||||
tabdefs: list[tuple[T, bui.Lstr]],
|
tabdefs: list[tuple[T, bui.Lstr]],
|
||||||
pos: tuple[float, float],
|
pos: tuple[float, float],
|
||||||
size: tuple[float, float],
|
size: tuple[float, float],
|
||||||
|
*,
|
||||||
on_select_call: Callable[[T], None] | None = None,
|
on_select_call: Callable[[T], None] | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
if not tabdefs:
|
if not tabdefs:
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
offset: tuple[float, float] = (0.0, 0.0),
|
offset: tuple[float, float] = (0.0, 0.0),
|
||||||
on_close_call: Callable[[], Any] | None = None,
|
on_close_call: Callable[[], Any] | None = None,
|
||||||
):
|
):
|
||||||
# Needs some tidying.
|
# pylint: disable=too-many-positional-arguments
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
# pylint: disable=too-many-branches
|
# pylint: disable=too-many-branches
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
|
|||||||
@ -21,6 +21,7 @@ class TournamentScoresWindow(PopupWindow):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
tournament_id: str,
|
tournament_id: str,
|
||||||
|
*,
|
||||||
tournament_activity: bs.GameActivity | None = None,
|
tournament_activity: bs.GameActivity | None = None,
|
||||||
position: tuple[float, float] = (0.0, 0.0),
|
position: tuple[float, float] = (0.0, 0.0),
|
||||||
scale: float | None = None,
|
scale: float | None = None,
|
||||||
|
|||||||
@ -134,6 +134,7 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
sub_width: int,
|
sub_width: int,
|
||||||
trophy_types: list[list[str]],
|
trophy_types: list[list[str]],
|
||||||
) -> int:
|
) -> int:
|
||||||
|
# pylint: disable=too-many-positional-arguments
|
||||||
from bascenev1 import get_trophy_string
|
from bascenev1 import get_trophy_string
|
||||||
|
|
||||||
total_pts = 0
|
total_pts = 0
|
||||||
|
|||||||
@ -699,8 +699,8 @@ auto Assets::GetPendingLoadCount() -> int {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
auto Assets::GetAssetPendingLoadCount(
|
auto Assets::GetAssetPendingLoadCount(
|
||||||
std::unordered_map<std::string, Object::Ref<T> >* t_list,
|
std::unordered_map<std::string, Object::Ref<T> >* t_list, AssetType type)
|
||||||
AssetType type) -> int {
|
-> int {
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
assert(asset_lists_locked_);
|
assert(asset_lists_locked_);
|
||||||
|
|
||||||
@ -1056,8 +1056,8 @@ void Assets::Prune(int level) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Assets::FindAssetFile(FileType type,
|
auto Assets::FindAssetFile(FileType type, const std::string& name)
|
||||||
const std::string& name) -> std::string {
|
-> std::string {
|
||||||
std::string file_out;
|
std::string file_out;
|
||||||
|
|
||||||
// We don't protect package-path access so make sure its always from here.
|
// We don't protect package-path access so make sure its always from here.
|
||||||
|
|||||||
@ -38,8 +38,8 @@ class Assets {
|
|||||||
/// is deleted once the load is completed.
|
/// is deleted once the load is completed.
|
||||||
void AddPendingLoad(Object::Ref<Asset>* c);
|
void AddPendingLoad(Object::Ref<Asset>* c);
|
||||||
enum class FileType { kMesh, kCollisionMesh, kTexture, kSound, kData };
|
enum class FileType { kMesh, kCollisionMesh, kTexture, kSound, kData };
|
||||||
auto FindAssetFile(FileType fileType,
|
auto FindAssetFile(FileType fileType, const std::string& file_in)
|
||||||
const std::string& file_in) -> std::string;
|
-> std::string;
|
||||||
|
|
||||||
/// Unload renderer-specific bits only (gl display lists, etc) - used when
|
/// Unload renderer-specific bits only (gl display lists, etc) - used when
|
||||||
/// recreating/adjusting the renderer.
|
/// recreating/adjusting the renderer.
|
||||||
@ -131,8 +131,8 @@ class Assets {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
auto GetAssetPendingLoadCount(
|
auto GetAssetPendingLoadCount(
|
||||||
std::unordered_map<std::string, Object::Ref<T> >* t_list,
|
std::unordered_map<std::string, Object::Ref<T> >* t_list, AssetType type)
|
||||||
AssetType type) -> int;
|
-> int;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
auto GetAsset(const std::string& file_name,
|
auto GetAsset(const std::string& file_name,
|
||||||
|
|||||||
@ -33,8 +33,8 @@ static auto CallbackRead(void* ptr, size_t size, size_t nmemb,
|
|||||||
void* data_source) -> size_t {
|
void* data_source) -> size_t {
|
||||||
return fread(ptr, size, nmemb, static_cast<FILE*>(data_source));
|
return fread(ptr, size, nmemb, static_cast<FILE*>(data_source));
|
||||||
}
|
}
|
||||||
static auto CallbackSeek(void* data_source, ogg_int64_t offset,
|
static auto CallbackSeek(void* data_source, ogg_int64_t offset, int whence)
|
||||||
int whence) -> int {
|
-> int {
|
||||||
return fseek(static_cast<FILE*>(data_source),
|
return fseek(static_cast<FILE*>(data_source),
|
||||||
static_cast_check_fit<long>(offset), whence); // NOLINT
|
static_cast_check_fit<long>(offset), whence); // NOLINT
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ static void LoadCachedOgg(const char* file_name, std::vector<char>* buffer,
|
|||||||
|
|
||||||
// If we have a cache file and it matches the mod time on the ogg, attempt to
|
// If we have a cache file and it matches the mod time on the ogg, attempt to
|
||||||
// load it.
|
// load it.
|
||||||
struct BA_STAT stat_ogg {};
|
struct BA_STAT stat_ogg{};
|
||||||
time_t ogg_mod_time = 0;
|
time_t ogg_mod_time = 0;
|
||||||
if (g_core->platform->Stat(file_name, &stat_ogg) == 0) {
|
if (g_core->platform->Stat(file_name, &stat_ogg) == 0) {
|
||||||
ogg_mod_time = stat_ogg.st_mtime;
|
ogg_mod_time = stat_ogg.st_mtime;
|
||||||
|
|||||||
@ -124,8 +124,8 @@ auto Audio::IsSoundPlaying(uint32_t play_id) -> bool {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Audio::SourceBeginExisting(uint32_t play_id,
|
auto Audio::SourceBeginExisting(uint32_t play_id, int debug_id)
|
||||||
int debug_id) -> AudioSource* {
|
-> AudioSource* {
|
||||||
BA_DEBUG_FUNCTION_TIMER_BEGIN();
|
BA_DEBUG_FUNCTION_TIMER_BEGIN();
|
||||||
uint32_t source_id = AudioServer::SourceIdFromPlayId(play_id);
|
uint32_t source_id = AudioServer::SourceIdFromPlayId(play_id);
|
||||||
|
|
||||||
@ -186,8 +186,8 @@ auto Audio::SafePlaySysSound(SysSoundID sound_id) -> std::optional<uint32_t> {
|
|||||||
return PlaySound(g_base->assets->SysSound(sound_id));
|
return PlaySound(g_base->assets->SysSound(sound_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Audio::PlaySound(SoundAsset* sound,
|
auto Audio::PlaySound(SoundAsset* sound, float volume)
|
||||||
float volume) -> std::optional<uint32_t> {
|
-> std::optional<uint32_t> {
|
||||||
assert(g_core);
|
assert(g_core);
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
BA_DEBUG_FUNCTION_TIMER_BEGIN();
|
BA_DEBUG_FUNCTION_TIMER_BEGIN();
|
||||||
|
|||||||
@ -15,8 +15,8 @@ static auto CallbackRead(void* ptr, size_t size, size_t nmemb,
|
|||||||
return fread(ptr, size, nmemb, static_cast<FILE*>(data_source));
|
return fread(ptr, size, nmemb, static_cast<FILE*>(data_source));
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto CallbackSeek(void* data_source, ogg_int64_t offset,
|
static auto CallbackSeek(void* data_source, ogg_int64_t offset, int whence)
|
||||||
int whence) -> int {
|
-> int {
|
||||||
return fseek(static_cast<FILE*>(data_source),
|
return fseek(static_cast<FILE*>(data_source),
|
||||||
static_cast_check_fit<long>(offset), whence); // NOLINT
|
static_cast_check_fit<long>(offset), whence); // NOLINT
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2824,17 +2824,19 @@ auto RendererGL::NewScreenRenderTarget() -> RenderTarget* {
|
|||||||
return Object::NewDeferred<RenderTargetGL>(this);
|
return Object::NewDeferred<RenderTargetGL>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto RendererGL::NewFramebufferRenderTarget(
|
auto RendererGL::NewFramebufferRenderTarget(int width, int height,
|
||||||
int width, int height, bool linear_interp, bool depth, bool texture,
|
bool linear_interp, bool depth,
|
||||||
bool depth_texture, bool high_quality, bool msaa,
|
bool texture, bool depth_texture,
|
||||||
bool alpha) -> Object::Ref<RenderTarget> {
|
bool high_quality, bool msaa,
|
||||||
|
bool alpha)
|
||||||
|
-> Object::Ref<RenderTarget> {
|
||||||
return Object::New<RenderTarget, RenderTargetGL>(
|
return Object::New<RenderTarget, RenderTargetGL>(
|
||||||
this, width, height, linear_interp, depth, texture, depth_texture,
|
this, width, height, linear_interp, depth, texture, depth_texture,
|
||||||
high_quality, msaa, alpha);
|
high_quality, msaa, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto RendererGL::NewMeshData(MeshDataType mesh_type,
|
auto RendererGL::NewMeshData(MeshDataType mesh_type, MeshDrawType draw_type)
|
||||||
MeshDrawType draw_type) -> MeshRendererData* {
|
-> MeshRendererData* {
|
||||||
switch (mesh_type) {
|
switch (mesh_type) {
|
||||||
case MeshDataType::kIndexedSimpleSplit: {
|
case MeshDataType::kIndexedSimpleSplit: {
|
||||||
MeshDataSimpleSplitGL* data;
|
MeshDataSimpleSplitGL* data;
|
||||||
|
|||||||
@ -141,17 +141,18 @@ class RendererGL : public Renderer {
|
|||||||
void SetDepthTesting(bool enable) override;
|
void SetDepthTesting(bool enable) override;
|
||||||
void SetDrawAtEqualDepth(bool enable) override;
|
void SetDrawAtEqualDepth(bool enable) override;
|
||||||
auto NewScreenRenderTarget() -> RenderTarget* override;
|
auto NewScreenRenderTarget() -> RenderTarget* override;
|
||||||
auto NewFramebufferRenderTarget(
|
auto NewFramebufferRenderTarget(int width, int height, bool linear_interp,
|
||||||
int width, int height, bool linear_interp, bool depth, bool texture,
|
bool depth, bool texture,
|
||||||
bool depth_is_texture, bool high_quality, bool msaa,
|
bool depth_is_texture, bool high_quality,
|
||||||
bool alpha) -> Object::Ref<RenderTarget> override;
|
bool msaa, bool alpha)
|
||||||
|
-> Object::Ref<RenderTarget> override;
|
||||||
auto NewMeshAssetData(const MeshAsset& mesh)
|
auto NewMeshAssetData(const MeshAsset& mesh)
|
||||||
-> Object::Ref<MeshAssetRendererData> override;
|
-> Object::Ref<MeshAssetRendererData> override;
|
||||||
auto NewTextureData(const TextureAsset& texture)
|
auto NewTextureData(const TextureAsset& texture)
|
||||||
-> Object::Ref<TextureAssetRendererData> override;
|
-> Object::Ref<TextureAssetRendererData> override;
|
||||||
|
|
||||||
auto NewMeshData(MeshDataType type,
|
auto NewMeshData(MeshDataType type, MeshDrawType drawType)
|
||||||
MeshDrawType drawType) -> MeshRendererData* override;
|
-> MeshRendererData* override;
|
||||||
void DeleteMeshData(MeshRendererData* data, MeshDataType type) override;
|
void DeleteMeshData(MeshRendererData* data, MeshDataType type) override;
|
||||||
|
|
||||||
void ProcessRenderCommandBuffer(RenderCommandBuffer* buffer,
|
void ProcessRenderCommandBuffer(RenderCommandBuffer* buffer,
|
||||||
|
|||||||
@ -484,8 +484,8 @@ void Graphics::DrawMiscOverlays(FrameDef* frame_def) {
|
|||||||
screenmessages->DrawMiscOverlays(frame_def);
|
screenmessages->DrawMiscOverlays(frame_def);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Graphics::GetDebugGraph(const std::string& name,
|
auto Graphics::GetDebugGraph(const std::string& name, bool smoothed)
|
||||||
bool smoothed) -> NetGraph* {
|
-> NetGraph* {
|
||||||
auto out = debug_graphs_.find(name);
|
auto out = debug_graphs_.find(name);
|
||||||
if (out == debug_graphs_.end()) {
|
if (out == debug_graphs_.end()) {
|
||||||
debug_graphs_[name] = Object::New<NetGraph>();
|
debug_graphs_[name] = Object::New<NetGraph>();
|
||||||
@ -1681,8 +1681,9 @@ auto Graphics::GraphicsQualityFromRequest(GraphicsQualityRequest request,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Graphics::TextureQualityFromRequest(
|
auto Graphics::TextureQualityFromRequest(TextureQualityRequest request,
|
||||||
TextureQualityRequest request, TextureQuality auto_val) -> TextureQuality {
|
TextureQuality auto_val)
|
||||||
|
-> TextureQuality {
|
||||||
switch (request) {
|
switch (request) {
|
||||||
case TextureQualityRequest::kLow:
|
case TextureQualityRequest::kLow:
|
||||||
return TextureQuality::kLow;
|
return TextureQuality::kLow;
|
||||||
|
|||||||
@ -339,8 +339,9 @@ class Graphics {
|
|||||||
static auto GraphicsQualityFromRequest(GraphicsQualityRequest request,
|
static auto GraphicsQualityFromRequest(GraphicsQualityRequest request,
|
||||||
GraphicsQuality auto_val)
|
GraphicsQuality auto_val)
|
||||||
-> GraphicsQuality;
|
-> GraphicsQuality;
|
||||||
static auto TextureQualityFromRequest(
|
static auto TextureQualityFromRequest(TextureQualityRequest request,
|
||||||
TextureQualityRequest request, TextureQuality auto_val) -> TextureQuality;
|
TextureQuality auto_val)
|
||||||
|
-> TextureQuality;
|
||||||
|
|
||||||
/// For temporary use from arbitrary threads. This should be removed when
|
/// For temporary use from arbitrary threads. This should be removed when
|
||||||
/// possible and replaced with proper safe thread-specific access patterns
|
/// possible and replaced with proper safe thread-specific access patterns
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
namespace ballistica::base {
|
namespace ballistica::base {
|
||||||
|
|
||||||
static auto ValueTestFloat(float* storage, double* absval,
|
static auto ValueTestFloat(float* storage, double* absval, double* deltaval)
|
||||||
double* deltaval) -> double {
|
-> double {
|
||||||
if (absval) {
|
if (absval) {
|
||||||
*storage = static_cast<float>(*absval);
|
*storage = static_cast<float>(*absval);
|
||||||
}
|
}
|
||||||
@ -27,8 +27,8 @@ static auto ValueTestFloat(float* storage, double* absval,
|
|||||||
return *storage;
|
return *storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto ValueTestBool(bool* storage, double* absval,
|
static auto ValueTestBool(bool* storage, double* absval, double* deltaval)
|
||||||
double* deltaval) -> double {
|
-> double {
|
||||||
if (absval) {
|
if (absval) {
|
||||||
*storage = static_cast<bool>(*absval);
|
*storage = static_cast<bool>(*absval);
|
||||||
}
|
}
|
||||||
@ -241,8 +241,9 @@ void GraphicsVR::CalcVROverlayMatrices(FrameDef* frame_def) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto GraphicsVR::CalcVROverlayMatrix(
|
auto GraphicsVR::CalcVROverlayMatrix(const Vector3f& cam_pt,
|
||||||
const Vector3f& cam_pt, const Vector3f& cam_target_pt) const -> Matrix44f {
|
const Vector3f& cam_target_pt) const
|
||||||
|
-> Matrix44f {
|
||||||
Matrix44f m = Matrix44fTranslate(cam_target_pt);
|
Matrix44f m = Matrix44fTranslate(cam_target_pt);
|
||||||
Vector3f diff = cam_pt - cam_target_pt;
|
Vector3f diff = cam_pt - cam_target_pt;
|
||||||
diff.Normalize();
|
diff.Normalize();
|
||||||
|
|||||||
@ -99,9 +99,9 @@ void Renderer::RenderFrameDef(FrameDef* frame_def) {
|
|||||||
// If preprocess decided not to render this.
|
// If preprocess decided not to render this.
|
||||||
if (!frame_def->rendering()) return;
|
if (!frame_def->rendering()) return;
|
||||||
|
|
||||||
// Set camera/hand/etc positioning with latest VR data if applicable.
|
// Set camera/hand/etc positioning with latest VR data if applicable.
|
||||||
// (we do this here at render time as opposed to frame construction time
|
// (we do this here at render time as opposed to frame construction time
|
||||||
// so we have the most up-to-date data possible).
|
// so we have the most up-to-date data possible).
|
||||||
#if BA_VR_BUILD
|
#if BA_VR_BUILD
|
||||||
VRUpdateForEyeRender(frame_def);
|
VRUpdateForEyeRender(frame_def);
|
||||||
#endif // BA_VR_BUILD
|
#endif // BA_VR_BUILD
|
||||||
|
|||||||
@ -152,8 +152,8 @@ class Renderer {
|
|||||||
-> Object::Ref<MeshAssetRendererData> = 0;
|
-> Object::Ref<MeshAssetRendererData> = 0;
|
||||||
virtual auto NewTextureData(const TextureAsset& texture)
|
virtual auto NewTextureData(const TextureAsset& texture)
|
||||||
-> Object::Ref<TextureAssetRendererData> = 0;
|
-> Object::Ref<TextureAssetRendererData> = 0;
|
||||||
virtual auto NewMeshData(MeshDataType t,
|
virtual auto NewMeshData(MeshDataType t, MeshDrawType drawType)
|
||||||
MeshDrawType drawType) -> MeshRendererData* = 0;
|
-> MeshRendererData* = 0;
|
||||||
virtual void DeleteMeshData(MeshRendererData* data, MeshDataType t) = 0;
|
virtual void DeleteMeshData(MeshRendererData* data, MeshDataType t) = 0;
|
||||||
virtual void ProcessRenderCommandBuffer(RenderCommandBuffer* buffer,
|
virtual void ProcessRenderCommandBuffer(RenderCommandBuffer* buffer,
|
||||||
const RenderPass& pass,
|
const RenderPass& pass,
|
||||||
@ -176,10 +176,12 @@ class Renderer {
|
|||||||
virtual void InvalidateFramebuffer(bool color, bool depth,
|
virtual void InvalidateFramebuffer(bool color, bool depth,
|
||||||
bool target_read_framebuffer) = 0;
|
bool target_read_framebuffer) = 0;
|
||||||
virtual auto NewScreenRenderTarget() -> RenderTarget* = 0;
|
virtual auto NewScreenRenderTarget() -> RenderTarget* = 0;
|
||||||
virtual auto NewFramebufferRenderTarget(
|
virtual auto NewFramebufferRenderTarget(int width, int height,
|
||||||
int width, int height, bool linear_interp, bool depth, bool texture,
|
bool linear_interp, bool depth,
|
||||||
bool depth_texture, bool high_quality, bool msaa,
|
bool texture, bool depth_texture,
|
||||||
bool alpha) -> Object::Ref<RenderTarget> = 0;
|
bool high_quality, bool msaa,
|
||||||
|
bool alpha)
|
||||||
|
-> Object::Ref<RenderTarget> = 0;
|
||||||
virtual void PushGroupMarker(const char* label) = 0;
|
virtual void PushGroupMarker(const char* label) = 0;
|
||||||
virtual void PopGroupMarker() = 0;
|
virtual void PopGroupMarker() = 0;
|
||||||
virtual void BlitBuffer(RenderTarget* src, RenderTarget* dst, bool depth,
|
virtual void BlitBuffer(RenderTarget* src, RenderTarget* dst, bool depth,
|
||||||
|
|||||||
@ -331,8 +331,8 @@ auto JoystickInput::ShouldBeHiddenFromUser() -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto JoystickInput::GetCalibratedValue(float raw,
|
auto JoystickInput::GetCalibratedValue(float raw, float neutral) const
|
||||||
float neutral) const -> int32_t {
|
-> int32_t {
|
||||||
int32_t val;
|
int32_t val;
|
||||||
float dead_zone = 0.5f;
|
float dead_zone = 0.5f;
|
||||||
float mag, target;
|
float mag, target;
|
||||||
|
|||||||
@ -43,8 +43,8 @@ class Input {
|
|||||||
// Given a device name and persistent identifier for it, returns a device or
|
// Given a device name and persistent identifier for it, returns a device or
|
||||||
// nullptr. Note that this can return hidden devices (ones the user has
|
// nullptr. Note that this can return hidden devices (ones the user has
|
||||||
// flagged as totally-ignored, etc).
|
// flagged as totally-ignored, etc).
|
||||||
auto GetInputDevice(const std::string& name,
|
auto GetInputDevice(const std::string& name, const std::string& persistent_id)
|
||||||
const std::string& persistent_id) -> InputDevice*;
|
-> InputDevice*;
|
||||||
|
|
||||||
// Return a device by id, or nullptr for an invalid id. Note that this can
|
// Return a device by id, or nullptr for an invalid id. Note that this can
|
||||||
// return hidden devices (ones the user has flagged as totally-ignored, etc).
|
// return hidden devices (ones the user has flagged as totally-ignored, etc).
|
||||||
|
|||||||
@ -636,8 +636,8 @@ void Logic::NotifyOfPendingAssetLoads() {
|
|||||||
UpdatePendingWorkTimer_();
|
UpdatePendingWorkTimer_();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Logic::NewAppTimer(microsecs_t length, bool repeat,
|
auto Logic::NewAppTimer(microsecs_t length, bool repeat, Runnable* runnable)
|
||||||
Runnable* runnable) -> int {
|
-> int {
|
||||||
// App-Timers simply get injected into our loop and run alongside our own
|
// App-Timers simply get injected into our loop and run alongside our own
|
||||||
// stuff.
|
// stuff.
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
@ -661,8 +661,8 @@ void Logic::SetAppTimerLength(int timer_id, microsecs_t length) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Logic::NewDisplayTimer(microsecs_t length, bool repeat,
|
auto Logic::NewDisplayTimer(microsecs_t length, bool repeat, Runnable* runnable)
|
||||||
Runnable* runnable) -> int {
|
-> int {
|
||||||
// Display-Timers go into a timer-list that we exec explicitly when we
|
// Display-Timers go into a timer-list that we exec explicitly when we
|
||||||
// step display-time.
|
// step display-time.
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
|
|||||||
@ -94,8 +94,8 @@ class Logic {
|
|||||||
void DeleteAppTimer(int timer_id);
|
void DeleteAppTimer(int timer_id);
|
||||||
void SetAppTimerLength(int timer_id, microsecs_t length);
|
void SetAppTimerLength(int timer_id, microsecs_t length);
|
||||||
|
|
||||||
auto NewDisplayTimer(microsecs_t length, bool repeat,
|
auto NewDisplayTimer(microsecs_t length, bool repeat, Runnable* runnable)
|
||||||
Runnable* runnable) -> int;
|
-> int;
|
||||||
void DeleteDisplayTimer(int timer_id);
|
void DeleteDisplayTimer(int timer_id);
|
||||||
void SetDisplayTimerLength(int timer_id, microsecs_t length);
|
void SetDisplayTimerLength(int timer_id, microsecs_t length);
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ void NetworkReader::PokeSelf_() {
|
|||||||
Log(LogLevel::kError, "Unable to create sleep ping socket; errno "
|
Log(LogLevel::kError, "Unable to create sleep ping socket; errno "
|
||||||
+ g_core->platform->GetSocketErrorString());
|
+ g_core->platform->GetSocketErrorString());
|
||||||
} else {
|
} else {
|
||||||
struct sockaddr_in serv_addr {};
|
struct sockaddr_in serv_addr{};
|
||||||
memset(&serv_addr, 0, sizeof(serv_addr));
|
memset(&serv_addr, 0, sizeof(serv_addr));
|
||||||
serv_addr.sin_family = AF_INET;
|
serv_addr.sin_family = AF_INET;
|
||||||
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); // NOLINT
|
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); // NOLINT
|
||||||
@ -69,7 +69,7 @@ void NetworkReader::PokeSelf_() {
|
|||||||
Log(LogLevel::kError, "Unable to bind sleep socket: "
|
Log(LogLevel::kError, "Unable to bind sleep socket: "
|
||||||
+ g_core->platform->GetSocketErrorString());
|
+ g_core->platform->GetSocketErrorString());
|
||||||
} else {
|
} else {
|
||||||
struct sockaddr_in t_addr {};
|
struct sockaddr_in t_addr{};
|
||||||
memset(&t_addr, 0, sizeof(t_addr));
|
memset(&t_addr, 0, sizeof(t_addr));
|
||||||
t_addr.sin_family = AF_INET;
|
t_addr.sin_family = AF_INET;
|
||||||
t_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // NOLINT
|
t_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); // NOLINT
|
||||||
@ -414,7 +414,7 @@ void NetworkReader::OpenSockets_() {
|
|||||||
g_core->platform->SetSocketNonBlocking(sd4_);
|
g_core->platform->SetSocketNonBlocking(sd4_);
|
||||||
|
|
||||||
// Bind to local server port.
|
// Bind to local server port.
|
||||||
struct sockaddr_in serv_addr {};
|
struct sockaddr_in serv_addr{};
|
||||||
serv_addr.sin_family = AF_INET;
|
serv_addr.sin_family = AF_INET;
|
||||||
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); // NOLINT
|
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); // NOLINT
|
||||||
|
|
||||||
@ -443,7 +443,7 @@ void NetworkReader::OpenSockets_() {
|
|||||||
|
|
||||||
// See what v4 port we actually wound up with.
|
// See what v4 port we actually wound up with.
|
||||||
if (sd4_ != -1) {
|
if (sd4_ != -1) {
|
||||||
struct sockaddr_in sa {};
|
struct sockaddr_in sa{};
|
||||||
socklen_t sa_len = sizeof(sa);
|
socklen_t sa_len = sizeof(sa);
|
||||||
if (getsockname(sd4_, reinterpret_cast<sockaddr*>(&sa), &sa_len) == 0) {
|
if (getsockname(sd4_, reinterpret_cast<sockaddr*>(&sa), &sa_len) == 0) {
|
||||||
port4_ = ntohs(sa.sin_port); // NOLINT
|
port4_ = ntohs(sa.sin_port); // NOLINT
|
||||||
@ -474,7 +474,7 @@ void NetworkReader::OpenSockets_() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_core->platform->SetSocketNonBlocking(sd6_);
|
g_core->platform->SetSocketNonBlocking(sd6_);
|
||||||
struct sockaddr_in6 serv_addr {};
|
struct sockaddr_in6 serv_addr{};
|
||||||
memset(&serv_addr, 0, sizeof(serv_addr));
|
memset(&serv_addr, 0, sizeof(serv_addr));
|
||||||
serv_addr.sin6_family = AF_INET6;
|
serv_addr.sin6_family = AF_INET6;
|
||||||
serv_addr.sin6_port = htons(port6_); // NOLINT
|
serv_addr.sin6_port = htons(port6_); // NOLINT
|
||||||
@ -505,7 +505,7 @@ void NetworkReader::OpenSockets_() {
|
|||||||
|
|
||||||
// See what v6 port we actually wound up with.
|
// See what v6 port we actually wound up with.
|
||||||
if (sd6_ != -1) {
|
if (sd6_ != -1) {
|
||||||
struct sockaddr_in sa {};
|
struct sockaddr_in sa{};
|
||||||
socklen_t sa_len = sizeof(sa);
|
socklen_t sa_len = sizeof(sa);
|
||||||
if (getsockname(sd6_, reinterpret_cast<sockaddr*>(&sa), &sa_len) == 0) {
|
if (getsockname(sd6_, reinterpret_cast<sockaddr*>(&sa), &sa_len) == 0) {
|
||||||
port6_ = ntohs(sa.sin_port); // NOLINT
|
port6_ = ntohs(sa.sin_port); // NOLINT
|
||||||
|
|||||||
@ -207,14 +207,14 @@ void BasePlatform::SetupInterruptHandling() {
|
|||||||
throw Exception();
|
throw Exception();
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
struct sigaction handler {};
|
struct sigaction handler{};
|
||||||
handler.sa_handler = HandleSIGINT;
|
handler.sa_handler = HandleSIGINT;
|
||||||
sigemptyset(&handler.sa_mask);
|
sigemptyset(&handler.sa_mask);
|
||||||
handler.sa_flags = 0;
|
handler.sa_flags = 0;
|
||||||
sigaction(SIGINT, &handler, nullptr);
|
sigaction(SIGINT, &handler, nullptr);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
struct sigaction handler {};
|
struct sigaction handler{};
|
||||||
handler.sa_handler = HandleSIGTERM;
|
handler.sa_handler = HandleSIGTERM;
|
||||||
sigemptyset(&handler.sa_mask);
|
sigemptyset(&handler.sa_mask);
|
||||||
handler.sa_flags = 0;
|
handler.sa_flags = 0;
|
||||||
|
|||||||
@ -333,8 +333,8 @@ auto BasePython::GetRawConfigValue(const char* name) -> PyObject* {
|
|||||||
return PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
|
return PyDict_GetItemString(objs().Get(ObjID::kConfig).Get(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BasePython::GetRawConfigValue(const char* name,
|
auto BasePython::GetRawConfigValue(const char* name, const char* default_value)
|
||||||
const char* default_value) -> std::string {
|
-> std::string {
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
assert(objs().Exists(ObjID::kConfig));
|
assert(objs().Exists(ObjID::kConfig));
|
||||||
PyObject* value =
|
PyObject* value =
|
||||||
@ -345,8 +345,8 @@ auto BasePython::GetRawConfigValue(const char* name,
|
|||||||
return PyUnicode_AsUTF8(value);
|
return PyUnicode_AsUTF8(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BasePython::GetRawConfigValue(const char* name,
|
auto BasePython::GetRawConfigValue(const char* name, float default_value)
|
||||||
float default_value) -> float {
|
-> float {
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
assert(objs().Exists(ObjID::kConfig));
|
assert(objs().Exists(ObjID::kConfig));
|
||||||
PyObject* value =
|
PyObject* value =
|
||||||
@ -402,8 +402,8 @@ auto BasePython::GetRawConfigValue(const char* name, int default_value) -> int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BasePython::GetRawConfigValue(const char* name,
|
auto BasePython::GetRawConfigValue(const char* name, bool default_value)
|
||||||
bool default_value) -> bool {
|
-> bool {
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
assert(objs().Exists(ObjID::kConfig));
|
assert(objs().Exists(ObjID::kConfig));
|
||||||
PyObject* value =
|
PyObject* value =
|
||||||
@ -537,8 +537,8 @@ auto BasePython::GetResource(const char* key, const char* fallback_resource,
|
|||||||
return std::string("<res-err: ") + key + ">";
|
return std::string("<res-err: ") + key + ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BasePython::GetTranslation(const char* category,
|
auto BasePython::GetTranslation(const char* category, const char* s)
|
||||||
const char* s) -> std::string {
|
-> std::string {
|
||||||
assert(Python::HaveGIL());
|
assert(Python::HaveGIL());
|
||||||
PythonRef results;
|
PythonRef results;
|
||||||
PythonRef args(Py_BuildValue("(ss)", category, s), PythonRef::kSteal);
|
PythonRef args(Py_BuildValue("(ss)", category, s), PythonRef::kSteal);
|
||||||
|
|||||||
@ -145,8 +145,8 @@ class BasePython {
|
|||||||
// functions (which themselves call these functions)
|
// functions (which themselves call these functions)
|
||||||
auto GetRawConfigValue(const char* name)
|
auto GetRawConfigValue(const char* name)
|
||||||
-> PyObject*; // (returns a borrowed ref)
|
-> PyObject*; // (returns a borrowed ref)
|
||||||
auto GetRawConfigValue(const char* name,
|
auto GetRawConfigValue(const char* name, const char* default_value)
|
||||||
const char* default_value) -> std::string;
|
-> std::string;
|
||||||
auto GetRawConfigValue(const char* name, float default_value) -> float;
|
auto GetRawConfigValue(const char* name, float default_value) -> float;
|
||||||
auto GetRawConfigValue(const char* name, std::optional<float> default_value)
|
auto GetRawConfigValue(const char* name, std::optional<float> default_value)
|
||||||
-> std::optional<float>;
|
-> std::optional<float>;
|
||||||
|
|||||||
@ -18,8 +18,8 @@ class PythonClassAppTimer : public PythonClass {
|
|||||||
static PyTypeObject type_obj;
|
static PyTypeObject type_obj;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static auto tp_new(PyTypeObject* type, PyObject* args,
|
static auto tp_new(PyTypeObject* type, PyObject* args, PyObject* keywds)
|
||||||
PyObject* keywds) -> PyObject*;
|
-> PyObject*;
|
||||||
static void tp_dealloc(PythonClassAppTimer* self);
|
static void tp_dealloc(PythonClassAppTimer* self);
|
||||||
int timer_id_{};
|
int timer_id_{};
|
||||||
bool have_timer_{};
|
bool have_timer_{};
|
||||||
|
|||||||
@ -92,8 +92,8 @@ auto PythonClassContextCall::tp_new(PyTypeObject* type, PyObject* args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto PythonClassContextCall::tp_call(PythonClassContextCall* self,
|
auto PythonClassContextCall::tp_call(PythonClassContextCall* self,
|
||||||
PyObject* args,
|
PyObject* args, PyObject* keywds)
|
||||||
PyObject* keywds) -> PyObject* {
|
-> PyObject* {
|
||||||
BA_PYTHON_TRY;
|
BA_PYTHON_TRY;
|
||||||
static const char* kwlist[] = {nullptr};
|
static const char* kwlist[] = {nullptr};
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "",
|
if (!PyArg_ParseTupleAndKeywords(args, keywds, "",
|
||||||
|
|||||||
@ -23,8 +23,8 @@ class PythonClassContextCall : public PythonClass {
|
|||||||
static auto tp_call(PythonClassContextCall* self, PyObject* args,
|
static auto tp_call(PythonClassContextCall* self, PyObject* args,
|
||||||
PyObject* keywds) -> PyObject*;
|
PyObject* keywds) -> PyObject*;
|
||||||
static auto tp_repr(PythonClassContextCall* self) -> PyObject*;
|
static auto tp_repr(PythonClassContextCall* self) -> PyObject*;
|
||||||
static auto tp_new(PyTypeObject* type, PyObject* args,
|
static auto tp_new(PyTypeObject* type, PyObject* args, PyObject* keywds)
|
||||||
PyObject* keywds) -> PyObject*;
|
-> PyObject*;
|
||||||
static void tp_dealloc(PythonClassContextCall* self);
|
static void tp_dealloc(PythonClassContextCall* self);
|
||||||
Object::Ref<PythonContextCall>* context_call_{};
|
Object::Ref<PythonContextCall>* context_call_{};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -151,8 +151,8 @@ auto PythonClassContextRef::Enter(PythonClassContextRef* self) -> PyObject* {
|
|||||||
BA_PYTHON_CATCH;
|
BA_PYTHON_CATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto PythonClassContextRef::Exit(PythonClassContextRef* self,
|
auto PythonClassContextRef::Exit(PythonClassContextRef* self, PyObject* args)
|
||||||
PyObject* args) -> PyObject* {
|
-> PyObject* {
|
||||||
BA_PYTHON_TRY;
|
BA_PYTHON_TRY;
|
||||||
g_base->SetCurrentContext(*self->context_ref_prev_);
|
g_base->SetCurrentContext(*self->context_ref_prev_);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
|||||||
@ -22,10 +22,10 @@ class PythonClassContextRef : public PythonClass {
|
|||||||
private:
|
private:
|
||||||
static PyMethodDef tp_methods[];
|
static PyMethodDef tp_methods[];
|
||||||
static auto tp_repr(PythonClassContextRef* self) -> PyObject*;
|
static auto tp_repr(PythonClassContextRef* self) -> PyObject*;
|
||||||
static auto tp_richcompare(PythonClassContextRef* c1, PyObject* c2,
|
static auto tp_richcompare(PythonClassContextRef* c1, PyObject* c2, int op)
|
||||||
int op) -> PyObject*;
|
-> PyObject*;
|
||||||
static auto tp_new(PyTypeObject* type, PyObject* args,
|
static auto tp_new(PyTypeObject* type, PyObject* args, PyObject* keywds)
|
||||||
PyObject* keywds) -> PyObject*;
|
-> PyObject*;
|
||||||
static void tp_dealloc(PythonClassContextRef* self);
|
static void tp_dealloc(PythonClassContextRef* self);
|
||||||
static auto Enter(PythonClassContextRef* self) -> PyObject*;
|
static auto Enter(PythonClassContextRef* self) -> PyObject*;
|
||||||
static auto Exit(PythonClassContextRef* self, PyObject* args) -> PyObject*;
|
static auto Exit(PythonClassContextRef* self, PyObject* args) -> PyObject*;
|
||||||
|
|||||||
@ -18,8 +18,8 @@ class PythonClassDisplayTimer : public PythonClass {
|
|||||||
static PyTypeObject type_obj;
|
static PyTypeObject type_obj;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static auto tp_new(PyTypeObject* type, PyObject* args,
|
static auto tp_new(PyTypeObject* type, PyObject* args, PyObject* keywds)
|
||||||
PyObject* keywds) -> PyObject*;
|
-> PyObject*;
|
||||||
static void tp_dealloc(PythonClassDisplayTimer* self);
|
static void tp_dealloc(PythonClassDisplayTimer* self);
|
||||||
int timer_id_;
|
int timer_id_;
|
||||||
bool have_timer_;
|
bool have_timer_;
|
||||||
|
|||||||
@ -214,8 +214,8 @@ void PythonClassEnv::tp_dealloc(PythonClassEnv* self) {
|
|||||||
Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
|
Py_TYPE(self)->tp_free(reinterpret_cast<PyObject*>(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto PythonClassEnv::tp_getattro(PythonClassEnv* self,
|
auto PythonClassEnv::tp_getattro(PythonClassEnv* self, PyObject* attr)
|
||||||
PyObject* attr) -> PyObject* {
|
-> PyObject* {
|
||||||
BA_PYTHON_TRY;
|
BA_PYTHON_TRY;
|
||||||
|
|
||||||
// Do we need to support other attr types?
|
// Do we need to support other attr types?
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user