Skip to content

Commit

Permalink
Black Market Revamp (#2929)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

### Mechanical stuff

- Removes Teleportation as a shipping option from the Black Market. The
code behind it was removed so it only ate your money.
- Changes how the LTSRBT handles orders. The uplink is now linked to the
LTSRBT as it's destination instead of checking for a free telepad across
the entire world.
- Adds examines for the Black Market uplink, changes shipping
descriptions to be more clear
- Adds the pair_item var for black market items. If the main item
spawns, it's paired item is guaranteed to spawn alongside it.
 - The LTSRBT gets orders 10x faster.
- The Black Market Uplink now uses a microlaser instead of an ansible in
it's crafting recipe.
-  A sawn off Illestren typepath
### Catalogue

- Reduces the cost of the LTSRBT at the outpost from 5000 to 1000.
- Adds a whole bunch of new items to the Black Market catalogues, and
changes the prices of existing items to be in line with the current
economy.
- Removes items and adjusted some descriptions from the Black Market
that didn't fit Shiptest's setting.
- Adds two new tabs to the Black Market, Explosives and Emergency.

## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

Honestly, this started as a redo of #2927 to add Eoehoma weapons to the
Black Market instead, but the Black Market was kinda shit. The teleport
option was broken, the black market uplink could send to any LTSRBT that
existed, so someone half the sector away could end up with your orders
(if anyone actually bought them that is) and the item selection was
pretty poor and still based around a station economy price wise.

Clears up the cruft, and adds a bunch of new items to the Black Market
catalogue to hopefully make it an appealing alternative option to buying
from the outpost. It's a thematic way to sell items normally wouldn't be
seen. Most of the stock is limited as well, which adds a sense of
urgency and competition with other ships if there's an item that catches
your eye.

Dropped the price of the LTSRBT and changed the uplink recipe to make
the Black Market more accessible. You weren't finding an ansible unless
you have RND or got lucky. The LTSRBT was also comedically slow to the
point where you were left wondering if it worked.

The sawn off Illestren was so I could directly spawn it for the Black
Market. I'd thought it'd be funny.
 
 I'm happy to change any of the items, prices or stocks if needed. 

## Changelog

:cl:
add: A bunch of new items for the Black Market catalogue
add: Two new Black Market Tabs, Explosives and Emergency
add: Sawn off Illestren typepath
del: Black Market Teleportation
del: Space Ninja mask and Clown Tears from Black Market
tweak: Black Market Uplink uses a micro laser instead of an ansible for
crafting
tweak: Black Market descriptions and examines
tweak: Black Market Uplinks link directly to a specific LTSRBT
balance: Black Market item price and stock adjusted
balance: LTSRBT is faster
code: pair_item var for Black Market items
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Signed-off-by: Gristlebee <[email protected]>
Co-authored-by: meem <[email protected]>
  • Loading branch information
Gristlebee and meemofcourse authored May 20, 2024
1 parent 2775370 commit 836a6c5
Show file tree
Hide file tree
Showing 17 changed files with 1,013 additions and 120 deletions.
4 changes: 1 addition & 3 deletions code/__DEFINES/blackmarket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

// The BEST way of shipping items: accurate, "undetectable"
#define SHIPPING_METHOD_LTSRBT "LTSRBT"
// Picks a random area to teleport the item to and gives you a minute to get there before it is sent.
#define SHIPPING_METHOD_TELEPORT "Teleport"
// Throws the item from somewhere at the station.
// Throws the item from somewhere at the uplink.
#define SHIPPING_METHOD_LAUNCH "Launch"

27 changes: 8 additions & 19 deletions code/controllers/subsystem/blackmarket.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SUBSYSTEM_DEF(blackmarket)

/// Descriptions for each shipping methods.
var/shipping_method_descriptions = list(
SHIPPING_METHOD_LAUNCH="Launches the item at your coordinates from across deep space, cheap but you might not recieve your item at all.",
SHIPPING_METHOD_LTSRBT="Long-To-Short-Range-Bluespace-Transceiver, a machine that prepares items at a remote storage location and then teleports them to the location of the uplink."
SHIPPING_METHOD_LAUNCH="Launches the item at your coordinates from across deep space. Cheap, but you might not recieve your item at all. We recommend being stationary in space, away from any large structures, for best results.",
SHIPPING_METHOD_LTSRBT="Long-To-Short-Range-Bluespace-Transceiver, a machine that prepares items at a remote storage location and then teleports them to the location of the LTRSBT."
)

/// List of all existing markets.
Expand All @@ -29,7 +29,8 @@ SUBSYSTEM_DEF(blackmarket)
if(!markets[M])
stack_trace("SSblackmarket: Item [I] available in market that does not exist.")
continue
markets[M].add_item(item)
markets[M].add_item(item, FALSE)

qdel(I)
. = ..()

Expand All @@ -47,22 +48,10 @@ SUBSYSTEM_DEF(blackmarket)
switch(purchase.method)
// Find a ltsrbt pad and make it handle the shipping.
if(SHIPPING_METHOD_LTSRBT)
if(!telepads.len)
continue
// Prioritize pads that don't have a cooldown active.
var/free_pad_found = FALSE
for(var/obj/machinery/ltsrbt/pad in telepads)
if(pad.recharge_cooldown)
continue
pad.add_to_queue(purchase)
queued_purchases -= purchase
free_pad_found = TRUE
break

if(free_pad_found)
if(!purchase.uplink.target)
continue

var/obj/machinery/ltsrbt/pad = pick(telepads)
var/obj/machinery/ltsrbt/pad = purchase.uplink.target

to_chat(recursive_loc_check(purchase.uplink.loc, /mob), "<span class='notice'>[purchase.uplink] flashes a message noting that the order is being processed by [pad].</span>")

Expand All @@ -76,7 +65,7 @@ SUBSYSTEM_DEF(blackmarket)
var/pickedloc = vlevel.get_side_turf(startSide)

var/atom/movable/item = purchase.entry.spawn_item(pickedloc)
item.throw_at(purchase.uplink, 3, 3, spin = FALSE)
item.safe_throw_at(purchase.uplink, 3, 3, spin = FALSE)

to_chat(recursive_loc_check(purchase.uplink.loc, /mob), "<span class='notice'>[purchase.uplink] flashes a message noting the order is being launched at your coordinates from [dir2text(startSide)].</span>")

Expand All @@ -96,7 +85,7 @@ SUBSYSTEM_DEF(blackmarket)

/// Used to add /datum/blackmarket_purchase to queued_purchases var. Returns TRUE when queued.
/datum/controller/subsystem/blackmarket/proc/queue_item(datum/blackmarket_purchase/P)
if(P.method == SHIPPING_METHOD_LTSRBT && !telepads.len)
if(P.method == SHIPPING_METHOD_LTSRBT && !P.uplink.target)
return FALSE
queued_purchases += P
return TRUE
6 changes: 6 additions & 0 deletions code/game/objects/items/stacks/sheets/mineral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
/obj/item/stack/sheet/mineral/uranium/twenty
amount = 20

/obj/item/stack/sheet/mineral/uranium/ten
amount = 10

/obj/item/stack/sheet/mineral/uranium/five
amount = 5

Expand Down Expand Up @@ -210,6 +213,9 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
/obj/item/stack/sheet/mineral/plasma/twenty
amount = 20

/obj/item/stack/sheet/mineral/plasma/ten
amount = 10

/obj/item/stack/sheet/mineral/plasma/five
amount = 5

Expand Down
2 changes: 2 additions & 0 deletions code/modules/cargo/blackmarket/blackmarket_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
var/availability_prob = 0
// Should there be an unlimited stock of an item
var/unlimited = FALSE
/// Should another item spawn alongside this one in the catalogue?
var/datum/blackmarket_item/pair_item

/datum/blackmarket_item/New()
if(isnull(price))
Expand Down
140 changes: 124 additions & 16 deletions code/modules/cargo/blackmarket/blackmarket_items/clothing.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
/datum/blackmarket_item/clothing
category = "Clothing"

/datum/blackmarket_item/clothing/ninja_mask
name = "Space Ninja Mask"
desc = "Apart from being acid, lava, fireproof and being hard to take off someone it does nothing special on it's own."
item = /obj/item/clothing/mask/gas/space_ninja
/datum/blackmarket_item/clothing/cloth
name = "Build Your Own Jumpsuit Special"
desc = "Ever wanted to learn how to sew? This lovely selection of cloth is perfect to get some practice with."
item = /obj/item/stack/sheet/cotton/cloth/ten

price_min = 200
price_max = 500
stock_max = 3
availability_prob = 40
price_max = 400
stock_max = 5
availability_prob = 80

/datum/blackmarket_item/clothing/crown
name = "Crown"
desc = "A beautiful golden crown, rich with history and pedigree. Better worn than left to collect dust in a museum, right?"
item = /obj/item/clothing/head/crown/fancy

price_min = 1000
price_max = 2000
stock_max = 1
availability_prob = 20

/datum/blackmarket_item/clothing/galaxy_blue
name = "Blue Galaxy Suit"
desc = "A handsome silk suit, treated with a finish of bluespace dust for an out of this world sheen."
item = /obj/item/clothing/under/rank/civilian/lawyer/galaxy

price_min = 500
price_max = 2000
stock = 1
availability_prob = 20

/datum/blackmarket_item/clothing/galaxy_red
name = "Red Galaxy Suit"
desc = "A handsome silk suit, treated with a finish of telecrystal dust. It cuts a menacing figure."
item = /obj/item/clothing/under/rank/civilian/lawyer/galaxy/red

price_min = 500
price_max = 2000
stock = 1
availability_prob = 20

/datum/blackmarket_item/clothing/durathread_vest
name = "Durathread Vest"
Expand All @@ -31,15 +61,73 @@
stock_max = 4
availability_prob = 50

/datum/blackmarket_item/clothing/degraded_armor_set
name = "Clearance Bin Armor Set"
desc = "Looking to protect yourself, but on a tight budget? These previously used vest and helmets served their former owners well! (May they rest in peace.)"
item = /obj/item/storage/box

price_min = 100
price_max = 400
stock_min = 4
stock_max = 6
availability_prob = 80

/datum/blackmarket_item/clothing/degraded_armor_set/spawn_item(loc)
var/obj/item/storage/box/B = ..()
B.name = "Used Armor Set Box"
B.desc = "It smells distinctly of iron."
new /obj/item/clothing/head/helmet/old(B)
new /obj/item/clothing/suit/armor/vest/old(B)
return B

/datum/blackmarket_item/clothing/frontiersmen_armor_set
name = "X-11 Bulletproof Armor Set"
desc = "We got a good deal on some extra bulletproof armor from a Frontiersmen Quartermaster, and we're passing those savings onto you!"
item = /obj/item/storage/box

price_min = 1000
price_max = 1750
stock_max = 3
availability_prob = 50

/datum/blackmarket_item/clothing/frontiersmen_armor_set/spawn_item(loc)
var/obj/item/storage/box/B = ..()
B.name = "Bulletproof Armor Set Box"
B.desc = "A beat up looking box with some armor inside."
new /obj/item/clothing/suit/armor/vest/bulletproof/frontier(B)
new /obj/item/clothing/head/helmet/bulletproof/x11/frontier(B)
return B

/datum/blackmarket_item/clothing/gezena_armor
name = "Raksha-Plating vest"
desc = "Genuine armor vests used by the PGF Marine Corp. If a military guy in a cape comes by, play dumb."
item = /obj/item/clothing/suit/armor/gezena/marine
pair_item = /datum/blackmarket_item/clothing/gezena_helmet

price_min = 750
price_max = 1250
stock_max = 3
availability_prob = 20

/datum/blackmarket_item/clothing/gezena_helmet
name = "Raksha-Helm"
desc = "A helmet used by the PGF Marine Corp. They won't miss it. Not like there's much to protect up there anyways."
item = /obj/item/clothing/head/helmet/gezena

price_min = 500
price_max = 600
stock_max = 3
availability_prob = 0

/datum/blackmarket_item/clothing/full_spacesuit_set
name = "\improper Nanotrasen Branded Spacesuit Box"
desc = "A few boxes of \"Old Style\" space suits fell off the back of a space truck."
item = /obj/item/storage/box

price_min = 1500
price_max = 4000
price_min = 250
price_max = 750
stock_max = 3
availability_prob = 30
availability_prob = 70

/datum/blackmarket_item/clothing/full_spacesuit_set/spawn_item(loc)
var/obj/item/storage/box/B = ..()
Expand All @@ -60,11 +148,31 @@
availability_prob = 70

/datum/blackmarket_item/clothing/combatmedic_suit
name = "Combat Medic hardsuit"
desc = "A discarded combat medic hardsuit, found in the ruins of a carpet bombed xeno hive. Definately used, but as sturdy as an anchor."
name = "Combat Medic Hardsuit"
desc = "A discarded combat medic hardsuit, found in the ruins of a carpet bombed xeno hive. Definitely used, but as sturdy as an anchor."
item = /obj/item/clothing/suit/space/hardsuit/combatmedic

price_min = 5500
price_max = 7000
stock_max = 1
availability_prob = 10
price_min = 1000
price_max = 2500
stock_max = 3
availability_prob = 30

/datum/blackmarket_item/clothing/ramzi_suit
name = "Rusted Red Hardsuit"
desc = "A vintage ICW Era Gorlex Maruader hardsuit. The previous owner said we could have it when we pried it off their cold dead hands. Dry cleaning not included."
item = /obj/item/clothing/head/helmet/space/hardsuit/syndi/ramzi

price_min = 1500
price_max = 2500
stock = 1
availability_prob = 30

/datum/blackmarket_item/clothing/frontiersmen_hardsuit
name = "Frontiersmen Hardsuit"
desc = "An old but durable hardsuit typically used by the Frontiersmen. We accept no liability if you're shot by CLIP while wearing this."
item = /obj/item/clothing/suit/space/hardsuit/security/independent/frontier

price_min = 1000
price_max = 2000
stock_max = 3
availability_prob = 40
Loading

0 comments on commit 836a6c5

Please sign in to comment.