shipWillLaunchFromStation() is once e again called for the player. Ejected items and debris are now spawned with 85% of the parent's cabin temperature. Incompatible OXP message is now loaded from descriptions.plist, but only the internal descriptions.plist; listing incompatible OXPs and generating the messages later would be a better approach.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1476 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2008-03-11 08:25:42 +00:00
parent 9f9df1e986
commit 627e5a9b57
7 changed files with 24 additions and 9 deletions

View File

@ -968,6 +968,8 @@
"legal-desc-military-vessel" = "Military Vessel";
"planetname-derivative-suffix" = "ian"; // This is the suffix used with %I (producing 'Laveian' for example)
"oxp-is-incompatible" = "\t“%@” is incompatible with version %@ of Oolite.";
// delivery reports
"arrival-report-title" = "%H Arrival Report";

View File

@ -302,6 +302,9 @@
strings.conversion.randomSeed = inherit;
sun.nova = no; // Debug messages for nova
texture.planet.generate = inherit;

View File

@ -3684,6 +3684,7 @@ double scoopSoundPlayTime = 0.0;
ident_engaged = NO;
[self doScriptEvent:@"shipWillLaunchFromStation" withArgument:station];
[self playLaunchFromStation];
}

View File

@ -61,6 +61,7 @@ MA 02110-1301, USA.
#define SHIP_INSULATION_FACTOR 0.00175
#define SHIP_MAX_CABIN_TEMP 256.0
#define SHIP_MIN_CABIN_TEMP 60.0
#define EJECTA_TEMP_FACTOR 0.85 // Ejected items have 85% of parent's temperature
#define SUN_TEMPERATURE 1250.0

View File

@ -3979,6 +3979,7 @@ static GLfloat mascem_color2[4] = { 0.4, 0.1, 0.4, 1.0}; // purple
[plate setCommodity:9 andAmount:1];
[UNIVERSE addEntity:plate];
[plate setStatus:STATUS_IN_FLIGHT];
[plate setTemperature:[self temperature] * EJECTA_TEMP_FACTOR];
[[plate getAI] setState:@"GLOBAL"];
[plate release];
}
@ -6000,6 +6001,7 @@ BOOL class_masslocks(int some_class)
[jetto setVelocity:vel];
[jetto setScanClass: CLASS_CARGO];
[jetto setStatus: STATUS_IN_FLIGHT];
[jetto setTemperature:[self temperature] * EJECTA_TEMP_FACTOR];
[UNIVERSE addEntity:jetto];
[[jetto getAI] setState:@"GLOBAL"];
cargo_dump_time = [UNIVERSE getTime];
@ -6601,17 +6603,16 @@ BOOL class_masslocks(int some_class)
{
if (station == nil) return;
Vector launchPos = station->position;
Vector stat_f = vector_forward_from_quaternion(station->orientation);
launchPos.x += 500.0*stat_f.x;
launchPos.y += 500.0*stat_f.y;
launchPos.z += 500.0*stat_f.z;
position = launchPos;
orientation = station->orientation;
Vector stat_f = vector_forward_from_quaternion([station orientation]);
[self setPosition:vector_add([station position], vector_multiply_scalar(stat_f, 500.0f))];
[self setOrientation:[station orientation]];
flightRoll = [station flightRoll];
flightPitch = 0.0;
flightSpeed = maxFlightSpeed * 0.5;
status = STATUS_LAUNCHING;
[self doScriptEvent:@"shipWillLaunchFromStation" withArgument:station];
[shipAI message:@"LAUNCHED"];
[UNIVERSE addEntity:self];
@ -7251,6 +7252,7 @@ static BOOL AuthorityPredicate(Entity *entity, void *parameter)
NSArray *tokens = ScanTokensFromString(roles_number);
NSString *roleString = nil;
NSString *numberString = nil;
ShipEntity *spawned = nil;
if ([tokens count] != 2)
{
@ -7267,7 +7269,8 @@ static BOOL AuthorityPredicate(Entity *entity, void *parameter)
do
{
[UNIVERSE spawnShipWithRole:roleString near:self];
spawned = [UNIVERSE spawnShipWithRole:roleString near:self];
[spawned setTemperature:[self temperature] * EJECTA_TEMP_FACTOR];
} while (--number);
}

View File

@ -245,7 +245,7 @@ static NSMutableDictionary *string_cache;
{
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
OOLog(@"oxp.versionMismatch", @"OXP %@ is incompatible with version %@ of Oolite.", path, version);
[self addError:[NSString stringWithFormat:@"\t'%@' is incompatible with version %@ of Oolite", [path lastPathComponent], version]];
[self addError:[NSString stringWithFormat:DESC(@"oxp-is-incompatible"), [path lastPathComponent], version]];
}
}

View File

@ -112,6 +112,11 @@ static NSComparisonResult comparePrice(NSDictionary *dict1, NSDictionary *dict2,
[self setGameView:inGameView];
gSharedUniverse = self;
// Load internal descriptions.plist for use in internal init; it will be replaced by merged version later.
descriptions = [NSDictionary dictionaryWithContentsOfFile:[[[ResourceManager builtInPath]
stringByAppendingPathComponent:@"Config"]
stringByAppendingPathComponent:@"descriptions.plist"]];
n_entities = 0;
x_list_start = y_list_start = z_list_start = nil;