예제 #1
0
    def run(self, actor):
        """
        :type actor: mudslingcore.objects.Player
        """
        from mudslingcore.globalvars import all_global_vars
        ui = actor.get_ui()
        c = ui.Column

        t = ui.Table([
            c('Name', align='l', cell_formatter=self._format_name),
            c('Type', align='l', cell_formatter=self._format_type),
            c('Value', align='l', cell_formatter=self._format_value)
        ])
        for name, value in all_global_vars().iteritems():
            t.add_row((name, value, value))
        actor.msg(ui.report('Globals', t))
예제 #2
0
    def run(self, actor):
        """
        :type actor: mudslingcore.objects.Player
        """
        from mudslingcore.globalvars import all_global_vars
        ui = actor.get_ui()
        c = ui.Column

        t = ui.Table([
            c('Name', align='l', cell_formatter=self._format_name),
            c('Type', align='l', cell_formatter=self._format_type),
            c('Value', align='l', cell_formatter=self._format_value)
        ])
        for name, value in all_global_vars().iteritems():
            t.add_row((name, value, value))
        actor.msg(ui.report('Globals', t))
예제 #3
0
 def run(self, this, actor, args):
     """
     :type this: mudslingcore.objects.Player
     :type actor: mudslingcore.objects.Player
     :type args: dict
     """
     obj = args['obj']
     if args['setting'] is not None:
         if obj.isa(ConfigurableObject):
             #: :type: mudslingcore.objsettings.ObjSetting
             setting = obj.get_obj_setting(args['setting'])
             val = mudsling.utils.string.escape_ansi_tokens(
                 setting.display_value(obj))
             actor.tell('{g', obj, '{n.{y', args['setting'], ' {x[',
                        obj._fmt_type(setting), '] {n= {c', val)
         else:
             raise self._err('Object does not have settings')
     else:
         body = obj.inspectable_output(who=actor)
         actor.tell(ui.report('Showing %s' % actor.name_for(obj), body))
예제 #4
0
 def run(self, this, actor, args):
     """
     :type this: mudslingcore.objects.Player
     :type actor: mudslingcore.objects.Player
     :type args: dict
     """
     obj = args['obj']
     if args['setting'] is not None:
         if obj.isa(ConfigurableObject):
             #: :type: mudslingcore.objsettings.ObjSetting
             setting = obj.get_obj_setting(args['setting'])
             val = mudsling.utils.string.escape_ansi_tokens(
                 setting.display_value(obj))
             actor.tell('{g', obj, '{n.{y', args['setting'], ' {x[',
                        obj._fmt_type(setting), '] {n= {c', val)
         else:
             raise self._err('Object does not have settings')
     else:
         body = obj.inspectable_output(who=actor)
         actor.tell(ui.report('Showing %s' % actor.name_for(obj), body))