Closed DanielBullimore closed 4 years ago
b.b.4 OO was not checking if an object of the same type and name existed before naming itself. To fix that I've changed funObj_GetObjectByName to return false when an object isn't found by name. Also changed funSetNameOnce to try call an object with the given name using funObj_GetObjectByName. it will now only set its name if no other object of its type has that name.
b.b.7 OK so I originally wrote the Destroy() function in 2012ish at that time I had no idea of array functions... so firstly i replace 40 lines of code withg one line.
rayOO[strType].splice(rayOO[strType].lastIndexOf(this),1);
Secondly the function was deleting rayOO if the object type was 'oomutiny' before deleting the rayOO[strType][x] so i've change that order around.
Finally Destroy was checking if the type of object being destroyed was oomutiny and deleting rayOO, howerver it was not checking if it was the last or only instance of OO. It now does that like :
if ( (strType === "oomutiny") && (rayOO['oomutiny'].length === 0) )
Every time a feature is tested the results of that test must be recorded here in a test results register. Dont forget to place post refactor notes as comments on this issue.
Details
Feature ID: 0.0 Feature Name: Master Feature Type: object class Test Number: 3 Testing Phase: 1 Date Tested: 10/01/20
Test Notes and Error Details:
funSetNameOnce allows duplicate names .Destroy removes ray00 completely even though two instances of OO exist
Post refactor notes: