示例#1
0
        public override bool HandleEvent(GetInventoryActionsEvent e)
        {
            // List an activate option that makes us brew.

            e.AddAction(
                Name: "Activate",
                Key: 'a',
                Display: "{{W|a}}ctivate",
                Command: "Activate",
                WorksTelekinetically: true
                );

            return(true);
        }
示例#2
0
 public override bool HandleEvent(GetInventoryActionsEvent E)
 {
     if (ParentObject.pPhysics.CurrentCell != null || ParentObject.InInventory != null)
     {
         if (ParentObject.pPhysics.Takeable)
         {
             E.AddAction("plant", "&Wp&ylant", "Plant", null, 'p', false, 5);
         }
     }
     if (ParentObject.pPhysics.CurrentCell != null && !ParentObject.pPhysics.Takeable)
     {
         E.AddAction("water", "&Ww&yater", "Water", null, 'w', false, 5);
     }
     return(true);
 }
示例#3
0
        public override bool HandleEvent(GetInventoryActionsEvent @event)
        {
            @event.AddAction(
                Name: "Activate",
                Key: 'a',
                Display: "{{W|a}}ctivate",
                Command: "Activate",
                WorksTelekinetically: true
                );

            // If a music player is currently playing, allow deactivating it.
            if (IsMusicLockOn())
            {
                @event.AddAction(
                    Name: "Deactivate",
                    Key: 'd',
                    Display: "{{W|d}}eactivate",
                    Command: "Deactivate",
                    WorksTelekinetically: true
                    );
            }

            return(true);
        }