Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit 2c89804

Browse files
authored
4.1.1
fixed an issue where the game would delete a saved run that had the island set to Tropical_Parkour_01 and the run was made by CCSM added linux support to system used to detect if CC was open or not fixed an issue where on some terminals , not all colors where avaible , do note this is done by running the cmd export TERM=xterm-256color which sets the terminal to use/allow 256 base colors but this doesn't work if the terminal can't support it, and while the program won't crash if it can't use the extra colors, any text that would use those colors would be invisable but can still are selectable , and by default some raritys use these colors and would have to be changed to be seen
1 parent 7a3756d commit 2c89804

1 file changed

Lines changed: 41 additions & 11 deletions

File tree

CrabChampionSaveManager.py

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
isExe = False
2222
isLinux = False
2323

24-
VERSION = "4.1.0"
24+
VERSION = "4.1.1"
2525

2626
if platform.system() == "Linux":
2727
isLinux = True
@@ -4859,6 +4859,12 @@ def convertPresetToGameSave(preset, defaultJSONOverride=""):
48594859
[{"name": "NextIslandInfo"}, "value", {"name": "IslandName"}, "unknown"],
48604860
"15",
48614861
) # WHY DO I HAVE TO DO THIS, WHY DOES IT NOT WORK UNLESS I DO THIS, WHYYYY
4862+
elif dynamicIslandName(preset["IslandName"]) in ISLANDS["Tropical Parkour Island"]:
4863+
setValue(
4864+
GameJSON,
4865+
[{"name": "NextIslandInfo"}, "value", {"name": "IslandName"}, "unknown"],
4866+
"18",
4867+
) # AGAIN, WHY I DO I HAVE TO DO THIS
48624868
setValue(GameJSON, Paths.CurrentHealth, preset["Health"])
48634869
setValue(GameJSON, Paths.CurrentMaxHealth, preset["MaxHealth"])
48644870
setValue(GameJSON, Paths.CurrentArmorPlates, preset["ArmorPlates"])
@@ -5456,14 +5462,28 @@ class Paths:
54565462
UltraChaosHighestIsland = [{"name": "UltraChaosHighestIslandReached"}, "value"]
54575463

54585464

5459-
def is_process_running(process_name):
5460-
output = subprocess.check_output(
5461-
f'tasklist /FI "IMAGENAME eq {process_name}"',
5462-
shell=True,
5463-
stderr=subprocess.STDOUT,
5464-
text=True,
5465-
)
5466-
return "INFO: No tasks are running which match the specified criteria." not in output
5465+
def is_process_running(process_name, isLinux):
5466+
if isLinux:
5467+
output = subprocess.check_output(
5468+
f'ps aux | grep "{process_name}"',
5469+
shell=True,
5470+
stderr=subprocess.STDOUT,
5471+
text=True,
5472+
)
5473+
return (
5474+
not "INFO: No tasks are running which match the specified criteria." in output
5475+
)
5476+
else:
5477+
output = subprocess.check_output(
5478+
f'tasklist /FI "IMAGENAME eq {process_name}"',
5479+
shell=True,
5480+
stderr=subprocess.STDOUT,
5481+
text=True,
5482+
)
5483+
return (
5484+
"Crab Champions\\CrabChampions\\Binaries\\Win64\\CrabChampions-Win64-Shipping.exe"
5485+
in output
5486+
)
54675487

54685488

54695489
def AccountStatsWatcher():
@@ -5474,13 +5494,14 @@ def AccountStatsWatcher():
54745494
global StopBackupWatcherEvent
54755495
global cacheJSON
54765496
global owd
5497+
global isLinux
54775498
time.sleep(1)
54785499
os.makedirs("CrabChampionSaveManager/AccountStats/Backups", exist_ok=True)
54795500
lastString = ""
54805501
lastAnswer = False
54815502
while True:
54825503
start = time.time()
5483-
answer = is_process_running("CrabChampions-Win64-Shipping.exe")
5504+
answer = is_process_running("CrabChampions-Win64-Shipping.exe", isLinux)
54845505
string = "CrabChampions-Win64-Shipping.exe"
54855506
if answer:
54865507
string += " is running."
@@ -5898,9 +5919,18 @@ def manageAccount():
58985919
# os.remove("CrabChampionSaveManager/backupDataCache.json")
58995920
# time.sleep(1)
59005921

5922+
if True and isLinux:
5923+
os.system("export TERM=xterm-256color")
5924+
59015925
makeScreen()
59025926
for i in range(1, 256):
5903-
curses.init_pair(i, i, -1)
5927+
try:
5928+
curses.init_pair(i, i, -1)
5929+
# infoScreen(str(i))
5930+
except BaseException:
5931+
None
5932+
# time.sleep(30)
5933+
# exiting(0)
59045934
infoScreen("Starting Crab Champion Save Manager\nThis may take a few seconds")
59055935
loadSettings()
59065936

0 commit comments

Comments
 (0)