Make a couple of fragmentation explosion types
Update wreckage to have varied explosion modes. Update Binary resources to bring in textures
This commit is contained in:
parent
6f85948528
commit
9e768a80ae
@ -1 +1 @@
|
||||
Subproject commit 22d5bdb097ef50840f0c6a72dcbbdbd761aff643
|
||||
Subproject commit f5aed27fefc32c24775b39fce25402b970b09b84
|
@ -9,17 +9,42 @@
|
||||
"texture" = "oolite-particle-cloud2.png";
|
||||
};
|
||||
|
||||
|
||||
"oolite-fragment-explosion" = {
|
||||
"alpha" = 0.25;
|
||||
"color_order" = "rgb";
|
||||
"count" = 5;
|
||||
"duration" = 1.2;
|
||||
"growth_rate" = 14;
|
||||
"size" = 1.0;
|
||||
"texture" = "oolite-particle-fragments.png";
|
||||
};
|
||||
|
||||
"oolite-fragment-explosion-b" = {
|
||||
"alpha" = 0.25;
|
||||
"color_order" = "rgb";
|
||||
"count" = 5;
|
||||
"duration" = 1.2;
|
||||
"growth_rate" = 14;
|
||||
"size" = 1.0;
|
||||
"texture" = "oolite-particle-fragments2.png";
|
||||
};
|
||||
|
||||
|
||||
"oolite-default-asteroid-explosion" = {
|
||||
"alpha" = 0.15;
|
||||
"alpha" = 0.85;
|
||||
"color_order" = "white";
|
||||
"count" = 10;
|
||||
"duration" = 1.5;
|
||||
"growth_rate" = 1.2;
|
||||
"size" = 0.6;
|
||||
"duration" = 1.2;
|
||||
"growth_rate" = 1.6;
|
||||
"size" = 1.6;
|
||||
"texture" = "oolite-particle-cloud.png";
|
||||
};
|
||||
|
||||
|
||||
/* The game provides special explosion effects which cannot (yet)
|
||||
* be redefined. */
|
||||
// "oolite-builtin-flash"
|
||||
// "oolite-builtin-slowcloud"
|
||||
// "oolite-builtin-fastspark"
|
||||
|
||||
}
|
@ -173,6 +173,7 @@
|
||||
bounty = 1;
|
||||
cargo_type = "CARGO_ALLOY";
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = ("oolite-builtin-slowcloud","oolite-builtin-fastspark");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
heat_insulation = 0.2;
|
||||
is_template = 1;
|
||||
@ -528,7 +529,7 @@
|
||||
debris_role = "boulder";
|
||||
density = 5;
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = "oolite-default-asteroid-explosion";
|
||||
explosion_type = ("oolite-default-asteroid-explosion");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
has_ecm = no;
|
||||
has_escape_pod = no;
|
||||
@ -586,6 +587,7 @@
|
||||
bounty = 1;
|
||||
cargo_type = "CARGO_RANDOM";
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = ("oolite-builtin-slowcloud","oolite-builtin-fastspark");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
heat_insulation = 0.3;
|
||||
is_template = 1;
|
||||
@ -926,7 +928,7 @@
|
||||
debris_role = "splinter";
|
||||
density = 5;
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = "oolite-default-asteroid-explosion";
|
||||
explosion_type = ("oolite-default-asteroid-explosion");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
has_ecm = no;
|
||||
has_escape_pod = no;
|
||||
@ -1945,6 +1947,7 @@
|
||||
"2.60324 -1.47267 -2.7841 0.35 0.35 0.5",
|
||||
"-2.60324 -1.47267 -2.7841 0.35 0.35 0.5"
|
||||
);
|
||||
explosion_type = ("oolite-builtin-slowcloud","oolite-builtin-fastspark","oolite-builtin-flash");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
hyperspace_motor = no;
|
||||
is_template = 1;
|
||||
@ -2503,6 +2506,7 @@
|
||||
cargo_type = "CARGO_NOT_CARGO";
|
||||
energy_recharge_rate = 0;
|
||||
exhaust = ("0.0 0.32581 -9.87154 2.0 2.0 1.5");
|
||||
explosion_type = ("oolite-builtin-slowcloud","oolite-builtin-fastspark","oolite-builtin-flash"); // not for detonation mode
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
is_template = 1;
|
||||
materials =
|
||||
@ -3002,6 +3006,7 @@
|
||||
{
|
||||
ai_type = "oolite-qbombAI.js";
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = ("oolite-builtin-slowcloud","oolite-builtin-fastspark","oolite-builtin-flash"); // for if it's shot down, not the Q-bomb!
|
||||
is_template = 1;
|
||||
max_energy = 10;
|
||||
max_flight_pitch = 2;
|
||||
@ -3396,7 +3401,7 @@
|
||||
bounty = 1;
|
||||
cargo_type = "CARGO_MINERALS";
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = "oolite-default-asteroid-explosion";
|
||||
explosion_type = ("oolite-default-asteroid-explosion");
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
has_ecm = no;
|
||||
has_escape_pod = no;
|
||||
@ -3952,6 +3957,7 @@
|
||||
ai_type = "nullAI.plist";
|
||||
cargo_type = "CARGO_NOT_CARGO";
|
||||
energy_recharge_rate = 0;
|
||||
explosion_type = ("oolite-default-ship-explosion","oolite-fragment-explosion"); // no flash
|
||||
forward_weapon_type = "WEAPON_NONE";
|
||||
fragment_chance = 0.0;
|
||||
is_template = 1;
|
||||
@ -4276,21 +4282,25 @@
|
||||
"more-wreckage2" =
|
||||
{
|
||||
like_ship = "oolite_template_wreckage-component";
|
||||
explosion_type = ("oolite-default-ship-explosion","oolite-fragment-explosion-b");
|
||||
model = "wreck2.dat";
|
||||
};
|
||||
"more-wreckage3" =
|
||||
{
|
||||
like_ship = "oolite_template_wreckage-component";
|
||||
explosion_type = ("oolite-default-ship-explosion");
|
||||
model = "wreck3.dat";
|
||||
};
|
||||
"more-wreckage4" =
|
||||
{
|
||||
like_ship = "oolite_template_wreckage-component";
|
||||
explosion_type = ("oolite-fragment-explosion");
|
||||
model = "wreck4.dat";
|
||||
};
|
||||
"more-wreckage5" =
|
||||
{
|
||||
like_ship = "oolite_template_wreckage-component";
|
||||
explosion_type = ("oolite-fragment-explosion-b");
|
||||
model = "wreck5.dat";
|
||||
};
|
||||
|
||||
|
@ -7229,7 +7229,6 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
|
||||
tab_stops[1] = 160;
|
||||
tab_stops[2] = 290;
|
||||
[gui overrideTabs:tab_stops from:kGuiStatusTabs length:3];
|
||||
OOLog(@"tab.stops",@"%d %d %d",tab_stops[0],tab_stops[1],tab_stops[2]);
|
||||
[gui setTabStops:tab_stops];
|
||||
|
||||
NSString *lightYearsDesc = DESC(@"status-light-years-desc");
|
||||
|
@ -323,7 +323,7 @@ typedef enum
|
||||
OORoleSet *roleSet; // Roles a ship can take, eg. trader, hunter, police, pirate, scavenger &c.
|
||||
NSString *primaryRole; // "Main" role of the ship.
|
||||
|
||||
NSString *explosionType; // explosion.plist entry
|
||||
NSArray *explosionType; // explosion.plist entries
|
||||
|
||||
// AI stuff
|
||||
Vector jink; // x and y set factors for offsetting a pursuing ship's position
|
||||
|
@ -448,7 +448,7 @@ static ShipEntity *doOctreesCollide(ShipEntity *prime, ShipEntity *other);
|
||||
// Get scriptInfo dictionary, containing arbitrary stuff scripts might be interested in.
|
||||
scriptInfo = [[shipDict oo_dictionaryForKey:@"script_info" defaultValue:nil] retain];
|
||||
|
||||
explosionType = [[shipDict oo_stringForKey:@"explosion_type" defaultValue:@"oolite-default-ship-explosion"] retain];
|
||||
explosionType = [[shipDict oo_arrayForKey:@"explosion_type" defaultValue:nil] retain];
|
||||
|
||||
return YES;
|
||||
|
||||
@ -8611,24 +8611,60 @@ NSComparisonResult ComparePlanetsBySurfaceDistance(id i1, id i2, void* context)
|
||||
|
||||
if (add_debris)
|
||||
{
|
||||
if ([UNIVERSE reducedDetail] || (scanClass == CLASS_CARGO && ![self isHulk]) || scanClass == CLASS_MISSILE || scanClass == CLASS_MINE)
|
||||
if ([UNIVERSE reducedDetail])
|
||||
{
|
||||
// "burst" explosion effect for small explosions
|
||||
// and minimum detail
|
||||
// Quick explosion effects for reduced detail mode
|
||||
|
||||
// 1. fast sparks
|
||||
[UNIVERSE addEntity:[OOSmallFragmentBurstEntity fragmentBurstFromEntity:self]];
|
||||
// 2. slow clouds
|
||||
[UNIVERSE addEntity:[OOBigFragmentBurstEntity fragmentBurstFromEntity:self]];
|
||||
// 3. flash
|
||||
[UNIVERSE addEntity:[OOFlashEffectEntity explosionFlashFromEntity:self]];
|
||||
/* This mode used to be the default for
|
||||
* cargo/munitions but this now must be explicitly
|
||||
* specified. */
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDictionary *explosion = [UNIVERSE explosionSetting:explosionType];
|
||||
NSString *explosionKey = @"oolite-default-ship-explosion";
|
||||
NSDictionary *explosion = nil;
|
||||
if (explosionType == nil)
|
||||
{
|
||||
explosion = [UNIVERSE explosionSetting:explosionKey];
|
||||
[UNIVERSE addEntity:[OOExplosionCloudEntity explosionCloudFromEntity:self withSettings:explosion]];
|
||||
// 3. flash
|
||||
[UNIVERSE addEntity:[OOFlashEffectEntity explosionFlashFromEntity:self]];
|
||||
}
|
||||
for (NSUInteger i=0;i<[explosionType count];i++)
|
||||
{
|
||||
explosionKey = [explosionType oo_stringAtIndex:i defaultValue:nil];
|
||||
if (explosionKey != nil)
|
||||
{
|
||||
// three special-case builtins
|
||||
if ([explosionKey isEqualToString:@"oolite-builtin-flash"])
|
||||
{
|
||||
[UNIVERSE addEntity:[OOFlashEffectEntity explosionFlashFromEntity:self]];
|
||||
}
|
||||
else if ([explosionKey isEqualToString:@"oolite-builtin-slowcloud"])
|
||||
{
|
||||
[UNIVERSE addEntity:[OOBigFragmentBurstEntity fragmentBurstFromEntity:self]];
|
||||
}
|
||||
else if ([explosionKey isEqualToString:@"oolite-builtin-fastspark"])
|
||||
{
|
||||
[UNIVERSE addEntity:[OOSmallFragmentBurstEntity fragmentBurstFromEntity:self]];
|
||||
}
|
||||
else
|
||||
{
|
||||
explosion = [UNIVERSE explosionSetting:explosionKey];
|
||||
[UNIVERSE addEntity:[OOExplosionCloudEntity explosionCloudFromEntity:self withSettings:explosion]];
|
||||
}
|
||||
}
|
||||
}
|
||||
// "fireball" explosion effect
|
||||
[UNIVERSE addEntity:[OOExplosionCloudEntity explosionCloudFromEntity:self withSettings:explosion]];
|
||||
|
||||
}
|
||||
}
|
||||
// 3. flash
|
||||
[UNIVERSE addEntity:[OOFlashEffectEntity explosionFlashFromEntity:self]];
|
||||
|
||||
// If UNIVERSE is nearing limit for entities don't add to it!
|
||||
if (add_debris)
|
||||
|
Loading…
x
Reference in New Issue
Block a user