mbkarle / mind-the-fog

Roguelike JavaScript game--mind the fog!
2 stars 1 forks source link

Fixing #45 caused error with taking gold #67

Closed akarle closed 7 years ago

akarle commented 7 years ago

Should be a quick fix, but fixing #45 meant that gold is now extended, and somewhere a check for whether or not it was gold fails

akarle commented 7 years ago

This is a bigger issue than gold I believe!!

Basically, I looked through the debugger and it is really clear that using $().extend makes a copy of the object BUT the problem is that this new object will not have the same obj.constructor.name property!!

Which means we need to stop using obj.constructor.name!! @mbkarle