mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-10-20 00:00:39 +00:00
commit
236df55e1b
1 changed files with 16 additions and 6 deletions
22
dist/ba_root/mods/spazmod/tag.py
vendored
22
dist/ba_root/mods/spazmod/tag.py
vendored
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
from playersData import pdata
|
||||
import ba, setting
|
||||
from stats import mystats
|
||||
sett = setting.get_settings_data()
|
||||
def addtag(node,player):
|
||||
session_player=player.sessionplayer
|
||||
account_id=session_player.get_v1_account_id()
|
||||
|
|
@ -22,7 +24,7 @@ def addtag(node,player):
|
|||
if tag:
|
||||
Tag(node,tag,col)
|
||||
|
||||
from stats import mystats
|
||||
|
||||
def addrank(node,player):
|
||||
session_player=player.sessionplayer
|
||||
account_id=session_player.get_v1_account_id()
|
||||
|
|
@ -33,7 +35,6 @@ def addrank(node,player):
|
|||
|
||||
def addhp(node):
|
||||
hp = node.hitpoints
|
||||
_set = setting.get_settings_data()
|
||||
def showHP():
|
||||
HitPoint(owner=node,prefix=str(int(hp)),position=(0,0.75,0),shad = 1.4)
|
||||
if hp: t = ba.Timer(100,ba.Call(showHP),repeat = True, timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
|
|
@ -41,6 +42,7 @@ def addhp(node):
|
|||
class Tag(object):
|
||||
def __init__(self,owner=None,tag="somthing",col=(1,1,1)):
|
||||
self.node=owner
|
||||
|
||||
mnode = ba.newnode('math',
|
||||
owner=self.node,
|
||||
attrs={
|
||||
|
|
@ -79,7 +81,16 @@ class Tag(object):
|
|||
'h_align': 'center'
|
||||
})
|
||||
mnode.connectattr('output', self.tag_text, 'position')
|
||||
|
||||
if sett["enableTagAnimation"]:
|
||||
ba.animate_array(node=self.tag_text, attr='color', size=3, keys={
|
||||
0.2: (2,0,2),
|
||||
0.4: (2,2,0),
|
||||
0.6: (0,2,2),
|
||||
0.8: (2,0,2),
|
||||
1.0: (1,1,0),
|
||||
1.2: (0,1,1),
|
||||
1.4: (1,0,1)
|
||||
}, loop=True)
|
||||
class Rank(object):
|
||||
def __init__(self,owner=None,rank=99):
|
||||
self.node=owner
|
||||
|
|
@ -105,8 +116,7 @@ class Rank(object):
|
|||
|
||||
class HitPoint(object):
|
||||
def __init__(self,position = (0,1.5,0),owner = None,prefix = 'ADMIN',shad = 1.2):
|
||||
_set = setting.get_settings_data()
|
||||
if not _set['enablehptag']: return
|
||||
if not sett['enablehptag']: return
|
||||
self.position = position
|
||||
self.owner = owner
|
||||
m = ba.newnode('math', owner=self.owner, attrs={'input1': self.position, 'operation': 'add'})
|
||||
|
|
@ -127,4 +137,4 @@ class HitPoint(object):
|
|||
def a():
|
||||
self._Text.delete()
|
||||
m.delete()
|
||||
self.timer = ba.Timer(100, ba.Call(a), timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
self.timer = ba.Timer(100, ba.Call(a), timetype=ba.TimeType.SIM, timeformat=ba.TimeFormat.MILLISECONDS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue