Updated server logs so admins can see disguised persons
clientist should also display stuff TODO: Log inventory interactions like putting item in slots (e.g. oxy mask equipped in Head slot or equipped in Any slot, etc.) so you can tell the exact moment someone decided to disguise themselves.
This commit is contained in:
@@ -299,6 +299,8 @@ namespace Barotrauma
|
|||||||
if (info != null)
|
if (info != null)
|
||||||
{
|
{
|
||||||
string name = Info.DisplayName;
|
string name = Info.DisplayName;
|
||||||
|
if (controlled == null && name != Info.Name)
|
||||||
|
name += " (Disguised)";
|
||||||
Vector2 namePos = new Vector2(pos.X, pos.Y - 110.0f - (5.0f / cam.Zoom)) - GUI.Font.MeasureString(name) * 0.5f / cam.Zoom;
|
Vector2 namePos = new Vector2(pos.X, pos.Y - 110.0f - (5.0f / cam.Zoom)) - GUI.Font.MeasureString(name) * 0.5f / cam.Zoom;
|
||||||
Color nameColor = Color.White;
|
Color nameColor = Color.White;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(Character.Controlled + (IsActive ? " turned on " : " turned off ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(Character.Controlled.LogName + (IsActive ? " turned on " : " turned off ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (GameMain.Client != null)
|
else if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(Character.Controlled + " set the pumping speed of " + item.Name + " to " + (int)(flowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(Character.Controlled.LogName + " set the pumping speed of " + item.Name + " to " + (int)(flowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (GameMain.Client != null)
|
else if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
@@ -58,7 +58,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(Character.Controlled + " set the pumping speed of " + item.Name + " to " + (int)(flowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(Character.Controlled.LogName + " set the pumping speed of " + item.Name + " to " + (int)(flowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (GameMain.Client != null)
|
else if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(Character.Controlled + " set the recharge speed of " + item.Name + " to " + (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(Character.Controlled.LogName + " set the recharge speed of " + item.Name + " to " + (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (GameMain.Client != null)
|
else if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(Character.Controlled + " set the recharge speed of " + item.Name + " to " + (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(Character.Controlled.LogName + " set the recharge speed of " + item.Name + " to " + (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (GameMain.Client != null)
|
else if (GameMain.Client != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ namespace Barotrauma.Items.Components
|
|||||||
var otherConnection = draggingConnected.OtherConnection(this);
|
var otherConnection = draggingConnected.OtherConnection(this);
|
||||||
if (otherConnection == null)
|
if (otherConnection == null)
|
||||||
{
|
{
|
||||||
GameServer.Log(Character.Controlled + " connected a wire to " +
|
GameServer.Log(Character.Controlled.LogName + " connected a wire to " +
|
||||||
Item.Name + " (" + Name + ")", ServerLog.MessageType.ItemInteraction);
|
Item.Name + " (" + Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameServer.Log(Character.Controlled + " connected a wire from " +
|
GameServer.Log(Character.Controlled.LogName + " connected a wire from " +
|
||||||
Item.Name + " (" + Name + ") to " + otherConnection.item.Name + " (" + otherConnection.Name + ")", ServerLog.MessageType.ItemInteraction);
|
Item.Name + " (" + Name + ") to " + otherConnection.item.Name + " (" + otherConnection.Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,6 +138,14 @@ namespace Barotrauma
|
|||||||
return info != null && !string.IsNullOrWhiteSpace(info.Name) ? info.Name : SpeciesName;
|
return info != null && !string.IsNullOrWhiteSpace(info.Name) ? info.Name : SpeciesName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Only used by server logs to determine "true identity" of the player for cases when they're disguised
|
||||||
|
public string LogName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return info != null && !string.IsNullOrWhiteSpace(info.Name) ? info.Name + (info.DisplayName != info.Name ? " (as " + info.DisplayName + ")" : "") : SpeciesName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private float hideFaceTimer;
|
private float hideFaceTimer;
|
||||||
public bool HideFace
|
public bool HideFace
|
||||||
@@ -1646,7 +1654,7 @@ namespace Barotrauma
|
|||||||
var attackingCharacter = attacker as Character;
|
var attackingCharacter = attacker as Character;
|
||||||
if (attackingCharacter != null && attackingCharacter.AIController == null)
|
if (attackingCharacter != null && attackingCharacter.AIController == null)
|
||||||
{
|
{
|
||||||
GameServer.Log(Name + " attacked by " + attackingCharacter.Name+". Damage: "+attackResult.Damage+" Bleeding damage: "+attackResult.Bleeding, ServerLog.MessageType.Attack);
|
GameServer.Log(LogName + " attacked by " + attackingCharacter.LogName +". Damage: "+attackResult.Damage+" Bleeding damage: "+attackResult.Bleeding, ServerLog.MessageType.Attack);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameMain.Client == null &&
|
if (GameMain.Client == null &&
|
||||||
@@ -1811,7 +1819,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
AnimController.Frozen = false;
|
AnimController.Frozen = false;
|
||||||
|
|
||||||
GameServer.Log(Name+" has died (Cause of death: "+causeOfDeath+")", ServerLog.MessageType.Attack);
|
GameServer.Log(LogName+" has died (Cause of death: "+causeOfDeath+")", ServerLog.MessageType.Attack);
|
||||||
|
|
||||||
if (OnDeath != null) OnDeath(this, causeOfDeath);
|
if (OnDeath != null) OnDeath(this, causeOfDeath);
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Barotrauma
|
|||||||
NewMessage("***************", Color.Cyan);
|
NewMessage("***************", Color.Cyan);
|
||||||
foreach (Client c in GameMain.Server.ConnectedClients)
|
foreach (Client c in GameMain.Server.ConnectedClients)
|
||||||
{
|
{
|
||||||
NewMessage("- " + c.ID.ToString() + ": " + c.Name + ", " + c.Connection.RemoteEndPoint.Address.ToString(), Color.Cyan);
|
NewMessage("- " + c.ID.ToString() + ": " + c.Name + (c.Character != null ? " playing " + c.Character.LogName : "") + ", " + c.Connection.RemoteEndPoint.Address.ToString(), Color.Cyan);
|
||||||
}
|
}
|
||||||
NewMessage("***************", Color.Cyan);
|
NewMessage("***************", Color.Cyan);
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -699,12 +699,12 @@ namespace Barotrauma.Items.Components
|
|||||||
if (docked)
|
if (docked)
|
||||||
{
|
{
|
||||||
if (item.Submarine != null && dockingTarget?.item?.Submarine != null)
|
if (item.Submarine != null && dockingTarget?.item?.Submarine != null)
|
||||||
GameServer.Log(sender.Name + " docked " + item.Submarine.Name + " to " + dockingTarget.item.Submarine.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(sender.LogName + " docked " + item.Submarine.Name + " to " + dockingTarget.item.Submarine.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (item.Submarine != null && prevDockingTarget?.item?.Submarine != null)
|
if (item.Submarine != null && prevDockingTarget?.item?.Submarine != null)
|
||||||
GameServer.Log(sender.Name + " undocked " + item.Submarine.Name + " from " + prevDockingTarget.item.Submarine.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(sender.LogName + " undocked " + item.Submarine.Name + " from " + prevDockingTarget.item.Submarine.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ namespace Barotrauma.Items.Components
|
|||||||
bool newState = predictedState == null ? isOpen : predictedState.Value;
|
bool newState = predictedState == null ? isOpen : predictedState.Value;
|
||||||
if (sender != null && wasOpen != newState)
|
if (sender != null && wasOpen != newState)
|
||||||
{
|
{
|
||||||
GameServer.Log(sender.Name + (newState ? " opened " : " closed ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(sender.LogName + (newState ? " opened " : " closed ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace Barotrauma.Items.Components
|
|||||||
item.body.Enabled = true;
|
item.body.Enabled = true;
|
||||||
IsActive = true;
|
IsActive = true;
|
||||||
|
|
||||||
if (!alreadySelected) GameServer.Log(character.Name + " equipped " + item.Name, ServerLog.MessageType.ItemInteraction);
|
if (!alreadySelected) GameServer.Log(character.LogName + " equipped " + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
picker.DeselectItem(item);
|
picker.DeselectItem(item);
|
||||||
|
|
||||||
GameServer.Log(character.Name + " unequipped " + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(character.LogName + " unequipped " + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
|
|
||||||
item.body.Enabled = false;
|
item.body.Enabled = false;
|
||||||
IsActive = false;
|
IsActive = false;
|
||||||
@@ -235,7 +235,7 @@ namespace Barotrauma.Items.Components
|
|||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
if (picker != null)
|
if (picker != null)
|
||||||
{
|
{
|
||||||
Networking.GameServer.Log(picker.Name + " detached " + item.Name + " from a wall", ServerLog.MessageType.ItemInteraction);
|
Networking.GameServer.Log(picker.LogName + " detached " + item.Name + " from a wall", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -290,7 +290,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (GameMain.Server != null)
|
if (GameMain.Server != null)
|
||||||
{
|
{
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
GameServer.Log(character.Name + " attached " + item.Name+" to a wall", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(character.LogName + " attached " + item.Name+" to a wall", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
item.Drop();
|
item.Drop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,12 +255,12 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
GameMain.Server.CreateEntityEvent(item, new object[] { Networking.NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnUse, targetCharacter.ID });
|
GameMain.Server.CreateEntityEvent(item, new object[] { Networking.NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnUse, targetCharacter.ID });
|
||||||
|
|
||||||
string logStr = picker?.Name + " used " + item.Name;
|
string logStr = picker?.LogName + " used " + item.Name;
|
||||||
if (item.ContainedItems != null && item.ContainedItems.Length > 0)
|
if (item.ContainedItems != null && item.ContainedItems.Length > 0)
|
||||||
{
|
{
|
||||||
logStr += "(" + string.Join(", ", item.ContainedItems.Select(i => i?.Name)) + ")";
|
logStr += "(" + string.Join(", ", item.ContainedItems.Select(i => i?.Name)) + ")";
|
||||||
}
|
}
|
||||||
logStr += " on " + targetCharacter + ".";
|
logStr += " on " + targetCharacter.LogName + ".";
|
||||||
Networking.GameServer.Log(logStr, Networking.ServerLog.MessageType.Attack);
|
Networking.GameServer.Log(logStr, Networking.ServerLog.MessageType.Attack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Barotrauma.Items.Components
|
|||||||
Vector2 throwVector = picker.CursorWorldPosition - picker.WorldPosition;
|
Vector2 throwVector = picker.CursorWorldPosition - picker.WorldPosition;
|
||||||
throwVector = Vector2.Normalize(throwVector);
|
throwVector = Vector2.Normalize(throwVector);
|
||||||
|
|
||||||
GameServer.Log(picker.Name + " threw " + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(picker.LogName + " threw " + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
|
|
||||||
item.Drop();
|
item.Drop();
|
||||||
item.body.ApplyLinearImpulse(throwVector * throwForce * item.body.Mass * 3.0f);
|
item.body.ApplyLinearImpulse(throwVector * throwForce * item.body.Mass * 3.0f);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + (IsActive ? " activated " : " deactivated ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(user.LogName + (IsActive ? " activated " : " deactivated ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + " started fabricating " + selectedItem.TargetItem.Name + " in " + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(user.LogName + " started fabricating " + selectedItem.TargetItem.Name + " in " + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
@@ -184,7 +184,7 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
if (fabricatedItem != null && user != null)
|
if (fabricatedItem != null && user != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + " cancelled the fabrication of " + fabricatedItem.TargetItem.Name + " in " + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(user.LogName + " cancelled the fabrication of " + fabricatedItem.TargetItem.Name + " in " + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
IsActive = false;
|
IsActive = false;
|
||||||
|
|||||||
@@ -157,11 +157,11 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
if (newFlowPercentage != FlowPercentage)
|
if (newFlowPercentage != FlowPercentage)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + " set the pumping speed of " + item.Name + " to " + (int)(newFlowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(c.Character.LogName + " set the pumping speed of " + item.Name + " to " + (int)(newFlowPercentage) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
if (newIsActive != IsActive)
|
if (newIsActive != IsActive)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + (newIsActive ? " turned on " : " turned off ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(c.Character.LogName + (newIsActive ? " turned on " : " turned off ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
FlowPercentage = newFlowPercentage;
|
FlowPercentage = newFlowPercentage;
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
if (Timing.TotalTime >= (float)nextServerLogWriteTime)
|
if (Timing.TotalTime >= (float)nextServerLogWriteTime)
|
||||||
{
|
{
|
||||||
GameServer.Log(lastUser + " adjusted reactor settings: " +
|
GameServer.Log(lastUser.LogName + " adjusted reactor settings: " +
|
||||||
"Temperature: " + (int)temperature +
|
"Temperature: " + (int)temperature +
|
||||||
", Fission rate: " + (int)fissionRate +
|
", Fission rate: " + (int)fissionRate +
|
||||||
", Cooling rate: " + (int)coolingRate +
|
", Cooling rate: " + (int)coolingRate +
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (item.CanClientAccess(c))
|
if (item.CanClientAccess(c))
|
||||||
{
|
{
|
||||||
RechargeSpeed = newRechargeSpeed;
|
RechargeSpeed = newRechargeSpeed;
|
||||||
GameServer.Log(c.Character + " set the recharge speed of "+item.Name+" to "+ (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(c.Character.LogName + " set the recharge speed of "+item.Name+" to "+ (int)((rechargeSpeed / maxRechargeSpeed) * 100.0f) + " %", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.CreateServerEvent(this);
|
item.CreateServerEvent(this);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (existingWire.Locked)
|
if (existingWire.Locked)
|
||||||
{
|
{
|
||||||
//this should not be possible unless the client is running a modified version of the game
|
//this should not be possible unless the client is running a modified version of the game
|
||||||
GameServer.Log(c.Character.Name + " attempted to disconnect a locked wire from " +
|
GameServer.Log(c.Character.LogName + " attempted to disconnect a locked wire from " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ")", ServerLog.MessageType.Error);
|
Connections[i].Item.Name + " (" + Connections[i].Name + ")", ServerLog.MessageType.Error);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -224,12 +224,12 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (existingWire.Connections[0] == null && existingWire.Connections[1] == null)
|
if (existingWire.Connections[0] == null && existingWire.Connections[1] == null)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " disconnected a wire from " +
|
GameServer.Log(c.Character.LogName + " disconnected a wire from " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ")", ServerLog.MessageType.ItemInteraction);
|
Connections[i].Item.Name + " (" + Connections[i].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (existingWire.Connections[0] != null)
|
else if (existingWire.Connections[0] != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " disconnected a wire from " +
|
GameServer.Log(c.Character.LogName + " disconnected a wire from " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " + existingWire.Connections[0].Item.Name + " (" + existingWire.Connections[0].Name + ")", ServerLog.MessageType.ItemInteraction);
|
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " + existingWire.Connections[0].Item.Name + " (" + existingWire.Connections[0].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
|
|
||||||
//wires that are not in anyone's inventory (i.e. not currently being rewired)
|
//wires that are not in anyone's inventory (i.e. not currently being rewired)
|
||||||
@@ -244,7 +244,7 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
else if (existingWire.Connections[1] != null)
|
else if (existingWire.Connections[1] != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " disconnected a wire from " +
|
GameServer.Log(c.Character.LogName + " disconnected a wire from " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " + existingWire.Connections[1].Item.Name + " (" + existingWire.Connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " + existingWire.Connections[1].Item.Name + " (" + existingWire.Connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
|
|
||||||
if (existingWire.Item.ParentInventory == null)
|
if (existingWire.Item.ParentInventory == null)
|
||||||
@@ -276,13 +276,13 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (otherConnection == null)
|
if (otherConnection == null)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " connected a wire to " +
|
GameServer.Log(c.Character.LogName + " connected a wire to " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ")",
|
Connections[i].Item.Name + " (" + Connections[i].Name + ")",
|
||||||
ServerLog.MessageType.ItemInteraction);
|
ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " connected a wire from " +
|
GameServer.Log(c.Character.LogName + " connected a wire from " +
|
||||||
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " +
|
Connections[i].Item.Name + " (" + Connections[i].Name + ") to " +
|
||||||
(otherConnection == null ? "none" : otherConnection.Item.Name + " (" + (otherConnection.Name) + ")"),
|
(otherConnection == null ? "none" : otherConnection.Item.Name + " (" + (otherConnection.Name) + ")"),
|
||||||
ServerLog.MessageType.ItemInteraction);
|
ServerLog.MessageType.ItemInteraction);
|
||||||
|
|||||||
@@ -308,18 +308,18 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
if (connections[0] != null && connections[1] != null)
|
if (connections[0] != null && connections[1] != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + " disconnected a wire from " +
|
GameServer.Log(user.LogName + " disconnected a wire from " +
|
||||||
connections[0].Item.Name + " (" + connections[0].Name + ") to "+
|
connections[0].Item.Name + " (" + connections[0].Name + ") to "+
|
||||||
connections[1].Item.Name + " (" + connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
connections[1].Item.Name + " (" + connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (connections[0] != null)
|
else if (connections[0] != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + " disconnected a wire from " +
|
GameServer.Log(user.LogName + " disconnected a wire from " +
|
||||||
connections[0].Item.Name + " (" + connections[0].Name + ")", ServerLog.MessageType.ItemInteraction);
|
connections[0].Item.Name + " (" + connections[0].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else if (connections[1] != null)
|
else if (connections[1] != null)
|
||||||
{
|
{
|
||||||
GameServer.Log(user.Name + " disconnected a wire from " +
|
GameServer.Log(user.LogName + " disconnected a wire from " +
|
||||||
connections[1].Item.Name + " (" + connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
connections[1].Item.Name + " (" + connections[1].Name + ")", ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (character != null)
|
if (character != null)
|
||||||
{
|
{
|
||||||
string msg = character.Name + " launched " + item.Name + " (projectile: " + projectiles[0].Item.Name;
|
string msg = character.LogName + " launched " + item.Name + " (projectile: " + projectiles[0].Item.Name;
|
||||||
if (projectiles[0].Item.ContainedItems == null || projectiles[0].Item.ContainedItems.All(i => i == null))
|
if (projectiles[0].Item.ContainedItems == null || projectiles[0].Item.ContainedItems.All(i => i == null))
|
||||||
{
|
{
|
||||||
msg += ")";
|
msg += ")";
|
||||||
|
|||||||
@@ -212,11 +212,11 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (Owner == c.Character)
|
if (Owner == c.Character)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + " picked up " + item.Name, ServerLog.MessageType.Inventory);
|
GameServer.Log(c.Character.LogName+ " picked up " + item.Name, ServerLog.MessageType.Inventory);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + " placed " + item.Name + " in " + Owner, ServerLog.MessageType.Inventory);
|
GameServer.Log(c.Character.LogName + " placed " + item.Name + " in " + Owner, ServerLog.MessageType.Inventory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,11 +227,11 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (Owner == c.Character)
|
if (Owner == c.Character)
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + " dropped " + item.Name, ServerLog.MessageType.Inventory);
|
GameServer.Log(c.Character.LogName + " dropped " + item.Name, ServerLog.MessageType.Inventory);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character + " removed " + item.Name + " from " + Owner, ServerLog.MessageType.Inventory);
|
GameServer.Log(c.Character.LogName + " removed " + item.Name + " from " + Owner, ServerLog.MessageType.Inventory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1361,12 +1361,12 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (ContainedItems == null || ContainedItems.All(i => i == null))
|
if (ContainedItems == null || ContainedItems.All(i => i == null))
|
||||||
{
|
{
|
||||||
GameServer.Log(c.Character.Name + " used item " + Name, ServerLog.MessageType.ItemInteraction);
|
GameServer.Log(c.Character.LogName + " used item " + Name, ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameServer.Log(
|
GameServer.Log(
|
||||||
c.Character.Name + " used item " + Name + " (contained items: " + string.Join(", ", Array.FindAll(ContainedItems, i => i != null).Select(i => i.Name)) + ")",
|
c.Character.LogName + " used item " + Name + " (contained items: " + string.Join(", ", Array.FindAll(ContainedItems, i => i != null).Select(i => i.Name)) + ")",
|
||||||
ServerLog.MessageType.ItemInteraction);
|
ServerLog.MessageType.ItemInteraction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user