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

Cargo Sell - fix order of checks, no selling station pets. #2354

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Robust.Shared.Map;
using Robust.Shared.Random;
using Robust.Shared.Audio;
using Content.Shared.Mind.Components; // Frontier

namespace Content.Server.Cargo.Systems;

Expand Down Expand Up @@ -319,15 +320,14 @@ private void GetPalletGoods(EntityUid consoleUid, EntityUid gridUid, out HashSet

private bool CanSell(EntityUid uid, TransformComponent xform)
{
if (_mobQuery.HasComponent(uid))
{
if (_mobQuery.GetComponent(uid).CurrentState == MobState.Alive)
{
return false;
}
// Frontier: Look for blacklisted items and stop the selling of the container.
if (_blacklistQuery.HasComponent(uid))
return false;

return true;
}
// Frontier: allow selling dead mobs
if (_mobQuery.TryComp(uid, out var mob) && mob.CurrentState != MobState.Dead)
return false;
// End Frontier

var complete = IsBountyComplete(uid, out var bountyEntities);

Expand All @@ -342,12 +342,6 @@ private bool CanSell(EntityUid uid, TransformComponent xform)
return false;
}

// Look for blacklisted items and stop the selling of the container.
if (_blacklistQuery.HasComponent(uid))
{
return false;
}

return true;
}

Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/NPCs/pets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@
attributes:
proper: true
gender: male
- type: CargoSellBlacklist # Frontier

- type: entity
name: Tropico
Expand Down
10 changes: 7 additions & 3 deletions Resources/Prototypes/_NF/Entities/Mobs/NPCs/pets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- Cat
- PetsNT
- type: ShowJobIcons
- type: CargoSellBlacklist

- type: entity
name: Clarpy
Expand Down Expand Up @@ -85,6 +86,7 @@
factions:
- Cat
- PirateNF
- type: CargoSellBlacklist

- type: entity
name: Cappy
Expand Down Expand Up @@ -146,12 +148,13 @@
- type: InteractionPopup
interactSuccessSound:
path: /Audio/_NF/Animals/nfsdcat_meow.ogg
- type: CargoSellBlacklist

- type: entity
name: Clugg
parent: [NFMobPet, MobCatCaracalGhost]
id: MobCatClugg
description:
description:
components:
- type: Sprite
drawdepth: Mobs
Expand Down Expand Up @@ -180,7 +183,7 @@
name: Mistake
parent: MobCatGhost
id: MobCatMistake
description: ???
description: "???"
components:
- type: Sprite
drawdepth: Mobs
Expand Down Expand Up @@ -256,4 +259,5 @@
- enum.DamageStateVisualLayers.Base:
kobold: YipYipColors
- horns:
horns_curled: YipYipHornColors
horns_curled: YipYipHornColors
- type: CargoSellBlacklist
Loading