Finaltwist

Member
Is there any specific reason why a container item wouldn't show name when single clicked, doesn't show properties when hover over?

I added
public override void AddNameProperties( ObjectPropertyList list )
{

to the class and nothing shows up....
Post automatically merged:

the addnameproperties is in a baseclass, could that be it?
 
Last edited:
Im running off of RUNUO 2.2.

That being said, all items i susually create have a name and properties on hover, but this one doesn't. could it be the itemID (tiledata is off somehow?)?
 
Depends on the itemID. If it doesn't have a name then the client won't show one unless you specify "name =" in the constructable section of the script.
 
this has no name on click, and no properties on hover over

C#:
    public class BaseHarvester : BaseContainer, IOneTime
    {
(...)

public BaseHarvester() : base( 0x5484 ) // 0x5485 is good too
        {
           
            OneTimeType = 3;
           
            if (type == 1)
            {
                ItemID = 0x5484;
                Name = "an ore harvester";
            }
            if (type == 2)
            {
                ItemID = 0x5485;
                Name = "a lumber harvester";
            }
           
            m_Spawn = new ArrayList();
            Weight = 750;
           
            m_owner = null;          
            Movable = true;
           
            Hue = 1818;

            quality = 1;
            HitsMax = (int)((1/quality) * 2500);
            Hits = HitsMax;
            RangeHome = 20;
            copper = 0;
            harvesttick = 0;
            RespawnTime = Utility.RandomMinMax( (int)((1/quality) * 20), 30 ); // change this to depend on type/difficulty
            RegenTime = Utility.RandomMinMax( (int)((1/quality) * 10), 20 ); // change this to depend on type/difficulty

            Movable = false;
            m_Entity = new HarvesterEntity( this );
            m_Entity.MoveToWorld( this.Location, this.Map );
           
            InvalidateProperties();
        }
Post automatically merged:

there are other basecontainer items that have names/properties - im just at a loss what the reason is here.
 
Last edited:
Hmm - I can't check the itemID because my client 7.0.75.35 doesn't have that item value.

Just a shot in the dark -- maybe it requires the "[Constructable]" flag on line 4 of your example?
 
its there - and the tiledata for that item just has impassable, container, item a and a name.

nothing fancy... i have no idea whats going on here.

C#:
        [Constructable]
        public BaseHarvester() : base( 0x5484 ) // 0x5485 is good too
        {
            
            OneTimeType = 3;
            
            if (type == 1)
            {
                ItemID = 0x5484;
                Name = "an ore harvester";
            }
            if (type == 2)
            {
                ItemID = 0x5485;
                Name = "a lumber harvester";
            }
            
            m_Spawn = new ArrayList();
            Weight = 750;
            
            m_owner = null;           
            Movable = true;
            
            Hue = 1818;

            quality = 1;
            HitsMax = (int)((1/quality) * 2500);
            Hits = HitsMax;
            RangeHome = 20;
            copper = 0;
            harvesttick = 0;
            RespawnTime = Utility.RandomMinMax( (int)((1/quality) * 20), 30 ); // change this to depend on type/difficulty
            RegenTime = Utility.RandomMinMax( (int)((1/quality) * 10), 20 ); // change this to depend on type/difficulty

            Movable = false;
            m_Entity = new HarvesterEntity( this );
            m_Entity.MoveToWorld( this.Location, this.Map );
            
            InvalidateProperties();
        }
        
        public override void AddNameProperties( ObjectPropertyList list )
        {
            base.AddNameProperties( list );

            if (m_owner != null)
                list.Add( "Double click to attack or collect resources." );
            else
                list.Add( "Double click to claim this device and confirm placement." );
                
            if (copper > 0)
            {
                if (m_type == 1)
                    list.Add( "Currently harvesting ores" );
                else if (m_type == 2)
                    list.Add( "Currently harvesting lumber" );
            }
            else if (copper == 0)
                list.Add( "Add copper to power the device." );

            if (this.RootParentEntity != null)
                list.Add( "Must be placed on the ground, outside a house to function." );
                
            if (m_quality <= 3)
                list.Add( "This machine is barely holding together" );
            else if (m_quality <= 5)
                list.Add( "This machine is poorly built" );
            else if (m_quality <= 8)
                list.Add( "This machine is well built" );
            else if (m_quality <= 10)
                list.Add( "This machine is perfectly built" );
            
            list.Add( "Has been harvesting for " + (int)(m_harvesttick) + " minutes." );
            list.Add( "This device continue to harvest for " + (int)((double)copper/150) + " minutes." );             

        }
Post automatically merged:

figured it out!! error was in the basecontainer :)
 
Last edited:
I have a question. If it's ore harvester, double clicking it can't detect the floor tiles. You must use a setting region to take effect. Can this problem be solved?
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back