mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
72f76caea0
## 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 /🆑
163 lines
7.3 KiB
Plaintext
163 lines
7.3 KiB
Plaintext
//All bundles and telecrystals
|
|
/datum/uplink_category/bundle
|
|
name = "Bundles"
|
|
weight = 10
|
|
|
|
/datum/uplink_item/bundles_tc
|
|
category = /datum/uplink_category/bundle
|
|
surplus = 0
|
|
cant_discount = TRUE
|
|
purchasable_from = parent_type::purchasable_from & ~UPLINK_SPY
|
|
|
|
/datum/uplink_item/bundles_tc/random
|
|
name = "Random Item"
|
|
desc = "Picking this will purchase a random item. Useful if you have some TC to spare or if you haven't decided on a strategy yet."
|
|
item = ABSTRACT_UPLINK_ITEM
|
|
cost = 0
|
|
cost_override_string = "Varies"
|
|
|
|
/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/uplink_item as anything in SStraitor.uplink_items)
|
|
if(src == uplink_item || !uplink_item.item)
|
|
continue
|
|
if(!handler.can_purchase_item(user, uplink_item))
|
|
continue
|
|
possible_items += uplink_item
|
|
|
|
if(possible_items.len)
|
|
var/datum/uplink_item/uplink_item = pick(possible_items)
|
|
log_uplink("[key_name(user)] purchased a random uplink item from [handler.owner]'s uplink with [handler.telecrystals] telecrystals remaining")
|
|
SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(uplink_item.name))
|
|
handler.purchase_item(user, uplink_item)
|
|
|
|
/datum/uplink_item/bundles_tc/telecrystal
|
|
name = "1 Raw Telecrystal"
|
|
desc = "A telecrystal in its rawest and purest form; can be utilized on active uplinks to increase their telecrystal count."
|
|
item = /obj/item/stack/telecrystal
|
|
cost = 1
|
|
// Don't add telecrystals to the purchase_log since
|
|
// it's just used to buy more items (including itself!)
|
|
purchase_log_vis = FALSE
|
|
purchasable_from = NONE
|
|
|
|
/datum/uplink_item/bundles_tc/bundle_a
|
|
name = "Syndi-kit Tactical"
|
|
desc = "Syndicate Bundles, also known as Syndi-Kits, are specialized groups of items that arrive in a plain box. \
|
|
These items are collectively worth more than 25 telecrystals, but you do not know which specialization \
|
|
you will receive. May contain discontinued and/or exotic items. \
|
|
The Syndicate will only provide one Syndi-Kit per agent."
|
|
item = /obj/item/storage/box/syndicate/bundle_a
|
|
cost = 20
|
|
stock_key = UPLINK_SHARED_STOCK_KITS
|
|
purchasable_from = ~(UPLINK_ALL_SYNDIE_OPS | UPLINK_SPY)
|
|
|
|
/datum/uplink_item/bundles_tc/bundle_b
|
|
name = "Syndi-kit Special"
|
|
desc = "Syndicate Bundles, also known as Syndi-Kits, are specialized groups of items that arrive in a plain box. \
|
|
In Syndi-kit Special, you will receive items used by famous syndicate agents of the past. \
|
|
Collectively worth more than 25 telecrystals, the syndicate loves a good throwback. \
|
|
The Syndicate will only provide one Syndi-Kit per agent."
|
|
item = /obj/item/storage/box/syndicate/bundle_b
|
|
cost = 20
|
|
stock_key = UPLINK_SHARED_STOCK_KITS
|
|
purchasable_from = ~(UPLINK_ALL_SYNDIE_OPS | UPLINK_SPY)
|
|
|
|
/datum/uplink_item/bundles_tc/surplus
|
|
name = "Syndicate Surplus Crate"
|
|
desc = "A dusty crate from the back of the Syndicate warehouse delivered directly to you via Supply Pod. \
|
|
If the rumors are true, it will fill it's contents based on your current reputation. Get on that grind. \
|
|
Contents are sorted to always be worth 30 TC. The Syndicate will only provide one surplus item per agent."
|
|
item = /obj/structure/closet/crate // will be replaced in purchase()
|
|
cost = 20
|
|
purchasable_from = ~(UPLINK_ALL_SYNDIE_OPS | UPLINK_SPY)
|
|
stock_key = UPLINK_SHARED_STOCK_SURPLUS
|
|
/// Value of items inside the crate in TC
|
|
var/crate_tc_value = 30
|
|
/// crate that will be used for the surplus crate
|
|
var/crate_type = /obj/structure/closet/crate
|
|
|
|
/// 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/uplink_item as anything in SStraitor.uplink_items)
|
|
if(src == uplink_item || !uplink_item.item)
|
|
continue
|
|
if(!handler.check_if_restricted(uplink_item))
|
|
continue
|
|
if(!uplink_item.surplus)
|
|
continue
|
|
if(handler.not_enough_reputation(uplink_item))
|
|
continue
|
|
possible_items += uplink_item
|
|
return possible_items
|
|
|
|
/// picks items from the list given to proc and generates a valid uplink item that is less or equal to the amount of TC it can spend
|
|
/datum/uplink_item/bundles_tc/surplus/proc/pick_possible_item(list/possible_items, tc_budget)
|
|
var/datum/uplink_item/uplink_item = pick(possible_items)
|
|
if(prob(100 - uplink_item.surplus))
|
|
return null
|
|
if(tc_budget < uplink_item.cost)
|
|
return null
|
|
return uplink_item
|
|
|
|
/// fills the crate that will be given to the traitor, edit this to change the crate and how the item is filled
|
|
/datum/uplink_item/bundles_tc/surplus/proc/fill_crate(obj/structure/closet/crate/surplus_crate, list/possible_items)
|
|
var/tc_budget = crate_tc_value
|
|
while(tc_budget)
|
|
var/datum/uplink_item/uplink_item = pick_possible_item(possible_items, tc_budget)
|
|
if(!uplink_item)
|
|
continue
|
|
tc_budget -= uplink_item.cost
|
|
new uplink_item.item(surplus_crate)
|
|
|
|
/// overwrites item spawning proc for surplus items to spawn an appropriate crate via a podspawn
|
|
/datum/uplink_item/bundles_tc/surplus/spawn_item(spawn_path, mob/user, datum/uplink_handler/handler, atom/movable/source)
|
|
var/obj/structure/closet/crate/surplus_crate = new crate_type()
|
|
if(!istype(surplus_crate))
|
|
CRASH("crate_type is not a crate")
|
|
var/list/possible_items = generate_possible_items(user, handler)
|
|
|
|
fill_crate(surplus_crate, possible_items)
|
|
|
|
podspawn(list(
|
|
"target" = get_turf(user),
|
|
"style" = /datum/pod_style/syndicate,
|
|
"spawn" = surplus_crate,
|
|
))
|
|
return source //For log icon
|
|
|
|
/datum/uplink_item/bundles_tc/surplus/united
|
|
name = "United Surplus Crate"
|
|
desc = "A shiny and large crate to be delivered directly to you via Supply Pod. It has an advanced locking mechanism with an anti-tampering protocol. \
|
|
It is recommended that you only attempt to open it by having another agent purchase a Surplus Crate Key. Unite and fight. \
|
|
Rumored to contain a valuable assortment of items based on your current reputation, but you never know. Contents are sorted to always be worth 80 TC. \
|
|
The Syndicate will only provide one surplus item per agent."
|
|
cost = 20
|
|
item = /obj/structure/closet/crate/secure/syndicrate
|
|
stock_key = UPLINK_SHARED_STOCK_SURPLUS
|
|
crate_tc_value = 80
|
|
crate_type = /obj/structure/closet/crate/secure/syndicrate
|
|
|
|
/// edited version of fill crate for super surplus to ensure it can only be unlocked with the syndicrate key
|
|
/datum/uplink_item/bundles_tc/surplus/united/fill_crate(obj/structure/closet/crate/secure/syndicrate/surplus_crate, list/possible_items)
|
|
if(!istype(surplus_crate))
|
|
return
|
|
var/tc_budget = crate_tc_value
|
|
while(tc_budget)
|
|
var/datum/uplink_item/uplink_item = pick_possible_item(possible_items, tc_budget)
|
|
if(!uplink_item)
|
|
continue
|
|
tc_budget -= uplink_item.cost
|
|
surplus_crate.unlock_contents += uplink_item.item
|
|
|
|
/datum/uplink_item/bundles_tc/surplus_key
|
|
name = "United Surplus Crate Key"
|
|
desc = "This inconscpicous device is actually a key that can open any United Surplus Crate. It can only be used once. \
|
|
Though initially designed to encourage cooperation, agents quickly discovered that you can turn the key to the crate by yourself. \
|
|
The Syndicate will only provide one surplus item per agent."
|
|
cost = 20
|
|
item = /obj/item/syndicrate_key
|
|
purchasable_from = ~(UPLINK_ALL_SYNDIE_OPS | UPLINK_SPY)
|
|
stock_key = UPLINK_SHARED_STOCK_SURPLUS
|