• 0
TroyT

Add classnames to "Mount" & "Install" user action menu

Question

Where might I find the array of supply crates that have the "Mount" and "Install" user actions assigned?  I'd like to add others, such as "C_IDAP_supplyCrate_F" to the array (assuming that is indeed an array.

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

In "ExileServer_object_supplyBox_network_installSupplyBoxRequest", 

Spoiler

/**
 * ExileServer_object_supplyBox_network_installSupplyBoxRequest
 *
 * Exile Mod
 * exile.majormittens.co.uk
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_sessionId", "_parameters", "_boxNetId", "_box", "_territory", "_playerObject", "_sessionID", "_access", "_containerID"];
_sessionId = _this select 0;
_parameters = _this select 1;
_boxNetId = _parameters select 0;
try
{
	_box = objectFromNetId _boxNetId;
	if (isNull _box) then 
	{
		throw "Box null";
	};
	if !((typeOf _box) isEqualTo "Exile_Container_SupplyBox") then 
	{
		throw "Fuck off";
	};
	if!((_box getVariable ["ExileDatabaseID", -1]) isEqualTo -1)then
	{
		throw "Container already installed.";
	};
	_territory = _box call ExileClient_util_world_getTerritoryAtPosition;
	if (isNull _territory) then
	{
		throw "Only allowed to install in a territory.";
	};
	_playerObject = _sessionID call ExileServer_system_session_getPlayerObject;
	_access = [_territory,getPlayerUID _playerObject] call ExileClient_util_territory_getAccessLevel;
	if (_access select 0 isEqualTo 0) then 
	{
		throw "Not allowed to install in this territory.";
	};
	_box setVariable ["ExileOwnerUID", getPlayerUID _playerObject,true];
	_containerID = _box call ExileServer_object_container_database_insert;
	[_sessionID, "toastRequest", ["SuccessTitleOnly", ["Supply box installed!"]]] call ExileServer_system_network_send_to;
}
catch
{
	[_sessionID, "toastRequest", ["ErrorTitleAndText", ["Failed to install!", _exception]]] call ExileServer_system_network_send_to;
};
true

 

 

Line 23
 

	if !((typeOf _box) isEqualTo "Exile_Container_SupplyBox") then 

So I assume that I can create a variable such as 

 

_boxType = ["C_IDAP_supplyCrate_F", "B_supplyCrate_F", "IG_supplyCrate_F", "C_supplyCrate_F", "C_T_supplyCrate_F", "O_supplyCrate_F", "I_supplyCrate_F", "Exile_Container_SupplyBox", "Exile_Construction_SupplyBox"];

But I don't know how to access the array.

Share this post


Link to post
Share on other sites
  • 0

Just comment out
 

if !((typeOf _box) isEqualTo "Exile_Container_SupplyBox") then 
	{
		throw "Fuck off";
	};

So it's like this

7xy0wtH.jpg

Edited by MGTDB
  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.