Spy loot tweaks (#94189)

## About The Pull Request

1. Ammo will no longer show as a loot option until a weapon that uses
said ammo has been claimed. Some ammo, particularly shotgun ammo has
unique status bypassing this, since you could reasonably acquire a
shotgun from the armory, a bartender, or cargo. There is also a 10%
chance that some ammo will show up anyways, to keep people on their
toes.

2. If you claim another weapon of an already claimed ammo type, the ammo
in the pool will be refreshed, meaning obtainable once again.

3. Unclaimed items have a 40% chance of being re-added to the loot pool.
This is on top of the 80% chance for an item to not be removed from the
pool when selecting loot.

4. When hard bounties empty out their loot pool, they will instead draw
from the medium loot pool. Likewise medium bounties will draw from the
easy pool when they run out.

5. Modified the antag info panel text slightly. 

6. Made more appropriate use of `SStraitor.uplink_items`, and checks for
abstract items more thoroughly.

7. Some weapons no longer come in gun cases for Spies

## Why It's Good For The Game

1. Initially the thought was Spies would just have dud bounties on
occasion. They could take the time to lie low or work on their plans
rather than prowl for loot. Alternatively, an aggressive spy would go
after them *just in case* they got the correct gun, or a passive spy
would go after them for the ability to later bribe someone carrying the
correct gun.

However, in practice it seems people largely just don't like having dud
bounties, as it hurts the pacing. Someone who is on a roll doesn't want
to sit there and do nothing.

Ghommie tried to implement this earlier but I disagreed with the
implementation, so here we are.

2. It would be pretty unappealing to go after a gun after realizing all
the gun's ammo has been looted already.

3. I noticed in testing pools would drain themselves pretty fast. This
serves as a bit of a stop-gap, and prevents items that rolled on
particularly difficult targets from being lost forever. Now you can roll
the dice and hope that it shows up again.

4. Might as well reward people with non-junk items if they manage to
drain a tier's loot pool, especially since the top tier pool is pretty
small.

5. People were oft confused about the wording of the text, thinking
they'd get banned.

6. No reason to use the indexed list. 

7. Having a gun case thrust into your hands is not very inconspicuous 

## Changelog

🆑 Melbert
balance: Ammo will no longer show up in the Spy loot pool until a weapon
that uses said ammo has been claimed. Some ammo for weapons easily
obtainable on station (shotgun shot) are not limited by this
restriction. Also, there's a rare chance ammo will show up anyways just
to keep people on their toes.
balance: Claiming a weapon will refresh ammo in the loot pool that has
already been claimed or cycled out.
balance: Bounty rewards that no Spy claimed have a chance to re-enter
the loot pool after a bounty refresh, rather than being lost for the
remainder of the round.
balance: When higher tier Spy bounties empty their loot pools, they will
attempt to draw from lower tier pools before defaulting to telecrystals.
balance: Spies no longer are rewarded with gun cases for bounties;
rather just the gun itself
spellcheck: Modified the Spy antag info text
/🆑
This commit is contained in:
MrMelbert
2025-12-05 20:42:32 -06:00
committed by GitHub
parent 962f2e1727
commit 72f76caea0
11 changed files with 220 additions and 27 deletions
+3
View File
@@ -109,6 +109,9 @@
/// Uses the purchase log, so items purchased that are not visible in the purchase log will not count towards this.
/// However, they won't be purchasable afterwards.
var/lock_other_purchases = FALSE
/// A lazylist of typepaths to uplink items relevant to this this item
/// EX: a pistol would list its magazines or modifications here
var/list/relevant_child_items
/datum/uplink_item/New()
. = ..()
+2 -4
View File
@@ -18,8 +18,7 @@
/datum/uplink_item/bundles_tc/random/purchase(mob/user, datum/uplink_handler/handler, atom/movable/source)
var/list/possible_items = list()
for(var/datum/uplink_item/item_path as anything in SStraitor.uplink_items_by_type)
var/datum/uplink_item/uplink_item = SStraitor.uplink_items_by_type[item_path]
for(var/datum/uplink_item/uplink_item as anything in SStraitor.uplink_items)
if(src == uplink_item || !uplink_item.item)
continue
if(!handler.can_purchase_item(user, uplink_item))
@@ -81,8 +80,7 @@
/// generates items that can go inside crates, edit this proc to change what items could go inside your specialized crate
/datum/uplink_item/bundles_tc/surplus/proc/generate_possible_items(mob/user, datum/uplink_handler/handler)
var/list/possible_items = list()
for(var/datum/uplink_item/item_path as anything in SStraitor.uplink_items_by_type)
var/datum/uplink_item/uplink_item = SStraitor.uplink_items_by_type[item_path]
for(var/datum/uplink_item/uplink_item as anything in SStraitor.uplink_items)
if(src == uplink_item || !uplink_item.item)
continue
if(!handler.check_if_restricted(uplink_item))
+17 -2
View File
@@ -15,7 +15,10 @@
item = /obj/item/storage/toolbox/guncase/traitor/donksoft
cost = 6
surplus = 10
purchasable_from = ~UPLINK_SERIOUS_OPS
purchasable_from = ~(UPLINK_SERIOUS_OPS | UPLINK_SPY)
relevant_child_items = list(
/datum/uplink_item/ammo/toydarts,
)
/datum/uplink_item/dangerous/pistol
name = "Makarov Pistol Case"
@@ -24,7 +27,13 @@
While not included in the kit, the pistol is compatible with suppressors, which can be purchased separately."
item = /obj/item/storage/toolbox/guncase/traitor
cost = 7
purchasable_from = ~UPLINK_ALL_SYNDIE_OPS
purchasable_from = ~(UPLINK_ALL_SYNDIE_OPS | UPLINK_SPY)
relevant_child_items = list(
/datum/uplink_item/ammo/pistol,
/datum/uplink_item/ammo/pistolap,
/datum/uplink_item/ammo/pistolhp,
/datum/uplink_item/ammo/pistolfire,
)
/datum/uplink_item/dangerous/throwingweapons
name = "Box of Throwing Weapons"
@@ -96,3 +105,9 @@
cost = 13
surplus = 50
purchasable_from = ~UPLINK_ALL_SYNDIE_OPS //only traitors get the original revolver
relevant_child_items = list(
/datum/uplink_item/ammo/revolver,
/datum/uplink_item/ammo_nuclear/basic/revolver,
/datum/uplink_item/ammo_nuclear/special/revolver/phasic,
/datum/uplink_item/ammo_nuclear/special/revolver/heartseeker,
)
@@ -72,6 +72,17 @@
desc = "A fully-loaded 2-round burst fire drum-fed shotgun, complete with a secondary magazine you can hotswap. The gun has a handy label to explain how. \
Compatible with all 12g rounds. Designed for close quarter anti-personnel engagements. Comes with three spare magazines."
item = /obj/item/storage/toolbox/guncase/bulldog
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/basic/buck,
/datum/uplink_item/ammo_nuclear/basic/donk,
/datum/uplink_item/ammo_nuclear/basic/flechette,
/datum/uplink_item/ammo_nuclear/basic/slug,
/datum/uplink_item/ammo_nuclear/incendiary/dragon,
/datum/uplink_item/ammo_nuclear/special/meteor,
/datum/uplink_item/spy_unique/shotgun_ammo,
/datum/uplink_item/spy_unique/shotgun_ammo/breacher_slug,
/datum/uplink_item/spy_unique/shotgun_ammo/slugs,
)
/datum/uplink_item/ammo_nuclear/basic/buck
name = "12g Buckshot Drum (Bulldog)"
@@ -122,6 +133,12 @@
desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible \
with suppressors. Comes with three spare magazines."
item = /obj/item/storage/toolbox/guncase/clandestine
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/basic/m10mm,
/datum/uplink_item/ammo_nuclear/ap/m10mm,
/datum/uplink_item/ammo_nuclear/hp/m10mm,
/datum/uplink_item/ammo_nuclear/incendiary/m10mm,
)
/datum/uplink_item/ammo_nuclear/basic/m10mm
name = "10mm Handgun Magazine (Ansem)"
@@ -164,6 +181,12 @@
desc = "A fully-loaded Scarborough Arms bullpup submachine gun. The C-20r fires .45 rounds with a \
24-round magazine and is compatible with suppressors. Comes with spare three magazines."
item = /obj/item/storage/toolbox/guncase/c20r
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/ap/smg,
/datum/uplink_item/ammo_nuclear/basic/smg,
/datum/uplink_item/ammo_nuclear/hp/smg,
/datum/uplink_item/ammo_nuclear/incendiary/smg,
)
/datum/uplink_item/ammo_nuclear/basic/smg
name = ".45 SMG Magazine (C-20r)"
@@ -213,6 +236,12 @@
desc = "Waffle Corp's modernized Syndicate revolver. Fires 7 brutal rounds of .357 Magnum. \
A classic operative weapon, improved for the modern era. Comes with 3 additional speedloaders of .357."
item = /obj/item/storage/toolbox/guncase/revolver
relevant_child_items = list(
/datum/uplink_item/ammo/revolver,
/datum/uplink_item/ammo_nuclear/basic/revolver,
/datum/uplink_item/ammo_nuclear/special/revolver/phasic,
/datum/uplink_item/ammo_nuclear/special/revolver/heartseeker,
)
/datum/uplink_item/ammo_nuclear/basic/revolver
name = ".357 Speed Loader (Revolver)"
@@ -246,6 +275,10 @@
desc = "A reusable rocket propelled grenade launcher preloaded with a low-yield 84mm HE round. \
Guaranteed to take your target out with a bang, or your money back! Comes with a bouquet of additional rockets!"
item = /obj/item/storage/toolbox/guncase/rocketlauncher
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/ap/rocket,
/datum/uplink_item/ammo_nuclear/basic/rocket,
)
/datum/uplink_item/ammo_nuclear/basic/rocket
name = "84mm HE Rocket Bouquet (Rocket Launcher)"
@@ -272,6 +305,13 @@
desc = "A fully-loaded Aussec Armoury belt-fed machine gun. \
This deadly weapon has a massive 50-round magazine of devastating 7mm ammunition."
item = /obj/item/gun/ballistic/automatic/l6_saw
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/ap/machinegun,
/datum/uplink_item/ammo_nuclear/basic/machinegun,
/datum/uplink_item/ammo_nuclear/hp/machinegun,
/datum/uplink_item/ammo_nuclear/incendiary/machinegun,
/datum/uplink_item/ammo_nuclear/special/machinegun,
)
/datum/uplink_item/ammo_nuclear/basic/machinegun
name = "7mm Box Magazine (L6 SAW)"
@@ -311,6 +351,11 @@
Comes with a 40mm underbarrel grenade launcher. Use secondary-fire to fire the grenade launcher. Also comes with two spare magazines \
and a box of 40mm rubber slugs."
item = /obj/item/storage/toolbox/guncase/m90gl
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/basic/carbine,
/datum/uplink_item/ammo_nuclear/special/carbine,
/datum/uplink_item/ammo_nuclear/basic/carbine/a40mm,
)
/datum/uplink_item/ammo_nuclear/basic/carbine
name = ".223 Toploader Magazine (M-90gl)"
@@ -340,6 +385,13 @@
Can be fitted with a suppressor. If anyone asks how that even works, tell them it's Nanotrasen's fault. Comes with \
3 spare magazines; 2 regular magazines and 1 disruptor magazine. Also comes with a suit and tie."
item = /obj/item/storage/briefcase/sniper
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/ap/sniper/penetrator,
/datum/uplink_item/ammo_nuclear/basic/sniper,
/datum/uplink_item/ammo_nuclear/basic/sniper/disruptor,
/datum/uplink_item/ammo_nuclear/incendiary/sniper,
/datum/uplink_item/ammo_nuclear/special/sniper/marksman,
)
/datum/uplink_item/ammo_nuclear/basic/sniper
name = ".50 BMG Magazine (AMSR)"
@@ -398,6 +450,9 @@
item = /obj/item/gun/ballistic/automatic/smartgun
cost = 2
purchasable_from = UPLINK_SERIOUS_OPS
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/surplus_smg,
)
/datum/uplink_item/ammo_nuclear/surplus_smg
name = "Surplus Smart-SMG Magazine (Smartgun)"
@@ -629,6 +684,12 @@
item = /obj/item/storage/box/syndie_kit/cowboy
cost = 18
purchasable_from = UPLINK_SERIOUS_OPS
relevant_child_items = list(
/datum/uplink_item/ammo/revolver,
/datum/uplink_item/ammo_nuclear/basic/revolver,
/datum/uplink_item/ammo_nuclear/special/revolver/phasic,
/datum/uplink_item/ammo_nuclear/special/revolver/heartseeker,
)
// Mech related gear
@@ -650,6 +711,9 @@
for hit-and-run style attacks. Features a scattershot shotgun, armor boosters against melee and ranged attacks, and ion thrusters."
item = /obj/vehicle/sealed/mecha/gygax/dark/loaded
cost = 60
relevant_child_items = list(
/datum/uplink_item/mech/support_bag/mauler,
)
/datum/uplink_item/mech/mauler
name = "Mauler Exosuit"
@@ -657,6 +721,9 @@
and deployable smoke. Comes equipped with an LMG, scattershot carbine, missile rack, and an antiprojectile armor booster."
item = /obj/vehicle/sealed/mecha/marauder/mauler/loaded
cost = 100
relevant_child_items = list(
/datum/uplink_item/mech/support_bag/mauler,
)
// ~~ Mech Support ~~
@@ -76,6 +76,11 @@
item = /obj/item/gun/ballistic/shotgun/automatic/dual_tube/deadly
cost = SPY_UPPER_COST_THRESHOLD
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/spy_unique/shotgun_ammo,
/datum/uplink_item/spy_unique/shotgun_ammo/breacher_slug,
/datum/uplink_item/spy_unique/shotgun_ammo/slugs,
)
/datum/uplink_item/spy_unique/bulldog_shotgun
name = "Bulldog Shotgun"
@@ -83,6 +88,17 @@
item = /obj/item/gun/ballistic/shotgun/bulldog/unrestricted
cost = SPY_UPPER_COST_THRESHOLD
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/basic/buck,
/datum/uplink_item/ammo_nuclear/basic/donk,
/datum/uplink_item/ammo_nuclear/basic/flechette,
/datum/uplink_item/ammo_nuclear/basic/slug,
/datum/uplink_item/ammo_nuclear/incendiary/dragon,
/datum/uplink_item/ammo_nuclear/special/meteor,
/datum/uplink_item/spy_unique/shotgun_ammo,
/datum/uplink_item/spy_unique/shotgun_ammo/breacher_slug,
/datum/uplink_item/spy_unique/shotgun_ammo/slugs,
)
/datum/uplink_item/spy_unique/ansem_pistol
name = "Ansem Pistol"
@@ -90,6 +106,36 @@
item = /obj/item/gun/ballistic/automatic/pistol/clandestine
cost = SPY_UPPER_COST_THRESHOLD
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/basic/m10mm,
/datum/uplink_item/ammo_nuclear/ap/m10mm,
/datum/uplink_item/ammo_nuclear/hp/m10mm,
/datum/uplink_item/ammo_nuclear/incendiary/m10mm,
)
/datum/uplink_item/spy_unique/makarov_pistol
name = "Makarov Pistol"
desc = "A Makarov pistol - Reliable and sturdy."
item = /obj/item/gun/ballistic/automatic/pistol
cost = SPY_LOWER_COST_THRESHOLD
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/ammo/pistol,
/datum/uplink_item/ammo/pistolap,
/datum/uplink_item/ammo/pistolhp,
/datum/uplink_item/ammo/pistolfire,
)
/datum/uplink_item/spy_unique/toy_pistol
name = "Donksoft Riot Pistol"
desc = "A Donksoft Riot Pistol - A toy pistol that fires foam darts at higher than normal velocity."
item = /obj/item/gun/ballistic/automatic/pistol/toy/riot/clandestine
cost = SPY_LOWER_COST_THRESHOLD
cost = SPY_LOWER_COST_THRESHOLD
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/ammo/toydarts,
)
/datum/uplink_item/spy_unique/rocket_launcher
name = "Rocket Launcher"
@@ -97,6 +143,10 @@
item = /obj/item/gun/ballistic/rocketlauncher
cost = SPY_UPPER_COST_THRESHOLD - 1 // It's a meme item
uplink_item_flags = SYNDIE_ILLEGAL_TECH | SYNDIE_TRIPS_CONTRABAND
relevant_child_items = list(
/datum/uplink_item/ammo_nuclear/ap/rocket,
/datum/uplink_item/ammo_nuclear/basic/rocket,
)
/datum/uplink_item/spy_unique/shotgun_ammo
name = "Box of Buckshot"