diff --git a/dist/ba_data/python/ba/__pycache__/_language.cpython-39.pyc b/dist/ba_data/python/ba/__pycache__/_language.cpython-39.pyc index 6f598fd..aea1344 100644 Binary files a/dist/ba_data/python/ba/__pycache__/_language.cpython-39.pyc and b/dist/ba_data/python/ba/__pycache__/_language.cpython-39.pyc differ diff --git a/dist/ba_data/python/ba/__pycache__/_store.cpython-39.pyc b/dist/ba_data/python/ba/__pycache__/_store.cpython-39.pyc index 6056930..d6d17c1 100644 Binary files a/dist/ba_data/python/ba/__pycache__/_store.cpython-39.pyc and b/dist/ba_data/python/ba/__pycache__/_store.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/__pycache__/gameutils.cpython-39.pyc b/dist/ba_data/python/bastd/__pycache__/gameutils.cpython-39.pyc index d46355b..957ed35 100644 Binary files a/dist/ba_data/python/bastd/__pycache__/gameutils.cpython-39.pyc and b/dist/ba_data/python/bastd/__pycache__/gameutils.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/__pycache__/mainmenu.cpython-39.pyc b/dist/ba_data/python/bastd/__pycache__/mainmenu.cpython-39.pyc index c58c164..a42ff8b 100644 Binary files a/dist/ba_data/python/bastd/__pycache__/mainmenu.cpython-39.pyc and b/dist/ba_data/python/bastd/__pycache__/mainmenu.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/__pycache__/maps.cpython-39.pyc b/dist/ba_data/python/bastd/__pycache__/maps.cpython-39.pyc index b1ef1f4..1458f41 100644 Binary files a/dist/ba_data/python/bastd/__pycache__/maps.cpython-39.pyc and b/dist/ba_data/python/bastd/__pycache__/maps.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/activity/__pycache__/dualteamscore.cpython-39.pyc b/dist/ba_data/python/bastd/activity/__pycache__/dualteamscore.cpython-39.pyc new file mode 100644 index 0000000..eea49a1 Binary files /dev/null and b/dist/ba_data/python/bastd/activity/__pycache__/dualteamscore.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-39.pyc b/dist/ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-39.pyc index 6720d2a..e1c4dba 100644 Binary files a/dist/ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-39.pyc and b/dist/ba_data/python/bastd/activity/__pycache__/multiteamscore.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-39.pyc b/dist/ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-39.pyc index 8242a30..ffb2102 100644 Binary files a/dist/ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-39.pyc and b/dist/ba_data/python/bastd/activity/__pycache__/multiteamvictory.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/bomb.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/bomb.cpython-39.pyc index dcb9d2e..8a0c29a 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/bomb.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/bomb.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-39.pyc index 165d956..ed3079d 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/controlsguide.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/image.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/image.cpython-39.pyc index e6e10d5..bf6a08e 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/image.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/image.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.opt-1.pyc b/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.opt-1.pyc index 077556e..c577b54 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.opt-1.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.opt-1.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.pyc index d58915c..f27eb18 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/playerspaz.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-39.pyc index aa1ce02..1eb49d2 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/powerupbox.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-39.pyc index b8f5270..2067dea 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/scoreboard.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/spaz.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/spaz.cpython-39.pyc index 27c6ee2..9575c94 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/spaz.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/spaz.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-39.pyc index 6b41d89..1387d52 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/spazappearance.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/spazbot.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/spazbot.cpython-39.pyc index aa265a8..ea9ac5f 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/spazbot.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/spazbot.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-39.pyc index c4e1719..5318582 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/spazfactory.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/__pycache__/text.cpython-39.pyc b/dist/ba_data/python/bastd/actor/__pycache__/text.cpython-39.pyc index 49eccb1..c91dff6 100644 Binary files a/dist/ba_data/python/bastd/actor/__pycache__/text.cpython-39.pyc and b/dist/ba_data/python/bastd/actor/__pycache__/text.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/actor/playerspaz.py b/dist/ba_data/python/bastd/actor/playerspaz.py index 3e285de..6105657 100644 --- a/dist/ba_data/python/bastd/actor/playerspaz.py +++ b/dist/ba_data/python/bastd/actor/playerspaz.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, TypeVar, overload import ba from bastd.actor.spaz import Spaz - +from spazmod import modifyspaz if TYPE_CHECKING: from typing import Any, Sequence, Optional, Literal @@ -56,6 +56,7 @@ class PlayerSpaz(Spaz): Note: this does not wire up any controls; you must call connect_controls_to_player() to do so. """ + character=modifyspaz.getCharacter(player,character) super().__init__(color=color, highlight=highlight, @@ -70,7 +71,7 @@ class PlayerSpaz(Spaz): self.last_player_held_by: Optional[ba.Player] = None self._player = player self._drive_player_position() - from spazmod import modifyspaz + modifyspaz.main(self, self.node, self._player) # Overloads to tell the type system our return type based on doraise val. diff --git a/dist/ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-39.pyc b/dist/ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-39.pyc index 50e200a..7a12c97 100644 Binary files a/dist/ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-39.pyc and b/dist/ba_data/python/bastd/game/__pycache__/easteregghunt.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/game/__pycache__/onslaught.cpython-39.pyc b/dist/ba_data/python/bastd/game/__pycache__/onslaught.cpython-39.pyc index 5dd5402..69fae39 100644 Binary files a/dist/ba_data/python/bastd/game/__pycache__/onslaught.cpython-39.pyc and b/dist/ba_data/python/bastd/game/__pycache__/onslaught.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/game/__pycache__/runaround.cpython-39.pyc b/dist/ba_data/python/bastd/game/__pycache__/runaround.cpython-39.pyc index 841f830..3d723fc 100644 Binary files a/dist/ba_data/python/bastd/game/__pycache__/runaround.cpython-39.pyc and b/dist/ba_data/python/bastd/game/__pycache__/runaround.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/ui/__pycache__/creditslist.cpython-39.pyc b/dist/ba_data/python/bastd/ui/__pycache__/creditslist.cpython-39.pyc index bd0fa18..f20270a 100644 Binary files a/dist/ba_data/python/bastd/ui/__pycache__/creditslist.cpython-39.pyc and b/dist/ba_data/python/bastd/ui/__pycache__/creditslist.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-39.pyc b/dist/ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-39.pyc index c9c9fcc..69f2526 100644 Binary files a/dist/ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-39.pyc and b/dist/ba_data/python/bastd/ui/__pycache__/mainmenu.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/ui/__pycache__/party.cpython-39.pyc b/dist/ba_data/python/bastd/ui/__pycache__/party.cpython-39.pyc index 4394a2d..bf39413 100644 Binary files a/dist/ba_data/python/bastd/ui/__pycache__/party.cpython-39.pyc and b/dist/ba_data/python/bastd/ui/__pycache__/party.cpython-39.pyc differ diff --git a/dist/ba_data/python/bastd/ui/__pycache__/popup.cpython-39.pyc b/dist/ba_data/python/bastd/ui/__pycache__/popup.cpython-39.pyc index f6a15e8..1e04780 100644 Binary files a/dist/ba_data/python/bastd/ui/__pycache__/popup.cpython-39.pyc and b/dist/ba_data/python/bastd/ui/__pycache__/popup.cpython-39.pyc differ diff --git a/dist/ba_root/mods/characters_duplicate.py b/dist/ba_root/mods/characters_duplicate.py deleted file mode 100644 index 41e637b..0000000 --- a/dist/ba_root/mods/characters_duplicate.py +++ /dev/null @@ -1,460 +0,0 @@ -# -*- coding: utf-8 -*- -# ba_meta require api 6 -from __future__ import annotations -from typing import TYPE_CHECKING -import _ba,ba,bastd -from bastd.actor.spazappearance import * -if TYPE_CHECKING: - from typing import List, Optional, Tuple - - -def add_characters(): - - # Zoe ####################################### - t = Appearance('Zoe_mod') - t.color_texture = 'zoeColor' - t.color_mask_texture = 'zoeColorMask' - t.default_color = (0.6, 0.6, 0.6) - t.default_highlight = (0, 1, 0) - t.icon_texture = 'zoeIcon' - t.icon_mask_texture = 'zoeIconColorMask' - t.head_model = 'zoeHead' - t.torso_model = 'zoeTorso' - t.pelvis_model = 'zoePelvis' - t.upper_arm_model = 'zoeUpperArm' - t.forearm_model = 'zoeForeArm' - t.hand_model = 'zoeHand' - t.upper_leg_model = 'zoeUpperLeg' - t.lower_leg_model = 'zoeLowerLeg' - t.toes_model = 'zoeToes' - t.jump_sounds = ['zoeJump01', 'zoeJump02', 'zoeJump03'] - t.attack_sounds = [ - 'zoeAttack01', 'zoeAttack02', 'zoeAttack03', 'zoeAttack04' - ] - t.impact_sounds = [ - 'zoeImpact01', 'zoeImpact02', 'zoeImpact03', 'zoeImpact04' - ] - t.death_sounds = ['zoeDeath01'] - t.pickup_sounds = ['zoePickup01'] - t.fall_sounds = ['zoeFall01'] - t.style = 'female' - - # Ninja ########################################## - t = Appearance('Snake Shadow_mod') - t.color_texture = 'ninjaColor' - t.color_mask_texture = 'ninjaColorMask' - t.default_color = (1, 1, 1) - t.default_highlight = (0.55, 0.8, 0.55) - t.icon_texture = 'ninjaIcon' - t.icon_mask_texture = 'ninjaIconColorMask' - t.head_model = 'ninjaHead' - t.torso_model = 'ninjaTorso' - t.pelvis_model = 'ninjaPelvis' - t.upper_arm_model = 'ninjaUpperArm' - t.forearm_model = 'ninjaForeArm' - t.hand_model = 'ninjaHand' - t.upper_leg_model = 'ninjaUpperLeg' - t.lower_leg_model = 'ninjaLowerLeg' - t.toes_model = 'ninjaToes' - ninja_attacks = ['ninjaAttack' + str(i + 1) + '' for i in range(7)] - ninja_hits = ['ninjaHit' + str(i + 1) + '' for i in range(8)] - ninja_jumps = ['ninjaAttack' + str(i + 1) + '' for i in range(7)] - t.jump_sounds = ninja_jumps - t.attack_sounds = ninja_attacks - t.impact_sounds = ninja_hits - t.death_sounds = ['ninjaDeath1'] - t.pickup_sounds = ninja_attacks - t.fall_sounds = ['ninjaFall1'] - t.style = 'ninja' - - # Barbarian ##################################### - t = Appearance('Kronk_mod') - t.color_texture = 'kronk' - t.color_mask_texture = 'kronkColorMask' - t.default_color = (0.4, 0.5, 0.4) - t.default_highlight = (1, 0.5, 0.3) - t.icon_texture = 'kronkIcon' - t.icon_mask_texture = 'kronkIconColorMask' - t.head_model = 'kronkHead' - t.torso_model = 'kronkTorso' - t.pelvis_model = 'kronkPelvis' - t.upper_arm_model = 'kronkUpperArm' - t.forearm_model = 'kronkForeArm' - t.hand_model = 'kronkHand' - t.upper_leg_model = 'kronkUpperLeg' - t.lower_leg_model = 'kronkLowerLeg' - t.toes_model = 'kronkToes' - kronk_sounds = [ - 'kronk1', 'kronk2', 'kronk3', 'kronk4', 'kronk5', 'kronk6', 'kronk7', - 'kronk8', 'kronk9', 'kronk10' - ] - t.jump_sounds = kronk_sounds - t.attack_sounds = kronk_sounds - t.impact_sounds = kronk_sounds - t.death_sounds = ['kronkDeath'] - t.pickup_sounds = kronk_sounds - t.fall_sounds = ['kronkFall'] - t.style = 'kronk' - - # Chef ########################################### - t = Appearance('Mel_mod') - t.color_texture = 'melColor' - t.color_mask_texture = 'melColorMask' - t.default_color = (1, 1, 1) - t.default_highlight = (0.1, 0.6, 0.1) - t.icon_texture = 'melIcon' - t.icon_mask_texture = 'melIconColorMask' - t.head_model = 'melHead' - t.torso_model = 'melTorso' - t.pelvis_model = 'kronkPelvis' - t.upper_arm_model = 'melUpperArm' - t.forearm_model = 'melForeArm' - t.hand_model = 'melHand' - t.upper_leg_model = 'melUpperLeg' - t.lower_leg_model = 'melLowerLeg' - t.toes_model = 'melToes' - mel_sounds = [ - 'mel01', 'mel02', 'mel03', 'mel04', 'mel05', 'mel06', 'mel07', 'mel08', - 'mel09', 'mel10' - ] - t.attack_sounds = mel_sounds - t.jump_sounds = mel_sounds - t.impact_sounds = mel_sounds - t.death_sounds = ['melDeath01'] - t.pickup_sounds = mel_sounds - t.fall_sounds = ['melFall01'] - t.style = 'mel' - - # Pirate ####################################### - t = Appearance('Jack Morgan_mod') - t.color_texture = 'jackColor' - t.color_mask_texture = 'jackColorMask' - t.default_color = (1, 0.2, 0.1) - t.default_highlight = (1, 1, 0) - t.icon_texture = 'jackIcon' - t.icon_mask_texture = 'jackIconColorMask' - t.head_model = 'jackHead' - t.torso_model = 'jackTorso' - t.pelvis_model = 'kronkPelvis' - t.upper_arm_model = 'jackUpperArm' - t.forearm_model = 'jackForeArm' - t.hand_model = 'jackHand' - t.upper_leg_model = 'jackUpperLeg' - t.lower_leg_model = 'jackLowerLeg' - t.toes_model = 'jackToes' - hit_sounds = [ - 'jackHit01', 'jackHit02', 'jackHit03', 'jackHit04', 'jackHit05', - 'jackHit06', 'jackHit07' - ] - sounds = ['jack01', 'jack02', 'jack03', 'jack04', 'jack05', 'jack06'] - t.attack_sounds = sounds - t.jump_sounds = sounds - - t.impact_sounds = hit_sounds - t.death_sounds = ['jackDeath01'] - t.pickup_sounds = sounds - t.fall_sounds = ['jackFall01'] - t.style = 'pirate' - - # Santa ###################################### - t = Appearance('Santa Claus_mod') - t.color_texture = 'santaColor' - t.color_mask_texture = 'santaColorMask' - t.default_color = (1, 0, 0) - t.default_highlight = (1, 1, 1) - t.icon_texture = 'santaIcon' - t.icon_mask_texture = 'santaIconColorMask' - t.head_model = 'santaHead' - t.torso_model = 'santaTorso' - t.pelvis_model = 'kronkPelvis' - t.upper_arm_model = 'santaUpperArm' - t.forearm_model = 'santaForeArm' - t.hand_model = 'santaHand' - t.upper_leg_model = 'santaUpperLeg' - t.lower_leg_model = 'santaLowerLeg' - t.toes_model = 'santaToes' - hit_sounds = ['santaHit01', 'santaHit02', 'santaHit03', 'santaHit04'] - sounds = ['santa01', 'santa02', 'santa03', 'santa04', 'santa05'] - t.attack_sounds = sounds - t.jump_sounds = sounds - t.impact_sounds = hit_sounds - t.death_sounds = ['santaDeath'] - t.pickup_sounds = sounds - t.fall_sounds = ['santaFall'] - t.style = 'santa' - - # Snowman ################################### - t = Appearance('Frosty_mod') - t.color_texture = 'frostyColor' - t.color_mask_texture = 'frostyColorMask' - t.default_color = (0.5, 0.5, 1) - t.default_highlight = (1, 0.5, 0) - t.icon_texture = 'frostyIcon' - t.icon_mask_texture = 'frostyIconColorMask' - t.head_model = 'frostyHead' - t.torso_model = 'frostyTorso' - t.pelvis_model = 'frostyPelvis' - t.upper_arm_model = 'frostyUpperArm' - t.forearm_model = 'frostyForeArm' - t.hand_model = 'frostyHand' - t.upper_leg_model = 'frostyUpperLeg' - t.lower_leg_model = 'frostyLowerLeg' - t.toes_model = 'frostyToes' - frosty_sounds = [ - 'frosty01', 'frosty02', 'frosty03', 'frosty04', 'frosty05' - ] - frosty_hit_sounds = ['frostyHit01', 'frostyHit02', 'frostyHit03'] - t.attack_sounds = frosty_sounds - t.jump_sounds = frosty_sounds - t.impact_sounds = frosty_hit_sounds - t.death_sounds = ['frostyDeath'] - t.pickup_sounds = frosty_sounds - t.fall_sounds = ['frostyFall'] - t.style = 'frosty' - - # Skeleton ################################ - t = Appearance('Bones_mod') - t.color_texture = 'bonesColor' - t.color_mask_texture = 'bonesColorMask' - t.default_color = (0.6, 0.9, 1) - t.default_highlight = (0.6, 0.9, 1) - t.icon_texture = 'bonesIcon' - t.icon_mask_texture = 'bonesIconColorMask' - t.head_model = 'bonesHead' - t.torso_model = 'bonesTorso' - t.pelvis_model = 'bonesPelvis' - t.upper_arm_model = 'bonesUpperArm' - t.forearm_model = 'bonesForeArm' - t.hand_model = 'bonesHand' - t.upper_leg_model = 'bonesUpperLeg' - t.lower_leg_model = 'bonesLowerLeg' - t.toes_model = 'bonesToes' - bones_sounds = ['bones1', 'bones2', 'bones3'] - bones_hit_sounds = ['bones1', 'bones2', 'bones3'] - t.attack_sounds = bones_sounds - t.jump_sounds = bones_sounds - t.impact_sounds = bones_hit_sounds - t.death_sounds = ['bonesDeath'] - t.pickup_sounds = bones_sounds - t.fall_sounds = ['bonesFall'] - t.style = 'bones' - - # Bear ################################### - t = Appearance('Bernard_mod') - t.color_texture = 'bearColor' - t.color_mask_texture = 'bearColorMask' - t.default_color = (0.7, 0.5, 0.0) - t.icon_texture = 'bearIcon' - t.icon_mask_texture = 'bearIconColorMask' - t.head_model = 'bearHead' - t.torso_model = 'bearTorso' - t.pelvis_model = 'bearPelvis' - t.upper_arm_model = 'bearUpperArm' - t.forearm_model = 'bearForeArm' - t.hand_model = 'bearHand' - t.upper_leg_model = 'bearUpperLeg' - t.lower_leg_model = 'bearLowerLeg' - t.toes_model = 'bearToes' - bear_sounds = ['bear1', 'bear2', 'bear3', 'bear4'] - bear_hit_sounds = ['bearHit1', 'bearHit2'] - t.attack_sounds = bear_sounds - t.jump_sounds = bear_sounds - t.impact_sounds = bear_hit_sounds - t.death_sounds = ['bearDeath'] - t.pickup_sounds = bear_sounds - t.fall_sounds = ['bearFall'] - t.style = 'bear' - - # Penguin ################################### - t = Appearance('Pascal_mod') - t.color_texture = 'penguinColor' - t.color_mask_texture = 'penguinColorMask' - t.default_color = (0.3, 0.5, 0.8) - t.default_highlight = (1, 0, 0) - t.icon_texture = 'penguinIcon' - t.icon_mask_texture = 'penguinIconColorMask' - t.head_model = 'penguinHead' - t.torso_model = 'penguinTorso' - t.pelvis_model = 'penguinPelvis' - t.upper_arm_model = 'penguinUpperArm' - t.forearm_model = 'penguinForeArm' - t.hand_model = 'penguinHand' - t.upper_leg_model = 'penguinUpperLeg' - t.lower_leg_model = 'penguinLowerLeg' - t.toes_model = 'penguinToes' - penguin_sounds = ['penguin1', 'penguin2', 'penguin3', 'penguin4'] - penguin_hit_sounds = ['penguinHit1', 'penguinHit2'] - t.attack_sounds = penguin_sounds - t.jump_sounds = penguin_sounds - t.impact_sounds = penguin_hit_sounds - t.death_sounds = ['penguinDeath'] - t.pickup_sounds = penguin_sounds - t.fall_sounds = ['penguinFall'] - t.style = 'penguin' - - # Ali ################################### - t = Appearance('Taobao Mascot_mod') - t.color_texture = 'aliColor' - t.color_mask_texture = 'aliColorMask' - t.default_color = (1, 0.5, 0) - t.default_highlight = (1, 1, 1) - t.icon_texture = 'aliIcon' - t.icon_mask_texture = 'aliIconColorMask' - t.head_model = 'aliHead' - t.torso_model = 'aliTorso' - t.pelvis_model = 'aliPelvis' - t.upper_arm_model = 'aliUpperArm' - t.forearm_model = 'aliForeArm' - t.hand_model = 'aliHand' - t.upper_leg_model = 'aliUpperLeg' - t.lower_leg_model = 'aliLowerLeg' - t.toes_model = 'aliToes' - ali_sounds = ['ali1', 'ali2', 'ali3', 'ali4'] - ali_hit_sounds = ['aliHit1', 'aliHit2'] - t.attack_sounds = ali_sounds - t.jump_sounds = ali_sounds - t.impact_sounds = ali_hit_sounds - t.death_sounds = ['aliDeath'] - t.pickup_sounds = ali_sounds - t.fall_sounds = ['aliFall'] - t.style = 'ali' - - # cyborg ################################### - t = Appearance('B-9000_mod') - t.color_texture = 'cyborgColor' - t.color_mask_texture = 'cyborgColorMask' - t.default_color = (0.5, 0.5, 0.5) - t.default_highlight = (1, 0, 0) - t.icon_texture = 'cyborgIcon' - t.icon_mask_texture = 'cyborgIconColorMask' - t.head_model = 'cyborgHead' - t.torso_model = 'cyborgTorso' - t.pelvis_model = 'cyborgPelvis' - t.upper_arm_model = 'cyborgUpperArm' - t.forearm_model = 'cyborgForeArm' - t.hand_model = 'cyborgHand' - t.upper_leg_model = 'cyborgUpperLeg' - t.lower_leg_model = 'cyborgLowerLeg' - t.toes_model = 'cyborgToes' - cyborg_sounds = ['cyborg1', 'cyborg2', 'cyborg3', 'cyborg4'] - cyborg_hit_sounds = ['cyborgHit1', 'cyborgHit2'] - t.attack_sounds = cyborg_sounds - t.jump_sounds = cyborg_sounds - t.impact_sounds = cyborg_hit_sounds - t.death_sounds = ['cyborgDeath'] - t.pickup_sounds = cyborg_sounds - t.fall_sounds = ['cyborgFall'] - t.style = 'cyborg' - - # Agent ################################### - t = Appearance('Agent Johnson_mod') - t.color_texture = 'agentColor' - t.color_mask_texture = 'agentColorMask' - t.default_color = (0.3, 0.3, 0.33) - t.default_highlight = (1, 0.5, 0.3) - t.icon_texture = 'agentIcon' - t.icon_mask_texture = 'agentIconColorMask' - t.head_model = 'agentHead' - t.torso_model = 'agentTorso' - t.pelvis_model = 'agentPelvis' - t.upper_arm_model = 'agentUpperArm' - t.forearm_model = 'agentForeArm' - t.hand_model = 'agentHand' - t.upper_leg_model = 'agentUpperLeg' - t.lower_leg_model = 'agentLowerLeg' - t.toes_model = 'agentToes' - agent_sounds = ['agent1', 'agent2', 'agent3', 'agent4'] - agent_hit_sounds = ['agentHit1', 'agentHit2'] - t.attack_sounds = agent_sounds - t.jump_sounds = agent_sounds - t.impact_sounds = agent_hit_sounds - t.death_sounds = ['agentDeath'] - t.pickup_sounds = agent_sounds - t.fall_sounds = ['agentFall'] - t.style = 'agent' - - # Wizard ################################### - t = Appearance('Grumbledorf_mod') - t.color_texture = 'wizardColor' - t.color_mask_texture = 'wizardColorMask' - t.default_color = (0.2, 0.4, 1.0) - t.default_highlight = (0.06, 0.15, 0.4) - t.icon_texture = 'wizardIcon' - t.icon_mask_texture = 'wizardIconColorMask' - t.head_model = 'wizardHead' - t.torso_model = 'wizardTorso' - t.pelvis_model = 'wizardPelvis' - t.upper_arm_model = 'wizardUpperArm' - t.forearm_model = 'wizardForeArm' - t.hand_model = 'wizardHand' - t.upper_leg_model = 'wizardUpperLeg' - t.lower_leg_model = 'wizardLowerLeg' - t.toes_model = 'wizardToes' - wizard_sounds = ['wizard1', 'wizard2', 'wizard3', 'wizard4'] - wizard_hit_sounds = ['wizardHit1', 'wizardHit2'] - t.attack_sounds = wizard_sounds - t.jump_sounds = wizard_sounds - t.impact_sounds = wizard_hit_sounds - t.death_sounds = ['wizardDeath'] - t.pickup_sounds = wizard_sounds - t.fall_sounds = ['wizardFall'] - t.style = 'spaz' - - # Pixie ################################### - t = Appearance('Pixel_mod') - t.color_texture = 'pixieColor' - t.color_mask_texture = 'pixieColorMask' - t.default_color = (0, 1, 0.7) - t.default_highlight = (0.65, 0.35, 0.75) - t.icon_texture = 'pixieIcon' - t.icon_mask_texture = 'pixieIconColorMask' - t.head_model = 'pixieHead' - t.torso_model = 'pixieTorso' - t.pelvis_model = 'pixiePelvis' - t.upper_arm_model = 'pixieUpperArm' - t.forearm_model = 'pixieForeArm' - t.hand_model = 'pixieHand' - t.upper_leg_model = 'pixieUpperLeg' - t.lower_leg_model = 'pixieLowerLeg' - t.toes_model = 'pixieToes' - pixie_sounds = ['pixie1', 'pixie2', 'pixie3', 'pixie4'] - pixie_hit_sounds = ['pixieHit1', 'pixieHit2'] - t.attack_sounds = pixie_sounds - t.jump_sounds = pixie_sounds - t.impact_sounds = pixie_hit_sounds - t.death_sounds = ['pixieDeath'] - t.pickup_sounds = pixie_sounds - t.fall_sounds = ['pixieFall'] - t.style = 'pixie' - - # Bunny ################################### - t = Appearance('Easter Bunny_mod') - t.color_texture = 'bunnyColor' - t.color_mask_texture = 'bunnyColorMask' - t.default_color = (1, 1, 1) - t.default_highlight = (1, 0.5, 0.5) - t.icon_texture = 'bunnyIcon' - t.icon_mask_texture = 'bunnyIconColorMask' - t.head_model = 'bunnyHead' - t.torso_model = 'bunnyTorso' - t.pelvis_model = 'bunnyPelvis' - t.upper_arm_model = 'bunnyUpperArm' - t.forearm_model = 'bunnyForeArm' - t.hand_model = 'bunnyHand' - t.upper_leg_model = 'bunnyUpperLeg' - t.lower_leg_model = 'bunnyLowerLeg' - t.toes_model = 'bunnyToes' - bunny_sounds = ['bunny1', 'bunny2', 'bunny3', 'bunny4'] - bunny_hit_sounds = ['bunnyHit1', 'bunnyHit2'] - t.attack_sounds = bunny_sounds - t.jump_sounds = ['bunnyJump'] - t.impact_sounds = bunny_hit_sounds - t.death_sounds = ['bunnyDeath'] - t.pickup_sounds = bunny_sounds - t.fall_sounds = ['bunnyFall'] - t.style = 'bunny' - -# ba_meta export plugin -class unlock_characters(ba.Plugin): - def on_app_launch(self): - add_characters() diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/Main.py b/dist/ba_root/mods/chatHandle/ChatCommands/Main.py index e06e6d6..5fa0faa 100644 --- a/dist/ba_root/mods/chatHandle/ChatCommands/Main.py +++ b/dist/ba_root/mods/chatHandle/ChatCommands/Main.py @@ -8,12 +8,12 @@ from .commands import Cheats from .Handlers import clientid_to_accountid from .Handlers import check_permissions - +from chatHandle.chatFilter import ChatFilter import ba, _ba import setting from serverData import serverdata - +settings = setting.get_settings_data() def command_type(command): """ @@ -88,7 +88,8 @@ def Command(msg, clientid): _ba.screenmessage("access denied", transient=True, clients=[clientid]) - settings = setting.get_settings_data() + + if accountid in serverdata.clients: if serverdata.clients[accountid]["isMuted"]: _ba.screenmessage("You are on mute", transient=True, clients=[clientid]) diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-39.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-39.pyc index d04b0cf..61a042d 100644 Binary files a/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-39.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/__pycache__/Main.cpython-39.pyc differ diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py index 508b8a7..fb5413d 100644 --- a/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py +++ b/dist/ba_root/mods/chatHandle/ChatCommands/commands/Management.py @@ -3,7 +3,7 @@ from playersData import pdata from tools.whitelist import add_to_white_list, add_commit_to_logs from serverData import serverdata import ba, _ba, time, setting - +import _thread Commands = ['ban','kick', 'remove', 'end', 'quit', 'mute', 'unmute', 'slowmo', 'nv', 'dv', 'pause', 'cameramode', 'createrole', 'addrole', 'removerole', 'addcommand', 'addcmd', 'removecommand','getroles', 'removecmd', 'changetag','customtag','customeffect','add', 'spectators', 'lobbytime'] CommandAliases = ['rm', 'next', 'restart', 'mutechat', 'unmutechat', 'sm', 'slow', 'night', 'day', 'pausegame', 'camera_mode', 'rotate_camera', 'whitelist','effect'] @@ -119,7 +119,8 @@ def ban(arguments): ac_id="" for ros in _ba.get_game_roster(): if ros["client_id"]==cl_id: - pdata.ban_player(ros['account_id']) + _thread.start_new_thread(pdata.ban_player,(ros['account_id'],)) + ac_id=ros['account_id'] if ac_id in serverdata.clients: serverdata.clients[ac_id]["isBan"]=True @@ -142,7 +143,8 @@ def mute(arguments): ac_id="" for ros in _ba.get_game_roster(): if ros["client_id"]==cl_id: - pdata.mute(ros['account_id']) + _thread.start_new_thread(pdata.mute,(ros['account_id'],)) + ac_id=ros['account_id'] if ac_id in serverdata.clients: serverdata.clients[ac_id]["isMuted"]=True diff --git a/dist/ba_root/mods/chatHandle/ChatCommands/commands/__pycache__/Management.cpython-39.pyc b/dist/ba_root/mods/chatHandle/ChatCommands/commands/__pycache__/Management.cpython-39.pyc index d3f2c0f..dc07f49 100644 Binary files a/dist/ba_root/mods/chatHandle/ChatCommands/commands/__pycache__/Management.cpython-39.pyc and b/dist/ba_root/mods/chatHandle/ChatCommands/commands/__pycache__/Management.cpython-39.pyc differ diff --git a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-39.pyc b/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-39.pyc index 15a4b97..130c95c 100644 Binary files a/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-39.pyc and b/dist/ba_root/mods/chatHandle/__pycache__/handlechat.cpython-39.pyc differ diff --git a/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py b/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py index fa64273..15708b0 100644 --- a/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py +++ b/dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py @@ -1,5 +1,57 @@ # Released under the MIT License. See LICENSE for details. import ba, _ba +from serverData import serverdata +from tools import profanity +from tools import servercheck +import time +import setting +import _thread +settings = setting.get_settings_data() + + +def filter(msg,pb_id,client_id): + new_msg=profanity.censor(msg) + if new_msg!=msg: + addWarn(pb_id,client_id) + + now = time.time() + + if "lastMsg" in serverdata.clients[pb_id]: + count=serverdata.clients[pb_id]["cMsgCount"] + if now - serverdata.clients[pb_id]["lastMsg"] < 5: + count+=1 + if count >=2: + addWarn(pb_id,client_id) + count =0 + else: + count =0 + + serverdata.clients[pb_id]['cMsgCount']=count + serverdata.clients[pb_id]['lastMsg']=now + else: + serverdata.clients[pb_id]['cMsgCount']=0 + serverdata.clients[pb_id]['lastMsg']=now + return new_msg + + + +def addWarn(pb_id,client_id): + now=time.time() + player=serverdata.clients[pb_id] + warn=player['warnCount'] + if now - player['lastWarned'] <= settings["WarnCooldownMinutes"]*60: + warn+=1 + if warn > settings["maxWarnCount"]: + _ba.screenmessage(settings["afterWarnKickMsg"],color=(1,0,0),transient=True,clients=[client_id]) + _ba.disconnect_client(client_id) + _thread.start_new_thread(servercheck.reportSpam,(pb_id,)) + + else: + _ba.screenmessage(settings["warnMsg"],color=(1,0,0),transient=True,clients=[client_id]) + else: + warn=0 + serverdata.clients[pb_id]["warnCount"]=warn + serverdata.clients[pb_id]['lastWarned']=now + + -def isAbuse(msg): - pass \ No newline at end of file diff --git a/dist/ba_root/mods/chatHandle/chatFilter/__pycache__/ChatFilter.cpython-39.pyc b/dist/ba_root/mods/chatHandle/chatFilter/__pycache__/ChatFilter.cpython-39.pyc new file mode 100644 index 0000000..d093add Binary files /dev/null and b/dist/ba_root/mods/chatHandle/chatFilter/__pycache__/ChatFilter.cpython-39.pyc differ diff --git a/dist/ba_root/mods/chatHandle/handlechat.py b/dist/ba_root/mods/chatHandle/handlechat.py index 9f55d55..da70241 100644 --- a/dist/ba_root/mods/chatHandle/handlechat.py +++ b/dist/ba_root/mods/chatHandle/handlechat.py @@ -4,7 +4,7 @@ from playersData import pdata from serverData import serverdata from chatHandle.ChatCommands import Main from tools import Logger, servercheck -from chatHandle import chatFilter +from chatHandle.chatFilter import ChatFilter import ba, _ba import setting @@ -22,8 +22,7 @@ def filter_chat_message(msg, client_id): acid = i['account_id'] Logger.log(acid+" | "+msg,"chat") - if acid in serverdata.clients: - + if acid in serverdata.clients and serverdata.clients[acid]["verified"]: if serverdata.clients[acid]["isMuted"]: _ba.screenmessage("You are on mute", transient=True, clients=[client_id]) return None @@ -31,9 +30,10 @@ def filter_chat_message(msg, client_id): _ba.screenmessage("New accounts not allowed to chat here", transient=True, clients=[client_id]) return None else: - return msg + return ChatFilter.filter(msg,acid,client_id) else: _ba.screenmessage("Fetching your account info , Wait a minute", transient=True, clients=[client_id]) - return None \ No newline at end of file + return None + diff --git a/dist/ba_root/mods/custom_hooks.py b/dist/ba_root/mods/custom_hooks.py index d001d81..fba76f7 100644 --- a/dist/ba_root/mods/custom_hooks.py +++ b/dist/ba_root/mods/custom_hooks.py @@ -4,11 +4,18 @@ import _ba from chatHandle import handlechat import setting from tools import servercheck +from tools import ServerUpdate import _thread from stats import mystats from datetime import datetime from ba import _activity +from typing import Optional, Any +from spazmod import modifyspaz +from bastd.activity import dualteamscore +from bastd.activity import multiteamscore +from bastd.actor.zoomtext import ZoomText +# from tools import fireflies settings = setting.get_settings_data() def filter_chat_message(msg, client_id): @@ -21,6 +28,8 @@ def on_app_launch(): whitelist.Whitelist() bootstraping() servercheck.checkserver().start() + ServerUpdate.check() + #something @@ -55,15 +64,18 @@ def new_disconnect(clid,duration=120): _ba.ban_client(clid,duration) org_begin=ba._activity.Activity.on_begin - def new_begin(self): org_begin(self) night_mode() - - ba._activity.Activity.on_begin=new_begin +org_end=ba._activity.Activity.end +def new_end(self,results:Any=None,delay:float=0.0,force:bool=False): + + org_end(self,results,delay,force) +ba._activity.Activity.end=new_end + def night_mode(): @@ -75,4 +87,11 @@ def night_mode(): if now.time() > start.time() or now.time() < end.time(): activity = _ba.get_foreground_host_activity() - activity.globalsnode.tint = (0.5, 0.7, 1.0) \ No newline at end of file + + activity.globalsnode.tint = (0.5, 0.7, 1.0) + + # if settings['autoNightMode']['fireflies']: + # fireflies.factory() + + + diff --git a/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-39.pyc b/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-39.pyc index 2a45500..b9e7293 100644 Binary files a/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-39.pyc and b/dist/ba_root/mods/playersData/__pycache__/pdata.cpython-39.pyc differ diff --git a/dist/ba_root/mods/playersData/pdata.py b/dist/ba_root/mods/playersData/pdata.py index 87f002f..462cf32 100644 --- a/dist/ba_root/mods/playersData/pdata.py +++ b/dist/ba_root/mods/playersData/pdata.py @@ -2,7 +2,7 @@ import _ba, os, json from serverData import serverdata import time - +import _thread roles = {} data = {} custom = {} @@ -42,6 +42,8 @@ def add_profile(id,display_string,currentname,age): "accountAge":age, "registerOn":time.time(), "canStartKickVote":True, + "spamCount":0, + "lastSpam":time.time(), "totaltimeplayer":0, "lastseen":0} @@ -82,26 +84,35 @@ def ban_player(id): profiles= get_profiles() if id in profiles: profiles[id]['isBan']=True - commit_profiles(profiles) + _thread.start_new_thread(commit_profiles,(profiles,)) + # commit_profiles(profiles) def mute(id): profiles=get_profiles() if id in profiles: profiles[id]["isMuted"]=True - commit_profiles(profiles) + _thread.start_new_thread(commit_profiles,(profiles,)) + # commit_profiles(profiles) def unmute(id): profiles=get_profiles() if id in profiles: profiles[id]["isMuted"]=False + _thread.start_new_thread(commit_profiles,(profiles,)) + # commit_profiles(profiles) + +def updateSpam(id,spamCount,lastSpam): + profiles=get_profiles() + if id in profiles: + profiles[id]["spamCount"]=spamCount + profiles[id]["lastSpam"]=lastSpam + commit_profiles(profiles) - - #================ ROLES ========================== def commit_roles(data): diff --git a/dist/ba_root/mods/playersData/profiles.json b/dist/ba_root/mods/playersData/profiles.json index 43a6ec7..ddf5d2e 100644 --- a/dist/ba_root/mods/playersData/profiles.json +++ b/dist/ba_root/mods/playersData/profiles.json @@ -6,7 +6,9 @@ "isBan": false, "isMuted": false, "totaltimeplayer": 0, - "lastseen": 0 + "lastseen": 0, + "spamCount": 0, + "lastSpam": 1637911682.2054627 }, "pb-IF5XUm9eAg==": { "display_string": [ @@ -14,12 +16,14 @@ ], "profiles": [], "name": "\ue030PC402015", - "isBan": false, + "isBan": true, "isMuted": false, "accountAge": "2021-11-12 20:30:30", "registerOn": 1636801177.809589, - "canStartKickVote":true, + "canStartKickVote": true, "totaltimeplayer": 0, - "lastseen": 0 + "lastseen": 0, + "spamCount": 4, + "lastSpam": 1637912278.8745685 } } \ No newline at end of file diff --git a/dist/ba_root/mods/serverData/Chat Logs.log b/dist/ba_root/mods/serverData/Chat Logs.log index 656ff45..aee6c63 100644 --- a/dist/ba_root/mods/serverData/Chat Logs.log +++ b/dist/ba_root/mods/serverData/Chat Logs.log @@ -8,3 +8,14 @@ 2021-10-23 15:53:34.357371: pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE | 7 2021-10-23 15:53:38.152627: pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE | 8 2021-10-23 15:53:41.077009: pb-JiNJARBaXEFBVF9HFkNXXF1EF0ZaRlZE | 9 +2021-11-25 22:15:06.477416: pb-IF5XUm9eAg== | ohh fuck +2021-11-25 22:15:10.409848: pb-IF5XUm9eAg== | shit +2021-11-25 22:15:14.275920: pb-IF5XUm9eAg== | bye +2021-11-25 22:15:16.296385: pb-IF5XUm9eAg== | no +2021-11-25 22:15:21.839111: pb-IF5XUm9eAg== | no +2021-11-25 22:15:24.687210: pb-IF5XUm9eAg== | fuck +2021-11-25 22:15:27.920635: pb-IF5XUm9eAg== | fuck +2021-11-25 22:15:30.901683: pb-IF5XUm9eAg== | uck +2021-11-25 22:15:33.372142: pb-IF5XUm9eAg== | fuck +2021-11-25 22:15:36.348450: pb-IF5XUm9eAg== | fuck +2021-11-25 22:15:39.339904: pb-IF5XUm9eAg== | okokoko diff --git a/dist/ba_root/mods/setting.json b/dist/ba_root/mods/setting.json index f9772a3..f87541b 100644 --- a/dist/ba_root/mods/setting.json +++ b/dist/ba_root/mods/setting.json @@ -4,15 +4,9 @@ "spectators": false, "lobbychecktime": 1 }, - - - "ChatCommands": { "BrodcastCommand": true }, - - - "textonmap": { "top watermark": "Welcome to server \n ip 192.168.0.1", "bottom left watermark": "Owner : \nEditor : \nScripts : BCS1.3.2", @@ -25,9 +19,12 @@ "autoNightMode":{ "enable":true, "startTime":"18:30", - "endTime":"06:00" + "endTime":"06:00", + "fireflies":true }, - "HostDeviceName":"v1.3.1", + "sameCharacterForTeam":false, + "newResultBoard":true, + "HostDeviceName":"v1.3.2", "HostName":"BCS", "ShowKickVoteStarterName":true, "KickVoteMsgType":"chat", @@ -35,6 +32,10 @@ "minAgeToJoinInHours":24, "maxWarnCount":2, "WarnCooldownMinutes":30, + "warnMsg":"WARNING !!!", + "afterWarnKickMsg":"Enough warnings, Goodbye have a nice day :)", + "firstTimeJoinMsg":"Welcome to the server,we r saving all your account details and chats", + "regularWelcomeMsg":"Welcome Back", "enabletags": true, "enablehptag": true, "enablerank": true, diff --git a/dist/ba_root/mods/spazmod/__pycache__/modifyspaz.cpython-39.pyc b/dist/ba_root/mods/spazmod/__pycache__/modifyspaz.cpython-39.pyc index f8c494a..453f501 100644 Binary files a/dist/ba_root/mods/spazmod/__pycache__/modifyspaz.cpython-39.pyc and b/dist/ba_root/mods/spazmod/__pycache__/modifyspaz.cpython-39.pyc differ diff --git a/dist/ba_root/mods/spazmod/modifyspaz.py b/dist/ba_root/mods/spazmod/modifyspaz.py index d26b221..cbaf49d 100644 --- a/dist/ba_root/mods/spazmod/modifyspaz.py +++ b/dist/ba_root/mods/spazmod/modifyspaz.py @@ -1,6 +1,10 @@ from spazmod import tag from spazmod import effects import setting +from random import randint + +import _ba,ba +_setting=setting.get_settings_data() def update_name(): import _ba @@ -17,7 +21,7 @@ def update_name(): # all activites related to modify spaz by any how will be here def main(spaz, node, player): - _setting=setting.get_settings_data() + if _setting['enablehptag']: tag.addhp(spaz) if _setting['enabletags']: @@ -26,4 +30,41 @@ def main(spaz, node, player): tag.addrank(node,player) if _setting['enableeffects']: effects.Effect(spaz,player) - update_name() \ No newline at end of file + + + #update_name() will add threading here later . it was adding delay on game start + +def getCharacter(player,character): + + if _setting["sameCharacterForTeam"]: + + if "character" in player.team.sessionteam.customdata: + + return player.team.sessionteam.customdata["character"] + + return character + + +def getRandomCharacter(otherthen): + characters=list(ba.app.spaz_appearances.keys()) + invalid_characters=["Snake Shadow","Lee","Zola","Butch","Witch","Middle-Man","Alien","OldLady","Wrestler","Gretel","Robot"] + + while True: + val=randint(0,len(characters)-1) + ch=characters[val] + if ch not in invalid_characters and ch not in otherthen: + return ch + + +def setTeamCharacter(): + if not _setting["sameCharacterForTeam"]: + return + used=[] + teams=_ba.get_foreground_host_session().sessionteams + if len(teams) < 10: + for team in teams: + character=getRandomCharacter(used) + used.append(character) + team.name=character + team.customdata["character"]=character + diff --git a/dist/ba_root/mods/stats/stats.json b/dist/ba_root/mods/stats/stats.json index 8b61140..59ea5b1 100644 --- a/dist/ba_root/mods/stats/stats.json +++ b/dist/ba_root/mods/stats/stats.json @@ -120,7 +120,7 @@ "aid": "pb-IF4VVUgJVw==" }, "pb-IF4gVU0BCg==": { - "rank": 53, + "rank": 52, "name": "\ue020Dewanggaming", "scores": 43, "total_damage": 0.0, @@ -132,7 +132,7 @@ "aid": "pb-IF4gVU0BCg==" }, "pb-IF4FVXkZDQ==": { - "rank": 27, + "rank": 26, "name": "\ue020lllBOLTlll", "scores": 151, "total_damage": 0.0, @@ -156,7 +156,7 @@ "aid": "pb-IF42VUpaDg==" }, "pb-IF4iVUNSIw==": { - "rank": 48, + "rank": 47, "name": "default", "scores": 56, "total_damage": 0.0, @@ -168,7 +168,7 @@ "aid": "pb-IF4iVUNSIw==" }, "pb-IF4PVGcSJw==": { - "rank": 42, + "rank": 41, "name": "\ue030Android29104233", "scores": 84, "total_damage": 0.0, @@ -180,7 +180,7 @@ "aid": "pb-IF4PVGcSJw==" }, "pb-IF4eVVMkMw==": { - "rank": 30, + "rank": 29, "name": "\ue030Android52887552", "scores": 101, "total_damage": 0.0, @@ -240,7 +240,7 @@ "aid": "pb-IF4PVVIeHw==" }, "pb-IF4AVXAmPA==": { - "rank": 50, + "rank": 49, "name": "\ue020ESZ\u4e5bOptimusOp\u4e44", "scores": 56, "total_damage": 0.0, @@ -252,7 +252,7 @@ "aid": "pb-IF4AVXAmPA==" }, "pb-IF4AVVEPNw==": { - "rank": 31, + "rank": 30, "name": "\ue020StealthyFelicity14", "scores": 96, "total_damage": 0.0, @@ -288,7 +288,7 @@ "aid": "pb-IF4DVEkPEg==" }, "pb-IF4TVVNeMg==": { - "rank": 46, + "rank": 45, "name": "\ue030Android52880740", "scores": 61, "total_damage": 0.0, @@ -312,7 +312,7 @@ "aid": "pb-IF4yVUcgBg==" }, "pb-IF4IVUUJMg==": { - "rank": 40, + "rank": 39, "name": "\ue030Android51464300", "scores": 90, "total_damage": 0.0, @@ -336,7 +336,7 @@ "aid": "pb-IF4tVUwGVA==" }, "pb-IF48NmQO": { - "rank": 59, + "rank": 58, "name": "default", "scores": 6, "total_damage": 0.0, @@ -348,7 +348,7 @@ "aid": "pb-IF48NmQO" }, "pb-IF4UVUQaAw==": { - "rank": 41, + "rank": 40, "name": "\ue020LikelyTour25", "scores": 85, "total_damage": 0.0, @@ -384,7 +384,7 @@ "aid": "pb-JiNJARBcV0FDXV1DGU5ZXV1FEUFWRVJC" }, "pb-IF4OVVMsDQ==": { - "rank": 49, + "rank": 48, "name": "\ue030Android52893090", "scores": 56, "total_damage": 0.0, @@ -408,7 +408,7 @@ "aid": "pb-IF5VVU4aFg==" }, "pb-IF4SVW9dEg==": { - "rank": 51, + "rank": 50, "name": "\ue020PROFFESOR9", "scores": 48, "total_damage": 0.0, @@ -420,7 +420,7 @@ "aid": "pb-IF4SVW9dEg==" }, "pb-IF4SVVMtDg==": { - "rank": 38, + "rank": 37, "name": "\ue020OrtigozaRafa2000", "scores": 92, "total_damage": 0.0, @@ -432,7 +432,7 @@ "aid": "pb-IF4SVVMtDg==" }, "pb-IF4cVVMhKg==": { - "rank": 29, + "rank": 28, "name": "\ue020jonyteoba100", "scores": 106, "total_damage": 0.0, @@ -456,7 +456,7 @@ "aid": "pb-IF4gVRlbXQ==" }, "pb-IF4dVVAMUg==": { - "rank": 39, + "rank": 38, "name": "\ue030Android52657984", "scores": 91, "total_damage": 0.0, @@ -468,7 +468,7 @@ "aid": "pb-IF4dVVAMUg==" }, "pb-JiNJVxFfUEFDWFtCFEdXVl1FF0FaTllC": { - "rank": 58, + "rank": 57, "name": "default", "scores": 10, "total_damage": 0.0, @@ -480,7 +480,7 @@ "aid": "pb-JiNJVxFfUEFDWFtCFEdXVl1FF0FaTllC" }, "pb-IF40VU4TAQ==": { - "rank": 36, + "rank": 35, "name": "default", "scores": 96, "total_damage": 0.0, @@ -504,7 +504,7 @@ "aid": "pb-IF5QVVUkLw==" }, "pb-IF5RVUkZKg==": { - "rank": 57, + "rank": 56, "name": "\ue020ThreateningOddball34", "scores": 16, "total_damage": 0.0, @@ -516,7 +516,7 @@ "aid": "pb-IF5RVUkZKg==" }, "pb-IF5VVVEnVQ==": { - "rank": 47, + "rank": 46, "name": "\ue030Android52446817", "scores": 59, "total_damage": 0.0, @@ -528,7 +528,7 @@ "aid": "pb-IF5VVVEnVQ==" }, "pb-JiNJARBaVUpHWl1BGUBVVFZAEkZeR1FE": { - "rank": 33, + "rank": 32, "name": "\ue020CreepyJourney52261", "scores": 96, "total_damage": 0.0, @@ -540,7 +540,7 @@ "aid": "pb-JiNJARBaVUpHWl1BGUBVVFZAEkZeR1FE" }, "pb-IF5QVVZTAA==": { - "rank": 45, + "rank": 44, "name": "default", "scores": 64, "total_damage": 0.0, @@ -552,7 +552,7 @@ "aid": "pb-IF5QVVZTAA==" }, "pb-IF5dVU0tPw==": { - "rank": 37, + "rank": 36, "name": "\ue030Android52110513", "scores": 93, "total_damage": 0.0, @@ -564,7 +564,7 @@ "aid": "pb-IF5dVU0tPw==" }, "pb-IF4PVUovCQ==": { - "rank": 55, + "rank": 54, "name": "\ue020Phriedbean", "scores": 20, "total_damage": 0.0, @@ -588,7 +588,7 @@ "aid": "pb-IF4sVRU8IA==" }, "pb-IF4zVUYjPA==": { - "rank": 26, + "rank": 25, "name": "\ue030Android51693156", "scores": 152, "total_damage": 0.0, @@ -600,7 +600,7 @@ "aid": "pb-IF4zVUYjPA==" }, "pb-IF4PVVJSNg==": { - "rank": 35, + "rank": 34, "name": "default", "scores": 96, "total_damage": 0.0, @@ -612,7 +612,7 @@ "aid": "pb-IF4PVVJSNg==" }, "pb-IF4qVVMuIA==": { - "rank": 32, + "rank": 31, "name": "\ue020TacitAnthropology26", "scores": 96, "total_damage": 0.0, @@ -648,7 +648,7 @@ "aid": "pb-IF4-VWItPA==" }, "pb-IF5VVxI5Fg==": { - "rank": 44, + "rank": 43, "name": "\ue020JinaYumnam1234", "scores": 76, "total_damage": 0.0, @@ -672,7 +672,7 @@ "aid": "pb-IF4lVUskVg==" }, "pb-IF4vVVAiKw==": { - "rank": 34, + "rank": 33, "name": "default", "scores": 96, "total_damage": 0.0, @@ -696,7 +696,7 @@ "aid": "pb-IF5RVU0vKg==" }, "pb-IF4JVWseCg==": { - "rank": 43, + "rank": 42, "name": "\ue020CapillaryJaguar7", "scores": 77, "total_damage": 0.0, @@ -720,7 +720,7 @@ "aid": "pb-IF4HVVAkEg==" }, "pb-JiNJARFTUUBCXFhJE0NUVFdCEERbT1dK": { - "rank": 56, + "rank": 55, "name": "\ue020snehil7701", "scores": 20, "total_damage": 0.0, @@ -804,7 +804,7 @@ "aid": "pb-IF5cVEMNNA==" }, "pb-IF4PVEEnBA==": { - "rank": 28, + "rank": 27, "name": "\ue020Deadly\u30c4TusKeR", "scores": 128, "total_damage": 0.0, @@ -816,7 +816,7 @@ "aid": "pb-IF4PVEEnBA==" }, "pb-IF4RVVMDVQ==": { - "rank": 54, + "rank": 53, "name": "\ue030Android52942930", "scores": 37, "total_damage": 0.0, @@ -828,7 +828,7 @@ "aid": "pb-IF4RVVMDVQ==" }, "pb-IF43VVJSAg==": { - "rank": 52, + "rank": 51, "name": "\ue020RANDOMGOD2011", "scores": 44, "total_damage": 0.0, @@ -840,15 +840,15 @@ "aid": "pb-IF43VVJSAg==" }, "pb-IF5XUm9eAg==": { - "rank": 25, + "rank": 59, "name": "\ue030PC402015", - "scores": 152, + "scores": 5, "total_damage": 0.0, - "kills": 0, - "deaths": 10, - "games": 21, - "kd": 0.0, - "avg_score": 7.238, + "kills": 8, + "deaths": 75, + "games": 93, + "kd": 0.106, + "avg_score": 0.053, "aid": "pb-IF5XUm9eAg==" } } \ No newline at end of file diff --git a/dist/ba_root/mods/stats/stats_page.html b/dist/ba_root/mods/stats/stats_page.html index 43e6dcd..05650f6 100644 --- a/dist/ba_root/mods/stats/stats_page.html +++ b/dist/ba_root/mods/stats/stats_page.html @@ -211,14 +211,6 @@ 25 - PC402015 - 152 - 0 - 10 - 21 - - - 26 Android51693156 152 0 @@ -226,7 +218,7 @@ 3 - 27 + 26 lllBOLTlll 151 9 @@ -234,7 +226,7 @@ 3 - 28 + 27 DeadlyツTusKeR 128 3 @@ -242,7 +234,7 @@ 3 - 29 + 28 jonyteoba100 106 2 @@ -250,7 +242,7 @@ 4 - 30 + 29 Android52887552 101 0 @@ -258,7 +250,7 @@ 6 - 31 + 30 StealthyFelicity14 96 0 @@ -266,7 +258,7 @@ 1 - 32 + 31 TacitAnthropology26 96 0 @@ -274,13 +266,21 @@ 1 - 33 + 32 CreepyJourney52261 96 0 0 1 + + 33 + default + 96 + 0 + 0 + 1 + 34 default @@ -299,14 +299,6 @@ 36 - default - 96 - 0 - 0 - 1 - - - 37 Android52110513 93 0 @@ -314,7 +306,7 @@ 2 - 38 + 37 OrtigozaRafa2000 92 4 @@ -322,7 +314,7 @@ 4 - 39 + 38 Android52657984 91 0 @@ -330,7 +322,7 @@ 2 - 40 + 39 Android51464300 90 0 @@ -338,7 +330,7 @@ 2 - 41 + 40 LikelyTour25 85 11 @@ -346,7 +338,7 @@ 2 - 42 + 41 Android29104233 84 7 @@ -354,7 +346,7 @@ 2 - 43 + 42 CapillaryJaguar7 77 7 @@ -362,7 +354,7 @@ 3 - 44 + 43 JinaYumnam1234 76 0 @@ -370,7 +362,7 @@ 1 - 45 + 44 default 64 0 @@ -378,7 +370,7 @@ 1 - 46 + 45 Android52880740 61 0 @@ -386,7 +378,7 @@ 2 - 47 + 46 Android52446817 59 2 @@ -394,7 +386,7 @@ 2 - 48 + 47 default 56 2 @@ -402,7 +394,7 @@ 1 - 49 + 48 Android52893090 56 0 @@ -410,7 +402,7 @@ 2 - 50 + 49 ESZ乛OptimusOp乄 56 0 @@ -418,7 +410,7 @@ 2 - 51 + 50 PROFFESOR9 48 0 @@ -426,7 +418,7 @@ 5 - 52 + 51 RANDOMGOD2011 44 3 @@ -434,7 +426,7 @@ 2 - 53 + 52 Dewanggaming 43 3 @@ -442,7 +434,7 @@ 3 - 54 + 53 Android52942930 37 1 @@ -450,7 +442,7 @@ 1 - 55 + 54 Phriedbean 20 2 @@ -458,7 +450,7 @@ 2 - 56 + 55 snehil7701 20 2 @@ -466,7 +458,7 @@ 1 - 57 + 56 ThreateningOddball34 16 1 @@ -474,7 +466,7 @@ 2 - 58 + 57 default 10 1 @@ -482,13 +474,21 @@ 1 - 59 + 58 default 6 0 1 1 + + 59 + PC402015 + 5 + 8 + 75 + 93 + 60 default diff --git a/dist/ba_root/mods/tools/ServerUpdate.py b/dist/ba_root/mods/tools/ServerUpdate.py new file mode 100644 index 0000000..fd0ac1c --- /dev/null +++ b/dist/ba_root/mods/tools/ServerUpdate.py @@ -0,0 +1,17 @@ +from playersData import pdata +import time +import _thread + +def check(): + _thread.start_new_thread(updateProfilesJson,()) + + +def updateProfilesJson(): + profiles=pdata.get_profiles() + + for id in profiles: + if "spamCount" not in profiles[id]: + profiles[id]["spamCount"]=0 + profiles[id]["lastSpam"]=time.time() + + pdata.commit_profiles(profiles) diff --git a/dist/ba_root/mods/tools/__pycache__/ServerUpdate.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/ServerUpdate.cpython-39.pyc new file mode 100644 index 0000000..3e034ae Binary files /dev/null and b/dist/ba_root/mods/tools/__pycache__/ServerUpdate.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/__pycache__/dualteamscore.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/dualteamscore.cpython-39.pyc new file mode 100644 index 0000000..0fb6f74 Binary files /dev/null and b/dist/ba_root/mods/tools/__pycache__/dualteamscore.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/__pycache__/fireflies.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/fireflies.cpython-39.pyc new file mode 100644 index 0000000..5ebbe87 Binary files /dev/null and b/dist/ba_root/mods/tools/__pycache__/fireflies.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/__pycache__/profanity.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/profanity.cpython-39.pyc new file mode 100644 index 0000000..ffccc78 Binary files /dev/null and b/dist/ba_root/mods/tools/__pycache__/profanity.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/__pycache__/servercheck.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/servercheck.cpython-39.pyc index c76bfca..e30c864 100644 Binary files a/dist/ba_root/mods/tools/__pycache__/servercheck.cpython-39.pyc and b/dist/ba_root/mods/tools/__pycache__/servercheck.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/__pycache__/textonmap.cpython-39.pyc b/dist/ba_root/mods/tools/__pycache__/textonmap.cpython-39.pyc index 54aa379..06758e8 100644 Binary files a/dist/ba_root/mods/tools/__pycache__/textonmap.cpython-39.pyc and b/dist/ba_root/mods/tools/__pycache__/textonmap.cpython-39.pyc differ diff --git a/dist/ba_root/mods/tools/profanity.py b/dist/ba_root/mods/tools/profanity.py new file mode 100644 index 0000000..6476f49 --- /dev/null +++ b/dist/ba_root/mods/tools/profanity.py @@ -0,0 +1,60 @@ +# ported from ankit scripts +# need to update in future with easy to add custom list and more deep analysis . +# working on other features rn, will update this later , for now lets use this +import re + +PATTERN = ( + r"fu+c+k|" + r"fu+c+($|)|" + r"fu+k+($|)|" + r"\w*ph+u*c+k\w*\b|" + r"\b\w+ch+o+d|" + r"randi+|" + r"chu+t\w*\b|" + r"chh+a+k+[ae]|" + r"hijd\w|" + r"lund\b|" + r"\bass\b|" + r"asshole|" + r"bi*tch|" + r"cock|" + r"\bga+nd\b|" + r"ga+ndu|" + r"tharki|" + r"tatti|" + r"lod\w\b|" + r"jha+nt|" + r"pu+s+y|" + r"pu+z+y|" + r"di+c+k|" + r"\b([mb]+c+)+\b|" + r"\b[mb]+[^a-zA-Z]?c+\b|" + r"f.u.c.k|" + r"b\w*s\w?d\w?k|" + r"m.{0,4}d.?a.{0,8}c.?h.?o.?d|" + r"b.+n.?c.?h.?o.?d|" + r"cunt|" + r"my+r+e|" + r"th+y+r|" + r"th+y+i+r|" + r"th+aa+y+o+l+i|" + r"th+a+y+o+l+i|" + r"ku+nn+a+n|" + r"na+y+i+n+t+e|" + r"pu+ll+u|" + r"la+(u|v)+d+\w\b|" + r"chu+d\w*\b|" + "sex+($|)|" + r"bo+b(s|z)|" + r"po+r+n|" + r"ni+p+le+" +) + +def censor(message): + censored_message = re.sub( + PATTERN, + lambda match: "*" * len(match.group()), + message, + flags=re.IGNORECASE + ) + return censored_message \ No newline at end of file diff --git a/dist/ba_root/mods/tools/servercheck.py b/dist/ba_root/mods/tools/servercheck.py index b5c1a9d..6866f6f 100644 --- a/dist/ba_root/mods/tools/servercheck.py +++ b/dist/ba_root/mods/tools/servercheck.py @@ -14,6 +14,8 @@ import ba from ba._general import Call import threading import setting +import _thread +from tools import profanity # class ServerChecker: # def __init__(): @@ -68,10 +70,17 @@ class checkserver(object): newPlayers.append(ros['account_id']) if ros['account_id'] not in self.players and ros['client_id'] !=-1: - + d_str=ros['display_string'] + d_str2=profanity.censor(d_str) + if d_str2!=d_str: + _ba.screenmessage("Profanity in Id , change your ID and join back",color=(1,0,0),transient=True,clients=[ros['client_id']]) + _ba.disconnect_client(ros['client_id'],1) + return if ros['account_id'] != None: - - LoadProfile(ros['account_id']).start() + if ros['account_id'] in serverdata.clients: + on_player_join_server(ros['account_id'],serverdata.clients[ros['account_id']]) + else: + LoadProfile(ros['account_id']).start() self.players=newPlayers @@ -80,8 +89,30 @@ settings = setting.get_settings_data() def on_player_join_server(pbid,player_data): - + now=time.time() #player_data=pdata.get_info(pbid) + clid=113 + for ros in _ba.get_game_roster(): + if ros["account_id"]==pbid: + clid=ros["client_id"] + if pbid in serverdata.clients: + rejoinCount=serverdata.clients[pbid]["rejoincount"] + spamCount=serverdata.clients[pbid]["spamCount"] + if now-serverdata.clients[pbid]["lastJoin"] < 15: + rejoinCount+=1 + if rejoinCount >2: + _ba.screenmessage("Joining too fast , slow down dude",color=(1,0,1),transient=True,clients=[clid]) + _ba.disconnect_client(clid) + _thread.start_new_thread(reportSpam,(pbid,)) + + return + else: + rejoinCount=0 + + serverdata.clients[pbid]["rejoincount"]=rejoinCount + serverdata.clients[pbid]["lastJoin"]=now + + if player_data!=None: device_strin="" @@ -89,25 +120,37 @@ def on_player_join_server(pbid,player_data): for ros in _ba.get_game_roster(): if ros['account_id']==pbid: if not player_data["isBan"]: - _ba.screenmessage("New Accounts not allowed here , come back later",transient=True,clients=[ros['client_id']]) + _ba.screenmessage("New Accounts not allowed here , come back later",color=(1,0,0), transient=True,clients=[ros['client_id']]) _ba.disconnect_client(ros['client_id']) return else: - - serverdata.clients[pbid]=player_data - serverdata.clients[pbid]["warnCount"]=0 - serverdata.clients[pbid]["lastWarned"]=time.time() - if not player_data["canStartKickVote"]: - _ba.disable_kickvote(pbid) + if pbid not in serverdata.clients: + serverdata.clients[pbid]=player_data + serverdata.clients[pbid]["warnCount"]=0 + serverdata.clients[pbid]["lastWarned"]=time.time() + serverdata.clients[pbid]["verified"]=False + serverdata.clients[pbid]["rejoincount"]=1 + serverdata.clients[pbid]["lastJoin"]=time.time() + if not player_data["canStartKickVote"]: + _ba.disable_kickvote(pbid) verify_account(pbid,player_data) + cid=113 + d_st="xx" + for ros in _ba.get_game_roster(): + if ros['account_id']==pbid: + cid=ros['client_id'] + d_st=ros['display_string'] + _ba.screenmessage(settings["regularWelcomeMsg"]+" "+d_st,color=(0.60,0.8,0.6),transient=True,clients=[cid]) else: d_string="" + cid=113 for ros in _ba.get_game_roster(): if ros['account_id']==pbid: d_string=ros['display_string'] + cid=ros['client_id'] thread = FetchThread( target=my_acc_age, @@ -117,6 +160,7 @@ def on_player_join_server(pbid,player_data): ) thread.start() + _ba.screenmessage(settings["firstTimeJoinMsg"],color=(0.6,0.8,0.6),transient=True,clients=[cid]) @@ -137,6 +181,8 @@ def verify_account(pb_id,p_data): display_string=d_string ) thread2.start() + else: + serverdata.clients[pb_id]["verified"]=True #============== IGNORE BLOW CODE , ELSE DIE ======================= @@ -250,6 +296,9 @@ def save_ids(ids,pb_id,display_string): if display_string not in ids: msg="Spoofed Id detected , Goodbye" _ba.pushcall(Call(kick_by_pb_id,pb_id,msg),from_other_thread=True) + serverdata.clients[pb_id]["verified"]=False + else: + serverdata.clients[pb_id]["verified"]=True @@ -259,17 +308,30 @@ def kick_by_pb_id(pb_id,msg): _ba.screenmessage(msg, transient=True, clients=[ros['client_id']]) _ba.disconnect_client(ros['client_id']) _ba.chatmessage("id spoofer kicked") + - - - - - - def get_account_age(ct): creation_time=datetime.datetime.strptime(ct,"%Y-%m-%d %H:%M:%S") now = datetime.datetime.now() delta = now - creation_time delta_hours = delta.total_seconds() / (60 * 60) return delta_hours + + +def reportSpam(id): + now=time.time() + profiles=pdata.get_profiles() + if id in profiles: + count=profiles[id]["spamCount"] + + if now-profiles[id]["lastSpam"] < 2*24*60*60: + count+=1 + if count > 3: + profiles[id]["isBan"]=True + else: + count =0 + + profiles[id]["spamCount"]=count + profiles[id]["lastSpam"]=now + pdata.commit_profiles(profiles) \ No newline at end of file diff --git a/dist/ba_root/mods/tools/textonmap.py b/dist/ba_root/mods/tools/textonmap.py index 62c0625..3c1516b 100644 --- a/dist/ba_root/mods/tools/textonmap.py +++ b/dist/ba_root/mods/tools/textonmap.py @@ -7,9 +7,13 @@ import ba, _ba import setting from stats import mystats from datetime import datetime +from spazmod import modifyspaz +from tools import fireflies class textonmap: def __init__(self): + modifyspaz.setTeamCharacter() + setti=setting.get_settings_data() data = setti['textonmap'] left = data['bottom left watermark']