Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Cargo Shepherd

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description A handy little piece of pylon-mounted equipment that when launched attracts most free-floating cargo pods to it and holds them until you can scoop them. Useful for when your hold is too full to take everything in one go, as it also includes a beacon to return to it. A handy little piece of pylon-mounted equipment that when launched attracts most free-floating cargo pods to it and holds them until you can scoop them. Useful for when your hold is too full to take everything in one go, as it also includes a beacon to return to it.
Identifier oolite.oxp.Thargoid.CargoShepherd oolite.oxp.Thargoid.CargoShepherd
Title Cargo Shepherd Cargo Shepherd
Category Equipment Equipment
Author Thargoid Thargoid
Version 1.01 1.01
Tags equipment equipment
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Cargo_Shepherd_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/9/95/Cargo_Shepherd_1.01.oxz n/a
License Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file
File Size n/a
Upload date 1610873375

Documentation

Also read http://wiki.alioth.net/index.php/Cargo%20Shepherd

Cargo Shepherd 1.01 Readme & License.txt

Cargo Shepherd OXP by Thargoid.

The latest piece of equipemnt from the labs of the Aquarian Shipbuilding Corporation, the Cargo Shepherd is designed for busy traders, scavengers and bounty hunters.

For those times when your cargo hold is just not big enough, the Cargo Shepherd is designed to mark the location of loose cargo pods, and also keep them in place via a specially designed broad-based tractor field. Put simply it will attract any loose cargo pod in range toward itself, and maintain them in a holding position 200m from the Shepherd unit.

To relocate the unit, simply tune your ASC (where fitted) to the magnet icon and follow it back. The unit is pylon-mounted and can be deployed in the normal manner. The unit is activated on launch, and keyed to the ship that launched it. It is fully re-usable, and once deactivated can be scooped (if sufficient cargo space is available) and restored onto your pylons (again if space is available). To deactivate the unit, gently bump into it with your ship (not too fast, or the unit may be damaged or destroyed).

It is not advised to leave units functioning and unattended for too long though, or else someone else may stumble upon your hoard!

This OXP requires Oolite v1.74 or higher, and will not run correctly on previous versions.

-------------------------------------------------------------------------------------------------------------------------------------
License:

This OXP is released under the Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with the following clauses:

* Whilst you are free (and encouraged) to re-use any of the scripting, models or texturing in this OXP, the usage must be distinct from that within this OXP. Unique identifiers such as (but not limited to) unique shipdata.plist entity keys, mission variables, script names (this.name), equipment identity strings (EQ_), description list arrays and entity roles must not be re-used without prior agreement.
* rebundling of this OXP within another distribution is permitted as long as it is unchanged. The following derivates however are permitted and except from the above:
	* the conversion of files between XML and openStep.
	* the merging of files with other files of the same type from other OXPs.
* Even though it is not compulsory, if you are re-using any sizable or recognisable piece of this OXP, please let me know :)

-------------------------------------------------------------------------------------------------------------------------------------
Instructions:

Unzip the file, and then move the folder "Cargo Shepherd 1.01.oxp" to the AddOns directory of your Oolite installation. Then start the game up whilst holding down the shift key (until the spinning Cobra Mk III screen appears) and the stations will appear in appropriate systems.

-------------------------------------------------------------------------------------------------------------------------------------

Version history:

07/04/2011 - Version 1.00, Initial release
11/06/2011 - Version 1.01, expanded the range of cargo pods that the shepherd can capture

Equipment

Name Visible Cost [deci-credits] Tech-Level
Cargo Shepherd yes 10000 6+

Ships

Name
Cargo Shepherd

Models

This expansion declares no models.

Scripts

Path
Scripts/cargoShepherd_magnet.js
this.name           = "cargoShepherd_magnet";
this.author         = "Thargoid";
this.copyright      = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description    = "Ship script for Cargo Shepherd";
this.version        = "1.00";

this.scanForPods = function() 
	{ 
	function allPods(entity) {return entity.isShip && (entity.hasRole("cargopod") || (entity.isCargo && !entity.isPiloted))}; 
	let farList = system.filteredEntities(this, allPods, this.ship, 25600); 
	let nearList = system.filteredEntities(this, allPods, this.ship, 200); 
	
	if(farList.length === 0)
		{
		this.ship.lightsActive = false;
		return;
		}
		
	if(farList.length > 0)
		{
		var podCounter = 0 ; // reset the counter
		for(podCounter = 0;podCounter<farList.length;podCounter++)
			{ farList[podCounter].velocity = this.ship.position.subtract(farList[podCounter].position).direction().multiply(10) }
		}
	
	if(nearList.length > 0)
		{
		var podCounter = 0 ; // reset the counter
		for(podCounter = 0;podCounter<nearList.length;podCounter++)
			{ nearList[podCounter].velocity = [0,0,0]; }
		}
	this.ship.lightsActive = true;	
	}

this.shipWasScooped = function(scooper)
	{
	if(scooper.isPlayer && player.ship.missiles.length < player.ship.missileCapacity)
		{ 
		player.ship.awardEquipment("EQ_CARGO_SHEPHERD_MINE");	
		player.consoleMessage("Cargo Shepherd available for re-use", 4);
		}
	}
	
this.shipCollided = function(otherShip)
	{
	if(otherShip && this.ship.owner && otherShip === this.ship.owner)
		{ this.ship.AIState = "INERT"; }
	else
		{ this.ship.AIState = "WARNING"; }
	}