Trunk & mine-triggered equipment

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Trunk & mine-triggered equipment

Post by Thargoid »

As reported here by Yodebee, trunk is exhibiting a potential glitch when mines are launched when cloaked.

It looks like the AI isn't triggering properly, as the fuel tank (for example) just appears as a mine and doesn't trigger (refuel the ship) when launched from a cloaked ship. He's on a mac (trunk rev 5267) and I confirm same under Win7 (trunk rev 5287). Works fine when done uncloaked, or when a cloaked ship decloaks with the mine still around.

I guess there have been some modifications to the code for weapons triggering since 1.76.1, but it looks like some tweaks may be needed.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Trunk & mine-triggered equipment

Post by Eric Walch »

Thargoid wrote:
It looks like the AI isn't triggering properly, as the fuel tank (for example) just appears as a mine and doesn't trigger (refuel the ship)
This is no trunk bug. It is actually a bug that is fixed in trunk. When you look at the AI of fuel tank 2.2 (the newest version) than you find the line:

Code: Select all

"scanForNearestShipWithRole: player"
The found ship is than awarded the fuel. It is correct that it can't find a cloaked ship anymore. :lol:

That script is wrong in the first place because when a NPC would launch a fuel tank in scanner range of the player, the fuel would go to the player.

Problem is that this is an very old oxp that predates the use of JS code. It should have been rewritten in JS by now. With JS it should be able to award the owner of the mine fuel without the need of a search first.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Trunk & mine-triggered equipment

Post by Eric Walch »

A small adjustment to fuelTank.oxp gave this unofficial version 2.3. Should work with Oolite 1.74 and higher, including trunk.

(I also pm-ed Ramirez about this issue)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Trunk & mine-triggered equipment

Post by Thargoid »

Ah yes, so it is - that's what I get for trying to deal with stuff just before bedtime.

Anyway all sorted now :)
Post Reply