Can't find the topic anymore ... CD and 1.72.1

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Can't find the topic anymore ... CD and 1.72.1

Post by Lestradae »

Sorry @re-asking an already asked question but blind again and don't find the thread anymore.

Read that the CD mission doesn't work anymore under 1.72.1, have to change something in the oolite-native js script so that it works as intended.

What do I have to change where exactly, I want to do that mission.

Thanks in advance

L
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6629
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Reposting the fixed script, this time using the orthodox way of checking for player. The file to change is oolite-cloaking-device-pod.js:

Code: Select all

this.shipWasScooped = function (scooper) 
{ 
   if (scooper == player)                      <------- THIS LINE IS THE PROBLEM 
   { 
      if (!player.ship.hasEquipment("EQ_CLOAKING_DEVICE")) 
      { 
         player.ship.awardEquipment("EQ_CLOAKING_DEVICE") 
         // Should we make it possible to repair? 
         // EquipmentInfo.infoForKey("EQ_CLOAKING_DEVICE").effectiveTechLevel = 14; 
      } 
      else 
      { 
         player.ship.awardCargo("Gold", 100) 
      } 
   } 
   // Should probably award 100 gold to non-player ships too, but they don’t have awardCargo at the moment. 
}
The marked line is to be changed to

Code: Select all

if (scooper.isPlayer)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Thanks very much, A_C! :D
Post Reply