class STZ_Sword_Mod extends GameMod
	config(Mods);

event OnModLoaded()
{
	HookActorSpawn(class'Hat_Player', 'Hat_Player');
	GiveItem(true);
}

event OnHookedActorSpawn(Object NewActor, Name Identifier)
{
	if (Identifier == 'Hat_Player') GiveItem(true);
}

function GiveItem(bool b)
{
	if (b)
		Hat_PlayerController(GetALocalPlayerController()).GetLoadout().AddBackpack(class'Hat_Loadout'.static.MakeLoadoutItem(class'Hat_Weapon_STSword'), true);
	else
		Hat_PlayerController(GetALocalPlayerController()).GetLoadout().RemoveBackpack(class'Hat_Loadout'.static.MakeLoadoutItem(class'Hat_Weapon_STSword'));
}

event OnModUnloaded()
{
	GiveItem(false);
}