mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
|
|
# -*- coding: utf-8 -*-
|
||
|
|
# Released under the MIT License. See LICENSE for details.
|
||
|
|
|
||
|
|
import babase
|
||
|
|
import bauiv1 as bui
|
||
|
|
import bascenev1 as bs, _ba, setting
|
||
|
|
import babase.internal
|
||
|
|
from stats.mystats import damage_data
|
||
|
|
from bascenev1lib.actor.popuptext import PopupText
|
||
|
|
|
||
|
|
our_settings = setting.get_settings_data()
|
||
|
|
|
||
|
|
def handle_hit(mag, pos):
|
||
|
|
if not mag: return
|
||
|
|
#Send Screen Texts in enabled
|
||
|
|
if our_settings['enableHitTexts']:
|
||
|
|
try:
|
||
|
|
if mag >= 110: PopupText("#PRO !",color=(1,0.2,0.2),scale=1.6,position=pos).autoretain()
|
||
|
|
elif mag >= 93 and mag < 110: PopupText("GOOD ONE!",color=(1,0.3,0.1),scale=1.6,position=pos).autoretain()
|
||
|
|
elif mag >= 63 and mag < 93: PopupText("OH! YEAH",color=(1,0.5,0.2),scale=1.6,position=pos).autoretain()
|
||
|
|
elif mag >= 45 and mag < 63: PopupText("WTF!",color=(0.7,0.4,0.2),scale=1.6,position=pos).autoretain()
|
||
|
|
elif mag > 30 and mag < 45: PopupText("!!!",color=(1,1,1),scale=1.6,position=pos).autoretain()
|
||
|
|
except: pass
|
||
|
|
return
|
||
|
|
|
||
|
|
|
||
|
|
class hit_message(bs.HitMessage):
|
||
|
|
def __init__(self, *args, **kwargs):
|
||
|
|
hit_type = kwargs["hit_type"]
|
||
|
|
if hit_type == "punch":
|
||
|
|
handle_hit(kwargs['magnitude'], kwargs['pos'])
|
||
|
|
super().__init__(*args, **kwargs)
|
||
|
|
bs.HitMessage = hit_message
|