Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a63fa75
Reworked permission logic into an enum, splited clearcache command
marius851000 Aug 25, 2024
5922ccf
moved where the permission level is accessed for command
marius851000 Aug 25, 2024
87b1039
more static typing
marius851000 Aug 25, 2024
897cdbd
SetProfile: moved register and forceregister
marius851000 Aug 25, 2024
43bbb58
rename: move to a seperate command file
marius851000 Aug 25, 2024
2271005
replaceressource: moved out of SpriteBot
marius851000 Aug 25, 2024
eb542c6
Moved MoveNode command out of SpriteBot
marius851000 Aug 28, 2024
11ed0af
help command: put all into a single command (instead of separate staf…
marius851000 Aug 28, 2024
25b74cf
SetRessourceCredit moved out of SpriteBot.py
marius851000 Aug 28, 2024
c71f76f
MoveRessource: move out of SpriteBot.py
marius851000 Aug 28, 2024
3ecbbc1
Solve some mypy warning
marius851000 Aug 28, 2024
ec5bec1
ignore or solve all remaining mypy error
marius851000 Aug 28, 2024
b7d3965
SetRessourceLock: moved out of SpriteBot.py
marius851000 Aug 31, 2024
ccd0401
AddNode: move out of SpriteBot.py
marius851000 Aug 31, 2024
48b33f9
delete: move out of SpriteBot
marius851000 Sep 3, 2024
0d8adeb
addgender: move out of SpriteBot.py
marius851000 Sep 3, 2024
907ec2d
need and dontneed: migrated out of SpriteBot.py
marius851000 Sep 16, 2024
eaf4706
AddRessourceCredit: move to dedicated file
marius851000 Oct 5, 2024
14d758b
ignore some mypy error
marius851000 Oct 5, 2024
aa5a504
forcepush: switch to separate file
marius851000 Nov 3, 2024
988b8cf
deletegender: move to a separate file
marius851000 Nov 4, 2024
bfffe64
canon/uncanon: move to a separate file
marius851000 Nov 9, 2024
e1ccad6
rescan: move to a separate file
marius851000 Nov 9, 2024
bae4783
More mypy typing around tracker dict
marius851000 Nov 10, 2024
d8a2f09
ressource completion: move to a separate file
marius851000 Nov 10, 2024
1a5ba2d
absentprofiles: move to a separate file
marius851000 Nov 10, 2024
446a64e
shutdown: move to a separate file
marius851000 Nov 10, 2024
6af9ba1
TransferProfile: move to a separate file
marius851000 Nov 10, 2024
f28ac19
update: move to a separate file
marius851000 Nov 10, 2024
443ce06
bounties: move to a seperate file
marius851000 Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BlueSkyUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_api_key(user, password):
body=bytes(json.dumps(post_data), encoding="utf-8"),
)
api_key = json.loads(api_key.data)
return api_key["accessJwt"]
return api_key["accessJwt"] # type: ignore

def upload_blob(img_data, jwt, mime_type):
http = urllib3.PoolManager()
Expand All @@ -46,7 +46,7 @@ def upload_blob(img_data, jwt, mime_type):
headers={"Content-Type": mime_type, "Authorization": f"Bearer {jwt}"},
)
blob_request = json.loads(blob_request.data)
return blob_request["blob"]
return blob_request["blob"] # type: ignore

def send_post(user, jwt, text, blob, image_alt):
http = urllib3.PoolManager()
Expand Down
38 changes: 30 additions & 8 deletions Constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from enum import Enum
from typing import Dict, List

PORTRAIT_SIZE = 0
PORTRAIT_TILE_X = 0
Expand All @@ -8,18 +10,18 @@

CROP_PORTRAITS = True

COMPLETION_EMOTIONS = []
COMPLETION_EMOTIONS: List[List[int]] = []

EMOTIONS = []
EMOTIONS: List[str] = []


ACTION_MAP = { }
ACTION_MAP: Dict[int, str] = { }

COMPLETION_ACTIONS = []
COMPLETION_ACTIONS: List[List[int]] = []

ACTIONS = []
DUNGEON_ACTIONS = []
STARTER_ACTIONS = []
ACTIONS: List[str] = []
DUNGEON_ACTIONS: List[str] = []
STARTER_ACTIONS: List[str] = []

DIRECTIONS = [ "Down",
"DownRight",
Expand All @@ -33,4 +35,24 @@
MULTI_SHEET_XML = "AnimData.xml"
CREDIT_TXT = "credits.txt"

PHASES = [ "\u26AA incomplete", "\u2705 available", "\u2B50 fully featured" ]
PHASES = [ "\u26AA incomplete", "\u2705 available", "\u2B50 fully featured" ]

MESSAGE_BOUNTIES_DISABLED = "Bounties are disabled for this instance of SpriteBot"

class PermissionLevel(Enum):
EVERYONE = 0
STAFF = 1
ADMIN = 2

def canPerformAction(self, required_level) -> bool:
return required_level.value <= self.value

def displayname(self) -> str:
if self == self.EVERYONE:
return "everyone"
elif self == self.STAFF:
return "staff"
elif self == self.ADMIN:
return "admin"
else:
return "unknown"
Loading
Loading