Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Bug Fixes #1311

Merged
merged 12 commits into from
Dec 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Content.Shared.Interaction;
using Content.Shared.Mobs.Components;
using Content.Shared.Popups;
using Content.Shared.Silicon.Components;
using Content.Shared.Silicons.Bots;
using Robust.Shared.Audio.Systems;

Expand Down Expand Up @@ -53,9 +54,11 @@ public override HTNOperatorStatus Update(NPCBlackboard blackboard, float frameTi
if (!blackboard.TryGetValue<EntityUid>(TargetKey, out var target, _entMan) || _entMan.Deleted(target))
return HTNOperatorStatus.Failed;

if (!_entMan.TryGetComponent<MedibotComponent>(owner, out var botComp))
if (_entMan.HasComponent<SiliconComponent>(target))
return HTNOperatorStatus.Failed;

if (!_entMan.TryGetComponent<MedibotComponent>(owner, out var botComp))
return HTNOperatorStatus.Failed;

if (!_entMan.TryGetComponent<DamageableComponent>(target, out var damage))
return HTNOperatorStatus.Failed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using Content.Shared.Mobs.Components;
using Content.Shared.Silicons.Bots;
using Content.Shared.Emag.Components;
using Content.Shared.Silicon.Components;


namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators.Specific;

Expand Down Expand Up @@ -64,6 +66,9 @@ public override void Initialize(IEntitySystemManager sysManager)
damageQuery.TryGetComponent(entity, out var damage) &&
!recentlyInjected.HasComponent(entity))
{
if (_entManager.HasComponent<SiliconComponent>(entity))
continue;

// no treating dead bodies
if (!_medibot.TryGetTreatment(medibot, state.CurrentState, out var treatment))
continue;
Expand Down
13 changes: 11 additions & 2 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ private void OnEatMouse(EntityUid uid, FelinidComponent component, EatMouseActio

if (hunger.CurrentThreshold == Shared.Nutrition.Components.HungerThreshold.Overfed)
{
_popupSystem.PopupEntity(Loc.GetString("food-system-you-cannot-eat-any-more"), uid, uid, Shared.Popups.PopupType.SmallCaution);
_popupSystem.PopupEntity(
Loc.GetString("food-system-you-cannot-eat-any-more"),
uid,
uid,
Shared.Popups.PopupType.SmallCaution);
return;
}

Expand All @@ -147,15 +151,20 @@ private void OnEatMouse(EntityUid uid, FelinidComponent component, EatMouseActio
_actionsSystem.SetCharges(component.HairballAction, 1); // You get the charge back and that's it. Tough.
_actionsSystem.SetEnabled(component.HairballAction, true);
}

Del(component.EatActionTarget.Value);
component.EatActionTarget = null;

_audio.PlayPvs("/Audio/DeltaV/Items/eatfood.ogg", uid, AudioHelpers.WithVariation(0.15f));

_hungerSystem.ModifyHunger(uid, 50f, hunger);

if (component.EatAction != null)
if (component.EatAction is not null && _actionsSystem.TryGetActionData(uid, out var result))
{
if (result.AttachedEntity == null)
return;
_actionsSystem.RemoveAction(uid, component.EatAction.Value);
}
}

private void SpawnHairball(EntityUid uid, FelinidComponent component)
Expand Down
3 changes: 1 addition & 2 deletions Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ private void OnBuckleInteractHand(Entity<BuckleComponent> ent, ref InteractHandE
return;

if (ent.Comp.BuckledTo != null)
TryUnbuckle(ent!, args.User, popup: true);
args.Handled = TryUnbuckle(ent!, args.User, popup: true);

// TODO BUCKLE add out bool for whether a pop-up was generated or not.
args.Handled = true;
}

private void AddStrapVerbs(EntityUid uid, StrapComponent component, GetVerbsEvent<InteractionVerb> args)
Expand Down
12 changes: 0 additions & 12 deletions Content.Shared/Fluids/Components/PreventSpillerComponent.cs

This file was deleted.

6 changes: 1 addition & 5 deletions Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private void OnExamined(Entity<SpillableComponent> entity, ref ExaminedEvent arg

private void AddSpillVerb(Entity<SpillableComponent> entity, ref GetVerbsEvent<Verb> args)
{
if (!args.CanAccess || !args.CanInteract)
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
return;

if (!_solutionContainerSystem.TryGetSolution(args.Target, entity.Comp.SolutionName, out var soln, out var solution))
Expand All @@ -46,10 +46,6 @@ private void AddSpillVerb(Entity<SpillableComponent> entity, ref GetVerbsEvent<V
if (solution.Volume == FixedPoint2.Zero)
return;

if (HasComp<PreventSpillerComponent>(args.User))
return;


Verb verb = new()
{
Text = Loc.GetString("spill-target-verb-get-data-text")
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
sprite: Clothing/Hands/Gloves/northstar.rsi
- type: MeleeWeapon
autoAttack: true
attackRate: 4
attackRate: 0.25
heavyStaminaCost: 2
heavyDamageBaseModifier: 1.05
maxTargets: 1
Expand Down
4 changes: 0 additions & 4 deletions Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1755,10 +1755,6 @@
- type: FelinidFood # Nyanotrasen - Felinid, ability to eat mice, see Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs
- type: BadFood
- type: NonSpreaderZombie
- type: PreventSpiller
- type: RandomBark
barkMultiplier: 0.3
barkType: mouse
- type: FireVisuals
sprite: Mobs/Effects/onfire.rsi
normalState: Mouse_burning
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/NPCs/space.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,4 @@
parent: MobCobraSpace
suffix: "Salvage Ruleset"
components:
- type: SalvageMobRestrictions
- type: SalvageMobRestrictions
Loading