~ubuntu-branches/ubuntu/wily/oolite/wily-proposed

« back to all changes in this revision

Viewing changes to src/Core/Entities/PlayerEntityLegacyScriptEngine.m

  • Committer: Package Import Robot
  • Author(s): Nicolas Boulenguez
  • Date: 2011-12-22 00:22:39 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20111222002239-pr3upeupp4jw1psp
Tags: 1.76-1
* New upstream.
* watch: scan upstream stable releases instead of dev snapshots.
* control: use default gobjc instead of explicit 4.6.
* rules: use dpkg-dev build flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
788
788
        {
789
789
                valueString = [tokens objectAtIndex:i];
790
790
                
791
 
                if ([mission_variables objectForKey:valueString])
 
791
                if ([valueString hasPrefix:@"mission_"] && [mission_variables objectForKey:valueString])
792
792
                {
793
793
                        [resultString replaceOccurrencesOfString:valueString withString:[mission_variables objectForKey:valueString] options:NSLiteralSearch range:NSMakeRange(0, [resultString length])];
794
794
                }
1240
1240
        }
1241
1241
        else if ([eqType canCarryMultiple] || ![self hasEquipmentItem:equipString])
1242
1242
        {
1243
 
                [self addEquipmentItem:equipString];
 
1243
                [self addEquipmentItem:equipString withValidation:YES];
1244
1244
        }
1245
1245
}
1246
1246
 
1399
1399
                {
1400
1400
                        ShipEntity* canister = [cargo objectAtIndex:i];
1401
1401
                        if (!canister) break;
1402
 
                        unit = [UNIVERSE unitsForCommodity:[canister commodityType]];
1403
 
                        if (unit == UNITS_TONS)
1404
 
                                [cargo removeObjectAtIndex:i];
 
1402
                        // Since we are forcing cargo removal, we don't really care about the unit of measurement. Any
 
1403
                        // commodity at more than 1000kg or 1000000gr will be inside cargopods, so remove those too.
 
1404
                        [cargo removeObjectAtIndex:i];
1405
1405
                }
1406
1406
        }
1407
1407
        
1937
1937
        [gui setText:@"" forRow:21];                    // clears out the 'Press spacebar' message
1938
1938
        [gui setKey:@"" forRow:21];                             // clears the key to enable pollDemoControls to check for a selection
1939
1939
        [gui setSelectableRange:NSMakeRange(0,0)];      // clears the selectable range
 
1940
        [UNIVERSE setDisplayCursor: YES];               // enables mouse selection of the choices list items
1940
1941
        
1941
1942
        int                                     choices_row = 22 - [choice_keys count];
1942
1943
        NSEnumerator            *choiceEnum = nil;