ID:2516588
 
Resolved
Reading and writing vars on an abstract filter didn't work correctly.
BYOND Version:512.1488
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 79.0.3936.0
Applies to:Dream Seeker
Status: Resolved (513.1491)

This issue has been resolved.
Descriptive Problem Summary:

When editing a /dm_filter before it has been added to a filters list (going from abstract to tangible) you'll end up with a "bad filter" runtime error.

Numbered Steps to Reproduce Problem:

1) Create a filter.
2) Try editing a variable on said filter.
3) Profit.

Code Snippet (if applicable) to Reproduce Problem:
var/dm_filter/filter = filter(type="drop_shadow",size=2,x=0,y=0)
filter.size = 4 // Runtime

// Removing the above you can do
src.filters += filter
filter = src.filters[src.filters.len]
filter.size = 4 // Works.


Expected Results:

Being able to interact with a filter outside its creation like any other datum.

Actual Results:

Runtime errors.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Probably.
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?

Turning the filter from an abstract by adding it to a filters list.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Interacting with filters this way wasn't possible until recently, it's likely this has been an issue since it became possible.

Workarounds:

Add to filters first, then keep that reference, you can keep it forever if you want.
Lummox JR resolved issue with message:
Reading and writing vars on an abstract filter didn't work correctly.
In response to Lummox JR
This should be moved to beta bugs tho.
No it shouldn't, it's a 512 bug.
In response to Nadrew
My bad then.