- respawn, fabricator & deconstructor logging
- fixed listbox child hiding 4 real now - dockingport logging fix (name of the sub instead of submarine.ToString)
This commit is contained in:
@@ -105,23 +105,23 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private bool ToggleActive(GUIButton button, object obj)
|
||||
{
|
||||
SetActive(!IsActive);
|
||||
SetActive(!IsActive, Character.Controlled);
|
||||
|
||||
currPowerConsumption = IsActive ? powerConsumption : 0.0f;
|
||||
|
||||
if (GameMain.Server != null)
|
||||
{
|
||||
item.CreateServerEvent<Deconstructor>(this);
|
||||
item.CreateServerEvent(this);
|
||||
}
|
||||
else if (GameMain.Client != null)
|
||||
{
|
||||
item.CreateClientEvent<Deconstructor>(this);
|
||||
item.CreateClientEvent(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SetActive(bool active)
|
||||
private void SetActive(bool active, Character user = null)
|
||||
{
|
||||
container = item.GetComponent<ItemContainer>();
|
||||
if (container == null)
|
||||
@@ -134,6 +134,11 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
IsActive = active;
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
GameServer.Log(user.Name + (IsActive ? " activated " : " deactivated ") + item.Name, ServerLog.MessageType.ItemInteraction);
|
||||
}
|
||||
|
||||
if (!IsActive)
|
||||
{
|
||||
progressBar.BarSize = 0.0f;
|
||||
@@ -160,11 +165,11 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
bool active = msg.ReadBoolean();
|
||||
|
||||
item.CreateServerEvent<Deconstructor>(this);
|
||||
item.CreateServerEvent(this);
|
||||
|
||||
if (item.CanClientAccess(c))
|
||||
{
|
||||
SetActive(active);
|
||||
SetActive(active, c.Character);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user