ID:2970007
 
Resolved
Regression: Making (var_name in vars) un-slow also made it un-work.
BYOND Version:516
Operating System:Windows 11 Pro 64-bit
Web Browser:my cat tree
Applies to:Dream Daemon
Status: Resolved (516.1661)

This issue has been resolved.
Descriptive Problem Summary:
x in vars always returns 0, while vars.Find(x) returns the expected result.

Numbered Steps to Reproduce Problem:
1. try to check if something is in vars via (x in vars)
2. always get 0 as the result

Code Snippet (if applicable) to Reproduce Problem:
/datum/cat
var/meow = "meow"

/world/New()
. = ..()
var/datum/cat/cat = new
world.log << "\"meow\" in cat.vars = ["meow" in cat.vars]"
world.log << "\"bark\" in cat.vars = ["bark" in cat.vars]"
world.log << "cat.vars.Find(\"meow\") = [cat.vars.Find("meow")]"
world.log << "cat.vars.Find(\"bark\") = [cat.vars.Find("bark")]"
del(src)


Expected Results:
"meow" in cat.vars = 1
"bark" in cat.vars = 0
cat.vars.Find("meow") = 1
cat.vars.Find("bark") = 0


Actual Results:
"meow" in cat.vars = 0
"bark" in cat.vars = 0
cat.vars.Find("meow") = 1
cat.vars.Find("bark") = 0


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

When does the problem NOT occur?
when using vars.Find(x)

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

Bug first appeared in 516.1660

Workarounds:
Using vars.Find(x)

Lummox JR resolved issue with message:
Regression: Making (var_name in vars) un-slow also made it un-work.

Login to reply.