Skip to content
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
15 changes: 15 additions & 0 deletions Content.Server/Cargo/Systems/PricingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
using Content.Server._Mono.VendingMachine; // Mono
using System.Linq;
using Content.Shared.Research.Prototypes;
using Content.Shared.Body.Organ; // LuaM
using Content.Shared.Body.Part; // LuaM


namespace Content.Server.Cargo.Systems;

Expand Down Expand Up @@ -276,6 +279,10 @@ public double GetPrice(EntityUid uid, bool includeContents = true)
{
foreach (var ent in container.ContainedEntities)
{
// LuaM-start:
if (HasComp<OrganComponent>(ent) && HasComp<BodyPartComponent>(uid)) // Skip organs
continue;
// LuaM-end
price += GetPrice(ent);
}
}
Expand Down Expand Up @@ -321,6 +328,10 @@ public double GetPriceWithVendingDiscount(EntityUid uid, EntityUid currentGrid,
{
foreach (var ent in container.ContainedEntities)
{
// LuaM-start:
if (HasComp<OrganComponent>(ent) && HasComp<BodyPartComponent>(uid)) // Skip organs
continue;
// LuaM-end
price += GetPriceWithVendingDiscount(ent, currentGrid);
}
}
Expand Down Expand Up @@ -350,6 +361,10 @@ public double GetPriceConditional(EntityUid uid, bool includeContents = true, Fu
{
foreach (var ent in container.ContainedEntities)
{
// LuaM-start:
if (HasComp<OrganComponent>(ent) && HasComp<BodyPartComponent>(uid)) // Skip organs
continue;
// LuaM-end:
price += GetPriceConditional(ent, true, predicate);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- id: ClothingBeltQuiverCrossbowFilledBolt
- id: SpaceCash1000
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand All @@ -74,6 +75,7 @@
- id: ClothingBeltQuiverCrossbowFilledUranium
- id: SpaceCash1000
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand All @@ -93,6 +95,7 @@
- id: ClothingBeltQuiverCrossbowFilledPlasma
- id: SpaceCash500
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand All @@ -111,6 +114,7 @@
items:
- id: SpaceCash500
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -140,6 +144,7 @@
- id: MaterialBones
prob: 0.2
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down Expand Up @@ -175,6 +180,7 @@
- id: MaterialBones
prob: 0.1
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down Expand Up @@ -210,6 +216,7 @@
- id: MaterialBones1
prob: 0.1
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand All @@ -236,6 +243,7 @@
- id: MaterialBones1
prob: 0.05
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
- id: ClothingNeckIFFCyan
prob: 0.1
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down Expand Up @@ -143,6 +144,7 @@
- id: ClothingNeckIFFCyan
prob: 0.1
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -183,6 +185,7 @@
- id: ClothingNeckIFFCyan
prob: 0.1
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down Expand Up @@ -231,6 +234,7 @@
- id: ClothingNeckIFFCyan
prob: 0.1
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -283,6 +287,7 @@
- id: ClothingNeckIFFCyan
prob: 0.1
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -121,6 +122,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down Expand Up @@ -182,6 +184,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpawnDungeonLootMaterialsBasicFull
Expand Down Expand Up @@ -240,6 +243,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -309,6 +313,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down Expand Up @@ -384,6 +389,7 @@
- id: ClothingNeckIFFNeutral
prob: 0.2
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down Expand Up @@ -497,6 +503,7 @@
- id: AmmoTechFabCircuitboard
prob: 0.1
# Bonus Loot T4
- id: SpaceCash10000 # LuaM
- id: SpaceCash2500
prob: 0.9
- id: SpawnDungeonLootFlatpacks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
amount: 1
prob: 0.05
# Bonus Loot T1
- id: SpaceCash5000 # LuaM
- id: SpaceCash500
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -114,6 +115,7 @@
amount: 1
prob: 0.05
# Bonus Loot T2
- id: SpaceCash7500 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash1000
Expand Down Expand Up @@ -161,6 +163,7 @@
amount: 1
prob: 0.05
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down Expand Up @@ -216,6 +219,7 @@
amount: 1
prob: 0.45
# Bonus Loot T3
- id: SpaceCash10000 # LuaM
- id: SpaceCash1000
prob: 0.9
- id: SpaceCash500
Expand Down Expand Up @@ -274,6 +278,7 @@
prob: 0.1
amount: 1
# Bonus Loot T4
- id: SpaceCash10000 # LuaM
- id: SpaceCash2500
prob: 0.9
- id: SpaceCash1000
Expand Down
Loading
Loading