Weapon Laws OXZ

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

This OXP also conflicts with Laser Arrangement.

Now if Weapon Laws' restrictions are legal, as I adumbrated earlier, one can well see GalCop confiscating the laser I asked the shipyard to move to my aft mount! Thank heavens they didn't fine me!

But if they are not, as argued above regarding magazines & toy shops, well ... then ... it's blatant theft, and GalCop should arrest the shipyard employees! And give me my lasers back! And get those scoundrels to pay me compensation!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2672
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Weapon Laws OXZ

Post by Redspear »

Cholmondely wrote: Tue Apr 20, 2021 4:43 pm
Now if Weapon Laws' restrictions are legal...
It's been a while so I'll try again.

Weapon Laws *:
  • The ownership, installation and maintenance of military hardware is legal throughout the eight galactic charts within the confines of GalCop stations.
  • The sale and purchasing of military hardware is restricted within systems according to their form of governmental control. The more potent the militaristic potential of the item, and the more safety focused the government, the less likely the item can be legally bought or sold.
  • The fact that GalCop stations exist within government zones of control and yet are simultaneously independant of them leads to a situation of legality concerning the handling of such items rather than of the items themselves.
* purely for the purpose of this oxp

As for Laser Arrangement oxp, looks like you've been caught out by a legal loophole by the red tape merchants at GalCop...

I'm not sure if a fix would be easy without altering (or bullying) that oxp in some way.
Pretty busy lately but it's on the (ever expanding) list.

Thanks.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

Here are my current tweaks to this OXP which include the VimanaHUD additions (laser, combat module etc) & Sniperlock.

equipment-overrides.plist:

Code: Select all

{
	"EQ_MISSILE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_DEFENCE_MISSILE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_TORPEDO_MISSILE" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_ECM" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_PULSE_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_DUAL_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_IPULSE_LASER" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_BEAM_LASER" = {
		condition_script = "weapon_laws.js";	
	};
	
	"EQ_WEAPON_IBEAM_LASER" = {
		condition_script = "weapon_laws.js";	
	};
	
	"EQ_WEAPON_BURST_LASER" = {
		condition_script = "weapon_laws.js";	
	};

	"EQ_WEAPON_MINING_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_BMINING_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_AMINING_LASER" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_MILITARY_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
        "EQ_WEAPON_VIMANA_BEAM" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_ASSAULT_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_EMILITARY_LASER" = {
		condition_script = "weapon_laws.js";
	};
		
	"EQ_WEAPON_VOLT_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_STAR_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_HIRAD_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	
	"EQ_HARDENED_MISSILE" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_SCANNER_SHOW_MISSILE_TARGET" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_MULTI_TARGET" = {
			condition_script = "weapon_laws.js";
	};

	"EQ_TARGET_MEMORY" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_INTEGRATED_TARGETING_SYSTEM" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_TARGET_FILTERING_SYSTEM" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_VIMANA_TARGET_MODULE" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_SNIPERLOCK" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_QC_MINE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_SHIELD_BOOSTER" = {
			condition_script = "weapon_laws.js";	
	};

		
	"EQ_NAVAL_SHIELD_BOOSTER" = {
			condition_script = "weapon_laws.js";	
	};
	
	"EQ_ENERGY_BOMB" = {
			condition_script = "weapon_laws.js";	
	};

}
weapon_laws.js

Code: Select all

this.name        = "weapon_laws"; 
this.author      = "Redspear"; 
this.copyright   = "2020 Redspear";
this.licence     = "CC BY-NC-SA 4.0"; 
this.description = "Script to restrict sale of military grade equipment at the safer systems."; 
this.version     = "1.3";

"use strict";

//	disallow free sale of military hardware at every station

this.allowAwardEquipment = function(eqKey, ship, context)
{	
	//	democracies
	if (eqKey == "EQ_SHIELD_BOOSTER" && context == "purchase" && system.government > 6) {
		return false;
		}
		else {
	//	confederacies
	if ((eqKey == "EQ_WEAPON_PULSE_LASER" || eqKey == "EQ_VIMANA_TARGET_MODULE" || eqKey == "EQ_SNIPERLOCK" || eqKey == "EQ_WEAPON_DUAL_LASER" || eqKey == "EQ_WEAPON_IPULSE_LASER" || eqKey == "EQ_DEFENCE_MISSILE" || eqKey == "EQ_NAVAL_SHIELD_BOOSTER") && context == "purchase" && system.government > 5) {
		return false;
		}
		else {
	//	communist states
	if ((eqKey == "EQ_MISSILE" || eqKey == "EQ_TARGET_FILTERING_SYSTEM" || eqKey == "EQ_MULTI_TARGET" || eqKey == "EQ_TARGET_MEMORY") && context == "purchase" && system.government > 4) {
		return false;}
		else {
	//	dictatorships
	if ((eqKey == "EQ_WEAPON_BEAM_LASER" || eqKey == "EQ_WEAPON_IBEAM_LASER" || eqKey == "EQ_WEAPON_BURST_LASER" || eqKey == "EQ_TORPEDO_MISSILE" || eqKey == "EQ_SCANNER_SHOW_MISSILE_TARGET") && context == "purchase" && system.government > 3) {
		return false;
		}
		else {
	//	multi-governments
	if ((eqKey == "EQ_WEAPON_MILITARY_LASER" || eqKey == "EQ_WEAPON_VIMANA_BEAM" || eqKey == "EQ_WEAPON_ASSAULT_LASER" || eqKey == "EQ_WEAPON_EMILITARY_LASER" || eqKey == "EQ_INTEGRATED_TARGETING_SYSTEM") && context == "purchase" && system.government > 2) {
		return false;
		}
		else {	
	//	feudal states
	if ((eqKey == "EQ_HARDENED_MISSILE" || eqKey == "EQ_QC_MINE") && context == "purchase" && system.government > 1) {
		return false;
		}
		else {
	//	anarchies
	if (eqKey == "EQ_ENERGY_BOMB" && context == "purchase" && system.government > 0) {	//	Moo Hoo Ha Ha Haaaaa! :-P (requires relevant oxp)
		return false;
		}
		else {
		
	// remainder from oolite-conditions.js
	
		// OXP hook to allow stations to forbid specific equipment
	if (context == "purchase" && player.ship.dockedStation && player.ship.dockedStation.scriptInfo["oolite-barred-equipment"])
	{
		if (player.ship.dockedStation.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
		{
			return false;
		}
	}

	// OXP hook to allow ships to forbid specific "available to all" equipment
	if (ship.scriptInfo && ship.scriptInfo["oolite-barred-equipment"] && ship.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
	{
		return false;
	}

	// otherwise allowed
	return true;
	}
}
}
}
}
}
}
}

Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

Could I tweak it further to make buying Quirium Cascade bombs only legal on certain planet surfaces & non-Galcop stations in anarchies?

And how would I do that?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

I've extended coverage to some of the items which I regularly use.

To whit:
VimanaHUD: Vimana Beam Laser (multi-governments); TFS/Target Filtering System (communists), Target Module (confederacies)
SniperLock: (confederacies)

If you wish to use this, unzip your WeaponLaws.oxz, open up the folder, then open up the Config folder and replace the old equipment-overrides.plist with this one (don't forget to name it if it is a new file!):

Code: Select all

{
	"EQ_MISSILE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_DEFENCE_MISSILE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_TORPEDO_MISSILE" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_ECM" = {
		condition_script = "weapon_laws.js";

	};

	"EQ_WEAPON_PULSE_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_DUAL_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_IPULSE_LASER" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_BEAM_LASER" = {
		condition_script = "weapon_laws.js";	
	};
	
	"EQ_WEAPON_IBEAM_LASER" = {
		condition_script = "weapon_laws.js";	
	};
	
	"EQ_WEAPON_BURST_LASER" = {
		condition_script = "weapon_laws.js";	
	};


	"EQ_WEAPON_MINING_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_BMINING_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_AMINING_LASER" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_WEAPON_MILITARY_LASER" = {
		condition_script = "weapon_laws.js";
	};


	
        "EQ_WEAPON_VIMANA_BEAM" = {
		condition_script = "weapon_laws.js";
	};




	"EQ_WEAPON_ASSAULT_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_EMILITARY_LASER" = {
		condition_script = "weapon_laws.js";
	};
		
	"EQ_WEAPON_VOLT_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_STAR_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_WEAPON_HIRAD_LASER" = {
		condition_script = "weapon_laws.js";
	};
	
	


	"EQ_HARDENED_MISSILE" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_SCANNER_SHOW_MISSILE_TARGET" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_MULTI_TARGET" = {
			condition_script = "weapon_laws.js";
	};


	"EQ_TARGET_MEMORY" = {
		condition_script = "weapon_laws.js";
	};

	"EQ_INTEGRATED_TARGETING_SYSTEM" = {
		condition_script = "weapon_laws.js";				
	};



	"EQ_TARGET_FILTERING_SYSTEM" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_VIMANA_TARGET_MODULE" = {
		condition_script = "weapon_laws.js";				
	};

	"EQ_SNIPERLOCK" = {
		condition_script = "weapon_laws.js";				
	};



	"EQ_QC_MINE" = {
		condition_script = "weapon_laws.js";
	};
	
	"EQ_SHIELD_BOOSTER" = {
			condition_script = "weapon_laws.js";	
	};

		
	"EQ_NAVAL_SHIELD_BOOSTER" = {
			condition_script = "weapon_laws.js";	
	};
	
	"EQ_ENERGY_BOMB" = {
			condition_script = "weapon_laws.js";	
	};

}
The open up the scripts folder and replace the old weapon_laws.js file with this one (ditto for new files as above!)

Code: Select all

this.name        = "weapon_laws"; 
this.author      = "Redspear"; 
this.copyright   = "2020 Redspear";
this.licence     = "CC BY-NC-SA 4.0"; 
this.description = "Script to restrict sale of military grade equipment at the safer systems."; 
this.version     = "1.3";

"use strict";

//	disallow free sale of military hardware at every station

this.allowAwardEquipment = function(eqKey, ship, context)
{	
	//	democracies
	if (eqKey == "EQ_SHIELD_BOOSTER" && context == "purchase" && system.government > 6) {
		return false;
		}
		else {
	//	confederacies
	if ((eqKey == "EQ_WEAPON_PULSE_LASER" || eqKey == "EQ_VIMANA_TARGET_MODULE" || eqKey == "EQ_SNIPERLOCK" || eqKey == "EQ_WEAPON_DUAL_LASER" || eqKey == "EQ_WEAPON_IPULSE_LASER" || eqKey == "EQ_DEFENCE_MISSILE" || eqKey == "EQ_NAVAL_SHIELD_BOOSTER") && context == "purchase" && system.government > 5) {
		return false;
		}
		else {
	//	communist states
	if ((eqKey == "EQ_MISSILE" || eqKey == "EQ_TARGET_FILTERING_SYSTEM" || eqKey == "EQ_MULTI_TARGET" || eqKey == "EQ_TARGET_MEMORY") && context == "purchase" && system.government > 4) {
		return false;}
		else {
	//	dictatorships
	if ((eqKey == "EQ_WEAPON_BEAM_LASER" || eqKey == "EQ_WEAPON_IBEAM_LASER" || eqKey == "EQ_WEAPON_BURST_LASER" || eqKey == "EQ_TORPEDO_MISSILE" || eqKey == "EQ_SCANNER_SHOW_MISSILE_TARGET") && context == "purchase" && system.government > 3) {
		return false;
		}
		else {
	//	multi-governments
	if ((eqKey == "EQ_WEAPON_MILITARY_LASER" || eqKey == "EQ_WEAPON_VIMANA_BEAM" || eqKey == "EQ_WEAPON_ASSAULT_LASER" || eqKey == "EQ_WEAPON_EMILITARY_LASER" || eqKey == "EQ_INTEGRATED_TARGETING_SYSTEM") && context == "purchase" && system.government > 2) {
		return false;
		}
		else {	
	//	feudal states
	if ((eqKey == "EQ_HARDENED_MISSILE" || eqKey == "EQ_QC_MINE") && context == "purchase" && system.government > 1) {
		return false;
		}
		else {
	//	anarchies
	if (eqKey == "EQ_ENERGY_BOMB" && context == "purchase" && system.government > 0) {	//	Moo Hoo Ha Ha Haaaaa! :-P (requires relevant oxp)
		return false;
		}
		else {
		
	// remainder from oolite-conditions.js
	
		// OXP hook to allow stations to forbid specific equipment
	if (context == "purchase" && player.ship.dockedStation && player.ship.dockedStation.scriptInfo["oolite-barred-equipment"])
	{
		if (player.ship.dockedStation.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
		{
			return false;
		}
	}

	// OXP hook to allow ships to forbid specific "available to all" equipment
	if (ship.scriptInfo && ship.scriptInfo["oolite-barred-equipment"] && ship.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
	{
		return false;
	}

	// otherwise allowed
	return true;
	}
}
}
}
}
}
}
}

Then add the extension .oxp to the folder and place your tweaked .oxp in your AddOns folder. That way both you and the Expansions Manager know it's been modified - and it will appear red in the in-game expansions manager's list when you next check it.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

Query re Station Options & Weapon Laws is here.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2672
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Weapon Laws OXZ

Post by Redspear »

Just uploaded v 1.5

No chance to test at present but just a minor change, so fingers crossed I haven't botched the syntax.

Change is significant however and should now only affect items for sale (as was supposed to be the case anyway...)
Should cause fewer oxp conflicts now.

Thanks to Cholmondely for the consistent feedback/encouragement/badgering.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2672
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Weapon Laws OXZ

Post by Redspear »

Cholmondely wrote: Mon May 31, 2021 10:24 am
Could I tweak it further to make buying Quirium Cascade bombs only legal on certain planet surfaces & non-Galcop stations in anarchies?
Yes.

Cholmondely wrote: Mon May 31, 2021 10:24 am
And how would I do that?
Er...
I think you'd need to set a ship (station in this case) context for mines in particular if (shipKey = ... && eqKey == "EQ_QC_MINE"
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

Redspear wrote: Wed Dec 22, 2021 7:55 pm
Just uploaded v 1.5

No chance to test at present but just a minor change, so fingers crossed I haven't botched the syntax.

Change is significant however and should now only affect items for sale (as was supposed to be the case anyway...)
Should cause fewer oxp conflicts now.

Thanks to Cholmondely for the consistent feedback/encouragement/badgering.
At first shot, works just fine. Will add in my Vimana no-no's and see what happens!

Thank you, Redspear! Shame about the triplicates....
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Weapon Laws OXZ

Post by montana05 »

Cholmondely wrote: Mon May 31, 2021 10:24 am
And how would I do that?
Have a look at Military Missile G2, you can use the code from there.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5339
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Weapon Laws OXZ

Post by Cholmondely »

montana05 wrote: Thu Dec 23, 2021 12:35 am
Cholmondely wrote: Mon May 31, 2021 10:24 am
And how would I do that?
Have a look at Military Missile G2, you can use the code from there.
Thanks!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4829
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Weapon Laws OXZ

Post by phkb »

There is a bug in the DM version of Weapon Laws (version 1.5).

In the "weapon_laws.js" file, the function is defined as

Code: Select all

this.allowAwardEquipment = function(context = purchase)
That is invalid. It should be:

Code: Select all

this.allowAwardEquipment = function (eqKey, ship, context)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4829
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Weapon Laws OXZ

Post by phkb »

BTW, while it won't work in v1.90 at the moment due to the need for a code change in v1.91, you can just add this line to the top of the allowAwardEquipment and then you can drop any further need to examine "context" throughout the rest of the routine.

Code: Select all

    if (context == "scripted") return true;
If you're running Oolite 1.91, this should make it compatible with Laser Arrangement and LMSS.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2672
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Weapon Laws OXZ

Post by Redspear »

phkb wrote: Fri May 27, 2022 12:57 am
There is a bug in the DM version of Weapon Laws (version 1.5).
Thanks phkb, I'll just have to decalre it in every instance then.

phkb wrote: Fri May 27, 2022 3:42 am
you can just add this line to the top of the allowAwardEquipment and then you can drop any further need to examine "context" throughout the rest of the routine.
Yeah... conflict betwwen making it work with other oxps and making it work with the current stable release.
Maybe when I've had a play with it I'll better understand how it works.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2672
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Weapon Laws OXZ

Post by Redspear »

dybal wrote: Wed Dec 16, 2020 12:19 pm
Beware that a ship that has "restricted" weapons installed in any mount will not be restored correctly by Ship Storage Helper (due to this). That affects the ship's insurance (getting the ship back with all installed equipments - for a fee - after using the escape pod), and Hyperspace Hangar.
Should be fixed.

Cholmondely wrote: Tue Apr 20, 2021 4:43 pm
This OXP also conflicts with Laser Arrangement.
Likewise.

phkb wrote: Fri May 27, 2022 12:57 am
There is a bug in the DM version of Weapon Laws (version 1.5).

In the "weapon_laws.js" file, the function is defined as

Code: Select all

this.allowAwardEquipment = function(context = purchase)
That is invalid. It should be:

Code: Select all

this.allowAwardEquipment = function (eqKey, ship, context)
Fixed.

Thanks to all of the above.

Also fixed an issue with the download manager (hopefully) which was only providing v1.3 (then 2 updates behind - now 3).

  • v1.6 is now available which, in addition to the above, makes a few tweaks to weapon availability.
    • Easier to find hardened missiles for sale (just one system in galaxy 1 was a bit harsh for an expendable item)
    • Slightly less restriction re beam lasers and targeting scanners
Post Reply