Back to Index |
Page generated: May 18, 2025, 8:34:31 AM |
Expansion Silicone Sealant
Content
Manifest
|
from Expansion Manager's OXP list |
from Expansion Manifest |
Description |
Applies silicone sealant to a fuel leak to stop the leak for a limited amount of time. |
Applies silicone sealant to a fuel leak to stop the leak for a limited amount of time. |
Identifier |
oolite.oxp.phkb.SiliconeSealant |
oolite.oxp.phkb.SiliconeSealant |
Title |
Silicone Sealant |
Silicone Sealant |
Category |
Equipment |
Equipment |
Author |
phkb |
phkb |
Version |
1.1 |
1.1 |
Tags |
|
|
Required Oolite Version |
|
|
Maximum Oolite Version |
|
|
Required Expansions |
|
|
Optional Expansions |
|
|
Conflict Expansions |
|
|
Information URL |
https://wiki.alioth.net/index.php/Silicone_Sealant |
n/a |
Download URL |
https://wiki.alioth.net/img_auth.php/5/5d/SiliconeSealant.oxz |
n/a |
License |
CC-BY-NC-SA 4.0 |
CC-BY-NC-SA 4.0 |
File Size |
n/a |
Upload date |
1743140920 |
Documentation
Also read http://wiki.alioth.net/index.php/Silicone%20Sealant
readme.txt
Silicone Sealant
by phkb
Overview
========
This OXP creates a new equipment item, called "Silicone Sealant". The cost is 10cr and is available from any station, and each purchase allows for 5 applications. The practical use for the sealant is to plug fuel leaks when they occur. Simply prime the equipment and activate it, and the fuel leak will be stopped.
However, given the volitile nature of Quirium fuel, and the forces exerted on its containment, any sealant fix will be temporary. The length of time the seal will hold for is uncertain, but it is not a permanent fix. You will still need to dock at a station to get the leak repaired properly.
Additionally, when the sealant inevitably fails, there is a chance the leak will be made worse.
Availability
============
Silicone Sealant is available at all stations.
If you use the "Hard Way" OXP, it will be available as soon as you start the game.
If you aren't using "Hard Way", and you have not yet completed the Nova mission, you will not be offered the item to purchase.
Licence
=======
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International Public License. To view a copy of this license, visit http://http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
Sound files taken from "Large Industrial Robot" WAV file, created by Mike Koenig and sourced from soundbible.com. Licenced under Creative Commons Attribution 3.0.
Version History
===============
1.1
- Added sound effects.
- Added readme file.
- Added random chance of a worsening fuel leak when sealant fails.
1.0
- Initial release.
Equipment
Ships
This expansion declares no ships.
Models
This expansion declares no models.
Scripts
Path |
Scripts/silicone_conditions.js |
"use strict";
this.name = "silicone_conditions";
this.author = "phkb";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Condition script for equipment.";
//----------------------------------------------------------------------------------------
this.allowAwardEquipment = function(equipment, ship, context) {
if (context === "scripted") return true;
// if you're running "Hard Way", should always be available
// otherwise, if you haven't finished nova mission, it won't be available
if (!worldScripts.CollapsShields && missionVariables.nova != "NOVA_HERO") return false;
return true;
} |
Scripts/silicone_equipment.js |
"use strict";
this.name = "silicone_equipment";
this.author = "phkb";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description = "Equipment script for silicone sealant.";
//-------------------------------------------------------------------------------------------------------------
this.activated = function() {
var p = player.ship;
if (p.fuelLeakRate == 0) {
player.consoleMessage("No fuel leak detected.");
return;
}
p.removeEquipment("EQ_SILICONE_SEALANT");
var sc = worldScripts.silicone_equipment;
sc._holdLeakRate = p.fuelLeakRate;
p.fuelLeakRate = 0;
this.$playSound("silicone");
player.consoleMessage("Fuel leak has been plugged.");
sc._timer = new Timer(sc, sc.$siliconeFail, Math.random() * 200 + 30);
}
//-------------------------------------------------------------------------------------------------------------
this.$siliconeFail = function $siliconeFail() {
this.$playSound("leak");
player.ship.fuelLeakRate = this._holdLeakRate + (Math.random() > 0.5 ? 0.03 : 0);
}
//-------------------------------------------------------------------------------------------------------------
this.playerBoughtEquipment = function(equipKey) {
if (equipKey == "EQ_SILICONE_SEALANT") {
// buying one means your buying 5 applications
for (var i = 1; i <= 4; i++) {
player.ship.awardEquipment("EQ_SILICONE_SEALANT");
}
player.consoleMessage("Purchased 5 silicone sealants");
}
}
//-------------------------------------------------------------------------------------------------------------
this.shipDockedWithStation = function() {
if (this._timer && this._timer.isRunning) this._timer.stop();
}
//-------------------------------------------------------------------------------------------------------------
// plays the hydraulic sound of the silicone sealant being applied
this.$playSound = function $playSound(type) {
var mySound = new SoundSource;
switch (type) {
case "silicone":
mySound.sound = "silicone_application.ogg";
break;
case "leak":
mySound.sound = "[fuel-leak]";
break;
}
mySound.loop = false;
mySound.play();
}
|