Quests, new sounds, explosives, bugfixes, asdfasdf
This commit is contained in:
@@ -4,12 +4,12 @@ using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Subsurface.Items.Components
|
||||
{
|
||||
class Holdable : ItemComponent
|
||||
class Holdable : Pickable
|
||||
{
|
||||
//the position(s) in the item that the character grabs
|
||||
protected Vector2[] handlePos;
|
||||
|
||||
protected Character picker;
|
||||
//protected Character picker;
|
||||
|
||||
//the distance from the holding characters elbow to center of the physics body of the item
|
||||
protected Vector2 holdPos;
|
||||
@@ -154,6 +154,8 @@ namespace Subsurface.Items.Components
|
||||
|
||||
public override bool Pick(Character picker)
|
||||
{
|
||||
if (!base.Pick(picker)) return false;
|
||||
|
||||
if (!attachable) return false;
|
||||
|
||||
//if (item.body==null)
|
||||
|
||||
@@ -37,10 +37,6 @@ namespace Subsurface.Items.Components
|
||||
if (picker == null) return false;
|
||||
if (picker.Inventory == null) return false;
|
||||
|
||||
//this.picker = picker;
|
||||
|
||||
|
||||
|
||||
if (picker.Inventory.TryPutItem(item, allowedSlots))
|
||||
{
|
||||
if (!picker.HasSelectedItem(item) && item.body!=null) item.body.Enabled = false;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace Subsurface.Items.Components
|
||||
foreach (StatusEffect effect in statusEffects)
|
||||
{
|
||||
//if (Array.IndexOf(effect.TargetNames, targetItem.Name) == -1) continue;
|
||||
effect.Apply(ActionType.OnUse, deltaTime, item.SimPosition, targetItem.AllPropertyObjects);
|
||||
effect.Apply(ActionType.OnUse, deltaTime, item, targetItem.AllPropertyObjects);
|
||||
//targetItem.ApplyStatusEffect(effect, ActionType.OnUse, deltaTime);
|
||||
}
|
||||
//ApplyStatusEffects(ActionType.OnUse, 1.0f, null, targ);
|
||||
@@ -182,7 +182,7 @@ namespace Subsurface.Items.Components
|
||||
(float)Math.Cos(item.body.Rotation),
|
||||
(float)Math.Sin(item.body.Rotation)) *item.body.Dir * 5.0f;
|
||||
|
||||
Game1.particleManager.CreateParticle("weld", TransformedBarrelPos, particleSpeed);
|
||||
Game1.ParticleManager.CreateParticle("weld", TransformedBarrelPos, particleSpeed);
|
||||
|
||||
//Vector2 startPos = ConvertUnits.ToDisplayUnits(item.body.Position);
|
||||
//Vector2 endPos = ConvertUnits.ToDisplayUnits(pickedPosition);
|
||||
|
||||
Reference in New Issue
Block a user