AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   TF2Items (https://forums.alliedmods.net/forumdisplay.php?f=146)
-   -   Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag (https://forums.alliedmods.net/showthread.php?t=183259)

Dr. McKay 04-19-2012 17:23

Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
 
So, if you're trying to modify an item while using the PRESERVE_ATTRIBUTES flag, you can't modify an existing attributes.

For example:

I have an Unusual hat. It is painted. I want to override the effect and change it. Doing so will remove the paint. If I use PRESERVE_ATTRIBUTES to try to keep the paint, no effect appears at all.

(Yes, I'm aware I can just reapply the paint attributes, but this is an example. This is actually happening automatically in a plugin).

Hope I'm clear enough...

asherkin 04-19-2012 20:02

Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
 
I've been planning something for this for a while, but I either need to do it without breaking the API, or redesign the API.

There are a few plugins miss-using it and causing terrible issues, I'd prefer to not exasperate that.

Powerlord 04-20-2012 09:54

Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
 
Quote:

Originally Posted by asherkin (Post 1692632)
I've been planning something for this for a while, but I either need to do it without breaking the API, or redesign the API.

There are a few plugins miss-using it and causing terrible issues, I'd prefer to not exasperate that.

Have you let the authors of these plugins know not to do that?

Actually, now I'm curious as to which plugins those are so we can put pressure on them instead of everypony else.

Blame the pony logo for the everypony comment.

asherkin 04-20-2012 10:14

Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
 
Quote:

Originally Posted by Powerlord (Post 1692908)
Have you let the authors of these plugins know not to do that?

Actually, now I'm curious as to which plugins those are so we can put pressure on them instead of everypony else.

Pretty much anything apart from tf2items_manager.

There's no clean solution for plugins to avoid the issue, it's a design flaw in the API.
Changes need to be made with TF2Items first.

Dr. McKay 04-23-2012 12:52

Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
 
If you need to make changes to the forward, you can just create a new one, like TF2Items_OnGiveNamedItemEx


All times are GMT -4. The time now is 17:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.