Back to Index Page generated: Nov 12, 2024, 11:02:04 PM

Expansion Your Ad Here Mobile

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description A little add-on OXP for Your Ad Here OXP. It introduces mobile ship-towed advertising billboards to the route one space lane of appropriate systems. A little add-on OXP for Your Ad Here OXP. It introduces mobile ship-towed advertising billboards to the route one space lane of appropriate systems.
Identifier oolite.oxp.Thargoid.YAH-Mobile oolite.oxp.Thargoid.YAH-Mobile
Title Your Ad Here Mobile Your Ad Here Mobile
Category Ambience Ambience
Author Thargoid Thargoid
Version 1.00 1.00
Tags ambience, ships ambience, ships
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/YAHMobile_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/7/79/YAH_Mobile_1.00.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1610873342

Documentation

Also read http://wiki.alioth.net/index.php/Your%20Ad%20Here%20Mobile

YAH Mobile v1.00 ReadMe & License.txt

YAH Mobile OXP by Thargoid.

This is a little add-on OXP to the magnificent Your Ad Here OXP franchise, by Dr Nil, Ark, DaddyHoggy and several other contributors.

The executives of the corporation noticed that a market was being missed in all of the traffic making the routine commute between the system witchpoint and the main planet/station aegis regions. So a new version of their existing billboard system was commissioned, especially designed to be towed by some of the Sidewinder station defense fleet. These fly along "route one" of all of the populous systems (except for Anarchy systems, where the risk of attack and vandalism was deemed too high) showing off the advertisements of the corporations customers.

This OXP requires at least one of the YAH ad-sets to be installed, and will work with existing sets A-G plus is pre-configured for the release of sets H-J.

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

License:

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

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

Instructions:

Unzip the file, and then move the folder "YAH Mobile 1.00.oxp" to the AddOns directory of your Oolite installation. 

This OXP requires Oolite version 1.74 or higher.

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

Version history:

05/03/2012 - Version 1.00, Initial release.

Equipment

This expansion declares no equipment.

Ships

Name
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Billboard
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
Mobile Ad Tractor
YAH_trader

Models

This expansion declares no models.

Scripts

Path
Config/script.js
this.name					= "YAH_mobile_populator";
this.author					= "Thargoid";
this.copyright				= "Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license";
this.description			= "Populator for YAH mobile ad boards";
this.version				= "1.0";

this.shipWillExitWitchspace = function()
	{
	if (system.government > 0 && !system.isInterstellarSpace && !system.sun.isGoingNova && system.population > 40 && system.countShipsWithRole("YAH_mobileTractor") === 0)
		{
		this.shipCount = Math.ceil((system.population - 40) / 4);
		var loopCounter = 0 ; // reset the counter
		for(loopCounter = 0;loopCounter<this.shipCount;loopCounter++)
			{
			system.addShipsToRoute("YAH_mobileTractor", 1, (0.1 + (0.8 * Math.random())), "pw");
			}
		}
	}

this.shipWillLaunchFromStation = function(station)
	{
	this.shipWillExitWitchspace();
	delete this.shipWillLaunchFromStation; // this is only needed for the first launch	
	}
Scripts/YAH_mobileTractor.js
this.name					= "YAH_mobileTractor.js";
this.author					= "Thargoid";
this.copyright				= "Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license";
this.description			= "Ship script for YAH mobile ad tractor ship.";
this.version				= "1.0";
"use strict";

this.shipSpawned = function()
	{
	this.adBoard = this.ship.spawnOne("YAH_mobileAd"); 
	if(!this.adBoard.isValid)
		{
		log(this.name, "adBoard spawn failed.");
		return;
		}
	
	this.adGroup = new ShipGroup("YAH Mobile Ads", this.ship);
	this.ship.group = this.adGroup;
	this.adGroup.leader = this.ship;
	this.adBoard.group = this.adGroup;
	
	this.callbackID = addFrameCallback(this.positionBoard.bind(this));
	}
	
this.positionBoard = function()
	{
	if(!this.adBoard.isValid || !this.ship.isValid)
		{
		this.stopCallback();
		return;
		}

	this.adBoard.position = this.ship.position.subtract(this.ship.orientation.vectorForward().multiply(10+ this.adBoard.collisionRadius + this.ship.collisionRadius));
	this.adBoard.orientation = this.ship.orientation.rotate(this.ship.vectorUp, (Math.PI / 2));
	}
	
this.shipDied = this.stopCallback = function()
	{
	if(this.callbackID) 
		{ removeFrameCallback(this.callbackID); } 
	delete this.callbackID;
	};