71 Commits

Author SHA1 Message Date
cim
23b5edea58 Initial implementation of waypoints
Try something like this to test.
S.setWaypoint("test", { position: [3E5,3E5,0], size: 5000, beaconCode: "T", beaconLabel: "Waypoint 1" });
2013-10-01 21:48:02 +01:00
cim
e377cd8438 Add beacon dial (will be needed for waypoints) and beacon label property
(beacon code isn't suitable as initial letter of label may differ from code: the N beacon being an obvious example)
2013-09-28 23:31:50 +01:00
cim
835410934e Add tradeInFactor as a shader uniform for the player ship 2013-08-21 18:13:56 +01:00
cim
8ca8e8a46f Merge branch 'master' of github.com:OoliteProject/oolite into javascript-populator
Conflicts:
	src/Core/Entities/ShipEntityAI.m
2013-07-08 21:53:03 +01:00
cim
83e0f31316 Primable equipment dial for HUD
Hidden while docked (primable equipment unusuable) or if no primable equipment is installed
2013-07-05 20:30:09 +01:00
cim
a27d5da974 Remove performBroadside AI command.
(Only really useful for testing anyway, never been in a stable release)
2013-07-04 14:50:26 +01:00
cim
6d12aa177e Make navigation buoys rotate again 2013-07-03 17:43:49 +01:00
Jens Ayton
f3df081d5b Aliased scriptActionOnTarget: to safeScriptActionOnTarget:.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5414 127b21dd-08f5-0310-b4b7-95ae10353056
2012-10-10 16:27:30 +00:00
Chris Morris
a943e125a6 Shader/JS bindings for vector up/right/forward in visual effects
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5404 127b21dd-08f5-0310-b4b7-95ae10353056
2012-10-07 11:04:56 +00:00
Chris Morris
5ac25bb344 Provide some shader-bindable properties for visual effects
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5238 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-24 20:20:43 +00:00
Chris Morris
55b8b21944 Start shader bindings for Visual Effects (fake hullHeatLevel for default shader)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5220 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-22 19:40:56 +00:00
Chris Morris
0db1d55fb6 Introduce Javascript-based frame-by-frame AI management
Add ship.max(Pitch|Roll|Yaw) properties
Modify player.ship.(Pitch|Roll|Yaw) properties so that signs reported are the same as for NPC ships.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5190 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-16 19:33:38 +00:00
Jens Ayton
c283c03ce4 Minor optimization and cleanup of AI dispatch.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5175 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-11 11:55:33 +00:00
Jens Ayton
a9c0e85649 Use OOWeakSet for ship defense targets.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5151 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-30 23:13:55 +00:00
Chris Morris
ae014d1496 Expose individual weapon mount temperatures (readonly!) to script for both player and NPC
Move laserHeatLevel from PlayerShip to Ship


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5047 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-04 21:08:38 +00:00
Chris Morris
000ff5c546 Remove debug lines mistakenly left in last commit
Add 'alertCondition' as an NPC shader property


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5012 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-16 12:01:17 +00:00
Chris Morris
48e2a103bb weaponRecoveryTime (for shaders, mimics 1.76 laserHeatLevel behaviour for NPCs)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5003 127b21dd-08f5-0310-b4b7-95ae10353056
2012-06-11 19:17:30 +00:00
Eric Walch
0167b32938 - Added a new AI command 'setDestinationToJinkPosition'
- Updated several AIs with reaction to cloaked attacks.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4954 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-22 20:06:21 +00:00
Chris Morris
7ec9ba3211 Add side weapon points to NPCs.
- automatically used sometimes in combat if weapons fitted
 - performBroadside AI command to force use if fitted
 - JS properties added for NPC ships
 - shipdata.plist properties added (no core ship uses them, of course)
 - works better if you fit the same weapon to each side, but it can cope...


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4949 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-20 15:59:44 +00:00
Eric Walch
27bb46cacd - Added two new AI commands: 'storeTarget' and 'recallStoredTarget'
- Used both commands in pirate and missile AI for a better reaction on cloaked targets.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4941 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-16 12:46:14 +00:00
Chris Morris
052f596e61 Improvements to (mostly Thargoid) AIs
Bug fixes:
1) Giving a ship an aft Thargoid laser and a forward Thargoid laser
   now has a different effect to giving it just a forward Thargoid
   laser. (It gives it double attack power with its laser; use sparingly!)
2) Thargoid laser rate of fire no longer depends on the frame rate.

AI upgrades:
1) Pilots with fear will attempt to flee from Q-Mines at top speed
2) Pilots without fear will attempt to blow up Q-Mines, then avoid the
   cloud if unsuccessful.
3) Ships with a Thargoid laser fitted will use the fact that they have
   an omnidirectional laser to their advantage in combat.
4) Ships with multidirectional weapons (thargoid lasers, plasma
   turrets) can now track multiple targets with those weapons, which
   need not be the primary target, and use these weapons as point
   defense. New AI commands have been added for optimal use of point
   defense, but even old AIs will do reasonably well.

New AI commands:
1) "addPrimaryAggressorAsDefenseTarget"
2) "addFoundTargetAsDefenseTarget"
3) "findNewDefenseTarget"
4) "clearDefenseTargets"

New AI alerts:
1) DEFENSE_TARGET_LOST
2) DEFENSE_TARGET_DESTROYED
3) CASCADE_WEAPON_DETECTED


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4899 127b21dd-08f5-0310-b4b7-95ae10353056
2012-05-02 20:08:54 +00:00
Eric Walch
79b17ebcef Added
- new behaviour BEHAVIOUR_LAND_ON_PLANET that takes care of the whole landing and removal.
- AI command: performLandOnPlanet. Works only very close (500 meters) to the planet surface were APPROACHING_SURFACE has be send. Otherwise returns: NO_PLANET_NEARBY
- ship event: shipLandedOnPlanet(planet)
- changed the old AI message LANDED_ON_PLANET from normal to reactToMessage.  The normal one never triggered because of ship removal in the same update.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4844 127b21dd-08f5-0310-b4b7-95ae10353056
2012-04-13 07:43:38 +00:00
Eric Walch
6fd5701273 - added two AI commands: setTargetToRandomStation and setTargetToLastStation.
- setTargetToRandomStation will select a random station from all stations within 'desiredRange'. Carriers and stations without npc_traffic are excluded. It returns "NO_STATION_IN_RANGE" or "STATION_FOUND"
- setTargetToLastStation sets the primary target to the last selected station. It returns "NO_STATION_FOUND" when the last station lo longer exists.
- Updated the route1traderAI.plist so that ships with bounty no longer go to the main station as default but start looking for a random station.

- Bugfix: Activating the fuel injector while deceleration from torus speed, no longer drops the speed immediately to max-injector speed.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4770 127b21dd-08f5-0310-b4b7-95ae10353056
2012-02-08 19:45:39 +00:00
Eric Walch
cf7ed44372 - Launching traders with a 'sunskimmer' role now start with sufficient heat insulation for sunskimming.
- Added an AI command 'checkHeatInsulation' (returns either: INSULATION_OK or INSULATION_POOR)
- ship_temperature no longer becomes negative (and stays negative) after a witchspace jump from a hot area. (delta_t can be several seconds on the first update after a jump)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4647 127b21dd-08f5-0310-b4b7-95ae10353056
2011-11-15 19:41:46 +00:00
Eric Walch
8ba93d4115 - The AI commands 'becomeExplosion' and 'becomeEnergyBlast' now also trigger the shipDied event handler.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4604 127b21dd-08f5-0310-b4b7-95ae10353056
2011-08-26 19:34:19 +00:00
Jens Ayton
954f5b4ef7 Removed unwarranted setTargetToFriendlyStation AI method alias, and moved setUpEscorts alias to right place.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4330 127b21dd-08f5-0310-b4b7-95ae10353056
2011-02-12 14:38:06 +00:00
Eric Walch
e4bc696ed7 - Added a cloakAutomatic ship property an a cloak_automatic shipkey. Default = yes
- GROUP_ATTACK_TARGET messages are now also send to escorts is the mother is part of a bigger group.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4162 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-27 18:14:33 +00:00
Jens Ayton
214d87e63c Escort formations can now be defined in JavaScript by implementing coordinatesForEscortPosition().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4105 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-20 19:52:01 +00:00
Eric Walch
5bea193153 - Added the AI command 'setDesiredRangeForWaypoint' to set a flexible range instead of the fixed value of 50, so that slow turning ships also can use the standard 'gotoWaypointAI.plist'
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4070 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-15 10:36:54 +00:00
Michael Werle
6b405350cd * Add player-wormholes (new AI function: enterPlayerWormhole).
* Refactored jump-code.
* Add minimum 0.1LY fuel consumption
* Fix cannot-jump-to-origin-system-from-interstellar-space bug


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3832 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-21 11:35:28 +00:00
Marc
b3647b67bc escape pods part II:
- player and NPCs can eject at all times now.
- if pod ejected in witchspace, it's game over for the player, unless overridden by oxp.
- if pod ejected in normal space, the player will always reappear at the main station, unless overridden by oxp!
- new worldScript event 'escapePodSequenceOver' to override escape pod behaviour: if at the end of the event player.ship.target is a dockable station, the player will reappear inside it, otherwise game over!
- new translation string: gameover-escape-pod

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3809 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-13 20:10:05 +00:00
Nikos Barkas
05694cebdc Implemented weapons lockdown toggle. Defaults to '_' and the weapons online/offline status is saved in the player's savefile. Affects lasers, missiles, mines and energy bomb.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3774 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-21 09:27:33 +00:00
Eric Walch
3c099b9a59 - Added AI command: thargonCheckMother for a more efficient thargon handling.
- Improved the thargletAI slightly.
- Changed policeInterceptAI so that launching ships without target immediately clear the launch area.
- Moved the constrictor script from shipData to the worldScript. (to prevent problems with bad oxp copies of the constrictor)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3752 127b21dd-08f5-0310-b4b7-95ae10353056
2010-09-16 20:13:01 +00:00
Jens Ayton
8971373510 Whitelisted addFuel:. Fixed a comment on the panoply of texture caches.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3474 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-06 16:33:29 +00:00
Michael Werle
ac25a891bc Revert accidental commit of whitelist.plist from r3448
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3457 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-04 09:12:36 +00:00
Michael Werle
9ac5d02bed Revert the GNUmakefile to compile, by default, using system-dependecies. This makes it easier for developers rather than packagers. Associated changes to not break packaging build rules.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3448 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-02 19:14:29 +00:00
Jens Ayton
3df2a3e3dd Implemented HUD dial whitelisting.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3370 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-18 19:26:26 +00:00
Jens Ayton
084248f98f Tiny tweaks: renamed AI methods scanFor{Nearest|Random}Merchantmen to ...Merchantman (with compatibility aliases). Removed all Light 0 stuff from shaders. Belatedly bumped cache format version for changed dust shader.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3314 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-09 23:13:12 +00:00
Jens Ayton
46c40ec186 More graceful handling of disappearing docking target.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3308 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-09 15:21:06 +00:00
Jens Ayton
29e904f0f6 More work on player shader binding issue: implemented ProxyPlayerEntity class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3052 127b21dd-08f5-0310-b4b7-95ae10353056
2010-03-03 21:23:31 +00:00
Jens Ayton
a4382b451f Fixed bug where space dust velocity ignored inertial velocity of player, taking only thrust into account. Exposed player velocity to JS. Initial work on fixing player-only shader binding issue described at http://aegidian.org/bb/viewtopic.php?p=103930#103930 .
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3051 127b21dd-08f5-0310-b4b7-95ae10353056
2010-03-03 18:04:06 +00:00
Jens Ayton
a90629799d Added lightsActive JS ship property and shader binding, tied into switchLightsOn/switchLightsOff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3013 127b21dd-08f5-0310-b4b7-95ae10353056
2010-02-09 16:56:04 +00:00
Marc
3320a6bc4d - Faster lights on/off implementation for shaders (as per bug #16268), included within a slight lighting & update method rewrite. Not directly usable as dimmer switch yet, but can be easily adapted to that purpose.
- OOGL wrapper added to a few stray opengl instructions from a previous commit.
- Possible fix for lower end graphic cards F7 lighting direction bug, as reported by a_c.
- Hopefully the last rename for the 'old' setSunCenterPosition method from rev2936

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2962 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-11 20:53:02 +00:00
Marc
193a5b5c4c - Lights on on/off switch added to shaders, could also be used as a dimmer switch in the future. :) This should finally fix bug #16268: Lighting issues for shaders.
- HUD whitelisting, part 0.5!

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2952 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-10 10:23:20 +00:00
Nikos Barkas
c2edf2238f Fixed a typo in whitelist.plist and removed references to methods removed in previous commit.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2781 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-24 21:15:40 +00:00
Jens Ayton
9bbc3845c1 Fixed questionable use of release in launchIndependentShip:, and moved some trivial aliases of launchIndependentShip: into whitelist aliasing mechanism.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2780 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-24 18:37:41 +00:00
Jens Ayton
07902c2b70 Whitelisted setPrimaryRole: for AIs, and made setStateTo: a normal method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2734 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-11 15:24:34 +00:00
Eric Walch
d80f8a1bfd Added a AI command "setThrustFactorTo:" Re-added the group feature for missiles with Thargoid scanclass after having seen some friendly fire going on between a thargoid and a tharglet.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2713 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-27 17:27:33 +00:00
Eric Walch
19ad69a4f3 Added AI commands: setCoordinatesFromPosition and checkEnergy. Used these commands in pirateAI.plist to send pirates back to their original position after a fight so they keep together as a group.
Player now sends "CARGO_DUMPED" to all ships in range. Pirates with cargo room can now react on this.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2518 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-19 10:12:54 +00:00
Eric Walch
eba04c02fc Added an AI command "checkAegis" that recalls the aegis messages. When traders or patrols go into a wayPointAI.plist or an interceptAI.plist they sometime miss this message. Now they can use checkAegis on RESTART.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2369 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-03 19:44:45 +00:00