Page 1 of 1

[FUN] Random ships of the Ooniverse in menu screen

Posted: Thu Mar 16, 2017 4:07 pm
by pleiadian
I know that the spinning Cobra appears to be some kind of trademark of the Elite/Oolite project and name. But maybe, for some of you, this is a little bit boring, so I decided to shape things up a little, by adding a list of the default ships to the start routine, and have it pick one, then spin that on the screen.

I changed the justCobra switch in the setupIntroFirstGo: method of src/Core/Universe.m into this bit:

Code: Select all

if (justCobra)
	{
		// Lets get an array of all possible ships and entities, then show one
		// at random.
		NSMutableArray *ships = [[NSMutableArray alloc] init];
		[ships addObject: PLAYER_SHIP_DESC];
		[ships addObject: @"adder"];
		[ships addObject: @"anaconda"];
		[ships addObject: @"asp"];
		[ships addObject: @"boa"];
		[ships addObject: @"boa-mk2"];
		[ships addObject: @"cobra-mk1"];
		[ships addObject: @"constrictor"];
		[ships addObject: @"coriolis-station"];
		[ships addObject: @"dodecahedron-station"];
		[ships addObject: @"ferdelance"];
		[ships addObject: @"gecko"];
		[ships addObject: @"icosahedron-station"];
		[ships addObject: @"krait"];
		[ships addObject: @"mamba"];
		[ships addObject: @"moray"];
		[ships addObject: @"python"];
		[ships addObject: @"rock-hermit"];
		[ships addObject: @"tharglet"];
		[ships addObject: @"thargoid"];
		[ships addObject: @"transporter"];
		[ships addObject: @"viper"];
		[ships addObject: @"viper-interceptor"];
		[ships addObject: @"worm"];

		srand(time(NULL));
		int r = rand() % 22;

		/*- cobra - intro1 -*/
		//ship = [self newShipWithName:PLAYER_SHIP_DESC usePlayerProxy:YES];
		ship = [self newShipWithName:[ships objectAtIndex: r] usePlayerProxy:YES];
	}



Recompiled... aaaaaand:

Image

Image

Image

Enjoy 8)

Re: [FUN] Random ships of the Ooniverse in menu screen

Posted: Thu Mar 16, 2017 5:31 pm
by another_commander
Image

Re: [FUN] Random ships of the Ooniverse in menu screen

Posted: Mon Mar 20, 2017 3:01 pm
by terry
Niiiice! A bit of variety! :D

Re: [FUN] Random ships of the Ooniverse in menu screen

Posted: Thu Mar 30, 2017 2:09 pm
by Getafix
@another_commander
Just like the queen, disguised as a farmer's wife, offering the poisoned apple to Snow White. :lol:

EDIT
terry wrote: Mon Mar 20, 2017 3:01 pm
Niiiice! A bit of variety! :D
@terry
Indeed! I also got tired of the almond cookies! :lol: