the first line after assigning a new src using a variable as an index will apply the variable change to the old src
Numbered Steps to Reproduce Problem:
see snippet
Code Snippet (if applicable) to Reproduce Problem:
mob
var
list/testStatusEffects = list()
obj/testObj/testMain = new
New()
..()
testStatusEffects["ID"] = testMain
verb
testThis()
new /obj/testObj(loc, src)
obj
testObj
var
testMerge
testID = "ID"
New(loc, mob/M)
var/obj/testObj/inisource = src
if(M)
world.log << "1testVar = ([testMerge]), isrc ([inisource.testMerge])" // should be null, null
//src = M.testStatusEffects["ID"] // this works
src = M.testStatusEffects[testID] // this doesn't work
testMerge = 1
world.log << "2testVar = ([testMerge]), isrc ([inisource.testMerge])" // should be 1, null
testMerge = 1
world.log << "2testVar = ([testMerge]), isrc ([inisource.testMerge])" // should be 1, null
Expected Results:
variable assignments apply to proper object
Actual Results:
first line of variable assignment applies to old object
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
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:
adding some kinds of spacer "fixes" it, such as outputting to world.log directly after the new src assignment