--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| 	Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]

FACTION.name = "Ministère de L'économie"
FACTION.description = "A representative of the Union's paramilitary.."
FACTION.color = Color(207, 182, 42)
FACTION.isDefault = false

-- Char Create Stuff
FACTION.noBackground = true
FACTION.factionImage = "materials/willardnetworks/faction_imgs/cityadmin.png"
FACTION.selectImage = "materials/willardnetworks/charselect/citizen2.png"
FACTION.inventoryImage = "materials/willardnetworks/tabmenu/inventory/backgrounds/office.png"

-- Scoreboard stuff
FACTION.isGloballyRecognized = false
FACTION.separateUnknownTab = true

-- Gameplay stuff
FACTION.humanVoices = true

FACTION.allowForcefieldPassage = true
FACTION.allowCIDCreator = true
FACTION.allowDatafile = true
FACTION.allowComputerLoginOverride = true
FACTION.allowUseGroupLock = true
FACTION.allowEnableRations = true
FACTION.allowCombineDoors = true
FACTION.allowCombineLock = true
FACTION.canHearRequests = true
FACTION.noSmuggler = true
FACTION.isCombineFaction = false

FACTION.canSeeWaypoints = true
FACTION.canAddWaypoints = true

FACTION.allowKickDoor = true

FACTION.idInspectionText = "Ministère de L'économie"

-- Tables
FACTION.models = {
	female = {
	"models/willardnetworks/citizens/female_01.mdl",
	"models/willardnetworks/citizens/female_02.mdl",
	"models/willardnetworks/citizens/female_03.mdl",
	"models/willardnetworks/citizens/female_04.mdl",
	"models/willardnetworks/citizens/female_06.mdl",
	"models/willardnetworks/citizens/female_05.mdl"
	};
	male = {
		"models/willardnetworks/citizens/male_01.mdl",
		"models/willardnetworks/citizens/male_02.mdl",
		"models/willardnetworks/citizens/male_03.mdl",
		"models/willardnetworks/citizens/male_04.mdl",
		"models/willardnetworks/citizens/male_05.mdl",
		"models/willardnetworks/citizens/male_06.mdl",
		"models/willardnetworks/citizens/male_07.mdl",
		"models/willardnetworks/citizens/male_08.mdl",
		"models/willardnetworks/citizens/male_09.mdl",
		"models/willardnetworks/citizens/male_10.mdl"
	};
};

FACTION.npcRelations = {
	["npc_combine_camera"] = D_LI,
	["npc_turret_ceiling"] = D_LI,
	["npc_cscanner"] = D_LI,
	["npc_manhack"] = D_LI,
	["npc_rollermine"] = D_LI,
	["npc_clawscanner"] = D_LI,
	["npc_turret_floor"] = D_LI,
	["npc_metropolice"] = D_LI,
	["npc_combinedropship"] = D_LI,
	["CombineElite"] = D_LI,
	["npc_combinegunship"] = D_LI,
	["npc_combine_s"] = D_LI,
	["npc_hunter"] = D_LI,
	["npc_helicopter"] = D_LI,
	["CombinePrison"] = D_LI,
	["PrisonShotgunner"] = D_LI,
	["ShotgunSoldier"] = D_LI,
	["npc_stalker"] = D_LI,
	["npc_strider"] = D_LI,
}

FACTION.radioChannels = {"haa", "ucmr", "utc",}

-- Functions
function FACTION:OnCharacterCreated(client, character)
	character:CreateIDCard()

	-- Give clothing chosen upon char creation
	local inventory = character:GetInventory()
	inventory:Add("pda", 1)

	-- Give clothing chosen upon char creation
	local chosenClothes = character:GetData("chosenClothes")
	if (istable(chosenClothes) and !table.IsEmpty(chosenClothes)) then
		if chosenClothes.torso then
			inventory:Add(chosenClothes.torso, 1)
		end

		if chosenClothes.legs then
			inventory:Add(chosenClothes.legs, 1)
		end

		if chosenClothes.shoes then
			inventory:Add(chosenClothes.shoes, 1)
		end

		if chosenClothes["8"] then
			inventory:Add("glasses", 1)
		end

		character:SetData("equipBgClothes", true)
	end

	character:SetData("chosenClothes", nil)
end

function FACTION:OnTransferred(character)
	local genericData = character:GetGenericdata()
	genericData.combine = true
	character:SetGenericdata(genericData)
end

FACTION_ME = FACTION.index
