private void cmdRadZoneList(BasePlayer player, string command, string[] args) { if (!IsAdmin(player)) { return; } if (radiationZones.Count == 0) { SendReply(player, msg("NoRadiationZones", player.userID)); return; } for (int i = 0; i < radiationZones.Count; i++) { if (i == 0) { SendEchoConsole(player.net.connection, $"---- MonumentRadiation Zone List ----"); } RadiationZone zone = radiationZones[i]; SendEchoConsole(player.net.connection, $"{zone.name} || Location: {zone.transform.position} || Radius: {zone.radius} || Radiation Amount: {zone.amount}"); } SendReply(player, msg("Title", player.userID) + msg("InfoToConsole", player.userID)); }
public void RemoveRadiationZone(RadiationZone zone) { if ((this.radiationZones != null) && this.radiationZones.Remove(zone)) { zone.RemoveFromRadiation(this); } }
void Awake() { radiation = gameObject.AddComponent <RadiationZone>(); zone = GetComponent <Zone>(); radiation.exposurePerMin = float.Parse(zone.info.radiation); radiation.radius = GetComponent <UnityEngine.SphereCollider>().radius; Interface.CallHook("anticheatAllowRadiationZone", radiation); }
public void AddRadiationZone(RadiationZone zone) { if (zone.CanAddToRadiation(this)) { if (this.radiationZones == null) { } (this.radiationZones = new List <RadiationZone>()).Add(zone); } }
public void AddRadiationZone(RadiationZone zone) { if (zone.CanAddToRadiation(this)) { if (this.radiationZones == null) { } (this.radiationZones = new System.Collections.Generic.List <RadiationZone>()).Add(zone); } }
public void SetInfo(ZoneDefinition info) { this.info = info; GetComponent <UnityEngine.Transform>().position = info.Location.GetPosition(); GetComponent <UnityEngine.SphereCollider>().radius = info.Location.GetRadius(); radiationamount = 0f; if (float.TryParse(info.radiation, out radiationamount)) { radiationzone = gameObject.AddComponent <RadiationZone>(); } }
public void AddRadiationZone(RadiationZone zone) { if (zone.CanAddToRadiation(this)) { List <RadiationZone> radiationZones = this.radiationZones; if (radiationZones == null) { List <RadiationZone> radiationZones1 = new List <RadiationZone>(); List <RadiationZone> radiationZones2 = radiationZones1; this.radiationZones = radiationZones1; radiationZones = radiationZones2; } radiationZones.Add(zone); } }
public void SetInfo(ZoneDefinition info) { this.info = info; GetComponent <UnityEngine.Transform>().position = info.Location.GetPosition(); GetComponent <UnityEngine.SphereCollider>().radius = info.Location.GetRadius(); radiationamount = 0f; zoneMask = 0; if (info.undestr != null || info.nodecay != null) { zoneMask |= ((int)1) << UnityEngine.LayerMask.NameToLayer("Construction"); zoneMask |= ((int)1) << UnityEngine.LayerMask.NameToLayer("Deployed"); } if (info.nogather != null) { zoneMask |= ((int)1) << UnityEngine.LayerMask.NameToLayer("Resource"); zoneMask |= ((int)1) << UnityEngine.LayerMask.NameToLayer("Tree"); } if (info.nopve != null) { zoneMask |= ((int)1) << UnityEngine.LayerMask.NameToLayer("AI"); } if (zoneMask != 0) { InvokeRepeating("CheckCollisions", 0f, 10f); } if (info.autolights != null) { float currentTime = GetSkyHour(); if (currentTime > AutolightOffTime && currentTime < AutolightOnTime) { lightsOn = true; } else { lightsOn = false; } InvokeRepeating("CheckLights", 0f, 10f); } if (float.TryParse(info.radiation, out radiationamount)) { radiationzone = gameObject.AddComponent <RadiationZone>(); } }
private void ccmdRadZoneList(ConsoleSystem.Arg arg) { if (!IsAuthed(arg)) { return; } if (radiationZones.Count == 0) { SendReply(arg, "There are no radiation zones setup"); return; } for (int i = 0; i < radiationZones.Count; i++) { if (i == 0) { SendReply(arg, $"---- MonumentRadiation Zone List ----"); } RadiationZone zone = radiationZones[i]; SendReply(arg, $"{zone.name} || Location: {zone.transform.position} || Radius: {zone.radius} || Radiation Amount: {zone.amount}"); } }
public void SetInfo(ZoneDefinition info) { this.info = info; GetComponent<UnityEngine.Transform>().position = info.Location.GetPosition(); GetComponent<UnityEngine.SphereCollider>().radius = info.Location.GetRadius(); radiationamount = 0f; zoneMask = 0; if(info.undestr != null || info.nodecay != null) { zoneMask |= ((int)1) << LayerMask.NameToLayer("Construction"); zoneMask |= ((int)1) << LayerMask.NameToLayer("Deployed"); } if(info.nogather != null) { zoneMask |= ((int)1) << LayerMask.NameToLayer("Resource"); zoneMask |= ((int)1) << LayerMask.NameToLayer("Tree"); } if (info.nopve != null) { zoneMask |= ((int)1) << LayerMask.NameToLayer("AI"); } if (zoneMask != 0) InvokeRepeating("CheckCollisions", 0f, 10f); if (info.autolights != null) { float currentTime = GetSkyHour(); if (currentTime > AutolightOffTime && currentTime < AutolightOnTime) { lightsOn = true; } else { lightsOn = false; } InvokeRepeating("CheckLights", 0f, 10f); } if (float.TryParse(info.radiation, out radiationamount)) radiationzone = gameObject.AddComponent<RadiationZone>(); }
void Awake() { radiation = gameObject.AddComponent<RadiationZone>(); zone = GetComponent<Zone>(); radiation.exposurePerMin = float.Parse(zone.info.radiation); radiation.radius = GetComponent<UnityEngine.SphereCollider>().radius; Interface.CallHook("anticheatAllowRadiationZone", radiation); }