Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

misterious equipmentDestroyed event

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

Post Reply
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

misterious equipmentDestroyed event

Post by dybal »

Excerpts from Latest.log:

Code: Select all

Opening log for Oolite development version 1.91.0.7287-200902-c4df27a (x86-64 test release) under Linux 5.4.0-47-generic at 2020
-09-20 10:03:31 -0300.
Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz 8 processors detected.
Build options: OpenAL, new planets, JavaScript console support, OXP verifier, localization tools, debug GraphViz support, JavaSc
ript profiling.
...
12:33:20.071 [LogEvents]: EQ_FUEL_INJECTION damaged
12:33:20.079 [LogEvents]: ship got EQ_DTADER
12:33:20.276 [telescope]: check_Sightings, started w/ 18, ended w/ 17
12:33:20.277 [LogEvents]: ship lost EQ_FUEL_INJECTION_DAMAGED
12:33:20.286 [Repair System]: Equipment Witchdrive Fuel Injectors (EQ_FUEL_INJECTION) destroyed
12:33:20.287 [LogEvents]: EQ_FUEL_INJECTION destroyed
The event handler in Repair System:

Code: Select all

this.equipmentDestroyed  = function _repsys_equipmentDestroyed(equipment) {
    if (equipment == this.$controllerVersion) {
        log(this.name, "Self-Repair System Controller destroyed");
        this.$removeRepairController();
    } else {
        var eqInfo = EquipmentInfo.infoForKey(equipment);
        log(this.name, "Equipment "+eqInfo.name+" ("+equipment+") destroyed");
    }
}
The equipmentDestroyed event was deprecated in version 1.80.

A search in the core game source tree didn't find any instances of the string "equipmentDestroyed", and no doScriptEvent call with a variable that could contain that string.

I don't know how that event occurred!

But then, if equipment B requires equipment A, when equipment A is removed from the ship, B disappears, and I could not find the code that does that, so I'm sure I missing something...
Post Reply