projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch internal counters to new-style Element
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
c3e1940
..
202b6b2
100644
(file)
--- a/
mudpy/misc.py
+++ b/
mudpy/misc.py
@@
-944,16
+944,12
@@
class User:
def new_avatar(self):
"""Instantiate a new, unconfigured avatar for this user."""
counter = 0
def new_avatar(self):
"""Instantiate a new, unconfigured avatar for this user."""
counter = 0
- while "avatar:" + self.account.get("name") + ":" + str(
- counter
- ) in universe.categories.get("actor", {}).keys():
+ while ("avatar_%s_%s" % (self.account.get("name"), counter)
+ in universe.categories.get("actor", {}).keys()):
counter += 1
self.avatar = Element(
counter += 1
self.avatar = Element(
- "actor:avatar:" + self.account.get("name") + ":" + str(
- counter
- ),
- universe, old_style=True
- )
+ "actor.avatar_%s_%s" % (self.account.get("name"), counter),
+ universe)
self.avatar.append("inherit", "archetype:avatar")
self.account.append("avatars", self.avatar.key)
self.avatar.append("inherit", "archetype:avatar")
self.account.append("avatars", self.avatar.key)
@@
-1405,7
+1401,7
@@
def on_pulse():
# add an element for counters if it doesn't exist
if "counters" not in universe.categories.get("internal", {}):
# add an element for counters if it doesn't exist
if "counters" not in universe.categories.get("internal", {}):
- Element("internal
:counters", universe, old_style=Tru
e)
+ Element("internal
.counters", univers
e)
# update the log every now and then
if not universe.categories["internal"]["counters"].get("mark"):
# update the log every now and then
if not universe.categories["internal"]["counters"].get("mark"):