Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADDCOMP, DELCOMP #1239

Open
Steinny opened this issue Apr 21, 2024 · 8 comments
Open

ADDCOMP, DELCOMP #1239

Steinny opened this issue Apr 21, 2024 · 8 comments

Comments

@Steinny
Copy link

Steinny commented Apr 21, 2024

I'm making a door replacement menu for standard type of house (for example) - m_wooden_house

  • Added AddComponent uid(W): Adds a Component with the given UID.
  • Added DelComponent uid(W): Deletes from the Components list the given UID (-1 clears the whole list)*.
    does not work

but work ADDCOMP - undocumented command!!!
DELCOMP - also doesn't work

Screenshot_3

@Steinny
Copy link
Author

Steinny commented Apr 21, 2024

I need not only to change the appearance, but also to give out the keys. That's why I'm completely changing one door.

@xwerswoodx
Copy link
Contributor

xwerswoodx commented Apr 22, 2024

It's silly, I don't know why it's like that but delete command is DELCOMPONENT instead of DELCOMP and add command is ADDCOMP. I have no idea why it is like that probably a mistake, but DELCOMPONENT and ADDCOMP works well. I will add ADDCOMPONENT as well to make sure both matches with the info in changelog.

@Steinny
Copy link
Author

Steinny commented Apr 22, 2024

my mistake. Maybe I didn't check DelComponent.
at first, I was generally confused between COMP and COMPONENT. and why are the functions different
But then I understand.

@Steinny
Copy link
Author

Steinny commented Apr 22, 2024

This command adds only tag.MultiComponent
events like ei_house_component and other
link to the house
is all this using scripts?
it's easier to write a separate function for yourself

@Steinny
Copy link
Author

Steinny commented Apr 22, 2024

SetOwner - also doesn't work !!!

@xwerswoodx
Copy link
Contributor

xwerswoodx commented Apr 24, 2024

What do you mean with SETOWNER? I don't think we have any command like this. In X when you set OWNER it directly set the owner of things, so probably you need to use .xowner uid or .set owner uid

@Steinny
Copy link
Author

Steinny commented Apr 24, 2024

Screenshot_1

@xwerswoodx
Copy link
Contributor

xwerswoodx commented Apr 24, 2024

I see, maybe the person who did this update used SetOwner at first, then changed it and forgot to update changelog, I can update this, but it should be OWNER directly.

case SHL_OWNER:
{
lpctstr ptcKey = s.GetKey();
ptcKey += 5;
if (*ptcKey == '.')
{
CChar *pOwner = GetOwner().CharFind();
if (pOwner)
{
return pOwner->r_LoadVal(s);
}
return false;
}
CUID uid(s.GetArgDWVal());
if (!uid.IsValidUID())
{
SetOwner(CUID());
}
else
{
SetOwner(uid);
}
break;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants