1. Is there any way to access the list of entities that will bring up a Hammer Context Menu when the player right clicks with the Hammer?
     
  2. I dont think there is a active list, but you can make your own list using testing and entity names.
     
  3. How do you mean?
     
  4. Hold that thought, jut found something in Hammer.cs inside the assembly:
    Code:
      private void OpenContextMenu()
    {
    BuildingBlock buildingBlock = this.GetBuildingBlock();
    if ((Object) buildingBlock == (Object) null)
        return;
    GameMenu.Option[] buildMenu = buildingBlock.GetBuildMenu(this.ownerPlayer);
    if (buildMenu.Length == 0)
        return;
    ContextMenuUI.Open(buildMenu, ContextMenuUI.MenuType.RightClick);
    }
    "BuildingBlock buildingBlock = this.GetBuildingBlock();"

    You can use that to see if something is rigthclickable with a hammer.
     
  5. In Hammer.cs I only see CanHit and DoAttackShared
     
  6. What do you use to decompile the assembly?
     
  7. Same, odd. Search for just "hammer"
     
  8. This is all I see in Hammer.cs
    Code:
    using Oxide.Core;
    using UnityEngine;public class Hammer : BaseMelee
    {
    public Hammer()
    {
    base.\u002Ector();
    }  public override bool CanHit(HitTest info)
    {
    if ((Object) info.HitEntity == (Object) null || info.HitEntity is BasePlayer)
        return false;
    return info.HitEntity is BaseCombatEntity;
    }  public override void DoAttackShared(HitInfo info)
    {
    if (this.isServer && !this.VerifyClientAttack(info))
        return;
    BaseCombatEntity baseCombatEntity = info.HitEntity as BaseCombatEntity;
    if (Interface.CallHook("OnHammerHit", (object) this.ownerPlayer, (object) info) != null)
        return;
    if ((Object) baseCombatEntity != (Object) null && this.isServer)
    {
        using (TimeWarning.New("DoRepair", 50L))
        baseCombatEntity.DoRepair(this.ownerPlayer);
    }
    if (this.isServer)
        Effect.server.ImpactEffect(info);
    else
        Effect.client.ImpactEffect(info);
    }
    }
     
    Last edited by a moderator: Feb 28, 2016
  9. Code:
    using UnityEngine;public class Hammer : BaseMelee
    {
    public Hammer()
    {
    base.\u002Ector();
    }  private BuildingBlock GetBuildingBlock()
    {
    return this.ownerPlayer.lookingAtEntity as BuildingBlock;
    }  public override void Frame()
    {
    base.Frame();
    BuildingBlock buildingBlock = this.GetBuildingBlock();
    if (!((Object) buildingBlock != (Object) null))
        return;
    buildingBlock.DrawHighlight();
    }  public override void OnTick(float delta)
    {
    base.OnTick(delta);
    if (!this.ownerPlayer.input.state.WasJustPressed(BUTTON.FIRE_SECONDARY) || !this.ownerPlayer.CanBuild() && !this.ownerPlayer.IsAdmin())
        return;
    this.OpenContextMenu();
    }  private void OpenContextMenu()
    {
    BuildingBlock buildingBlock = this.GetBuildingBlock();
    if ((Object) buildingBlock == (Object) null)
        return;
    GameMenu.Option[] buildMenu = buildingBlock.GetBuildMenu(this.ownerPlayer);
    if (buildMenu.Length == 0)
        return;
    ContextMenuUI.Open(buildMenu, ContextMenuUI.MenuType.RightClick);
    }  public override bool CanHit(HitTest info)
    {
    if ((Object) info.HitEntity == (Object) null || info.HitEntity is BasePlayer)
        return false;
    return info.HitEntity is BaseCombatEntity;
    }  public override void DoAttackShared(HitInfo info)
    {
    if (!((Object) (info.HitEntity as BaseCombatEntity) != (Object) null))
        ;
    if (this.isServer)
        Effect.server.ImpactEffect(info);
    else
        Effect.client.ImpactEffect(info);
    }
    }
    
     
  10. This isn't from Rust Legacy is it?

     
  11. Shouldn't be, I get all of my code straight from the assembly of rust data, are you getting yours from legacy?
    [DOUBLEPOST=1456693899][/DOUBLEPOST]Cant be actually, that assembly I use contains the helicopter files and legacy doesnt have a helicopter.