mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 03:35:12 -06:00
Fix ~~target, and add a command to disable your GM icon.
This commit is contained in:
parent
55ace187c1
commit
1309f1a4ad
2 changed files with 21 additions and 2 deletions
|
@ -67,6 +67,7 @@ class Avatar(Actor, ShadowCaster):
|
|||
self.__chatSet = 0
|
||||
self.__chatLocal = 0
|
||||
self.__currentDialogue = None
|
||||
self.wantAdminTag = True
|
||||
|
||||
def delete(self):
|
||||
try:
|
||||
|
@ -172,6 +173,12 @@ class Avatar(Actor, ShadowCaster):
|
|||
|
||||
def getType(self):
|
||||
return self.avatarType
|
||||
|
||||
def setWantAdminTag(self, bool):
|
||||
self.wantAdminTag = bool
|
||||
|
||||
def getWantAdminTag(self):
|
||||
return self.wantAdminTag
|
||||
|
||||
def setName(self, name):
|
||||
if hasattr(self, 'isDisguised') and self.isDisguised:
|
||||
|
@ -194,7 +201,7 @@ class Avatar(Actor, ShadowCaster):
|
|||
|
||||
self.nametag.setName(name)
|
||||
|
||||
if hasattr(self, 'adminAccess') and self.isAdmin():
|
||||
if hasattr(self, 'adminAccess') and self.isAdmin() and self.getWantAdminTag():
|
||||
access = self.getAdminAccess()
|
||||
|
||||
if access in OTPLocalizer.AccessToString:
|
||||
|
@ -553,7 +560,7 @@ class Avatar(Actor, ShadowCaster):
|
|||
|
||||
return sequence
|
||||
|
||||
@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[])
|
||||
@magicWord(category=CATEGORY_COMMUNITY_MANAGER)
|
||||
def target():
|
||||
"""
|
||||
Returns the current Spellbook target.
|
||||
|
|
|
@ -2451,6 +2451,18 @@ def blackCat():
|
|||
"""
|
||||
base.cr.blackCatMgr.requestBlackCatTransformation()
|
||||
|
||||
@magicWord(category=CATEGORY_COMMUNITY_MANAGER)
|
||||
def toggleGM():
|
||||
invoker = spellbook.getInvoker()
|
||||
if invoker.gmIcon:
|
||||
invoker.setWantAdminTag(False)
|
||||
invoker.removeGMIcon()
|
||||
invoker.setNametagName()#setName(invoker.getName())
|
||||
else:
|
||||
invoker.setWantAdminTag(True)
|
||||
invoker.setGMIcon(invoker.getAdminAccess())
|
||||
invoker.setNametagName()#setName(invoker.getName())
|
||||
|
||||
@magicWord(category=CATEGORY_COMMUNITY_MANAGER, types=[str])
|
||||
def showParticle(name):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue