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

Expansion Sell Equipment

Content

Warnings

  1. Found XML equipment list

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Allows to resell most original equipments and some more in stations with the same techlevel necessary to buy the equipment. The resell value is generally 60 per cent of the original recommended retail price. Allows to resell most original equipments and some more in stations with the same techlevel necessary to buy the equipment. The resell value is generally 60 per cent of the original recommended retail price.
Identifier oolite.oxp.Commander_McLane.Sell_Equipment oolite.oxp.Commander_McLane.Sell_Equipment
Title Sell Equipment Sell Equipment
Category Equipment Equipment
Author Commander McLane Commander McLane
Version 1.5 1.5
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Sell_equipment_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/4/4a/Sell_Equipment_1.5.oxz n/a
License CC-BY-NC-SA 3.0 CC-BY-NC-SA 3.0
File Size n/a
Upload date 1610873296

Documentation

Also read http://wiki.alioth.net/index.php/Sell%20Equipment

readMe.rtf

{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
\readonlydoc1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11905\paperh16837\margl1440\margr1440\vieww12720\viewh8880\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural

\f0\b\fs26 \cf0 \ul \ulc0 sell_equipment v 1.5
\b0 \ulnone \
\
by "Commander McLane"\
\
\
an Expansion Pack for Oolite by Giles Williams\
\
based on "Elite" by Ian Bell and David Braben\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\cf0 \
\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\cf0 \ul Introduction\ulnone \
\
It does what it says. This OXP allows you to resell all original equipment\'97and some more\'97in stations with the same techlevel necessary to buy the equipment.\
\
\ul Overview\ulnone \
\
Just go to the station's equipment department. Together with equipment items you don't yet have there will be the possibility to sell those items you have. Selling equipment costs a small fee, and don't expect to get all your money back. The resell value is generally 60 per cent of the original recommended retail price.\
\
Anyway, if you're in dire need for some cash, selling some of your equipment can be a less dangerous alternative to taking out a loan with the notorious Black Monks. When you got some money again, you can easily replace whatever you have sold with a brand new item.\
\
Note that some equipment is not affected by this OXP. For reselling missiles and other stuff mounted outside the ship there has always been the missile removal. And similarly there was always the passenger berth removal. Main weapons like lasers and twin plasma cannons cannot be removed by selling them, because they are handled differently by the engine.\
\
\ul Minimum Requirements\ulnone \
\
Sell_equipment1.5.oxp requires at least Oolite 1.73.\
\
\ul Download Location\ulnone \
\
This OXP is available for download via the {\field{\*\fldinst{HYPERLINK "http://wiki.alioth.net/index.php/Sell_equipment_OXP"}}{\fldrslt Elite Wiki}}.\
\
\ul Installation\ulnone \
\
Move or copy the file sell_equipment1.5.oxp from this folder to the AddOns folder inside the Oolite main folder. Make sure to remove any previous versions of the OXP. Restart Oolite.\
\
\ul Acknowledgements\ulnone \
\
Thanks to Eric Walch who gave me the idea to just sit down and do this. And thanks to all the Oolite coders who are continuously working to make OXPs like this possible.\
\
\ul License\ulnone \
\
This work is licensed under the Creative\'a0Commons Attribution-NonCommercial-ShareAlike License version 3.0. For more information see the ReadMe of Oolite or the {\field{\*\fldinst{HYPERLINK "http://creativecommons.org/licenses/by-nc-sa/3.0/"}}{\fldrslt Creative Commons' website}}.\
\
Practically this means that you may rip it apart and use whatever seems useful to you, as long as you credit the original author. It would be nice\'97although by no means necessary\'97to give me a note, if you intend to use parts of it.\
\
\ul History\ulnone \
\
version 1.5 (October 19th, 2013)\
- fixed a bug that allowed you to sell and retain the large cargo bay under certain circumstances\
\
version 1.4 (February 28th, 2011)\
- added the wormhole scanner to the sellable equipment items\
- tidied up the script\
- requires now Oolite 1.73\
\
version 1.3 (February 4th, 2009)\
- added another OXP equipment item\
- fixed a typo in one of the short descriptions\
\
version 1.2 (November 26th, 2008)\
- removed a bug which could lead to problems in Anarchies.oxp (accidentally introduced two global variables with the same name)\
\
version 1.1 (November 11th, 2008)\
- added some OXP equipment items\
- prepared for more sophisticated calculation of the resell value (but it is still 60% of original price)\
\
version 1.0 (November 6th, 2008)\
- fully functional version\
- requires Oolite 1.72\
}

Equipment

Name Visible Cost [deci-credits] Tech-Level
Sell Advanced Space Compass yes 100 8+
Sell Advanced Navigational Array yes 100 7+
Sell Large Cargo Bay yes 100 2+
Sell Chaff Dispenser yes 100 8+
Sell Cloaking Device yes 100 14+
Sell Docking Computers yes 100 10+
Sell E.C.M. System yes 100 3+
Sell Emergency Energy Unit yes 100 9+
Sell Energy Bomb yes 100 8+
Sell Extra Energy Unit yes 100 9+
Sell Escape Pod yes 100 7+
Sell Bounty Scanner yes 100 1+
Sell Fuel Collector yes 100 11+
Sell Witchdrive Fuel Injectors yes 100 11+
Sell Fuel Scoops yes 100 6+
Sell Galactic Hyperdrive yes 100 11+
Sell External Heat Shielding yes 100 5+
Sell Military Anti-Scanner Countermeasures (MASC'M) yes 100 14+
Sell Military Scanner Filtering yes 100 14+
Sell Multi-Targeting System yes 100 6+
Sell Naval Energy Unit yes 100 14+
Sell Military Shield Enhancement yes 100 14+
Sell Ore Processor yes 100 12+
Sell Rock Hermit Locator yes 100 11+
Sell Scanner Targeting Enhancement yes 100 12+
Sell Shield Boosters yes 100 11+
Sell Target System Memory Expansion yes 100 9+
Sell Wormhole Scanner yes 100 10+

Ships

This expansion declares no ships. This may be related to warnings.

Models

This expansion declares no models. This may be related to warnings.

Scripts

Path
Config/script.js
"use strict";
/*

sell_equipment script

Script for selling the standard Oolite equipment, and some items more.


Oolite
Copyright © 2003-2013 Giles C Williams and contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.


sell_equipment.oxp
Copyright © 2008-2013 "Commander McLane"

This work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 Unported License.

To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

*/


this.name           = "sell_equipment";
this.description    = "script for selling equipment";
this.author         = "Commander McLane";
this.copyright      = "© 2013 Commander McLane";
this.license		= "CC-by-nc-sa 3.0";
this.version        = "1.5";


/* variables */

this.equipment_key = new Array(
	"EQ_CARGO_BAY",
	"EQ_ECM",
	"EQ_FUEL_SCOOPS",
	"EQ_ESCAPE_POD",
	"EQ_ENERGY_BOMB",
	"EQ_ENERGY_UNIT",
	"EQ_NAVAL_ENERGY_UNIT",
	"EQ_DOCK_COMP",
	"EQ_GAL_DRIVE",
	"EQ_CLOAKING_DEVICE",
	"EQ_FUEL_INJECTION",
	"EQ_SCANNER_SHOW_MISSILE_TARGET",
	"EQ_MULTI_TARGET",
	"EQ_ADVANCED_COMPASS",
	"EQ_ADVANCED_NAVIGATIONAL_ARRAY",
	"EQ_TARGET_MEMORY",
	"EQ_SHIELD_BOOSTER",
	"EQ_NAVAL_SHIELD_BOOSTER",
	"EQ_HEAT_SHIELD",
	"EQ_WORMHOLE_SCANNER",
	"EQ_MILITARY_JAMMER",
	"EQ_MILITARY_SCANNER_FILTER",
	"EQ_FRAME_BOUNTY_SCANNER",
	"EQ_CHAFF_LAUNCHER",
	"EQ_EEU",
	"EQ_FRAME_FUEL_COLLECTOR",
	"EQ_ORE_PROCESSOR",
	"EQ_ROCKHERMIT_SCANNER"
);


/* event handler */

this.playerBoughtEquipment = function(equipmentKey)
{
	for(var i = 0; i < this.equipment_key.length; i++)
	{
		if(equipmentKey == this.equipment_key[i] + "_REMOVAL")
		{
			player.ship.removeEquipment(this.equipment_key[i]);
			player.ship.removeEquipment(this.equipment_key[i] + "_REMOVAL");
			if(player.ship.equipmentStatus(this.equipment_key[i]) === "EQUIPMENT_UNAVAILABLE")
            {
                player.credits += (EquipmentInfo.infoForKey(this.equipment_key[i]).price * 0.1 * 0.6);
            }
            else
            {
                player.credits += 10;
            }
			break;
		}
	}
}

/*

Idee: Den Wiederverkaufspreis vom TL abhängig machen. Je niedriger, desto mehr Geld.
Eventuell den WiederverkaufsTL senken. Warum sollten nicht rückständige Systeme fortschrittliche Technik
kaufen wollen, für teuer Geld?
Entscheidend müsste die Differenz zwischen SystemTL und KaufTL sein.

*/