A* pathfinding, autopilot, WIP radar rendering, proper location names, character skills shown in menus, got rid of PreviewCharacter, mantis

This commit is contained in:
Regalis
2015-07-14 21:09:00 +03:00
parent a2636133ca
commit 44b9a63c94
51 changed files with 1971 additions and 940 deletions
+9 -1
View File
@@ -727,10 +727,13 @@ namespace Subsurface
public bool Pick(Character picker, bool forcePick=false)
{
bool hasRequiredSkills = true;
bool picked = false, selected = false;
foreach (ItemComponent ic in components)
{
if (!ic.HasRequiredSkills(picker)) hasRequiredSkills = false;
if ((ic.CanBePicked || ic.CanBeSelected)
&& (ic.HasRequiredEquippedItems(picker, picker == Character.Controlled) || forcePick)
&& ic.Pick(picker))
@@ -747,6 +750,11 @@ namespace Subsurface
picker.SelectedConstruction = (picker.SelectedConstruction == this) ? null : this;
}
if (!hasRequiredSkills)
{
GUI.AddMessage("Your skills may be insufficient to use the item!", Color.Red, 5.0f);
}
if (container!=null) container.RemoveContained(this);
return true;