Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(5)  |  Derive(0)  |  Import(3)

src/l/a/Lampost-Mud-HEAD/lampost/lpflavor/article.py   Lampost-Mud(Download)
from lampost.comm.broadcast import BroadcastMap
from lampost.datastore.dbo import DBOTField
from lampost.datastore.auto import TemplateField
from lampost.model.article import Article, ArticleTemplate
from lampost.mud.action import mud_action
 
 
class ArticleTemplateLP(ArticleTemplate):
    remove_msg = BroadcastMap(s="You unequip {N}", e="{N} unequips {n}")
    equip_msg = BroadcastMap(s="You wear {N}", e="{n} wears {N}")
    def on_loaded(self):
        if self.art_type == 'weapon':
            self.equip_msg = BroadcastMap(s="You wield {N}", e="{n} wields {N}")
 
 

src/l/a/Lampost-Mud-HEAD/lampost/editor/socials.py   Lampost-Mud(Download)
from lampost.editor.base import EditResource
from lampost.mud.socials import Social
from lampost.comm.broadcast import BroadcastMap, Broadcast, broadcast_types
 
m_requires('mud_actions', __name__)
    def render_POST(self, content):
        broadcast = Broadcast(BroadcastMap(**content.b_map), content.source, content.source if content.self_source else content.target)
        return {broadcast_type['id']: broadcast.substitute(broadcast_type['id']) for broadcast_type in broadcast_types}
 

src/l/a/Lampost-Mud-HEAD/lampost/mud/socials.py   Lampost-Mud(Download)
from lampost.comm.broadcast import BroadcastMap
from lampost.context.resource import m_requires
from lampost.datastore.dbo import RootDBO, DBOField
from lampost.mud.action import mud_action
 
    def on_loaded(self):
        mud_action(self.dbo_id)(self)
        self.broadcast_map = BroadcastMap(**self.b_map)
 
    def __call__(self, source, target, **_):