Raised This Month: $68 Target: $400
 17% 

Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-19-2012 , 17:23   Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
Reply With Quote #1

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...
__________________

Last edited by Dr. McKay; 04-19-2012 at 17:24.
Dr. McKay is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-19-2012 , 20:02   Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
Reply With Quote #2

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.
__________________
asherkin is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-20-2012 , 09:54   Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
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.
__________________
Am I back? Well, we'll see.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-20-2012 , 10:14   Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
Reply With Quote #4

Quote:
Originally Posted by Powerlord View Post
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.
__________________
asherkin is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-23-2012 , 12:52   Re: Allow us to override existing attributes while using the PRESERVE_ATTRIBUTES flag
Reply With Quote #5

If you need to make changes to the forward, you can just create a new one, like TF2Items_OnGiveNamedItemEx
__________________
Dr. McKay is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:27.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode