Merge branch 'master' into steady-state-ecosystem
Conflicts: src/Core/Scripting/OOJSEntity.m
This commit is contained in:
commit
028fa0c8aa
@ -37,6 +37,12 @@ Changes between Oolite 1.77 and Oolite 1.77.1:
|
||||
* Sort save-game list alphabetically
|
||||
* Slightly lengthen deadlines on parcel contracts to avoid impossible ones
|
||||
* Prevent docking with dead stations
|
||||
* Fix memory leaks.
|
||||
* Remove "performBroadside" AI command
|
||||
* Fix scanner display bug
|
||||
* Display correct key in 'pause' message
|
||||
* Fix rotational_velocity for subentities
|
||||
* Fix shipEnergyBecameFull event to fire as documented
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-cloaking-device";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2007-2013 the Oolite team.";
|
||||
this.description = "Cloaking device mission in galaxy 5.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this.startUp = function ()
|
||||
|
@ -36,7 +36,7 @@
|
||||
this.name = "oolite-cloaking-device-pod";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2007-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this.shipWasScooped = function (scooper)
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-cloaking-device-target-ship";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this.shipDied = function ()
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-conditions";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
/* contexts: npc, purchase, scripted, newShip, (loading), (damage), (portable) */
|
||||
|
@ -37,7 +37,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-constrictor-hunt";
|
||||
this.author = "Eric Walch";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this._cleanUp = function ()
|
||||
|
@ -30,7 +30,7 @@
|
||||
this.name = "oolite-constrictor-pilot";
|
||||
this.author = "Eric Walch";
|
||||
this.copyright = "© 2008-2010 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this.unloadCharacter = function ()
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-constrictor";
|
||||
this.author = "Eric Walch";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
/*
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-contracts-cargo";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.description = "Cargo delivery contracts.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
/**** Configuration options and API ****/
|
||||
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-contracts-helpers";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.description = "Helper functions for various contracts.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
// returns a string containing the necessary number of "hair spaces" to
|
||||
// pad the currentText string to the specified length in 'em'
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-contracts-parcels";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.description = "Parcel delivery contracts.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
/**** Configuration options and API ****/
|
||||
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-contracts-passengers";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.description = "Parcel delivery contracts.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
/**** Configuration options and API ****/
|
||||
|
||||
|
@ -36,6 +36,6 @@ this.name = "oolite-default-effect-script";
|
||||
this.author = "cim";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.description = "Standard script for effects.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
// this script does not define default behaviours for any handlers.
|
||||
|
@ -34,4 +34,4 @@ this.name = "oolite-default-player-script";
|
||||
this.author = "Jens Ayton";
|
||||
this.description = "Standard script for player ship.";
|
||||
this.copyright = "© 2007-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
@ -36,7 +36,7 @@ this.name = "oolite-default-ship-script";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2007-2013 the Oolite team.";
|
||||
this.description = "Standard script for ships.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
// launch_actions handled on shipSpawned(). For parity with 1.65, launch_actions don’t fire for the main station.
|
||||
|
@ -46,7 +46,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-global-prefix";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2009-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
(function (special) {
|
||||
|
@ -35,7 +35,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-locale-functions";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2012-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
(function () {
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-nova";
|
||||
this.author = "Eric Walch, Jens Ayton, Kaks";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this._endTheMission = function ()
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-thargoid-plans";
|
||||
this.author = "Eric Walch";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this._cleanUp = function ()
|
||||
|
@ -36,7 +36,7 @@ MA 02110-1301, USA.
|
||||
this.name = "oolite-thargoid-warship";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
this.shipDied = function ()
|
||||
|
@ -37,7 +37,7 @@ this.name = "oolite-trumbles";
|
||||
this.author = "Jens Ayton";
|
||||
this.copyright = "© 2008-2013 the Oolite team.";
|
||||
this.description = "Random offers of trumbles.";
|
||||
this.version = "1.77.1";
|
||||
this.version = "1.79";
|
||||
|
||||
|
||||
(function () {
|
||||
|
@ -18,7 +18,7 @@ Packager: Konstantinos Sykas <ksykas@gmail.com>
|
||||
Summary: Oolite is an Elite tribute game that is easily expandable.
|
||||
URL: http://oolite.aegidian.org
|
||||
License: GNU GPL version 2
|
||||
SoftwareVersion: 1.77.1
|
||||
SoftwareVersion: 1.79
|
||||
AutopackageTarget: 1.4
|
||||
# Use 'CPUArchitectures: x86_64' if 'uname -m' gives x86_64
|
||||
CPUArchitectures: x86
|
||||
|
@ -18,7 +18,7 @@ Packager: Konstantinos Sykas <ksykas@gmail.com>
|
||||
Summary: Oolite is an Elite tribute game that is easily expandable.
|
||||
URL: http://oolite.aegidian.org
|
||||
License: GNU GPL version 2
|
||||
SoftwareVersion: 1.77.1
|
||||
SoftwareVersion: 1.79
|
||||
AutopackageTarget: 1.4
|
||||
# Use 'CPUArchitectures: x86' if 'uname -m' gives i?86 (i.e. consider '?' as a wildcard)
|
||||
CPUArchitectures: x86_64
|
||||
|
@ -60,7 +60,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Ool8</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.77.1</string>
|
||||
<string>1.79</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.games</string>
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
|
@ -1 +1 @@
|
||||
OOLITE_VERSION=1.77.1
|
||||
OOLITE_VERSION=1.79
|
||||
|
@ -269,6 +269,7 @@ enum OOScanClass
|
||||
- (double) findCollisionRadius;
|
||||
- (void) drawImmediate:(bool)immediate translucent:(bool)translucent;
|
||||
- (BOOL) isVisible;
|
||||
- (BOOL) isInSpace;
|
||||
- (BOOL) isImmuneToBreakPatternHide;
|
||||
|
||||
// For shader bindings.
|
||||
|
@ -1065,6 +1065,24 @@ static NSString * const kOOLogEntityUpdateError = @"entity.linkedList.update.
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) isInSpace
|
||||
{
|
||||
switch ([self status])
|
||||
{
|
||||
case STATUS_IN_FLIGHT:
|
||||
case STATUS_DOCKING:
|
||||
case STATUS_LAUNCHING:
|
||||
case STATUS_WITCHSPACE_COUNTDOWN:
|
||||
case STATUS_BEING_SCOOPED:
|
||||
case STATUS_EFFECT:
|
||||
case STATUS_ACTIVE:
|
||||
return YES;
|
||||
default:
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) isImmuneToBreakPatternHide
|
||||
{
|
||||
return isImmuneToBreakPatternHide;
|
||||
|
@ -2312,7 +2312,7 @@ static OOPolygonSprite *IconForMissileRole(NSString *role)
|
||||
ShipEntity *secondary = [(OOWeakReference *)sec_id weakRefUnderlyingObject];
|
||||
if (secondary != nil && secondary != primary)
|
||||
{
|
||||
if ([secondary zeroDistance] <= SCANNER_MAX_RANGE2)
|
||||
if ([secondary zeroDistance] <= SCANNER_MAX_RANGE2 && [secondary isInSpace])
|
||||
{
|
||||
hudDrawReticleOnTarget(secondary, PLAYER, z1, alpha, NO, nil, YES, NO);
|
||||
}
|
||||
|
@ -241,20 +241,7 @@ static JSBool EntityGetProperty(JSContext *context, JSObject *this, jsid propID,
|
||||
return YES;
|
||||
|
||||
case kEntity_isInSpace:
|
||||
switch ([entity status])
|
||||
{
|
||||
case STATUS_IN_FLIGHT:
|
||||
case STATUS_DOCKING:
|
||||
case STATUS_LAUNCHING:
|
||||
case STATUS_WITCHSPACE_COUNTDOWN:
|
||||
case STATUS_BEING_SCOOPED:
|
||||
case STATUS_EFFECT:
|
||||
case STATUS_ACTIVE:
|
||||
*value = JSVAL_TRUE;
|
||||
break;
|
||||
default:
|
||||
*value = JSVAL_FALSE;
|
||||
}
|
||||
*value = OOJSValueFromBOOL([entity isInSpace]);
|
||||
return YES;
|
||||
|
||||
case kEntity_isShip:
|
||||
|
Loading…
x
Reference in New Issue
Block a user