diff --git a/Content.Server/Radio/EntitySystems/RadioSystem.cs b/Content.Server/Radio/EntitySystems/RadioSystem.cs index 2f0872ee842..9ba10252e5c 100644 --- a/Content.Server/Radio/EntitySystems/RadioSystem.cs +++ b/Content.Server/Radio/EntitySystems/RadioSystem.cs @@ -199,7 +199,7 @@ public void SendRadioMessage(EntityUid messageSource, string message, RadioChann private string GetIdCardName(EntityUid senderUid) { var idCardTitle = Loc.GetString("chat-radio-no-id"); - idCardTitle = GetIdCard(senderUid)?.JobTitle ?? idCardTitle; + idCardTitle = GetIdCard(senderUid)?.LocalizedJobTitle ?? idCardTitle; var textInfo = CultureInfo.CurrentCulture.TextInfo; idCardTitle = textInfo.ToTitleCase(idCardTitle); diff --git a/Content.Server/Supermatter/Components/SupermatterComponent.cs b/Content.Server/Supermatter/Components/SupermatterComponent.cs index 9843a097470..f356abe6f67 100644 --- a/Content.Server/Supermatter/Components/SupermatterComponent.cs +++ b/Content.Server/Supermatter/Components/SupermatterComponent.cs @@ -1,4 +1,4 @@ -using Content.Shared.Atmos; +using Content.Shared.Atmos; using Robust.Shared.Audio; namespace Content.Server.Supermatter.Components; @@ -6,6 +6,36 @@ namespace Content.Server.Supermatter.Components; [RegisterComponent] public sealed partial class SupermatterComponent : Component { + /// + /// The damage taken from direct hits, e.g. laser weapons + /// + [ViewVariables(VVAccess.ReadOnly)] + public float AVExternalDamage = 0f; + + // + [ViewVariables(VVAccess.ReadOnly)] + public float HeatAccumulatorRate = 0.5f; + + [ViewVariables(VVAccess.ReadOnly)] + public float AVHeatAccumulator = 0f; + + [ViewVariables(VVAccess.ReadOnly)] + public float RadiationAccumulatorRate = 0.3f; + + [ViewVariables(VVAccess.ReadOnly)] + public float AVRadiationAccumulator = 0f; + + [ViewVariables(VVAccess.ReadOnly)] + public float LightingAccumulatorThreshold = 2f; + + [ViewVariables(VVAccess.ReadOnly)] + public float LightingAccumulatorRate = 0.1f; + + [ViewVariables(VVAccess.ReadOnly)] + public float AVLightingAccumulator = 0f; + + [ViewVariables(VVAccess.ReadOnly)] + public float InternalEnergyAccumulatorRate = 0.1f; /// /// Lightning prototype IDs that the supermatter should spit out. /// @@ -64,8 +94,6 @@ public sealed partial class SupermatterComponent : Component public float UpdateTimerAccumulator = 0f; - public float ZapTimerAccumulator = 0f; - public float AnnouncementTimerAccumulator = 0f; /// @@ -74,12 +102,6 @@ public sealed partial class SupermatterComponent : Component [DataField("updateTimer")] public float UpdateTimer = 1f; - /// - /// Amount of seconds to pass before SM does it's zap. - /// - [DataField("zapTimer")] - public float ZapTimer = 10f; - /// /// Amount of seconds to pass before makes an announcement. /// @@ -123,12 +145,6 @@ public sealed partial class SupermatterComponent : Component /// public float DamageArchive = 0f; - /// - /// The damage taken from direct hits, e.g. laser weapons - /// - [ViewVariables(VVAccess.ReadOnly)] - public float ExternalDamage = 0f; - /// /// The temperature at which the supermatter crystal will begin to take damage. /// @@ -168,11 +184,8 @@ public sealed partial class SupermatterComponent : Component /// [ViewVariables(VVAccess.ReadOnly)] public float GasPowerlossInhibition = 0f; - /// - /// Affects the amount of power the main SM zap makes. - /// [ViewVariables(VVAccess.ReadOnly)] - public float PowerTransmissionRate = 0f; + public float ThermalСonductivity = 0f; /// /// Affects the power gain the SM experiences from heat. /// @@ -199,15 +212,15 @@ public sealed partial class SupermatterComponent : Component [ViewVariables(VVAccess.ReadOnly)] public GasFact[] GasFacts = { - new (transmissionRate: .15f, heatPowerGeneration: 1f), // o2 - new (heatModifier: -2.5f, heatPowerGeneration: -1), // n2 - new (heatModifier: 1f, heatPowerGeneration: 1f, powerlossInhibition: 1f), // co2 - new (transmissionRate: .4f, heatModifier: 14f, heatPowerGeneration: 1f), // plasma - new (transmissionRate: 3f, heatModifier: 9f, heatPowerGeneration: 1f), // tritium - new (transmissionRate: -.25f, heatModifier: 11f, heatPowerGeneration: 1f), // vapor - new (heatPowerGeneration: .5f), // ommonium - new (heatResistance: 5f), // n2o - new (transmissionRate: -3f, heatModifier: 9f, heatResistance: 1f, heatPowerGeneration: 1f), // frezon + new (thermalConductivity: 2.4f, heatPowerGeneration: 1f), // o2 + new (thermalConductivity: 2.0f, heatModifier: -2.5f, heatPowerGeneration: -1), // n2 + new (thermalConductivity: 1.2f, heatModifier: 1f, heatPowerGeneration: 1f, powerlossInhibition: 1f), // co2 + new (thermalConductivity: 6.0f, heatModifier: 14f, heatPowerGeneration: 1f), // plasma + new (thermalConductivity: 3.0f, heatModifier: 9f, heatPowerGeneration: 1f), // tritium + new (thermalConductivity: 1.4f, heatModifier: 11f, heatPowerGeneration: 1f), // vapor + new (thermalConductivity: 1.6f, heatPowerGeneration: .5f), // ommonium + new (thermalConductivity: 1.3f, heatResistance: 5f), // n2o + new (thermalConductivity: 9.9f, heatModifier: 9f, heatResistance: 1f, heatPowerGeneration: 1f), // frezon }; } @@ -222,7 +235,7 @@ public sealed partial class GasFact /// Affects the amount of power the main SM zap makes. /// [ViewVariables(VVAccess.ReadWrite)] - public float PowerTransmissionRate; + public float ThermalСonductivity; /// /// Affects the heat SM makes. /// @@ -244,9 +257,9 @@ public sealed partial class GasFact [ViewVariables(VVAccess.ReadWrite)] public float PowerlossInhibition; - public GasFact(float? transmissionRate = null, float? heatModifier = null, float? heatResistance = null, float? heatPowerGeneration = null, float? powerlossInhibition = null) + public GasFact(float? thermalConductivity = null, float? heatModifier = null, float? heatResistance = null, float? heatPowerGeneration = null, float? powerlossInhibition = null) { - PowerTransmissionRate = transmissionRate ?? 1; + ThermalСonductivity = thermalConductivity ?? 1; HeatModifier = heatModifier ?? 1; HeatResistance = heatResistance ?? 0; HeatPowerGeneration = heatPowerGeneration ?? 0; diff --git a/Content.Server/Supermatter/EntitySystems/SupermatterSystem.cs b/Content.Server/Supermatter/EntitySystems/SupermatterSystem.cs index 1cf41b65634..a0f37771d8e 100644 --- a/Content.Server/Supermatter/EntitySystems/SupermatterSystem.cs +++ b/Content.Server/Supermatter/EntitySystems/SupermatterSystem.cs @@ -1,4 +1,4 @@ -using Content.Server.Atmos.EntitySystems; +using Content.Server.Atmos.EntitySystems; using Content.Server.Supermatter.Components; using Content.Shared.Atmos; using Content.Server.Lightning; @@ -26,6 +26,8 @@ using Content.Server.DoAfter; using Content.Server.Explosion.EntitySystems; using Content.Server.Kitchen.Components; +using Content.Shared.Singularity.Components; +using System; namespace Content.Server.Supermatter.EntitySystems; @@ -39,6 +41,7 @@ public sealed class SupermatterSystem : EntitySystem [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly AmbientSoundSystem _ambience = default!; [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly TagSystem _tagSystem = default!; [Dependency] private readonly StationSystem _station = default!; [Dependency] private readonly AnomalySystem _anomaly = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; @@ -81,17 +84,10 @@ public override void Update(float frameTime) public void Cycle(EntityUid uid, SupermatterComponent sm) { - sm.ZapTimerAccumulator++; sm.AnnouncementTimerAccumulator++; ProcessAtmos(uid, sm); - - if (sm.ZapTimerAccumulator >= sm.ZapTimer) - { - sm.ZapTimerAccumulator = 0f; - ProcessPower(uid, sm); - } - + ProcessPower(uid, sm); ProcessDamage(uid, sm); // due to how damage calculation works, it will do the announcement only if sm is consistently taking damage @@ -104,7 +100,7 @@ public void Cycle(EntityUid uid, SupermatterComponent sm) if (sm.Damage > sm.DamageEmergencyPoint) loc = "critical"; - SupermatterAlert(uid, Loc.GetString($"supermatter-announcement-{loc}", ("integrity", Math.Round(sm.DelaminationPoint - sm.Damage, 1)))); + SupermatterAlert(uid, Loc.GetString($"supermatter-announcement-{loc}", ("integrity", (int)(sm.DelaminationPoint - sm.Damage)))); } } @@ -127,7 +123,7 @@ private void ProcessAtmos(EntityUid uid, SupermatterComponent sm) // calculate gases var gasPercentages = new float[Enum.GetValues(typeof(Gas)).Length]; - var powerTransmissionRate = 0f; + var thermalСonductivity = 0f; var heatModifier = 0f; var heatResistance = 0f; var heatPowerGeneration = 0f; @@ -148,7 +144,7 @@ private void ProcessAtmos(EntityUid uid, SupermatterComponent sm) gasPercentages[i] = moleCount / moles; var smGas = sm.GasFacts[i]; - powerTransmissionRate += smGas.PowerTransmissionRate * gasPercentages[i]; + thermalСonductivity += smGas.ThermalСonductivity * gasPercentages[i]; heatModifier += smGas.HeatModifier * gasPercentages[i]; heatResistance += smGas.HeatResistance * gasPercentages[i]; heatPowerGeneration += smGas.HeatPowerGeneration * gasPercentages[i]; @@ -159,7 +155,7 @@ private void ProcessAtmos(EntityUid uid, SupermatterComponent sm) powerlossInhibition = Math.Clamp(powerlossInhibition, 0, 1); sm.AbsorbedGasMix = absorbedMix; - sm.PowerTransmissionRate = powerTransmissionRate; + sm.ThermalСonductivity = thermalСonductivity; sm.GasHeatModifier = heatModifier; sm.GasHeatResistance = heatResistance; sm.HeatPowerGeneration = heatPowerGeneration; @@ -172,17 +168,32 @@ private void ProcessPower(EntityUid uid, SupermatterComponent sm) { var powerHeat = sm.HeatPowerGeneration * sm.AbsorbedGasMix.Temperature * SupermatterComponent.GasHeatPowerScaling; var powerloss = -1 * sm.GasPowerlossInhibition; - var atmosStrength = Math.Clamp((powerHeat + powerloss) * sm.PowerTransmissionRate, 0, 2); + var atmosStrength = Math.Clamp((powerHeat + powerloss) * 0.2f, 0, 2); var damageStrength = Math.Clamp(sm.Damage / sm.DelaminationPoint, 0, 1); var strength = Math.Clamp(atmosStrength + damageStrength, 0, 4); + var damageExternal = sm.AVExternalDamage + strength; + sm.AVExternalDamage = 0f; - sm.InternalEnergy = strength; - var lightningProto = sm.LightningPrototypeIDs[(int) Math.Clamp(strength, 0, 3)]; + sm.AVHeatAccumulator = Math.Clamp(sm.AVHeatAccumulator + (damageExternal * sm.HeatAccumulatorRate), 0, 10); + sm.AVRadiationAccumulator = Math.Clamp(sm.AVRadiationAccumulator + (damageExternal * sm.RadiationAccumulatorRate), 0, 10); + sm.AVLightingAccumulator = Math.Clamp(sm.AVLightingAccumulator + (damageExternal * sm.LightingAccumulatorRate), 0, 10); + sm.InternalEnergy = Math.Clamp(sm.InternalEnergy + (damageExternal * sm.InternalEnergyAccumulatorRate), 0, 10); - _sound.PlayPvs(SupermatterComponent.SupermatterZapSound, uid); - _lightning.ShootRandomLightnings(uid, 3, (int) strength < 1 ? 1 : (int) strength, lightningProto); - Comp(uid).Intensity = 1 + strength; + if (sm.AVLightingAccumulator > sm.LightingAccumulatorThreshold) + { + var lightningProto = sm.LightningPrototypeIDs[(int)Math.Clamp(sm.AVLightingAccumulator, 0, 3)]; + _lightning.ShootRandomLightnings(uid, 3, (int)sm.AVLightingAccumulator, lightningProto); + sm.AVLightingAccumulator = 0; + } + + Comp(uid).Intensity = 1 + sm.AVRadiationAccumulator; + sm.AVRadiationAccumulator /= 2; + sm.InternalEnergy /= 2; + + var mix = _atmos.GetContainingMixture((uid, Transform(uid)), true, true) ?? new(); + mix.Temperature += sm.AVHeatAccumulator * 4; + sm.AVHeatAccumulator /= sm.ThermalСonductivity; } /// /// React to damage dealt by all doodads. @@ -196,11 +207,8 @@ private void ProcessDamage(EntityUid uid, SupermatterComponent sm) sm.TempLimit = Math.Max(tempLimitBase + tempLimitGas + tempLimitMoles, Atmospherics.TCMB); - var damageExternal = sm.ExternalDamage * Math.Clamp((sm.DamageEmergencyPoint - sm.Damage) / sm.DamageEmergencyPoint, 0, 1); - sm.ExternalDamage = 0f; - var damageHeat = Math.Clamp((sm.AbsorbedGasMix.Temperature - sm.TempLimit) / 24000, 0, .15f); - var damagePower = Math.Clamp((sm.InternalEnergy - SupermatterComponent.PowerPenaltyThreshold) / 40000, 0, .1f); + var damagePower = Math.Clamp((sm.InternalEnergy - SupermatterComponent.PowerPenaltyThreshold), 0, .1f); var damageMoles = Math.Clamp((sm.AbsorbedGasMix.TotalMoles - SupermatterComponent.MolePenaltyThreshold) / 3200, 0, .1f); var damageHealHeat = 0f; @@ -208,7 +216,7 @@ private void ProcessDamage(EntityUid uid, SupermatterComponent sm) if (sm.AbsorbedGasMix.TotalMoles > 0) damageHealHeat = Math.Clamp((sm.AbsorbedGasMix.TotalMoles - sm.TempLimit) / 6000, -.1f, 0); - var totalDamage = damageExternal + damageHeat + damagePower + damageMoles + damageHealHeat; + var totalDamage = damageHeat + damagePower + damageMoles + damageHealHeat; sm.Damage += Math.Max(totalDamage, 0); @@ -235,7 +243,7 @@ private void ProcessWaste(EntityUid uid, SupermatterComponent sm) mergeMix.Temperature = Math.Clamp(mergeMix.Temperature, Atmospherics.TCMB, 2500 * sm.WasteMultiplier); mergeMix.AdjustMoles(Gas.Plasma, Math.Max(.65f * sm.InternalEnergy * sm.WasteMultiplier * SupermatterComponent.PlasmaReleaseModifier, 0)); - mergeMix.AdjustMoles(Gas.Oxygen, Math.Max((.65f + mergeMix.Temperature * sm.WasteMultiplier - Atmospherics.T0C) * SupermatterComponent.OxygenReleaseModifier, 0)); + mergeMix.AdjustMoles(Gas.Oxygen, Math.Max(.65f * sm.InternalEnergy * sm.WasteMultiplier * SupermatterComponent.OxygenReleaseModifier, 0)); _atmos.Merge(mix, mergeMix); } @@ -282,7 +290,7 @@ private void GenerateAnomaly(EntityUid uid, float amount = 1) for (var i = 0; i < amount; i++) { - _anomaly.SpawnOnRandomGridLocation((EntityUid) grid, "RandomAnomalySpawner"); + _anomaly.SpawnOnRandomGridLocation((EntityUid)grid, "RandomAnomalySpawner"); _adminLogger.Add(LogType.Anomaly, LogImpact.Medium, $"An anomaly has been spawned by the supermatter crystal."); } } @@ -295,6 +303,13 @@ private void Vaporize(EntityUid uid, EntityUid smUid) if (EntityManager.IsQueuedForDeletion(uid)) return; + if (_tagSystem.HasTag(uid, "EmitterBolt") + || HasComp(uid)) + return; + + if (TryComp(smUid, out var sm)) + sm.AVExternalDamage += 1f; + _sound.PlayPvs(SupermatterComponent.VaporizeSound, smUid); EntityManager.QueueDeleteEntity(uid); @@ -302,14 +317,13 @@ private void Vaporize(EntityUid uid, EntityUid smUid) _adminLogger.Add(LogType.Action, LogImpact.High, $"{EntityManager.ToPrettyString(uid):player} has been vaporized by the supermatter."); } - /// /// Handle supermatter delamination and the end of the station. /// private void Delaminate(EntityUid uid, SupermatterComponent sm) { - sm.PreferredDelamType = sm.PreferredDelamType ?? (int) ChooseDelam(sm); - Delaminate(uid, sm, (DelamType) sm.PreferredDelamType); + sm.PreferredDelamType = sm.PreferredDelamType ?? (int)ChooseDelam(sm); + Delaminate(uid, sm, (DelamType)sm.PreferredDelamType); } /// @@ -413,8 +427,6 @@ private void DelamCountdown(EntityUid uid, SupermatterComponent sm) sm.DelamCountdownAccumulator++; } - - private void OnCollide(EntityUid uid, SupermatterComponent sm, StartCollideEvent args) { if (!sm.Activated) @@ -446,7 +458,7 @@ private void OnClick(EntityUid uid, SupermatterComponent sm, InteractUsingEvent private void OnGetSliver(EntityUid uid, SupermatterComponent sm, SupermatterDoAfterEvent args) { sm.Damage += 10; // your criminal actions will not go unnoticed - SupermatterAlert(uid, Loc.GetString("supermatter-announcement-tamper", ("integrity", (int) (100 - sm.Damage)))); + SupermatterAlert(uid, Loc.GetString("supermatter-announcement-tamper", ("integrity", (int)(100 - sm.Damage)))); Spawn(sm.SliverPrototype, _transform.GetMapCoordinates(args.User)); _popup.PopupClient(Loc.GetString("supermatter-tamper-end"), args.User); @@ -457,17 +469,14 @@ private void OnGetHit(EntityUid uid, SupermatterComponent sm, DamageChangedEvent if (!sm.Activated) sm.Activated = true; - sm.ExternalDamage += args.DamageDelta?.GetTotal().Value / 1000 ?? 0; - - Cycle(uid, sm); - ProcessPower(uid, sm); + sm.AVExternalDamage += args.DamageDelta?.GetTotal().Value / 100 ?? 0; } private void OnExamine(EntityUid uid, SupermatterComponent sm, ExaminedEvent args) { if (args.IsInDetailsRange) // get all close to it { - args.PushMarkup(Loc.GetString("supermatter-examine-integrity", ("integrity", (int) (100 - sm.Damage)))); + args.PushMarkup(Loc.GetString("supermatter-examine-integrity", ("integrity", (int)(100 - sm.Damage)))); } } } diff --git a/Content.Shared/Actions/ActionContainerSystem.cs b/Content.Shared/Actions/ActionContainerSystem.cs index dbac6063fae..840a16fa136 100644 --- a/Content.Shared/Actions/ActionContainerSystem.cs +++ b/Content.Shared/Actions/ActionContainerSystem.cs @@ -238,16 +238,16 @@ public bool AddAction(EntityUid uid, EntityUid actionId, BaseActionComponent? ac DebugTools.AssertOwner(uid, comp); comp ??= EnsureComp(uid); - ///if (!TryComp(actionId, out var actionData)) - /// return false; - ///if (!TryPrototype(actionId, out var actionProto, actionData)) - /// return false; - - ///if (HasAction(uid, actionProto.ID)) - ///{ - /// Log.Debug($"Tried to insert action {ToPrettyString(actionId)} into {ToPrettyString(uid)}. Failed due to duplicate actions."); - /// return false; - ///} + if (!TryComp(actionId, out var actionData)) + return false; + if (!TryPrototype(actionId, out var actionProto, actionData)) + return false; + + if (HasAction(uid, actionProto.ID, comp)) + { + Log.Debug($"Tried to insert action {ToPrettyString(actionId)} into {ToPrettyString(uid)}. Failed due to duplicate actions."); + return false; + } if (!_container.Insert(actionId, comp.Container)) { diff --git a/Content.Shared/Bed/Sleep/SleepingSystem.cs b/Content.Shared/Bed/Sleep/SleepingSystem.cs index 0e29fcd98ae..57b93f390c6 100644 --- a/Content.Shared/Bed/Sleep/SleepingSystem.cs +++ b/Content.Shared/Bed/Sleep/SleepingSystem.cs @@ -28,6 +28,7 @@ public sealed partial class SleepingSystem : EntitySystem { [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + [Dependency] private readonly ActionContainerSystem _actionContainer = default!; [Dependency] private readonly BlindableSystem _blindableSystem = default!; [Dependency] private readonly SharedPopupSystem _popupSystem = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; @@ -241,6 +242,8 @@ private void Wake(Entity ent) { RemComp(ent); _actionsSystem.RemoveAction(ent, ent.Comp.WakeAction); + if (ent.Comp.WakeAction != null) + _actionContainer.RemoveAction(ent.Comp.WakeAction.Value); var ev = new SleepStateChangedEvent(false); RaiseLocalEvent(ent, ref ev); diff --git a/Content.Shared/Weapons/Reflect/ReflectComponent.cs b/Content.Shared/Weapons/Reflect/ReflectComponent.cs index 8418c1f3efb..724b4ae697b 100644 --- a/Content.Shared/Weapons/Reflect/ReflectComponent.cs +++ b/Content.Shared/Weapons/Reflect/ReflectComponent.cs @@ -25,6 +25,9 @@ public sealed partial class ReflectComponent : Component [DataField("spread"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] public Angle Spread = Angle.FromDegrees(45); + [DataField("overrideAngle"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField] + public Angle? OverrideAngle = null; + [DataField("soundOnReflect")] public SoundSpecifier? SoundOnReflect = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg"); } diff --git a/Content.Shared/Weapons/Reflect/ReflectSystem.cs b/Content.Shared/Weapons/Reflect/ReflectSystem.cs index 881b547f27f..1c682678ec3 100644 --- a/Content.Shared/Weapons/Reflect/ReflectSystem.cs +++ b/Content.Shared/Weapons/Reflect/ReflectSystem.cs @@ -104,19 +104,35 @@ private bool TryReflectProjectile(EntityUid user, EntityUid reflector, EntityUid return false; } - var rotation = _random.NextAngle(-reflect.Spread / 2, reflect.Spread / 2).Opposite(); - var existingVelocity = _physics.GetMapLinearVelocity(projectile, component: physics); - var relativeVelocity = existingVelocity - _physics.GetMapLinearVelocity(user); - var newVelocity = rotation.RotateVec(relativeVelocity); + if (reflect.OverrideAngle is not null) + { + var overrideAngle = _transform.GetWorldRotation(reflector) + reflect.OverrideAngle.Value; + + var existingVelocity = _physics.GetMapLinearVelocity(projectile, component: physics); + var relativeVelocity = existingVelocity - _physics.GetMapLinearVelocity(user); + var speed = relativeVelocity.Length(); + + var newVelocity = new Vector2((float)Math.Cos(overrideAngle), (float)Math.Sin(overrideAngle)) * speed; + + var difference = newVelocity - existingVelocity; + _physics.SetLinearVelocity(projectile, physics.LinearVelocity + difference, body: physics); + _transform.SetLocalRotation(projectile, overrideAngle); + } + else + { + var rotation = _random.NextAngle(-reflect.Spread / 2, reflect.Spread / 2).Opposite(); + var existingVelocity = _physics.GetMapLinearVelocity(projectile, component: physics); + var relativeVelocity = existingVelocity - _physics.GetMapLinearVelocity(user); + var newVelocity = rotation.RotateVec(relativeVelocity); - // Have the velocity in world terms above so need to convert it back to local. - var difference = newVelocity - existingVelocity; + var difference = newVelocity - existingVelocity; - _physics.SetLinearVelocity(projectile, physics.LinearVelocity + difference, body: physics); + _physics.SetLinearVelocity(projectile, physics.LinearVelocity + difference, body: physics); - var locRot = Transform(projectile).LocalRotation; - var newRot = rotation.RotateVec(locRot.ToVec()); - _transform.SetLocalRotation(projectile, newRot.ToAngle()); + var locRot = Transform(projectile).LocalRotation; + var newRot = rotation.RotateVec(locRot.ToVec()); + _transform.SetLocalRotation(projectile, newRot.ToAngle()); + } if (_netManager.IsServer) { @@ -176,9 +192,17 @@ private bool TryReflectHitscan( _popup.PopupEntity(Loc.GetString("reflect-shot"), user); _audio.PlayPvs(reflect.SoundOnReflect, user, AudioHelpers.WithVariation(0.05f, _random)); } - - var spread = _random.NextAngle(-reflect.Spread / 2, reflect.Spread / 2); - newDirection = -spread.RotateVec(direction); + if (reflect.OverrideAngle is not null) + { + var overrideAngle = _transform.GetWorldRotation(reflector) + reflect.OverrideAngle.Value; + newDirection = new Vector2((float)Math.Cos(overrideAngle), (float)Math.Sin(overrideAngle)); + newDirection = newDirection.Value.Normalized(); + } + else + { + var spread = _random.NextAngle(-reflect.Spread / 2, reflect.Spread / 2); + newDirection = -spread.RotateVec(direction); + } if (shooter != null) _adminLogger.Add(LogType.HitScanHit, LogImpact.Medium, $"{ToPrettyString(user)} reflected hitscan from {ToPrettyString(shotSource)} shot by {ToPrettyString(shooter.Value)}"); @@ -216,7 +240,7 @@ private void OnReflectHandUnequipped(EntityUid uid, ReflectComponent component, private void OnToggleReflect(EntityUid uid, ReflectComponent comp, ref ItemToggledEvent args) { - if (args.User is {} user) + if (args.User is { } user) RefreshReflectUser(user); } diff --git a/Content.Shared/_Sunrise/Eye/NightVision/Systems/NightVisionDeviceSystem.cs b/Content.Shared/_Sunrise/Eye/NightVision/Systems/NightVisionDeviceSystem.cs index 33ec1e2c517..8a3317b62fb 100644 --- a/Content.Shared/_Sunrise/Eye/NightVision/Systems/NightVisionDeviceSystem.cs +++ b/Content.Shared/_Sunrise/Eye/NightVision/Systems/NightVisionDeviceSystem.cs @@ -4,6 +4,8 @@ using Content.Shared.Actions; using Content.Shared.Inventory.Events; using Content.Shared.Toggleable; +using Content.Shared.PowerCell; +using Content.Shared.PowerCell.Components; using Content.Shared.Popups; using Robust.Shared.Audio.Systems; using Robust.Shared.Network; @@ -20,6 +22,7 @@ public sealed class NightVisionDeviceSystem : EntitySystem [Dependency] private readonly SharedPointLightSystem _light = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly SharedPowerCellSystem _cell = default!; public override void Initialize() { @@ -27,6 +30,9 @@ public override void Initialize() SubscribeLocalEvent>(OnNVDTrySee); SubscribeLocalEvent(OnNightVisionDeviceUpdateVisuals); + + SubscribeLocalEvent(OnPowerCellChanged); + SubscribeLocalEvent(OnPowerCellSlotEmpty); SubscribeLocalEvent(OnGetActions); SubscribeLocalEvent(OnToggleAction); @@ -56,7 +62,20 @@ private void OnShutdown(EntityUid uid, NightVisionDeviceComponent component, Com { _actionsSystem.RemoveAction(uid, component.ToggleActionEntity); } + + private void OnPowerCellSlotEmpty(Entity ent, ref PowerCellSlotEmptyEvent args) + { + if (ent.Comp.isPowered) + Toggle(ent); + } + private void OnPowerCellChanged(Entity ent, ref PowerCellChangedEvent args) + { + if (args.Ejected || !_powerCell.HasDrawCharge(ent)) + if (ent.Comp.isPowered) + Toggle(ent); + } + private void OnToggleAction(Entity ent, ref ToggleActionEvent args) { if (args.Handled) @@ -68,6 +87,13 @@ private void OnToggleAction(Entity ent, ref ToggleAc return; } + Toggle(ent); + + args.Handled = true; + } + + public void Toggle(Entity ent) + { var updVisEv = new NightVisionDeviceUpdateVisualsEvent(); RaiseLocalEvent(ent, ref updVisEv); @@ -81,15 +107,22 @@ private void OnToggleAction(Entity ent, ref ToggleAc if (!_light.TryGetLight(ent.Owner, out var light)) return; + + var draw = Comp(ent.Owner); + _cell.QueueUpdate((ent.Owner, draw)); + _cell.SetDrawEnabled((ent.Owner, draw), ent.Comp.Activated); _appearance.SetData(ent, ToggleableLightVisuals.Enabled, ent.Comp.Activated); _light.SetEnabled(ent.Owner, ent.Comp.Activated, comp: light); - var changeEv = new NightVisionDeviceToggledEvent(args.Performer); - RaiseLocalEvent(ent.Owner, ref changeEv); - Dirty(ent); + if (TryComp(ent.Owner, out var transform)) + { + var equipped = transform.ParentUid; - args.Handled = true; + var changeEv = new NightVisionDeviceToggledEvent(equipped); + RaiseLocalEvent(ent.Owner, ref changeEv); + } + Dirty(ent); } } diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/tools/energydome.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/tools/energydome.ftl index 831800399e8..69a8ef37e94 100644 --- a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/tools/energydome.ftl +++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/objects/tools/energydome.ftl @@ -1,4 +1,6 @@ ent-EnergyDomeGeneratorBackpackSyndie = кроваво-красный наспинный генератор щита .desc = Наспинный генератор щита, защищающий владельца от лазеров и пуль, но не позволяющий самому использовать оружие дальнего боя. Использует батареи. +ent-EnergyDomeGeneratorBackpackNT = BR-50c "Бастион" + .desc = Наспинный генератор щита, защищающий владельца от лазеров и пуль, но не позволяющий самому использовать оружие дальнего боя. Использует батареи. ent-EnergyDomeGeneratorPersonalNT = BT-21b "Барьер" - .desc = Генератор щита, защищающий владельца от лазеров и пуль, но не позволяющий самому использовать оружие дальнего боя. Использует батареи. + .desc = Генератор щита, защищающий владельца от лазеров и пуль, но не позволяющий самому использовать оружие дальнего боя. Использует батареи. \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml index 1126c9b73d0..3034e912891 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardsuit-helmets.yml @@ -86,9 +86,9 @@ # Sunrise-Start - type: EyeProtection - type: FlashImmunity - - type: NightVisionDevice - displayColor: "#ebeb00" - displayShader: NVDDisplay +# - type: NightVisionDevice +# displayColor: "#ebeb00" +# displayShader: NVDDisplay # Sunrise-End #Spationaut Hardsuit @@ -405,9 +405,9 @@ Slash: 0.9 Piercing: 0.9 Heat: 0.9 - - type: NightVisionDevice #Sunrise - night vision - displayColor: "#44b855" - displayShader: NVDDisplay +# - type: NightVisionDevice Sunrise - night vision +# displayColor: "#44b855" +# displayShader: NVDDisplay #Syndicate Elite Hardsuit - type: entity @@ -437,9 +437,9 @@ Slash: 0.9 Piercing: 0.9 Heat: 0.9 - - type: NightVisionDevice #Sunrise - night vision - displayColor: "#44b855" - displayShader: NVDDisplay +# - type: NightVisionDevice Sunrise - night vision +# displayColor: "#44b855" +# displayShader: NVDDisplay #Syndicate Commander Hardsuit - type: entity @@ -464,9 +464,9 @@ Slash: 0.9 Piercing: 0.9 Heat: 0.9 - - type: NightVisionDevice #Sunrise - night vision - displayColor: "#44b855" - displayShader: NVDDisplay +# - type: NightVisionDevice Sunrise - night vision +# displayColor: "#44b855" +# displayShader: NVDDisplay #Cybersun Juggernaut Hardsuit - type: entity @@ -491,9 +491,9 @@ Slash: 0.9 Piercing: 0.9 Heat: 0.9 - - type: NightVisionDevice #Sunrise - night vision - displayColor: "#44b855" - displayShader: NVDDisplay +# - type: NightVisionDevice Sunrise - night vision +# displayColor: "#44b855" +# displayShader: NVDDisplay #Wizard Hardsuit - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_parts.yml b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_parts.yml index 6df0488e28f..39ec468f8d2 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_parts.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_parts.yml @@ -501,3 +501,183 @@ tags: - Trash - BorgServiceTorso + +# peace parts +- type: entity + id: LeftArmBorgPeace + parent: BaseBorgArmLeft + name: peace cyborg left arm + components: + - type: Sprite + state: peace_l_arm + - type: Icon + state: peace_l_arm + - type: Tag + tags: + - Trash + - BorgArm + - BorgPeaceLArm + +- type: entity + id: RightArmBorgPeace + parent: BaseBorgArmRight + name: peace cyborg right arm + components: + - type: Sprite + state: peace_r_arm + - type: Icon + state: peace_r_arm + - type: Tag + tags: + - Trash + - BorgArm + - BorgPeaceRArm + +- type: entity + id: LeftLegBorgPeace + parent: BaseBorgLegLeft + name: peace cyborg left leg + components: + - type: Sprite + state: peace_l_leg + - type: Icon + state: peace_l_leg + - type: Tag + tags: + - Trash + - BorgLeg + - BorgPeaceLLeg + +- type: entity + id: RightLegBorgPeace + parent: BaseBorgLegRight + name: peace cyborg right leg + components: + - type: Sprite + state: peace_r_leg + - type: Icon + state: peace_r_leg + - type: Tag + tags: + - Trash + - BorgLeg + - BorgPeaceRLeg + +- type: entity + id: HeadBorgPeace + parent: BaseBorgHead + name: peace cyborg head + components: + - type: Sprite + state: peace_head + - type: Icon + state: peace_head + - type: Tag + tags: + - Trash + - BorgHead + - BorgPeaceHead + +- type: entity + id: TorsoBorgPeace + parent: BaseBorgTorso + name: peace cyborg torso + components: + - type: Sprite + state: peace_chest + - type: Icon + state: peace_chest + - type: Tag + tags: + - Trash + - BorgPeaceTorso + +# clown parts +- type: entity + id: LeftArmBorgClown + parent: BaseBorgArmLeft + name: clown cyborg left arm + components: + - type: Sprite + state: peace_l_arm + - type: Icon + state: peace_l_arm + - type: Tag + tags: + - Trash + - BorgArm + - BorgClownLArm + +- type: entity + id: RightArmBorgClown + parent: BaseBorgArmRight + name: clown cyborg right arm + components: + - type: Sprite + state: peace_r_arm + - type: Icon + state: peace_r_arm + - type: Tag + tags: + - Trash + - BorgArm + - BorgClownRArm + +- type: entity + id: LeftLegBorgClown + parent: BaseBorgLegLeft + name: clown cyborg left leg + components: + - type: Sprite + state: peace_l_leg + - type: Icon + state: peace_l_leg + - type: Tag + tags: + - Trash + - BorgLeg + - BorgClownLLeg + +- type: entity + id: RightLegBorgClown + parent: BaseBorgLegRight + name: clown cyborg right leg + components: + - type: Sprite + state: peace_r_leg + - type: Icon + state: peace_r_leg + - type: Tag + tags: + - Trash + - BorgLeg + - BorgClownRLeg + +- type: entity + id: HeadBorgClown + parent: BaseBorgHead + name: clown cyborg head + components: + - type: Sprite + state: peace_head + - type: Icon + state: peace_head + - type: Tag + tags: + - Trash + - BorgHead + - BorgClownHead + +- type: entity + id: TorsoBorgClown + parent: BaseBorgTorso + name: clown cyborg torso + components: + - type: Sprite + state: peace_chest + - type: Icon + state: peace_chest + - type: Tag + tags: + - Trash + - BorgClownTorso \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Specific/Robotics/endoskeleton.yml b/Resources/Prototypes/Entities/Objects/Specific/Robotics/endoskeleton.yml index 9261e06ea2a..018883d236e 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Robotics/endoskeleton.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Robotics/endoskeleton.yml @@ -166,6 +166,54 @@ whitelist: tags: - BorgJanitorTorso + peace_l_arm+o: + whitelist: + tags: + - BorgPeaceLArm + peace_r_arm+o: + whitelist: + tags: + - BorgPeaceRArm + peace_l_leg+o: + whitelist: + tags: + - BorgPeaceLLeg + peace_r_leg+o: + whitelist: + tags: + - BorgPeaceRLeg + peace_head+o: + whitelist: + tags: + - BorgPeaceHead + peace_chest+o: + whitelist: + tags: + - BorgPeaceTorso + clown_l_arm+o: + whitelist: + tags: + - BorgClownLArm + clown_r_arm+o: + whitelist: + tags: + - BorgClownRArm + clown_l_leg+o: + whitelist: + tags: + - BorgClownLLeg + clown_r_leg+o: + whitelist: + tags: + - BorgClownRLeg + clown_head+o: + whitelist: + tags: + - BorgClownHead + clown_chest+o: + whitelist: + tags: + - BorgClownTorso - type: ContainerContainer containers: part-container: !type:Container @@ -212,6 +260,20 @@ - BorgMiningRLeg - BorgMiningHead - BorgMiningTorso + peace: + - BorgPeaceLArm + - BorgPeaceRArm + - BorgPeaceLLeg + - BorgPeaceRLeg + - BorgPeaceHead + - BorgPeaceTorso + clown: + - BorgClownLArm + - BorgClownRArm + - BorgClownLLeg + - BorgClownRLeg + - BorgClownHead + - BorgClownTorso - type: Construction graph: Cyborg node: start diff --git a/Resources/Prototypes/Entities/Objects/Tools/energydome.yml b/Resources/Prototypes/Entities/Objects/Tools/energydome.yml index 05a2f53a5f2..acd1e3b9aa0 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/energydome.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/energydome.yml @@ -2,7 +2,7 @@ name: blood red personal shield generator description: A personal shield generator that protects the wearer from lasers and bullets but prevents from using ranged weapons himself. Uses a power cell. id: EnergyDomeGeneratorPersonalSyndie - parent: BaseItem + parent: [ BaseItem, BaseSyndicateContraband ] components: - type: Item size: Ginormous diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml index 98508b21bcf..933014a1b6f 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/assembly.yml @@ -145,7 +145,7 @@ suffix: Hydroponics components: - type: Sprite - sprite: Structures/Doors/Airlocks/Standard/hydroponics.rsi + sprite: _Sunrise/Structures/Doors/Airlocks/Standard/hydroponics.rsi #Sunrise-Resprite state: "assembly" - type: entity @@ -154,7 +154,7 @@ suffix: Hydroponics, Glass components: - type: Sprite - sprite: Structures/Doors/Airlocks/Glass/hydroponics.rsi + sprite: _Sunrise/Structures/Doors/Airlocks/Glass/hydroponics.rsi #Sunrise-Resprite state: "assembly" #Maintenance diff --git a/Resources/Prototypes/Entities/Structures/Doors/airlock_groups.yml b/Resources/Prototypes/Entities/Structures/Doors/airlock_groups.yml index 9beedb5e494..a33477ea5a1 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/airlock_groups.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/airlock_groups.yml @@ -5,11 +5,11 @@ atmospherics: Structures/Doors/Airlocks/Standard/atmospherics.rsi basic: Structures/Doors/Airlocks/Standard/basic.rsi cargo: Structures/Doors/Airlocks/Standard/cargo.rsi - chemistry: Structures/Doors/Airlocks/Standard/chemistry.rsi + chemistry: _Sunrise/Structures/Doors/Airlocks/Standard/chemistry.rsi #Sunrise-Resprite command: Structures/Doors/Airlocks/Standard/command.rsi engineering: Structures/Doors/Airlocks/Standard/engineering.rsi freezer: Structures/Doors/Airlocks/Standard/freezer.rsi - hydroponics: Structures/Doors/Airlocks/Standard/hydroponics.rsi + hydroponics: _Sunrise/Structures/Doors/Airlocks/Standard/hydroponics.rsi #Sunrise-Resprite maintenance: Structures/Doors/Airlocks/Standard/maint.rsi medical: Structures/Doors/Airlocks/Standard/medical.rsi science: Structures/Doors/Airlocks/Standard/science.rsi @@ -24,11 +24,11 @@ basic: Structures/Doors/Airlocks/Glass/basic.rsi cargo: Structures/Doors/Airlocks/Glass/cargo.rsi command: Structures/Doors/Airlocks/Glass/command.rsi - chemistry: Structures/Doors/Airlocks/Glass/chemistry.rsi + chemistry: _Sunrise/Structures/Doors/Airlocks/Glass/chemistry.rsi #Sunrise-Resprite science: Structures/Doors/Airlocks/Glass/science.rsi engineering: Structures/Doors/Airlocks/Glass/engineering.rsi glass: Structures/Doors/Airlocks/Glass/glass.rsi - hydroponics: Structures/Doors/Airlocks/Glass/hydroponics.rsi + hydroponics: _Sunrise/Structures/Doors/Airlocks/Glass/hydroponics.rsi #Sunrise-Resprite maintenance: Structures/Doors/Airlocks/Glass/maint.rsi medical: Structures/Doors/Airlocks/Glass/medical.rsi security: Structures/Doors/Airlocks/Glass/security.rsi diff --git a/Resources/Prototypes/_Sunrise/Catalog/Cargo/cargo_armory.yml b/Resources/Prototypes/_Sunrise/Catalog/Cargo/cargo_armory.yml index 28a26597f9c..0f7fa15638a 100644 --- a/Resources/Prototypes/_Sunrise/Catalog/Cargo/cargo_armory.yml +++ b/Resources/Prototypes/_Sunrise/Catalog/Cargo/cargo_armory.yml @@ -14,7 +14,7 @@ sprite: _Sunrise/Objects/Weapons/Guns/Rifles/akms/big.rsi state: icon product: CrateArmoryAKMS - cost: 11000 + cost: 35000 category: cargoproduct-category-name-armory group: market diff --git a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml index 4d0e582ce67..10f16f24a68 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/night_vision_device.yml @@ -38,7 +38,6 @@ - type: PowerCellDraw drawRate: 0 useRate: 20 - - type: ToggleCellDraw - type: entity parent: [ClothingEyesNVD,ShowSecurityIcons] diff --git a/Resources/Prototypes/_Sunrise/Entities/Objects/Tools/energydome.yml b/Resources/Prototypes/_Sunrise/Entities/Objects/Tools/energydome.yml index 4cae859ac84..0b57535583c 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Objects/Tools/energydome.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Objects/Tools/energydome.yml @@ -2,7 +2,7 @@ name: blood red backpack shield generator description: A backpack shield generator that protects the wearer from lasers and bullets but prevents from using ranged weapons himself. Uses a power cell. id: EnergyDomeGeneratorBackpackSyndie - parent: BaseItem + parent: [ BaseItem, BaseSyndicateContraband ] components: - type: Item size: Ginormous @@ -38,11 +38,51 @@ - type: UseDelay delay: 10.0 +- type: entity + name: BR-50c "Bastion" + description: A backpack shield generator that protects the wearer from lasers and bullets but prevents from using ranged weapons himself. Uses a power cell. + id: EnergyDomeGeneratorBackpackNT + parent: [ BaseItem, BaseCentcommContraband ] + components: + - type: Item + size: Ginormous + - type: MultiHandedItem + - type: Clothing + quickEquip: false + slots: + - Back + - type: Sprite + sprite: _Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi + layers: + - state: icon + - type: ContainerContainer + containers: + cell_slot: !type:ContainerSlot + - type: PowerCellSlot + cellSlotId: cell_slot + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellSmall + whitelist: + tags: + - PowerCell + - PowerCellSmall + - type: EnergyDomeGenerator + damageEnergyDraw: 3 + domePrototype: EnergyDomeMediumBlue + - type: PowerCellDraw + drawRate: 2 + useRate: 0 + - type: UseDelay + delay: 10.0 + - type: entity name: BT-21b "Barrier" description: A personal shield generator that protects the wearer from lasers and bullets but prevents from using ranged weapons himself. Uses a power cell. id: EnergyDomeGeneratorPersonalNT - parent: BaseItem + parent: [ BaseItem, BaseCentcommContraband ] components: - type: Item size: Ginormous diff --git a/Resources/Prototypes/_Sunrise/Entities/Structures/Reflector/reflector.yml b/Resources/Prototypes/_Sunrise/Entities/Structures/Reflector/reflector.yml new file mode 100644 index 00000000000..583a6c56e9d --- /dev/null +++ b/Resources/Prototypes/_Sunrise/Entities/Structures/Reflector/reflector.yml @@ -0,0 +1,90 @@ +- type: entity + id: Reflector + name: reflector + placement: + mode: SnapgridCenter + components: + - type: MeleeSound + soundGroups: + Brute: + collection: GlassSmack + - type: Anchorable + - type: Pullable + - type: Rotatable + - type: Machine + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.25,0.25,0.25" + density: 400 + mask: + - MachineMask + layer: + - MachineLayer + - type: Reflect + reflectProb: 1.0 + overrideAngle: 270 + reflects: + - Energy + - type: RCDDeconstructable + deconstructable: false + - type: Sprite + sprite: _Sunrise/Structures/Reflector/reflector.rsi + layers: + - state: reflector_box + shader: unshaded + - type: Repairable + fuelCost: 15 + doAfterDelay: 3 + - type: Damageable + damageContainer: StructuralInorganic + damageModifierSet: RGlass + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1000 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 500 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: WindowShatter + - !type:SpawnEntitiesBehavior + spawn: + ShardGlassReinforced: + min: 1 + max: 2 + PartRodMetal: + min: 1 + max: 2 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Construction + graph: Window + node: shuttleWindow + - type: Appearance + - type: DamageVisuals + thresholds: [5, 10, 20] + damageDivisor: 28 + trackAllDamage: true + damageOverlay: + sprite: Structures/Windows/cracks.rsi + - type: StaticPrice + price: 150 + - type: ExaminableDamage + messages: WindowMessages + - type: InteractionPopup + interactSuccessString: comp-window-knock + messagePerceivedByOthers: comp-window-knock + interactSuccessSound: + path: /Audio/Effects/glass_knock.ogg + - type: BlockWeather \ No newline at end of file diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index a0490fa15ac..d61acb713e0 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -146,6 +146,42 @@ - type: Tag id: BorgMedicalTorso + +- type: Tag + id: BorgPeaceHead + +- type: Tag + id: BorgPeaceLArm + +- type: Tag + id: BorgPeaceLLeg + +- type: Tag + id: BorgPeaceRArm + +- type: Tag + id: BorgPeaceRLeg + +- type: Tag + id: BorgPeaceTorso + +- type: Tag + id: BorgClownHead + +- type: Tag + id: BorgClownLArm + +- type: Tag + id: BorgClownLLeg + +- type: Tag + id: BorgClownRArm + +- type: Tag + id: BorgClownRLeg + +- type: Tag + id: BorgClownTorso - type: Tag id: BorgMiningHead diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest+o.png new file mode 100644 index 00000000000..7dca9a23cb3 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest.png new file mode 100644 index 00000000000..9d672232412 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_chest.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head+o.png new file mode 100644 index 00000000000..bd4fc5d792d Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head.png new file mode 100644 index 00000000000..e8a4dd4d5f6 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_head.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm+o.png new file mode 100644 index 00000000000..b7e7c4e57bb Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm.png new file mode 100644 index 00000000000..7e63942f1a2 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_arm.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg+o.png new file mode 100644 index 00000000000..76ca93d07dc Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg.png new file mode 100644 index 00000000000..33309421fb3 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_l_leg.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm+o.png new file mode 100644 index 00000000000..632582fc9d5 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm.png new file mode 100644 index 00000000000..19087ffeb38 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_arm.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg+o.png new file mode 100644 index 00000000000..b58073a781f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg.png new file mode 100644 index 00000000000..323c31b0d0b Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/clown_r_leg.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/meta.json b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/meta.json index 8cab41943fe..0d737f37e08 100644 --- a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/meta.json @@ -213,6 +213,78 @@ }, { "name": "service_r_leg+o" + }, + { + "name": "peace_l_arm" + }, + { + "name": "peace_r_arm" + }, + { + "name": "peace_l_leg" + }, + { + "name": "peace_r_leg" + }, + { + "name": "peace_chest" + }, + { + "name": "peace_head" + }, + { + "name": "peace_head+o" + }, + { + "name": "peace_chest+o" + }, + { + "name": "peace_l_arm+o" + }, + { + "name": "peace_r_arm+o" + }, + { + "name": "peace_l_leg+o" + }, + { + "name": "peace_r_leg+o" + }, + { + "name": "clown_l_arm" + }, + { + "name": "clown_r_arm" + }, + { + "name": "clown_l_leg" + }, + { + "name": "clown_r_leg" + }, + { + "name": "clown_chest" + }, + { + "name": "clown_head" + }, + { + "name": "clown_head+o" + }, + { + "name": "clown_chest+o" + }, + { + "name": "clown_l_arm+o" + }, + { + "name": "clown_r_arm+o" + }, + { + "name": "clown_l_leg+o" + }, + { + "name": "clown_r_leg+o" } ] } diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest+o.png new file mode 100644 index 00000000000..a123e988955 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest.png new file mode 100644 index 00000000000..65a91a8e19f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_chest.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head+o.png new file mode 100644 index 00000000000..2ccf28c4e85 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head.png new file mode 100644 index 00000000000..bf38656ca44 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_head.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm+o.png new file mode 100644 index 00000000000..b7e7c4e57bb Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm.png new file mode 100644 index 00000000000..7e63942f1a2 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_arm.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg+o.png new file mode 100644 index 00000000000..76ca93d07dc Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg.png new file mode 100644 index 00000000000..33309421fb3 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_l_leg.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm+o.png new file mode 100644 index 00000000000..632582fc9d5 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm.png new file mode 100644 index 00000000000..19087ffeb38 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_arm.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg+o.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg+o.png new file mode 100644 index 00000000000..b58073a781f Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg+o.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg.png b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg.png new file mode 100644 index 00000000000..323c31b0d0b Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/cyborg_parts.rsi/peace_r_leg.png differ diff --git a/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/equipped-BACKPACK.png b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/equipped-BACKPACK.png new file mode 100644 index 00000000000..3989fbf8d30 Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/equipped-BACKPACK.png differ diff --git a/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/icon.png b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/icon.png new file mode 100644 index 00000000000..26402a58305 Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/icon.png differ diff --git a/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-left.png b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-left.png new file mode 100644 index 00000000000..8cf64054d16 Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-left.png differ diff --git a/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-right.png b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-right.png new file mode 100644 index 00000000000..73f546d7a4a Binary files /dev/null and b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/inhand-right.png differ diff --git a/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/meta.json b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/meta.json new file mode 100644 index 00000000000..fc0abb8b460 --- /dev/null +++ b/Resources/Textures/_Sunrise/Objects/Tools/EnergyDome/nanotrasen_back.rsi/meta.json @@ -0,0 +1,34 @@ +{ + "version": 1, + "license": "CLA", + "copyright": "SUNRISE", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + }, + { + "name": "equipped-BACKPACK", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/meta.json b/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/meta.json new file mode 100644 index 00000000000..12e4145b276 --- /dev/null +++ b/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "copyright": "Taked From Paradise Station", + "license": "CC-BY-SA-3.0", + "states": [ + { + "name": "reflector_box", + "directions": 4 + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/reflector_box.png b/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/reflector_box.png new file mode 100644 index 00000000000..d06830e5864 Binary files /dev/null and b/Resources/Textures/_Sunrise/Structures/Reflector/reflector.rsi/reflector_box.png differ diff --git a/Resources/engineCommandPerms.yml b/Resources/engineCommandPerms.yml index 94d7920228c..2047bcd5bd2 100644 --- a/Resources/engineCommandPerms.yml +++ b/Resources/engineCommandPerms.yml @@ -73,19 +73,21 @@ - Flags: MAPPING Commands: - addmap - - loadgrid - - loadmap +#Sunrise-start: loadmap|mapinit|loadgrid|tpgrid|rmmap|rmgrid for moderators +# - loadgrid +# - loadmap - pausemap - querymappaused - - rmgrid - - rmmap - - mapinit +# - rmgrid +# - rmmap +# - mapinit - savegrid - savemap - setambientlight - - tpgrid +# - tpgrid - gridtc - togglespritenetsync +#Sunrise-end - Flags: ADMIN Commands: @@ -111,6 +113,14 @@ - spawn - cspawn - delete +#Sunrise-start: loadmap|mapinit|loadgrid for moderators + - loadgrid + - loadmap + - mapinit + - tpgrid + - rmgrid + - rmmap +#Sunrise-end - Flags: MODERATOR Commands: