Traitor Deathmatch (#2719)
* Traitor Deathmatch: Add the preset [Rebase onto factors line] * Traitor Deathmatch: Being a human head or other not-quite-fully-animate object counts as dead. [ROFL] * Traitor Deathmatch: Add redemption machine (but it doesn't work) [ROFL] * Traitor Deathmatch: Map in redemption machines [ROFL] * Traitor Deathmatch: Make the rounds end properly [ROFL] * Traitor Deathmatch: PDA redemption works [ROFL] * Traitor Deathmatch: New redemption machine sprite ( @Tomeno ) * Traitor Deathmatch: Get rid of redundant using * Traitor Deathmatch: Change scoring, prevent redeeming your own PDA, fix bug where PDAs are not tagged with their owner names * Traitor Deathmatch: Better messages, change cvar name, don't count ghosts for spawnpoint selection
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#nullable enable
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||
@@ -38,6 +39,23 @@ namespace Content.Server.Atmos
|
||||
return !Equals(air = coordinates.GetTileAir(entityManager)!, default);
|
||||
}
|
||||
|
||||
public static bool IsTileAirProbablySafe(this EntityCoordinates coordinates)
|
||||
{
|
||||
// Note that oxygen mix isn't checked, but survival boxes make that not necessary.
|
||||
var air = coordinates.GetTileAir();
|
||||
if (air == null)
|
||||
return false;
|
||||
if (air.Pressure <= Atmospherics.WarningLowPressure)
|
||||
return false;
|
||||
if (air.Pressure >= Atmospherics.WarningHighPressure)
|
||||
return false;
|
||||
if (air.Temperature <= 260)
|
||||
return false;
|
||||
if (air.Temperature >= 360)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static TileAtmosphere GetTileAtmosphere(this Vector2i indices, GridId gridId)
|
||||
{
|
||||
var gridAtmos = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(gridId);
|
||||
|
||||
Reference in New Issue
Block a user