Two energy units in one ship

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Two energy units in one ship

Post by Smivs »

This shouldn't happen, should it? I'm running v1.75.3.

Image

The shipyard.plist for the Clipper

Code: Select all

{ 
    "boaclipper-player" =     { 
        chance = 0.325; 
        "optional_equipment" =         ( 
            "EQ_ECM", 
            "EQ_PASSENGER_BERTH", 
            "EQ_ESCAPE_POD", 
            "EQ_ENERGY_BOMB", 
            "EQ_ENERGY_UNIT", 
            "EQ_NAVAL_ENERGY_UNIT", 
            "EQ_DOCK_COMP", 
            "EQ_WEAPON_PULSE_LASER", 
            "EQ_WEAPON_BEAM_LASER", 
            "EQ_WEAPON_MINING_LASER", 
            "EQ_WEAPON_MILITARY_LASER", 
            "EQ_FUEL_INJECTION", 
            "EQ_SCANNER_SHOW_MISSILE_TARGET", 
            "EQ_MULTI_TARGET", 
            "EQ_GAL_DRIVE", 
            "EQ_ADVANCED_COMPASS", 
            "EQ_SHIELD_BOOSTER", 
            "EQ_NAVAL_SHIELD_BOOSTER"
        ); 
        price = 525000; 
        "standard_equipment" =         { 
            extras =             ( 
                "EQ_FUEL_SCOOPS", 
                "EQ_HEAT_SHIELD" 
            ); 
            "forward_weapon_type" = "EQ_WEAPON_BEAM_LASER"; 
            missiles = 5; 
        }; 
        techlevel = 7; 
        "weapon_facings" = 15; 
    }; 
}
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: Two energy units in one ship

Post by Eric Walch »

It won't harm, but should not happen. The energy units are a special case where the code has to use many exception on the general code. I thought this was explicit checked.
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: Two energy units in one ship

Post by Eric Walch »

Smivs wrote:
This shouldn't happen, should it? I'm running v1.75.3.
I finally made time to look at this: This bug was fixed in r4601. That is after 1.75.3 release and should no longer happen in trunk. Bug was already fixed before this error report.

There was always a check for incompatible equipment that never did work. I think this bug was already present in 1.65. It contained a 'break' statement on detecting an incompatibility, but only did 'break' a local for-loop and not the bigger while-loop it intended to quit. Result was that it still added incompatible equipment in the shipyard, despite the detection. Although, on buying the ship you would only get one of the two.
Post Reply