When a system executes callbacks as a result of a value being set, it passes the wrong context of "this" to the callback function (at least, that's what I think is happening).
In all callback functions, instead of calling using this, use Ship.XXXXXX.
e.g.
healthChanged(){
if(Ship.Health.Radar < Ship.Defaults.Radar.minhealth){
Ship.Radar.set("objects",{}) //instead of this.set
}
}
When a system executes callbacks as a result of a value being set, it passes the wrong context of "this" to the callback function (at least, that's what I think is happening).
In all callback functions, instead of calling using this, use Ship.XXXXXX.
e.g.