Browse Source

1.16.5

master
DrBot7 4 years ago
parent
commit
13ca3f0f3e
  1. 2
      cogs/timings_check.yml
  2. 8
      cogs/timings_public.py

2
cogs/timings_check.yml

@ -5,7 +5,7 @@
# wake_up_inactive_animals_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["animals-every"]) # wake_up_inactive_animals_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["animals-every"])
# wake_up_inactive_flying_monsters_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["flying-monsters-every"]) # wake_up_inactive_flying_monsters_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["flying-monsters-every"])
# wake_up_inactive_monsters_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["monsters-every"]) # wake_up_inactive_monsters_every = int(spigot["world-settings"]["default"]["entity-activation-range"]["wake-up-inactive"]["monsters-every"])
version: "1.16.4"
version: "1.16.5"
servers: servers:
- name: "Yatopia" - name: "Yatopia"
prefix: "❌" prefix: "❌"

8
cogs/timings_public.py

@ -22,6 +22,7 @@ class Timings(commands.Cog):
self.bot = bot self.bot = bot
self.TIMINGS_TITLE = "Timings Analysis" self.TIMINGS_TITLE = "Timings Analysis"
# TODO: Check Tuinity.yml for spawn rate changes
async def analyze_timings(self, message): async def analyze_timings(self, message):
words = message.content.replace("\n", " ").split(" ") words = message.content.replace("\n", " ").split(" ")
timings_url = "" timings_url = ""
@ -335,13 +336,16 @@ def create_field(option):
field["inline"] = option["inline"] field["inline"] = option["inline"]
return field return field
# Returns -1 if version A is older than version B # Returns -1 if version A is older than version B
# Returns 0 if version A and B are equivalent # Returns 0 if version A and B are equivalent
# Returns 1 if version A is newer than version B # Returns 1 if version A is newer than version B
def compare_versions(versionA, versionB):
def compare_versions(version_a, version_b):
def normalize(v): def normalize(v):
return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")] return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")]
return (normalize(versionA) > normalize(versionB)) - (normalize(versionA) < normalize(versionB))
return (normalize(version_a) > normalize(version_b)) - (normalize(version_a) < normalize(version_b))
def setup(bot): def setup(bot):
bot.add_cog(Timings(bot)) bot.add_cog(Timings(bot))

Loading…
Cancel
Save