From d856a1d2e00299c4707da05b5293e9e062acbca2 Mon Sep 17 00:00:00 2001 From: qweq12yt <45515587+qweq12yt@users.noreply.github.com> Date: Thu, 25 Mar 2021 00:35:47 -0300 Subject: [PATCH] added more items, stock/price/chance balance --- .../cargo/blackmarket/blackmarket_item.dm | 2 +- .../blackmarket/blackmarket_items/clothing.dm | 15 ++++++- .../blackmarket_items/consumables.dm | 39 +++++++++++++++++-- .../blackmarket/blackmarket_items/misc.dm | 2 +- .../blackmarket/blackmarket_items/tools.dm | 19 ++++++--- .../blackmarket/blackmarket_items/weapons.dm | 9 +++++ .../boxes_magazines/internal/revolver.dm | 2 +- .../projectiles/guns/ballistic/revolver.dm | 3 +- 8 files changed, 75 insertions(+), 16 deletions(-) diff --git a/code/modules/cargo/blackmarket/blackmarket_item.dm b/code/modules/cargo/blackmarket/blackmarket_item.dm index 53c0004a7f..dbea2572a2 100644 --- a/code/modules/cargo/blackmarket/blackmarket_item.dm +++ b/code/modules/cargo/blackmarket/blackmarket_item.dm @@ -17,7 +17,7 @@ /datum/blackmarket_item/New() if(isnull(price)) - price = rand(price_min, price_max) + price = round(rand(price_min, price_max), 10) if(isnull(stock)) stock = rand(stock_min, stock_max) diff --git a/code/modules/cargo/blackmarket/blackmarket_items/clothing.dm b/code/modules/cargo/blackmarket/blackmarket_items/clothing.dm index a6ee19e38d..5bdc44f68d 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/clothing.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/clothing.dm @@ -51,5 +51,16 @@ item = /obj/item/clothing/head/chameleon/broken price_min = 100 price_max = 200 - stock_max = 2 - availability_prob = 70 + stock_min = 3 + stock_max = 7 + availability_prob = 80 + +/datum/blackmarket_item/clothing/earmuffs + name = "Earmuffs" + desc = "Protect your precious ears from security's flashbangs with this handy device." + item = /obj/item/clothing/ears/earmuffs + price_min = 100 + price_max = 200 + stock_min = 3 + stock_max = 7 + availability_prob = 80 diff --git a/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm b/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm index 469c467c2f..9d2ac335cf 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm @@ -18,7 +18,7 @@ stock_max = 5 price_min = 325 price_max = 400 - availability_prob = 80 + availability_prob = 100 /datum/blackmarket_item/consumable/suspicious_pills name = "Bottle of Suspicious Pills" @@ -46,13 +46,44 @@ stock_max = 35 price_min = 10 price_max = 60 - availability_prob = 50 + availability_prob = 70 /datum/blackmarket_item/consumable/pumpup name = "Shoddy Stimulants" desc = "Feel the energy inside each needle!" item = /obj/item/reagent_containers/hypospray/medipen/stimpack stock_max = 5 - price_min = 50 - price_max = 150 + price_min = 80 + price_max = 170 availability_prob = 90 + +/datum/blackmarket_item/consumable/stray_drink + name = "A random drink" + desc = "A surprise drink direcly from the counter. No refunds on spilling." + item = /obj/item/reagent_containers/food/drinks/drinkingglass + stock_min = 10 + stock_max = 15 + price_min = 50 + price_max = 130 + availability_prob = 100 + + // add new drinks here + var/list/counter = list( + /datum/reagent/consumable/ethanol/gintonic, + /datum/reagent/consumable/ethanol/cuba_libre, + /datum/reagent/consumable/ethanol/martini, + /datum/reagent/consumable/ethanol/b52, + /datum/reagent/consumable/ethanol/manhattan, + /datum/reagent/consumable/ethanol/bahama_mama, + /datum/reagent/consumable/ethanol/syndicatebomb, + /datum/reagent/consumable/ethanol/quadruple_sec + ) + +// i found no other way to fill a glass with a random reagent at runtime. and i definitely was not going to do the same done in bottle.dm +/datum/blackmarket_item/consumable/stray_drink/spawn_item(loc) + var/obj/item/reagent_containers/food/drinks/drinkingglass/drink = new item(loc) + var/picked = pick(counter) + drink.list_reagents = list() + drink.list_reagents[picked] = 50 + drink.add_initial_reagents() + return drink diff --git a/code/modules/cargo/blackmarket/blackmarket_items/misc.dm b/code/modules/cargo/blackmarket/blackmarket_items/misc.dm index 474be8d29c..f84fe6c66c 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/misc.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/misc.dm @@ -41,7 +41,7 @@ price_max = 360 stock_min = 2 stock_max = 5 - availability_prob = 50 + availability_prob = 80 /datum/blackmarket_item/misc/smugglers_satchel name = "Smuggler's Satchel" diff --git a/code/modules/cargo/blackmarket/blackmarket_items/tools.dm b/code/modules/cargo/blackmarket/blackmarket_items/tools.dm index 3da10b16fd..5406cf57c0 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/tools.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/tools.dm @@ -59,7 +59,7 @@ name = "Thermite Bottle" desc = "30 units of Thermite to assist in creating a quick access point or get away!" item = /obj/item/reagent_containers/glass/bottle/thermite - price_min = 500 + price_min = 750 price_max = 1500 stock_max = 3 availability_prob = 30 @@ -68,7 +68,16 @@ name = "Science Goggles" desc = "These glasses scan the contents of containers and projects their contents to the user in an easy-to-read format." item = /obj/item/clothing/glasses/science - price_min = 150 - price_max = 200 - stock_max = 3 - availability_prob = 50 + price_min = 200 + price_max = 250 + stock_max = 5 + availability_prob = 80 + +/datum/blackmarket_item/tool/meson_goggles + name = "Meson Goggles" + desc = "These let you see through walls and inspect other structures." + item = /obj/item/clothing/glasses/meson + price_min = 200 + price_max = 250 + stock_max = 5 + availability_prob = 80 diff --git a/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm b/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm index 4978d688ae..fc9d4e0ad7 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm @@ -39,3 +39,12 @@ price_max = 400 stock_max = 2 availability_prob = 50 + +/datum/blackmarket_item/weapon/derringer + name = "Derringer Pistol" + desc = "Tiny two-round pistol chambered in .38. Rubber bullets included." + item = /obj/item/gun/ballistic/revolver/derringer + price_min = 1500 + price_max = 2000 + stock_max = 2 + availability_prob = 35 diff --git a/code/modules/projectiles/boxes_magazines/internal/revolver.dm b/code/modules/projectiles/boxes_magazines/internal/revolver.dm index ae704642b8..791c40e8d8 100644 --- a/code/modules/projectiles/boxes_magazines/internal/revolver.dm +++ b/code/modules/projectiles/boxes_magazines/internal/revolver.dm @@ -25,7 +25,7 @@ /obj/item/ammo_box/magazine/internal/cylinder/derringer name = "derringer receiver" caliber = list("38") - ammo_type = /obj/item/ammo_casing/c38/lethal // lets have it start loaded + ammo_type = /obj/item/ammo_casing/c38 max_ammo = 2 // lets not let it reload with speedloadrs, it makes no sense! but maybe later lets allow it? diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index c444fd47f3..dc16d3c0ef 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -501,14 +501,13 @@ // also /obj/item/gun/ballistic/revolver/derringer name = "derringer pistol" - desc = "A favorite among dentists and vengeful heroes. Hides neatly inside your sleeves! Uses .357 rounds." + desc = "A favorite among dentists and vengeful heroes. Hides neatly inside your sleeves! Uses .38 rounds." fire_sound = "sound/weapons/derringer.ogg" icon_state = "pistol" // placeholder // not visible in sprite, we want it to be like in jango // not having it show on examining would be good and 'if (wearing clothes)' would desirable item_state = null - mag_type = /obj/item/ammo_box/magazine/internal/cylinder/derringer suppressed = TRUE // it needs to be good at something w_class = WEIGHT_CLASS_SMALL