v1.72 equipmentDamaged

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

v1.72 equipmentDamaged

Post by Svengali »

SYSTEM: WIN

equipmentDamaged is not fired if you set the status from within a script.
So if OXP-A has to disable a equipment from OXP-B and the handling is inside these event-handlers - nothing will happen.

During a conflict it works.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Strongly related to this topic: Wrong parameter transfer with equipmentDamaged and equipmentDestroyed.

From the 1.72 update notes:
New script events: playerBoughtEquipment(equipmentKey), equipmentDamaged(eqipmentKey), equipmentDestroyed(equipmentKey).
playerBoughtEquipment(equipmentKey) does work well, but the other two don't. Using it in code I got errors. On logging the "equipment" I noticed it is not using the key, but just the readable equipment name. And with the name you can't do much else than displaying it. With the key you can get all other essential info over the new "EquipmentInfo"
Looking in the code I noticed it is indeed only transferring the name not the whole key.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

That should be easy to fix then. :)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Yes, it was really easy ;-)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: v1.72 equipmentDamaged

Post by JensAyton »

Svengali wrote:
equipmentDamaged is not fired if you set the status from within a script.
Fixed, player.ship.setEquipmentStatus(foo, "EQUIPMENT_DAMAGED") now triggers equipmentDamaged() handlers.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Good news. Muchas gracias Ahruman and another_commander :-)
Post Reply