Felinids fit in duffelbags. (#515)
* - add: Felinids fit in duffelbags. * - add: This is better. * - add: Move to shared.
This commit is contained in:
@@ -207,9 +207,9 @@ public sealed class CarryingSystem : EntitySystem
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void StartCarryDoAfter(EntityUid carrier, EntityUid carried, CarriableComponent component)
|
||||
public void StartCarryDoAfter(EntityUid carrier, EntityUid carried, CarriableComponent component)
|
||||
{
|
||||
var length = TimeSpan.FromSeconds(6); // т.к. удалили систему разницы масс увеличу время с 3 до 6
|
||||
var length = component.DoAfterLength; // т.к. удалили систему разницы масс увеличу время с 3 до 6
|
||||
if (length >= TimeSpan.FromSeconds(9))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carry-too-heavy"), carried, carrier,
|
||||
@@ -230,7 +230,11 @@ public sealed class CarryingSystem : EntitySystem
|
||||
NeedHand = true
|
||||
};
|
||||
|
||||
_doAfterSystem.TryStartDoAfter(args);
|
||||
if(_doAfterSystem.TryStartDoAfter(args))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("carry-start", ("carrier", carrier)), carried, carried,
|
||||
Shared.Popups.PopupType.SmallCaution);
|
||||
}
|
||||
}
|
||||
|
||||
private void Carry(EntityUid carrier, EntityUid carried)
|
||||
@@ -260,17 +264,22 @@ public sealed class CarryingSystem : EntitySystem
|
||||
_actionBlockerSystem.UpdateCanMove(carried);
|
||||
}
|
||||
|
||||
public void DropCarried(EntityUid carrier, EntityUid carried)
|
||||
public void DropCarried(EntityUid carrier,
|
||||
EntityUid carried,
|
||||
bool attachToGridOrMap = true,
|
||||
bool removeCanEscape = true)
|
||||
{
|
||||
RemComp<CarryingComponent>(carrier); // get rid of this first so we don't recusrively fire that event
|
||||
RemComp<CarryingSlowdownComponent>(carrier);
|
||||
RemComp<BeingCarriedComponent>(carried);
|
||||
RemComp<KnockedDownComponent>(carried);
|
||||
RemComp<CanEscapeInventoryComponent>(carried);
|
||||
if (removeCanEscape)
|
||||
RemComp<CanEscapeInventoryComponent>(carried);
|
||||
|
||||
_actionBlockerSystem.UpdateCanMove(carried);
|
||||
_virtualItemSystem.DeleteInHandsMatching(carrier, carried);
|
||||
_transform.AttachToGridOrMap(carried);
|
||||
if (attachToGridOrMap)
|
||||
_transform.AttachToGridOrMap(carried);
|
||||
_movementSpeed.RefreshMovementSpeedModifiers(carrier);
|
||||
}
|
||||
|
||||
@@ -302,4 +311,4 @@ public sealed class CarryingSystem : EntitySystem
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user