ID:2970639
 
Not a bug
BYOND Version:516
Operating System:Linux
Web Browser:Chrome 135.0.0.0
Applies to:Dream Daemon
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
The filters list on MA acts nothing like it does on atoms and can break completely unrelated things like setting appearances

Numbered Steps to Reproduce Problem:
Code snippet
Code Snippet (if applicable) to Reproduce Problem:
Normal Code: filters is length 0
var/obj/o = new
o.filters += list("type" = "outline", "size" = 1, "color" = "FFF")
world.log << length(o.filters)
var/dm_filter/d = o.filters[1]
world.log << isnull(d)
world.log << d.type

0
runtime error: list index out of bounds

MA: filters is length... three?
var/mutable_appearance/o = new
o.filters += list("type" = "outline", "size" = 1, "color" = "FFF")
world.log << length(o.filters)
var/dm_filter/d = o.filters[1]
world.log << isnull(d)
world.log << d.type

3
0
runtime error: Cannot read "type".type

Trying to copy a broken MAs appearance prints.. a bad color error?
var/mutable_appearance/o = new
o.filters += list("type" = "outline", "size" = 1, "color" = "FFF")
world.log << length(o.filters)
var/obj/q = new
q.appearance = o.appearance

3
runtime error: bad color

Expected Results:
Something that makes sense like just not adding the filter (how objs work)

Actual Results:
See above

As a side note lists added to filters may appear to work fine when the MA is just used as an overlay even when it's added as a list like this. (Did not test extensively, but the code where I discovered this issue had the filter visible regardless)

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

When does the problem NOT occur?
When you use it properly

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

Workarounds:
N/A tested on 515.1634 and 516.1659
Lummox JR resolved issue (Not a bug)
You're trying to add a list() instead of a filter() to the list. Adding a list to a list will append all items from the added list, and that's why you're seeing this issue.

Login to reply.