mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
/***** INCLUDES ********************************************************/
|
|
include library.prose;
|
|
include library.factions;
|
|
include library.battlefield;
|
|
include library.utils;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
const string VAR_FACTION = "faction_recruiter.faction";
|
|
const string VAR_DECLARED = "faction_recruiter.declared";
|
|
|
|
const string_id SID_MUST_BE_DECLARED = new string_id("faction_recruiter", "must_be_declared");
|
|
const string_id SID_MUST_BE_FACTION_MEMBER = new string_id("faction_recruiter", "must_be_faction_member");
|
|
const string_id SID_MUST_BE_DECLARED_USE = new string_id("faction_recruiter", "must_be_declared_use");
|
|
const string_id SID_MUST_BE_FACTION_MEMBER_USE = new string_id("faction_recruiter", "must_be_faction_member_use");
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnAboutToBeTransferred(obj_id destContainer, obj_id transferer)
|
|
{
|
|
// LOG("LOG_CHANNEL", "transferer ->" + transferer + " destContainer ->" + destContainer);
|
|
|
|
obj_id appearanceInventory = getAppearanceInventory(transferer);
|
|
boolean appearanceInventoryEquip = (isIdValid(appearanceInventory) && destContainer == appearanceInventory);
|
|
|
|
if (destContainer == transferer || appearanceInventoryEquip)
|
|
{
|
|
if (!utils.hasSpecialSkills(transferer))
|
|
{
|
|
string_id specialItem = new string_id ("error_message", "mandalorian_armor_restriction");
|
|
sendSystemMessage (transferer, specialItem);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|