diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index c107bbab7d4..b5bd54e8d72 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -10,7 +10,7 @@ using Content.Server.Materials; using Content.Server.Popups; using Content.Server.Power.EntitySystems; -using Content.Server.Traits.Assorted; +using Content.Shared.Silicon.Components; // Goobstation using Content.Shared.Atmos; using Content.Shared.CCVar; using Content.Shared.Chemistry.Components; @@ -204,12 +204,9 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(bodyToClone)) + return false; // Goobstation: Don't clone IPCs. // Yes, this can return true without making a body. If it returns true, we're making clone soup instead. if (CheckGeneticDamage(uid, bodyToClone, clonePod, out var geneticDamage, failChanceModifier)) diff --git a/Content.Server/Mech/Systems/MechSystem.cs b/Content.Server/Mech/Systems/MechSystem.cs index b738d28b467..b7bbc4ad473 100644 --- a/Content.Server/Mech/Systems/MechSystem.cs +++ b/Content.Server/Mech/Systems/MechSystem.cs @@ -234,7 +234,6 @@ private void OnMechEntry(EntityUid uid, MechComponent component, MechEntryEvent TryInsert(uid, args.Args.User, component); _actionBlocker.UpdateCanMove(uid); - args.Handled = true; } @@ -244,7 +243,6 @@ private void OnMechExit(EntityUid uid, MechComponent component, MechExitEvent ar return; TryEject(uid, component); - args.Handled = true; } diff --git a/Content.Server/Objectives/Components/PickRandomPersonComponent.cs b/Content.Server/Objectives/Components/PickRandomPersonComponent.cs index 4188b1da3d2..7de6cb71468 100644 --- a/Content.Server/Objectives/Components/PickRandomPersonComponent.cs +++ b/Content.Server/Objectives/Components/PickRandomPersonComponent.cs @@ -8,4 +8,6 @@ namespace Content.Server.Objectives.Components; [RegisterComponent, Access(typeof(KillPersonConditionSystem))] public sealed partial class PickRandomPersonComponent : Component { + [DataField] + public bool NeedsOrganic; // Goobstation: Only pick non-silicon players. } diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index c1caa819e44..73ae7a94f83 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -54,7 +54,7 @@ private void OnPersonAssigned(EntityUid uid, PickRandomPersonComponent comp, ref return; // no other humans to kill - var allHumans = _mind.GetAliveHumansExcept(args.MindId); + var allHumans = _mind.GetAliveHumans(args.MindId, comp.NeedsOrganic); if (allHumans.Count == 0) { args.Cancelled = true; diff --git a/Content.Server/PowerCell/PowerCellSystem.cs b/Content.Server/PowerCell/PowerCellSystem.cs index f7b4cf02491..221a3909e26 100644 --- a/Content.Server/PowerCell/PowerCellSystem.cs +++ b/Content.Server/PowerCell/PowerCellSystem.cs @@ -228,8 +228,8 @@ private void OnCellEmpAttempt(EntityUid uid, PowerCellComponent component, EmpAt private void OnCellSlotExamined(EntityUid uid, PowerCellSlotComponent component, ExaminedEvent args) { - TryGetBatteryFromSlot(uid, out var battery); - OnBatteryExamined(uid, battery, args); + TryGetBatteryFromSlot(uid, out var batteryEnt, out var battery); // Goobstation + OnBatteryExamined(batteryEnt.GetValueOrDefault(uid), battery, args); // Goobstation } private void OnBatteryExamined(EntityUid uid, BatteryComponent? component, ExaminedEvent args) diff --git a/Content.Server/Silicon/Charge/Systems/SiliconChargeSystem.cs b/Content.Server/Silicon/Charge/Systems/SiliconChargeSystem.cs index 444b65530b2..b1fef0f1d3a 100644 --- a/Content.Server/Silicon/Charge/Systems/SiliconChargeSystem.cs +++ b/Content.Server/Silicon/Charge/Systems/SiliconChargeSystem.cs @@ -182,8 +182,9 @@ private float SiliconHeatEffects(EntityUid silicon, SiliconComponent siliconComp if (!_random.Prob(Math.Clamp(temperComp.CurrentTemperature / (upperThresh * 5), 0.001f, 0.9f))) return hotTempMulti; - _flammable.AdjustFireStacks(silicon, Math.Clamp(siliconComp.FireStackMultiplier, -10, 10), flamComp); - _flammable.Ignite(silicon, silicon, flamComp); + // Goobstation: Replaced by KillOnOverheatSystem + //_flammable.AdjustFireStacks(silicon, Math.Clamp(siliconComp.FireStackMultiplier, -10, 10), flamComp); + //_flammable.Ignite(silicon, silicon, flamComp); return hotTempMulti; } diff --git a/Content.Server/Silicon/WeldingHealable/WeldingHealableSystem.cs b/Content.Server/Silicon/WeldingHealable/WeldingHealableSystem.cs index df7ac7ac0fd..5bbbf398310 100644 --- a/Content.Server/Silicon/WeldingHealable/WeldingHealableSystem.cs +++ b/Content.Server/Silicon/WeldingHealable/WeldingHealableSystem.cs @@ -6,7 +6,9 @@ using Content.Shared.Damage; using Content.Shared.Interaction; using Content.Shared.Popups; -using Content.Shared.Tools.Components; +using Content.Shared.Tools; +using Content.Shared._Shitmed.Targeting; +using Content.Shared.Body.Systems; using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem; namespace Content.Server.Silicon.WeldingHealable; @@ -17,7 +19,7 @@ public sealed class WeldingHealableSystem : SharedWeldingHealableSystem [Dependency] private readonly DamageableSystem _damageableSystem = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; - + [Dependency] private readonly SharedBodySystem _bodySystem = default!; public override void Initialize() { SubscribeLocalEvent(Repair); @@ -31,7 +33,7 @@ private void OnRepairFinished(EntityUid uid, WeldingHealableComponent healableCo || !TryComp(args.Used, out var component) || damageable.DamageContainerID is null || !component.DamageContainers.Contains(damageable.DamageContainerID) - || !HasDamage(damageable, component) + || !HasDamage((args.Target.Value, damageable), component, args.User) || !TryComp(args.Used, out var welder) || !TryComp(args.Used, out var solutionContainer)) return; @@ -70,7 +72,7 @@ private async void Repair(EntityUid uid, WeldingHealableComponent healableCompon || !EntityManager.TryGetComponent(args.Target, out DamageableComponent? damageable) || damageable.DamageContainerID is null || !component.DamageContainers.Contains(damageable.DamageContainerID) - || !HasDamage(damageable, component) + || !HasDamage((args.Target, damageable), component, args.User) || !_toolSystem.HasQuality(args.Used, component.QualityNeeded) || args.User == args.Target && !component.AllowSelfHeal) return; @@ -97,9 +99,20 @@ private bool HasDamage(DamageableComponent component, WeldingHealingComponent he return false; foreach (var type in healable.Damage.DamageDict) - if (component.Damage.DamageDict[type.Key].Value > 0) + if (damageable.Comp.Damage.DamageDict[type.Key].Value > 0) return true; + + // In case the healer is a humanoid entity with targeting, we run the check on the targeted parts. + if (!TryComp(user, out TargetingComponent? targeting)) + return false; + + var (targetType, targetSymmetry) = _bodySystem.ConvertTargetBodyPart(targeting.Target); + foreach (var part in _bodySystem.GetBodyChildrenOfType(damageable, targetType, symmetry: targetSymmetry)) + if (TryComp(part.Id, out var damageablePart)) + foreach (var type in healable.Damage.DamageDict) + if (damageablePart.Damage.DamageDict[type.Key].Value > 0) + return true; + return false; } } - diff --git a/Content.Server/_Goobstation/Mech/Equipment/EntitySystems/MechGunSystem.cs b/Content.Server/_Goobstation/Mech/Equipment/EntitySystems/MechGunSystem.cs index 5d23f2ebc5b..014204582c9 100644 --- a/Content.Server/_Goobstation/Mech/Equipment/EntitySystems/MechGunSystem.cs +++ b/Content.Server/_Goobstation/Mech/Equipment/EntitySystems/MechGunSystem.cs @@ -2,26 +2,27 @@ using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Shared.Mech.Components; +using Content.Shared.Mech.EntitySystems; using Content.Shared.Mech.Equipment.Components; using Content.Shared.Throwing; -using Content.Shared.Weapons.Ranged.Systems; +using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Random; namespace Content.Server.Mech.Equipment.EntitySystems; public sealed class MechGunSystem : EntitySystem { - [Dependency] private readonly IRobustRandom _random = default!; - [Dependency] private readonly ThrowingSystem _throwing = default!; [Dependency] private readonly MechSystem _mech = default!; [Dependency] private readonly BatterySystem _battery = default!; public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(MechGunShot); + SubscribeLocalEvent(OnHandleMechEquipmentBattery); + SubscribeLocalEvent(OnCheckBattery); + SubscribeLocalEvent(OnCheckBattery); } - private void MechGunShot(EntityUid uid, MechEquipmentComponent component, ref GunShotEvent args) + private void OnHandleMechEquipmentBattery(EntityUid uid, MechEquipmentComponent component, HandleMechEquipmentBatteryEvent args) { if (!component.EquipmentOwner.HasValue) return; @@ -31,11 +32,22 @@ private void MechGunShot(EntityUid uid, MechEquipmentComponent component, ref Gu if (TryComp(uid, out var battery)) { + var ev = new CheckMechWeaponBatteryEvent(battery); + RaiseLocalEvent(uid, ref ev); + + if (ev.Cancelled) + return; + ChargeGunBattery(uid, battery); - return; } } + private void OnCheckBattery(EntityUid uid, BatteryAmmoProviderComponent component, CheckMechWeaponBatteryEvent args) + { + if (args.Battery.CurrentCharge > component.FireCost) + args.Cancelled = true; + } + private void ChargeGunBattery(EntityUid uid, BatteryComponent component) { if (!TryComp(uid, out var mechEquipment) || !mechEquipment.EquipmentOwner.HasValue) @@ -59,3 +71,6 @@ private void ChargeGunBattery(EntityUid uid, BatteryComponent component) _battery.SetCharge(uid, component.MaxCharge, component); } } + +[ByRefEvent] +public record struct CheckMechWeaponBatteryEvent(BatteryComponent Battery, bool Cancelled = false); \ No newline at end of file diff --git a/Content.Server/_Goobstation/Temperature/KillOnOverheatComponent.cs b/Content.Server/_Goobstation/Temperature/KillOnOverheatComponent.cs new file mode 100644 index 00000000000..fc4e6155395 --- /dev/null +++ b/Content.Server/_Goobstation/Temperature/KillOnOverheatComponent.cs @@ -0,0 +1,16 @@ +using Content.Shared.Atmos; + +namespace Content.Server._Goobstation.Temperature; + +/// +/// Kills an entity when its temperature goes over a threshold. +/// +[RegisterComponent, Access(typeof(KillOnOverheatSystem))] +public sealed partial class KillOnOverheatComponent : Component +{ + [DataField] + public float OverheatThreshold = Atmospherics.T0C + 110f; + + [DataField] + public LocId OverheatPopup = "ipc-overheat-popup"; +} diff --git a/Content.Server/_Goobstation/Temperature/KillOnOverheatSystem.cs b/Content.Server/_Goobstation/Temperature/KillOnOverheatSystem.cs new file mode 100644 index 00000000000..9b32e344376 --- /dev/null +++ b/Content.Server/_Goobstation/Temperature/KillOnOverheatSystem.cs @@ -0,0 +1,33 @@ +using Content.Server.Temperature.Components; +using Content.Shared.IdentityManagement; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; +using Content.Shared.Mobs.Systems; +using Content.Shared.Popups; +using Content.Shared.Damage.Components; + +namespace Content.Server._Goobstation.Temperature; + +public sealed class KillOnOverheatSystem : EntitySystem +{ + [Dependency] private readonly MobStateSystem _mob = default!; + [Dependency] private readonly SharedPopupSystem _popup = default!; + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp, out var temp, out var mob)) + { + if (mob.CurrentState == MobState.Dead + || temp.CurrentTemperature < comp.OverheatThreshold + || HasComp(uid)) + continue; + + var msg = Loc.GetString(comp.OverheatPopup, ("name", Identity.Name(uid, EntityManager))); + _popup.PopupEntity(msg, uid, PopupType.LargeCaution); + _mob.ChangeMobState(uid, MobState.Dead, mob); + } + } +} diff --git a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs index b1e0c00f6df..83acf1701d4 100644 --- a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs +++ b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs @@ -22,9 +22,15 @@ using Robust.Shared.Timing; // Goobstation Change -using Content.Shared.Emag.Components; +using Content.Shared.CCVar; +using Content.Shared._Goobstation.CCVar; using Content.Shared.Emag.Systems; using Content.Shared.Weapons.Ranged.Events; +using Content.Shared.Hands.Components; +using Content.Shared.Hands.EntitySystems; +using Content.Shared.Inventory.VirtualItem; +using Robust.Shared.Configuration; +using Content.Shared.Implants.Components; namespace Content.Shared.Mech.EntitySystems; @@ -44,7 +50,13 @@ public abstract class SharedMechSystem : EntitySystem [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!; + [Dependency] private readonly SharedHandsSystem _hands = default!; // Goobstation Change + [Dependency] private readonly SharedVirtualItemSystem _virtualItem = default!; // Goobstation Change + [Dependency] private readonly IConfigurationManager _config = default!; // Goobstation Change + // Goobstation: Local variable for checking if mech guns can be used out of them. + private bool _canUseMechGunOutside; + /// public override void Initialize() { @@ -61,6 +73,15 @@ public override void Initialize() SubscribeLocalEvent(OnGetMeleeWeapon); SubscribeLocalEvent(OnCanAttackFromContainer); SubscribeLocalEvent(OnAttackAttempt); + SubscribeLocalEvent(OnEntGotRemovedFromContainer); + SubscribeLocalEvent(OnShotAttempted); // Goobstation + Subs.CVar(_config, GoobCVars.MechGunOutsideMech, value => _canUseMechGunOutside = value, true); // Goobstation + } + + // GoobStation: Fixes scram implants or teleports locking the pilot out of being able to move. + private void OnEntGotRemovedFromContainer(EntityUid uid, MechPilotComponent component, EntGotRemovedFromContainerMessage args) + { + TryEject(component.Mech, pilot: uid); } private void OnToggleEquipmentAction(EntityUid uid, MechComponent component, MechToggleEquipmentEvent args) @@ -374,6 +395,7 @@ public bool TryInsert(EntityUid uid, EntityUid? toInsert, MechComponent? compone SetupUser(uid, toInsert.Value); _container.Insert(toInsert.Value, component.PilotSlot); UpdateAppearance(uid, component); + UpdateHands(toInsert.Value, uid, true); // Goobstation return true; } @@ -382,23 +404,71 @@ public bool TryInsert(EntityUid uid, EntityUid? toInsert, MechComponent? compone /// /// /// + /// The pilot to eject /// Whether or not the pilot was ejected. - public bool TryEject(EntityUid uid, MechComponent? component = null) + public bool TryEject(EntityUid uid, MechComponent? component = null, EntityUid? pilot = null) { if (!Resolve(uid, ref component)) return false; - if (component.PilotSlot.ContainedEntity == null) - return false; + if (component.PilotSlot.ContainedEntity != null) + pilot = component.PilotSlot.ContainedEntity.Value; - var pilot = component.PilotSlot.ContainedEntity.Value; + if (pilot == null) + return false; - RemoveUser(uid, pilot); - _container.RemoveEntity(uid, pilot); + RemoveUser(uid, pilot.Value); + _container.RemoveEntity(uid, pilot.Value); UpdateAppearance(uid, component); + UpdateHands(pilot.Value, uid, false); // Goobstation return true; } + // Goobstation Change Start + private void UpdateHands(EntityUid uid, EntityUid mech, bool active) + { + if (!TryComp(uid, out var handsComponent)) + return; + + if (active) + BlockHands(uid, mech, handsComponent); + else + FreeHands(uid, mech); + } + + private void BlockHands(EntityUid uid, EntityUid mech, HandsComponent handsComponent) + { + var freeHands = 0; + foreach (var hand in _hands.EnumerateHands(uid, handsComponent)) + { + if (hand.HeldEntity == null) + { + freeHands++; + continue; + } + + // Is this entity removable? (they might have handcuffs on) + if (HasComp(hand.HeldEntity) && hand.HeldEntity != mech) + continue; + + _hands.DoDrop(uid, hand, true, handsComponent); + freeHands++; + if (freeHands == 2) + break; + } + if (_virtualItem.TrySpawnVirtualItemInHand(mech, uid, out var virtItem1)) + EnsureComp(virtItem1.Value); + + if (_virtualItem.TrySpawnVirtualItemInHand(mech, uid, out var virtItem2)) + EnsureComp(virtItem2.Value); + } + + private void FreeHands(EntityUid uid, EntityUid mech) + { + _virtualItem.DeleteInHandsMatching(uid, mech); + } + + // Goobstation Change End private void OnGetMeleeWeapon(EntityUid uid, MechPilotComponent component, GetMeleeWeaponEvent args) { if (args.Handled) @@ -423,6 +493,21 @@ private void OnAttackAttempt(EntityUid uid, MechPilotComponent component, Attack args.Cancel(); } + // Goobstation: Prevent guns being used out of mechs if CCVAR is set. + private void OnShotAttempted(EntityUid uid, MechEquipmentComponent component, ref ShotAttemptedEvent args) + { + if (!component.EquipmentOwner.HasValue + || !HasComp(component.EquipmentOwner.Value)) + { + if (!_canUseMechGunOutside) + args.Cancel(); + return; + } + + var ev = new HandleMechEquipmentBatteryEvent(); + RaiseLocalEvent(uid, ev); + } + private void UpdateAppearance(EntityUid uid, MechComponent? component = null, AppearanceComponent? appearance = null) { @@ -490,3 +575,12 @@ public sealed partial class MechExitEvent : SimpleDoAfterEvent public sealed partial class MechEntryEvent : SimpleDoAfterEvent { } + +/// +/// Event raised when an user attempts to fire a mech weapon to check if its battery is drained +/// + +[Serializable, NetSerializable] +public sealed partial class HandleMechEquipmentBatteryEvent : EntityEventArgs +{ +} diff --git a/Content.Shared/Mind/SharedMindSystem.cs b/Content.Shared/Mind/SharedMindSystem.cs index 994d230e8bd..9454443eb33 100644 --- a/Content.Shared/Mind/SharedMindSystem.cs +++ b/Content.Shared/Mind/SharedMindSystem.cs @@ -1,5 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; +using Content.Shared.Silicon.Components; // Goobstation using Content.Shared.Administration.Logs; using Content.Shared.Database; using Content.Shared.Examine; @@ -538,22 +539,23 @@ public string MindOwnerLoggingString(MindComponent mind) /// /// Returns a list of every living humanoid player's minds, except for a single one which is exluded. /// - public List GetAliveHumansExcept(EntityUid exclude) + public HashSet> GetAliveHumans(EntityUid? exclude = null, bool excludeSilicon = false) { - var mindQuery = EntityQuery(); - - var allHumans = new List(); + var allHumans = new HashSet>(); // HumanoidAppearanceComponent is used to prevent mice, pAIs, etc from being chosen - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var mc, out var mobState, out _)) + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var mobState, out _)) { - // the player needs to have a mind and not be the excluded one - if (mc.Mind == null || mc.Mind == exclude) + // the player needs to have a mind and not be the excluded one + + // the player has to be alive + if (!TryGetMind(uid, out var mind, out var mindComp) || mind == exclude || !_mobState.IsAlive(uid, mobState)) continue; - // the player has to be alive - if (_mobState.IsAlive(uid, mobState)) - allHumans.Add(mc.Mind.Value); + // Goobstation: Skip IPCs from selections + if (excludeSilicon && HasComp(uid)) + continue; + + allHumans.Add(new Entity(mind, mindComp)); } return allHumans; diff --git a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs index e25328ada61..c393d2f6876 100644 --- a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs +++ b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs @@ -220,6 +220,10 @@ public sealed partial class MeleeWeaponComponent : Component /// [DataField, AutoNetworkedField] public bool MustBeEquippedToUse = false; + + // Goobstation + [DataField, AutoNetworkedField] + public bool CanWideSwing = true; } /// diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 99db6a5f70c..ce2228ff66b 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -174,7 +174,8 @@ private void OnHeavyAttack(HeavyAttackEvent msg, EntitySessionEventArgs args) return; if (!TryGetWeapon(user, out var weaponUid, out var weapon) || - weaponUid != GetEntity(msg.Weapon)) + weaponUid != GetEntity(msg.Weapon) || + !weapon.CanWideSwing) // Goobstation Change { return; } diff --git a/Content.Shared/_Goobstation/CCVars/CCVars.Goob.cs b/Content.Shared/_Goobstation/CCVars/CCVars.Goob.cs new file mode 100644 index 00000000000..16ef7e9da40 --- /dev/null +++ b/Content.Shared/_Goobstation/CCVars/CCVars.Goob.cs @@ -0,0 +1,17 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared._Goobstation.CCVar; + +[CVarDefs] +public sealed partial class GoobCVars +{ + #region Mechs + + /// + /// Whether or not players can use mech guns outside of mechs. + /// + public static readonly CVarDef MechGunOutsideMech = + CVarDef.Create("mech.gun_outside_mech", true, CVar.SERVER | CVar.REPLICATED); + + #endregion +} diff --git a/Resources/Locale/en-US/_Goobstation/power/silicons.ftl b/Resources/Locale/en-US/_Goobstation/power/silicons.ftl new file mode 100644 index 00000000000..9d52b2210d1 --- /dev/null +++ b/Resources/Locale/en-US/_Goobstation/power/silicons.ftl @@ -0,0 +1 @@ +ipc-overheat-popup = {$name}'s circuits shut down from overheating! diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml index 9747f2436ce..212ad96c668 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml @@ -39,6 +39,18 @@ # safe: false # - type: EyeProtection # You'll want this if your robot can't wear glasses, like an IPC. # protectionTime: 12 + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.35 + density: 185 + restitution: 0.0 + mask: + - MobMask + layer: + - MobLayer - type: Silicon entityType: enum.SiliconType.Player batteryPowered: false # Needs to also have a battery! @@ -53,7 +65,7 @@ 0: 0.00 - type: Temperature - heatDamageThreshold: 325 + heatDamageThreshold: 1800 # GoobStation: Roughly the melting point of mild steels coldDamageThreshold: 260 currentTemperature: 310.15 specificHeat: 42 @@ -64,6 +76,7 @@ types: Heat: 3 #per second, scales with temperature & other constants atmosTemperatureTransferEfficiency: 0.05 + - type: KillOnOverheat # GoobStation - type: Deathgasp prototype: SiliconDeathgasp needsCritical: false @@ -165,7 +178,7 @@ canResistFire: true damage: types: - Heat: 0.75 #per second, scales with number of fire 'stacks' + Heat: 0 # GoobStation: Replaced fire damage with overheating shutdown # - type: Barotrauma # Not particularly modifiable. In the future, some response to pressure changes would be nice. # damage: # types: @@ -315,6 +328,12 @@ - type: LightningTarget priority: 1 lightningExplode: false + - type: ComplexInteraction + - type: FootPrints + - type: Carriable + - type: Targeting + - type: SurgeryTarget + - type: LayingDown - type: damageModifierSet @@ -323,5 +342,4 @@ Poison: 0 Cold: 0.2 Heat: 2 - Shock: 2.5 - + Shock: 2.5 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml index c062fcf5bbb..098dceb8bc5 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Mech/mechs.yml @@ -42,6 +42,7 @@ enum.MechUiKey.Key: type: MechBoundUserInterface - type: MeleeWeapon + canWideSwing: false hidden: true attackRate: 1.3333 damage: diff --git a/Resources/Prototypes/_EinsteinEngines/Damage/modifier_sets.yml b/Resources/Prototypes/_EinsteinEngines/Damage/modifier_sets.yml new file mode 100644 index 00000000000..b8ef8204ebf --- /dev/null +++ b/Resources/Prototypes/_EinsteinEngines/Damage/modifier_sets.yml @@ -0,0 +1,7 @@ +- type: damageModifierSet + id: IPC + coefficients: + Poison: 0 + Cold: 0.2 + Heat: 2 + Shock: 2.5 diff --git a/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Gun/industrial.yml b/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Gun/industrial.yml index e1d37125727..070b2553835 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Gun/industrial.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Gun/industrial.yml @@ -17,7 +17,7 @@ path: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg - type: ProjectileBatteryAmmoProvider proto: BulletKineticShuttle - fireCost: 50 + fireCost: 0.1 - type: Appearance - type: AmmoCounter # TODO: Plasma Cutter diff --git a/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Melee/industrial.yml b/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Melee/industrial.yml index 89cd78520e1..416af7e3ad3 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Melee/industrial.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Objects/Specific/Mech/Weapons/Melee/industrial.yml @@ -1,5 +1,5 @@ - type: entity - id: WeaponMechMelleDrill + id: WeaponMechMeleeDrill parent: BaseMechWeaponMelee name: exosuit drill suffix: Mech Weapon, Melee, Industrial @@ -12,6 +12,7 @@ - Pickaxe - IndustrialMech - type: MeleeWeapon + canWideSwing: false autoAttack: true angle: 0 wideAnimationRotation: -90 @@ -25,7 +26,7 @@ Structural: 40 # ~10 seconds for solid wall / ~21 secods for reinforced wall - type: entity - id: WeaponMechMelleDrillDiamond + id: WeaponMechMeleeDrillDiamond parent: BaseMechWeaponMelee name: diamond-tipped exosuit drill suffix: Mech Weapon, Melee, Industrial @@ -38,6 +39,7 @@ - Pickaxe - IndustrialMech - type: MeleeWeapon + canWideSwing: false autoAttack: true angle: 0 wideAnimationRotation: -90 diff --git a/Resources/Prototypes/_Goobstation/Recipes/Lathes/mech_parts.yml b/Resources/Prototypes/_Goobstation/Recipes/Lathes/mech_parts.yml index 7a9f9878d40..be3aaff08f0 100644 --- a/Resources/Prototypes/_Goobstation/Recipes/Lathes/mech_parts.yml +++ b/Resources/Prototypes/_Goobstation/Recipes/Lathes/mech_parts.yml @@ -202,7 +202,7 @@ # Equipment - type: latheRecipe id: MechEquipmentDrill - result: WeaponMechMelleDrill + result: WeaponMechMeleeDrill category: MechEquipment completetime: 10 materials: @@ -211,7 +211,7 @@ - type: latheRecipe id: MechEquipmentDrillDiamond - result: WeaponMechMelleDrillDiamond + result: WeaponMechMeleeDrillDiamond category: MechEquipment completetime: 10 materials: