Skip to content

Commit

Permalink
clean up StatBox
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Nov 29, 2023
1 parent 9626582 commit c52fb86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion changelogs/3.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ It seems every update I add a giant feature no one is going to use. From scale e
That's right, SizeBot is now public! Anyone can now add SizeBot to their server and mess around with it. Whether you're an RP group, a public community, a D&D guild, an artist looking for references, or just want to do funny math in the privacy of you're own server dang it, SizeBot is now available!

This was a hard desicion for me for a lot of reasons.
Firstly, I wanted to ensure I was always *in* the servers that had SizeBot; partially so I could help support it, and partially so I knew my efforts were going towards communities that I could help directly. However, now, my involvement with any communities has become largely diminished, and it feels disingenious to continue pretending as if there's much difference between servers I'm in and server's I'm not.
Firstly, I wanted to ensure I was always *in* the servers that had SizeBot; partially so I could help support it, and partially so I knew my efforts were going towards communities that I could help directly. However, now, my involvement with any communities has become largely diminished, and it feels disingenious to continue pretending as if there's much difference between servers I'm in and servers I'm not.
Secondly, I want the service I've built here to not be linked to me, strictly. I'm not the only one who works or has worked on SizeBot, and I hope that it's usefulness exceed what I alone can do.
Thirdly, I want communities that I would never have thought of; artist groups, D&D guilds, game designers; to be able to use and suggest features for the bot. I am but one person, and my imagination alone shouldn't be the limit for this bot's capabilites.

Expand Down
9 changes: 1 addition & 8 deletions sizebot/lib/proportions.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, user: User, stats: list[StatValue] = None):
sv = s.set(self.user)
self.stats.append(sv)
found_stats[sv.stat.sets] = sv.value
# FInd the everything else
# Find the everything else
loops = 0
while len(all_stats) != len(found_stats):
loops += 1
Expand All @@ -173,9 +173,6 @@ def __init__(self, user: User, stats: list[StatValue] = None):

@property
def scaled(self) -> StatBox:
# TODO: THIS DOES NOT WORK.
# .as_dict() is for the base user, so when it goes to do the calculations, it's not using the new one.
# This only affects equations with power = 0.
scaled_stat_box = self.partial_scaled_dict
new_stats = []
for s in self.stats:
Expand All @@ -188,10 +185,6 @@ def get(self, stat_name: str) -> StatValue | None:
g = (s for s in self.stats if s.stat.sets == stat_name)
return next(g, None)

@property
def as_dict(self) -> dict:
return {s.stat.sets: s.value for s in self.stats if s.value is not None}

@property
def partial_scaled_dict(self) -> dict:
known_stats = {}
Expand Down

0 comments on commit c52fb86

Please sign in to comment.