Re: [RELEASE] HUD Requests OXP and LogEvents OXP
Posted: Mon Mar 13, 2017 10:04 pm
Ok so the last LogEvents update added about a dozen of new and two older events. Thanks phkb for fixing the wiki!
For information and discussion about Oolite.
https://bb.oolite.space/
Ok so the last LogEvents update added about a dozen of new and two older events. Thanks phkb for fixing the wiki!
Code: Select all
Exception: TypeError: cyclic object value
Active script: logevents 1.1
logevents.js, line 487:
n = JSON.stringify(target); // ** this is now line 487 **, sometimes get TypeError: cyclic object value
Code: Select all
in LogEvents_TargetName, caught error: TypeError: cyclic object value
target = [VisualEffect position: (-2235.38, 170098, 753921) scanClass: CLASS_VISUAL_EFFECT status: STATUS_EFFECT]
*** TypeError: cyclic object value
*** line: 487 in file: ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
line: 487 in function: ([object VisualEffect]) in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
> line: 416 in function: ("compass targeted",[object VisualEffect],"in mode COMPASS_MODE_BEACONS") in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
>> line: 334 in function: ([object VisualEffect],"COMPASS_MODE_BEACONS") in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
Code: Select all
this.$LogEvents_TargetName = function( target ) { //support for ShipVersion OXP to log ship version also
if( !target ) return("lost target");
var n = "";
if( target.name ) n = target.name;
else {
try {
n = JSON.stringify(target); // ** this is now line 487 **, sometimes get TypeError: cyclic object value
} catch( err ) {
log(this.name, '**************************************************************************************' );
log(this.name, 'in LogEvents_TargetName, caught error: ' + err );
log(this.name, ' target = ' + target );
if( err /*instanceof TypeError*/ ) this._rpt_error( err );
log(this.name, '**************************************************************************************' );
throw err;
}
}
if( target.script && target.script.$Detectors_Origname )
n = target.script.$Detectors_Origname;
return( n + " " + target.entityPersonality );
Code: Select all
{
beaconCode: "Thoth",
beaconLabel: "Thoth (Moon)",
dataKey: "planetaryCompass_moon",
isBreakPattern: false,
scaleX: 1,
scaleY: 1,
scaleZ: 1,
scannerDisplayColor1: null,
scannerDisplayColor2: null,
hullHeatLevel: 0.234375,
script: [Script "oolite-default-effect-script" version 1.84],
scriptInfo: {},
shaderFloat1: 0,
shaderFloat2: 0,
shaderInt1: 0,
shaderInt2: 0,
shaderVector1: (0, 0, 0),
shaderVector2: (0, 0, 0),
subEntities: null,
vectorForward: (0.731917, 0.21657, 0.646061),
vectorRight: (-0.616752, 0.613644, 0.493009),
vectorUp: (-0.28968, -0.759302, 0.582706),
collisionRadius: 0.00502493791282177,
distanceTravelled: 0,
energy: 0,
heading: (0.731917, 0.21657, 0.646061),
mass: 0,
maxEnergy: 0,
orientation: (0.259811 - 0.35231i - 0.229885j - 0.869212k),
owner: null,
position: (-2235.38, 170098, 753921),
scanClass: "CLASS_VISUAL_EFFECT",
spawnTime: 2.4590001106262207,
status: "STATUS_EFFECT",
isPlanet: false,
isPlayer: false,
isShip: false,
isDock: false,
isStation: false,
isSubEntity: false,
isSun: false,
isValid: true,
isInSpace: true,
isVisible: true,
isVisualEffect: true,
isWormhole: false
}