Final batch of code stability updates before anouther bout of extended testing. Still plenty to go, but making progress.

This commit is contained in:
Storm Dragon
2025-06-20 03:34:50 -04:00
parent 64e79f6945
commit dda84b9905
7 changed files with 48 additions and 15 deletions

View File

@ -30,11 +30,12 @@ class memoryManager():
if not self.listStorageValid(name):
return
if self.listStorage[name]['maxLength'] == None:
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list']
# Fallback: if maxLength is still None, apply default limit of 1000
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list'][:999]
else:
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list'][:self.listStorage[name]['maxLength'] -1]
self.listStorage[name]['index'] = 0
def addIndexList(self, name, maxLength = None, currList = [], currIndex = -1):
def addIndexList(self, name, maxLength = 1000, currList = [], currIndex = -1):
if len(currList) != 0 and (currIndex == -1):
currIndex = 0
self.listStorage[name] = {'list': currList, 'index': currIndex, 'maxLength': maxLength}