(e42047dc1) Tester's build, January 30th 2020
This commit is contained in:
@@ -199,7 +199,7 @@ namespace Barotrauma
|
||||
#if CLIENT
|
||||
for (int j = 0; j < capacity; j++)
|
||||
{
|
||||
if (slots != null && Items[j] == Items[i]) slots[j].ShowBorderHighlight(Color.Red, 0.1f, 0.9f);
|
||||
if (slots != null && Items[j] == Items[i]) slots[j].ShowBorderHighlight(GUI.Style.Red, 0.1f, 0.9f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace Barotrauma.Items.Components
|
||||
#if CLIENT
|
||||
else if (hasRequiredItems && character != null && character == Character.Controlled)
|
||||
{
|
||||
GUI.AddMessage(accessDeniedTxt, Color.Red);
|
||||
GUI.AddMessage(accessDeniedTxt, GUI.Style.Red);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Barotrauma.Items.Components
|
||||
this,
|
||||
item.WorldPosition,
|
||||
pickTimer / requiredTime,
|
||||
Color.Red, Color.Green);
|
||||
GUI.Style.Red, GUI.Style.Green);
|
||||
#endif
|
||||
|
||||
picker.AnimController.UpdateUseItem(true, item.WorldPosition + new Vector2(0.0f, 100.0f) * ((pickTimer / 10.0f) % 0.1f));
|
||||
|
||||
@@ -462,7 +462,7 @@ namespace Barotrauma.Items.Components
|
||||
this,
|
||||
targetItem.WorldPosition,
|
||||
levelResource.DeattachTimer / levelResource.DeattachDuration,
|
||||
Color.Red, Color.Green);
|
||||
GUI.Style.Red, GUI.Style.Green);
|
||||
#endif
|
||||
}
|
||||
FixItemProjSpecific(user, deltaTime, targetItem);
|
||||
|
||||
@@ -504,11 +504,12 @@ namespace Barotrauma.Items.Components
|
||||
loopingSoundChannel = null;
|
||||
}
|
||||
|
||||
foreach (SoundChannel channel in playingOneshotSoundChannels)
|
||||
//no need to Dispose these - SoundManager will do it when it when it needs a free channel and the sound has stopped playing
|
||||
//disposing immediately on Remove will for example prevent explosives from playing a sound if the explosion removes the item
|
||||
/*foreach (SoundChannel channel in playingOneshotSoundChannels)
|
||||
{
|
||||
channel.Dispose();
|
||||
loopingSoundChannel = null;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (GuiFrame != null) { GUI.RemoveFromUpdateList(GuiFrame, true); }
|
||||
#endif
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
currPowerConsumption = Math.Abs(targetForce) / 100.0f * powerConsumption;
|
||||
//pumps consume more power when in a bad condition
|
||||
currPowerConsumption *= MathHelper.Lerp(2.0f, 1.0f, item.Condition / item.MaxCondition);
|
||||
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
|
||||
|
||||
if (powerConsumption == 0.0f) { Voltage = 1.0f; }
|
||||
|
||||
@@ -95,7 +95,8 @@ namespace Barotrauma.Items.Components
|
||||
Force = MathHelper.Lerp(force, (Voltage < MinVoltage) ? 0.0f : targetForce, 0.1f);
|
||||
if (Math.Abs(Force) > 1.0f)
|
||||
{
|
||||
Vector2 currForce = new Vector2((force / 10.0f) * maxForce * Math.Min(Voltage / MinVoltage, 1.0f), 0.0f);
|
||||
float voltageFactor = MinVoltage <= 0.0f ? 1.0f : Math.Min(Voltage / MinVoltage, 1.0f);
|
||||
Vector2 currForce = new Vector2((force / 10.0f) * maxForce * voltageFactor, 0.0f);
|
||||
//less effective when in a bad condition
|
||||
currForce *= MathHelper.Lerp(0.5f, 2.0f, item.Condition / item.MaxCondition);
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Barotrauma.Items.Components
|
||||
outputContainer.Inventory.Locked = true;
|
||||
|
||||
currPowerConsumption = powerConsumption;
|
||||
currPowerConsumption *= MathHelper.Lerp(2.0f, 1.0f, item.Condition / item.MaxCondition);
|
||||
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
|
||||
}
|
||||
|
||||
private void CancelFabricating(Character user = null)
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
currPowerConsumption = powerConsumption;
|
||||
currPowerConsumption *= MathHelper.Lerp(2.0f, 1.0f, item.Condition / item.MaxCondition);
|
||||
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
|
||||
|
||||
hasPower = Voltage > MinVoltage;
|
||||
if (hasPower)
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ namespace Barotrauma.Items.Components
|
||||
CurrFlow = 0.0f;
|
||||
currPowerConsumption = powerConsumption;
|
||||
//consume more power when in a bad condition
|
||||
currPowerConsumption *= MathHelper.Lerp(2.0f, 1.0f, item.Condition / item.MaxCondition);
|
||||
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
|
||||
|
||||
if (powerConsumption <= 0.0f)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace Barotrauma.Items.Components
|
||||
private float? targetLevel;
|
||||
|
||||
private float pumpSpeedLockTimer, isActiveLockTimer;
|
||||
|
||||
private bool hasPower;
|
||||
|
||||
[Serialize(0.0f, true, description: "How fast the item is currently pumping water (-100 = full speed out, 100 = full speed in). Intended to be used by StatusEffect conditionals (setting this value in XML has no effect).")]
|
||||
public float FlowPercentage
|
||||
@@ -23,7 +21,7 @@ namespace Barotrauma.Items.Components
|
||||
get { return flowPercentage; }
|
||||
set
|
||||
{
|
||||
if (!MathUtils.IsValid(flowPercentage)) return;
|
||||
if (!MathUtils.IsValid(flowPercentage)) { return; }
|
||||
flowPercentage = MathHelper.Clamp(value, -100.0f, 100.0f);
|
||||
flowPercentage = MathUtils.Round(flowPercentage, 1.0f);
|
||||
}
|
||||
@@ -41,11 +39,26 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsActive) return 0.0f;
|
||||
if (!IsActive) { return 0.0f; }
|
||||
return Math.Abs(currFlow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override bool IsActive
|
||||
{
|
||||
get => base.IsActive;
|
||||
set
|
||||
{
|
||||
base.IsActive = value;
|
||||
if (!IsActive)
|
||||
{
|
||||
powerConsumption = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasPower => IsActive && Voltage >= MinVoltage;
|
||||
|
||||
public Pump(Item item, XElement element)
|
||||
: base(item, element)
|
||||
{
|
||||
@@ -57,7 +70,6 @@ namespace Barotrauma.Items.Components
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
currFlow = 0.0f;
|
||||
hasPower = false;
|
||||
|
||||
if (targetLevel != null)
|
||||
{
|
||||
@@ -74,14 +86,12 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
currPowerConsumption = powerConsumption * Math.Abs(flowPercentage / 100.0f);
|
||||
//pumps consume more power when in a bad condition
|
||||
currPowerConsumption *= MathHelper.Lerp(2.0f, 1.0f, item.Condition / item.MaxCondition);
|
||||
currPowerConsumption *= MathHelper.Lerp(1.5f, 1.0f, item.Condition / item.MaxCondition);
|
||||
|
||||
if (Voltage < MinVoltage) { return; }
|
||||
if (!HasPower) { return; }
|
||||
|
||||
UpdateProjSpecific(deltaTime);
|
||||
|
||||
hasPower = true;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (item.CurrentHull == null) { return; }
|
||||
@@ -102,8 +112,8 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (connection.Name == "toggle")
|
||||
{
|
||||
isActiveLockTimer = 0.1f;
|
||||
IsActive = !IsActive;
|
||||
isActiveLockTimer = 0.1f;
|
||||
}
|
||||
else if (connection.Name == "set_active")
|
||||
{
|
||||
@@ -126,21 +136,23 @@ namespace Barotrauma.Items.Components
|
||||
pumpSpeedLockTimer = 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
if (!IsActive) currPowerConsumption = 0.0f;
|
||||
}
|
||||
|
||||
public override bool AIOperate(float deltaTime, Character character, AIObjectiveOperateItem objective)
|
||||
{
|
||||
#if CLIENT
|
||||
if (GameMain.Client != null) return false;
|
||||
if (GameMain.Client != null) { return false; }
|
||||
#endif
|
||||
|
||||
if (objective.Option.ToLowerInvariant() == "stoppumping")
|
||||
{
|
||||
#if SERVER
|
||||
if (FlowPercentage > 0.0f) item.CreateServerEvent(this);
|
||||
if (FlowPercentage > 0.0f)
|
||||
{
|
||||
item.CreateServerEvent(this);
|
||||
}
|
||||
#endif
|
||||
IsActive = false;
|
||||
FlowPercentage = 0.0f;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,19 @@ namespace Barotrauma.Items.Components
|
||||
private Vector2 optimalFissionRate, allowedFissionRate;
|
||||
private Vector2 optimalTurbineOutput, allowedTurbineOutput;
|
||||
|
||||
private bool shutDown;
|
||||
private bool _powerOn;
|
||||
|
||||
public bool PowerOn
|
||||
{
|
||||
get { return _powerOn; }
|
||||
set
|
||||
{
|
||||
_powerOn = value;
|
||||
#if CLIENT
|
||||
UpdateUIElementStates();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private Character lastAIUser;
|
||||
|
||||
@@ -152,12 +164,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
autoTemp = value;
|
||||
#if CLIENT
|
||||
if (autoTempSlider != null)
|
||||
{
|
||||
autoTempSlider.BarScroll = value ?
|
||||
Math.Min(0.45f, autoTempSlider.BarScroll) :
|
||||
Math.Max(0.55f, autoTempSlider.BarScroll);
|
||||
}
|
||||
UpdateUIElementStates();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -257,7 +264,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
currPowerConsumption += autoAdjustAmount;
|
||||
|
||||
if (shutDown)
|
||||
if (!PowerOn)
|
||||
{
|
||||
targetFissionRate = 0.0f;
|
||||
targetTurbineOutput = 0.0f;
|
||||
@@ -472,8 +479,8 @@ namespace Barotrauma.Items.Components
|
||||
targetFissionRate = Math.Max(targetFissionRate - deltaTime * 10.0f, 0.0f);
|
||||
targetTurbineOutput = Math.Max(targetTurbineOutput - deltaTime * 10.0f, 0.0f);
|
||||
#if CLIENT
|
||||
fissionRateScrollBar.BarScroll = 1.0f - FissionRate / 100.0f;
|
||||
turbineOutputScrollBar.BarScroll = 1.0f - TurbineOutput / 100.0f;
|
||||
FissionRateScrollBar.BarScroll = 1.0f - FissionRate / 100.0f;
|
||||
TurbineOutputScrollBar.BarScroll = 1.0f - TurbineOutput / 100.0f;
|
||||
UpdateGraph(deltaTime);
|
||||
#endif
|
||||
}
|
||||
@@ -582,14 +589,14 @@ namespace Barotrauma.Items.Components
|
||||
LastUser = lastAIUser = character;
|
||||
|
||||
bool prevAutoTemp = autoTemp;
|
||||
bool prevShutDown = shutDown;
|
||||
bool prevPowerOn = _powerOn;
|
||||
float prevFissionRate = targetFissionRate;
|
||||
float prevTurbineOutput = targetTurbineOutput;
|
||||
|
||||
switch (objective.Option.ToLowerInvariant())
|
||||
{
|
||||
case "powerup":
|
||||
shutDown = false;
|
||||
PowerOn = true;
|
||||
if (objective.Override || !autoTemp)
|
||||
{
|
||||
//characters with insufficient skill levels simply set the autotemp on instead of trying to adjust the temperature manually
|
||||
@@ -604,24 +611,20 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
#if CLIENT
|
||||
onOffSwitch.BarScroll = 0.0f;
|
||||
fissionRateScrollBar.BarScroll = FissionRate / 100.0f;
|
||||
turbineOutputScrollBar.BarScroll = TurbineOutput / 100.0f;
|
||||
FissionRateScrollBar.BarScroll = FissionRate / 100.0f;
|
||||
TurbineOutputScrollBar.BarScroll = TurbineOutput / 100.0f;
|
||||
#endif
|
||||
break;
|
||||
case "shutdown":
|
||||
#if CLIENT
|
||||
onOffSwitch.BarScroll = 1.0f;
|
||||
#endif
|
||||
PowerOn = false;
|
||||
AutoTemp = false;
|
||||
shutDown = true;
|
||||
targetFissionRate = 0.0f;
|
||||
targetTurbineOutput = 0.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
if (autoTemp != prevAutoTemp ||
|
||||
prevShutDown != shutDown ||
|
||||
prevPowerOn != _powerOn ||
|
||||
Math.Abs(prevFissionRate - targetFissionRate) > 1.0f ||
|
||||
Math.Abs(prevTurbineOutput - targetTurbineOutput) > 1.0f)
|
||||
{
|
||||
@@ -640,14 +643,11 @@ namespace Barotrauma.Items.Components
|
||||
case "shutdown":
|
||||
if (targetFissionRate > 0.0f || targetTurbineOutput > 0.0f)
|
||||
{
|
||||
shutDown = true;
|
||||
PowerOn = false;
|
||||
AutoTemp = false;
|
||||
targetFissionRate = 0.0f;
|
||||
targetTurbineOutput = 0.0f;
|
||||
unsentChanges = true;
|
||||
#if CLIENT
|
||||
onOffSwitch.BarScroll = 1.0f;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -116,8 +116,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
#if CLIENT
|
||||
if (activeTickBox != null) activeTickBox.Selected = value == Mode.Active;
|
||||
if (passiveTickBox != null) passiveTickBox.Selected = value == Mode.Passive;
|
||||
UpdateGUIElements();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -126,10 +125,9 @@ namespace Barotrauma.Items.Components
|
||||
: base(item, element)
|
||||
{
|
||||
connectedTransducers = new List<ConnectedTransducer>();
|
||||
|
||||
CurrentMode = Mode.Passive;
|
||||
IsActive = true;
|
||||
InitProjSpecific(element);
|
||||
CurrentMode = Mode.Passive;
|
||||
}
|
||||
|
||||
partial void InitProjSpecific(XElement element);
|
||||
@@ -344,14 +342,10 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.CanClientAccess(c)) return;
|
||||
if (!item.CanClientAccess(c)) { return; }
|
||||
|
||||
CurrentMode = isActive ? Mode.Active : Mode.Passive;
|
||||
|
||||
//TODO: cleanup
|
||||
#if CLIENT
|
||||
activeTickBox.Selected = currentMode == Mode.Active;
|
||||
#endif
|
||||
if (isActive)
|
||||
{
|
||||
zoom = MathHelper.Lerp(MinZoom, MaxZoom, zoomT);
|
||||
@@ -363,8 +357,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
#if CLIENT
|
||||
zoomSlider.BarScroll = zoomT;
|
||||
directionalTickBox.Selected = useDirectionalPing;
|
||||
directionalSlider.BarScroll = pingDirectionT;
|
||||
directionalModeSwitch.Selected = useDirectionalPing;
|
||||
#endif
|
||||
}
|
||||
#if SERVER
|
||||
|
||||
@@ -58,19 +58,24 @@ namespace Barotrauma.Items.Components
|
||||
get { return autoPilot; }
|
||||
set
|
||||
{
|
||||
if (value == autoPilot) return;
|
||||
if (value == autoPilot) { return; }
|
||||
autoPilot = value;
|
||||
#if CLIENT
|
||||
autopilotTickBox.Selected = autoPilot;
|
||||
manualTickBox.Selected = !autoPilot;
|
||||
maintainPosTickBox.Enabled = autoPilot;
|
||||
levelEndTickBox.Enabled = autoPilot;
|
||||
levelStartTickBox.Enabled = autoPilot;
|
||||
UpdateGUIElements();
|
||||
#endif
|
||||
if (autoPilot)
|
||||
{
|
||||
if (pathFinder == null) pathFinder = new PathFinder(WayPoint.WayPointList, false);
|
||||
if (pathFinder == null)
|
||||
{
|
||||
pathFinder = new PathFinder(WayPoint.WayPointList, false);
|
||||
}
|
||||
MaintainPos = true;
|
||||
if (posToMaintain == null)
|
||||
{
|
||||
posToMaintain = controlledSub != null ?
|
||||
controlledSub.WorldPosition :
|
||||
item.Submarine == null ? item.WorldPosition : item.Submarine.WorldPosition;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -272,7 +277,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (autoPilot)
|
||||
if (AutoPilot)
|
||||
{
|
||||
UpdateAutoPilot(deltaTime);
|
||||
float userSkill = 0.0f;
|
||||
@@ -317,7 +322,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private void UpdateAutoPilot(float deltaTime)
|
||||
{
|
||||
if (controlledSub == null) return;
|
||||
if (controlledSub == null) { return; }
|
||||
if (posToMaintain != null)
|
||||
{
|
||||
Vector2 steeringVel = GetSteeringVelocity((Vector2)posToMaintain, 10.0f);
|
||||
|
||||
@@ -577,6 +577,8 @@ namespace Barotrauma.Items.Components
|
||||
railSprite?.Remove(); railSprite = null;
|
||||
|
||||
#if CLIENT
|
||||
crosshairSprite?.Remove(); crosshairSprite = null;
|
||||
crosshairPointerSprite?.Remove(); crosshairPointerSprite = null;
|
||||
moveSoundChannel?.Dispose(); moveSoundChannel = null;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -37,13 +37,17 @@ namespace Barotrauma
|
||||
#if CLIENT
|
||||
this.slotsPerRow = slotsPerRow;
|
||||
|
||||
if (slotSpriteSmall == null)
|
||||
if (SlotSpriteSmall == null)
|
||||
{
|
||||
//TODO: define these in xml
|
||||
slotSpriteSmall = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(532, 395, 75, 71), null, 0);
|
||||
SlotSpriteSmall = new Sprite("Content/UI/InventoryUIAtlas.png", new Rectangle(0, 0, 128, 128), null, 0);
|
||||
// Adjustment to match the old size of 75,71
|
||||
SlotSpriteSmall.size = new Vector2(SlotSpriteSmall.SourceRect.Width * 0.5859375f, SlotSpriteSmall.SourceRect.Height * 0.5546875f);
|
||||
|
||||
slotSpriteVertical = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(672, 218, 75, 144), null, 0);
|
||||
slotSpriteHorizontal = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(476, 186, 160, 75), null, 0);
|
||||
slotSpriteRound = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(681, 373, 58, 64), null, 0);
|
||||
slotHotkeySprite = new Sprite("Content/UI/InventoryUIAtlas.png", new Rectangle(128, 0, 128, 128), null, 0);
|
||||
|
||||
EquipIndicator = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(673, 182, 73, 27), new Vector2(0.5f, 0.5f), 0);
|
||||
EquipIndicatorHighlight = new Sprite("Content/UI/inventoryAtlas.png", new Rectangle(679, 108, 67, 21), new Vector2(0.5f, 0.5f), 0);
|
||||
@@ -154,7 +158,7 @@ namespace Barotrauma
|
||||
else
|
||||
{
|
||||
#if CLIENT
|
||||
if (slots != null && createNetworkEvent) slots[i].ShowBorderHighlight(Color.Red, 0.1f, 0.9f);
|
||||
if (slots != null && createNetworkEvent) slots[i].ShowBorderHighlight(GUI.Style.Red, 0.1f, 0.9f);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
@@ -280,11 +284,11 @@ namespace Barotrauma
|
||||
{
|
||||
for (int j = 0; j < capacity; j++)
|
||||
{
|
||||
if (Items[j] == item) slots[j].ShowBorderHighlight(Color.Green, 0.1f, 0.9f);
|
||||
if (Items[j] == item) slots[j].ShowBorderHighlight(GUI.Style.Green, 0.1f, 0.9f);
|
||||
}
|
||||
for (int j = 0; j < otherInventory.capacity; j++)
|
||||
{
|
||||
if (otherInventory.Items[j] == existingItem) otherInventory.slots[j].ShowBorderHighlight(Color.Green, 0.1f, 0.9f);
|
||||
if (otherInventory.Items[j] == existingItem) otherInventory.slots[j].ShowBorderHighlight(GUI.Style.Green, 0.1f, 0.9f);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -322,7 +326,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (Items[j] == existingItem)
|
||||
{
|
||||
slots[j].ShowBorderHighlight(Color.Red, 0.1f, 0.9f);
|
||||
slots[j].ShowBorderHighlight(GUI.Style.Red, 0.1f, 0.9f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ namespace Barotrauma
|
||||
contained.Container = null;
|
||||
}
|
||||
|
||||
public void SetTransform(Vector2 simPosition, float rotation, bool findNewHull = true)
|
||||
public void SetTransform(Vector2 simPosition, float rotation, bool findNewHull = true, bool setPrevTransform = true)
|
||||
{
|
||||
if (!MathUtils.IsValid(simPosition))
|
||||
{
|
||||
@@ -938,13 +938,13 @@ namespace Barotrauma
|
||||
try
|
||||
{
|
||||
#endif
|
||||
if (body.Enabled)
|
||||
if (body.PhysEnabled)
|
||||
{
|
||||
body.SetTransform(simPosition, rotation);
|
||||
body.SetTransform(simPosition, rotation, setPrevTransform);
|
||||
}
|
||||
else
|
||||
{
|
||||
body.SetTransformIgnoreContacts(simPosition, rotation);
|
||||
body.SetTransformIgnoreContacts(simPosition, rotation, setPrevTransform);
|
||||
}
|
||||
#if DEBUG
|
||||
}
|
||||
@@ -1270,10 +1270,6 @@ namespace Barotrauma
|
||||
HandleCollision(impact);
|
||||
}
|
||||
|
||||
if (!isActive) { return; }
|
||||
|
||||
aiTarget?.Update(deltaTime);
|
||||
|
||||
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsServer)
|
||||
{
|
||||
sendConditionUpdateTimer -= deltaTime;
|
||||
@@ -1283,6 +1279,10 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (!isActive) { return; }
|
||||
|
||||
aiTarget?.Update(deltaTime);
|
||||
|
||||
ApplyStatusEffects(ActionType.Always, deltaTime, character: (parentInventory as CharacterInventory)?.Owner as Character);
|
||||
|
||||
for (int i = 0; i < updateableComponents.Count; i++)
|
||||
@@ -1376,7 +1376,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
if (updateableComponents.Count == 0 && aiTarget == null && !conditionUpdatePending && !hasStatusEffectsOfType[(int)ActionType.Always] && body == null)
|
||||
if (updateableComponents.Count == 0 && aiTarget == null && !hasStatusEffectsOfType[(int)ActionType.Always] && body == null)
|
||||
{
|
||||
#if CLIENT
|
||||
positionBuffer.Clear();
|
||||
@@ -1814,6 +1814,12 @@ namespace Barotrauma
|
||||
else if (selected)
|
||||
{
|
||||
picker.SelectedConstruction = this;
|
||||
#if CLIENT
|
||||
if (GameMain.GameSession?.CrewManager != null && picker == Character.Controlled && GetComponent<Ladder>() == null)
|
||||
{
|
||||
GameMain.GameSession.CrewManager.ToggleCrewListOpen = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1823,7 +1829,7 @@ namespace Barotrauma
|
||||
if (requiredSkill != null)
|
||||
{
|
||||
GUI.AddMessage(TextManager.GetWithVariables("InsufficientSkills", new string[2] { "[requiredskill]", "[requiredlevel]" },
|
||||
new string[2] { TextManager.Get("SkillName." + requiredSkill.Identifier), ((int)requiredSkill.Level).ToString() }, new bool[2] { true, false }), Color.Red);
|
||||
new string[2] { TextManager.Get("SkillName." + requiredSkill.Identifier), ((int)requiredSkill.Level).ToString() }, new bool[2] { true, false }), GUI.Style.Red);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user