Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged

Fd #337

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
2 changes: 1 addition & 1 deletion code/game/machinery/dance_machine.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/machinery/jukebox
name = "jukebox"
desc = "A classic music player.."
desc = "A classic music player."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "jukebox"
anchored = TRUE
Expand Down
3 changes: 1 addition & 2 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@
var/category = pick(uplink_items)
var/item = pick(uplink_items[category])
var/datum/uplink_item/I = uplink_items[category][item]

if(!I.surplus || prob(100 - I.surplus))
if(!I.surplus_nullcrates || prob(100 - I.surplus_nullcrates))
continue
if(crate_value < I.cost)
continue
Expand Down
6 changes: 6 additions & 0 deletions code/modules/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
var/refund_amount = 0 // specified refund amount in case there needs to be a TC penalty for refunds.
var/refundable = FALSE
var/surplus = 100 // Chance of being included in the surplus crate.
var/surplus_nullcrates //Chance of being included in null crates. null = pull from surplus
var/cant_discount = FALSE
var/limited_stock = -1 //Setting this above zero limits how many times this item can be bought by the same traitor in a round, -1 is unlimited
var/list/include_modes = list() // Game modes to allow this item in.
Expand All @@ -72,6 +73,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
var/player_minimum //The minimum crew size needed for this item to be added to uplinks.
var/purchase_log_vis = TRUE // Visible in the purchase log?

/datum/uplink_item/New()
. = ..()
if(isnull(surplus_nullcrates))
surplus_nullcrates = surplus

/datum/uplink_item/proc/get_discount()
return pick(4;0.75,2;0.5,1;0.25)

Expand Down