mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
139 lines
5.0 KiB
Plaintext
139 lines
5.0 KiB
Plaintext
// The list of all current global, shared crew bounties, does not contain any personal bounties however.
|
|
GLOBAL_LIST_EMPTY(shared_crew_bounties)
|
|
|
|
/datum/bounty
|
|
/// A name for the bounty. Displayed on the bounty console/Paper sheets.
|
|
var/name
|
|
/// A description for the bounty.
|
|
var/description
|
|
/// Whether or not the bounty has been claimed by cargo. Only applies to cargo list bounties.
|
|
var/claimed = FALSE
|
|
/// Whether or not the bounty is high priority. High priority bounties appear at the top of the list.
|
|
var/high_priority = FALSE
|
|
/// The reward for completing the bounty in credits, before being split by cargo/the player.
|
|
VAR_PROTECTED/reward = CARGO_CRATE_VALUE * 5 // In credits.
|
|
var/allow_duplicate = FALSE
|
|
/// Can this bounty be selected got a new global bounty?
|
|
var/global_exempt = FALSE
|
|
///A list consisting of the accounts who sent several of the items required for a bounty payout. Used for distributing payout with the payment component.
|
|
var/list/contribution = list()
|
|
/// Is this bounty considered unique? This is for weird, singleton bounties that we don't want to roll into randomly, and we provide one of these
|
|
var/unique = FALSE
|
|
|
|
/// Can this bounty be claimed right now?
|
|
/datum/bounty/proc/can_claim()
|
|
return FALSE
|
|
|
|
/// If an item in question can satisfy the bounty.
|
|
/datum/bounty/proc/applies_to(obj/shipped)
|
|
return FALSE
|
|
|
|
/// When calculating the contribution breakdown of an object shipped, how much does that object increase that account's cut?
|
|
/datum/bounty/proc/contribution_amount(obj/shipped)
|
|
return 1
|
|
|
|
/// Called when an object is sent on the bounty pad.
|
|
/datum/bounty/proc/ship(obj/shipped)
|
|
return
|
|
|
|
/// Formats the text for what is required to complete the bounty, for display purposes.
|
|
/datum/bounty/proc/print_required()
|
|
return ""
|
|
|
|
/// Returns the adjusted reward for this bounty, taking into account any global modifiers.
|
|
/datum/bounty/proc/get_bounty_reward()
|
|
var/high_priority_mult = high_priority ? 1.5 : 1
|
|
return reward * SSeconomy.bounty_modifier * high_priority_mult
|
|
|
|
/// Called when this bounty is selected by the passed ID card
|
|
/datum/bounty/proc/on_selected(obj/item/card/id/id_card)
|
|
return
|
|
|
|
/// Called when this bounty is successfully claimed by the passed ID card
|
|
/datum/bounty/proc/on_claimed(obj/item/card/id/id_card)
|
|
return
|
|
|
|
/// Called when this bounty is reset from the passed ID card, either from successful claim or from being replaced by another bounty
|
|
/datum/bounty/proc/on_reset(obj/item/card/id/id_card)
|
|
return
|
|
|
|
/// Proc that returns the current quantity of this bounty.
|
|
/datum/bounty/proc/get_total()
|
|
return
|
|
|
|
/// Proc that returns the current maximum quantity of this bounty.
|
|
/datum/bounty/proc/get_max()
|
|
return
|
|
|
|
/// If the user can actually get this bounty as a selection.
|
|
/datum/bounty/proc/can_get()
|
|
return TRUE
|
|
|
|
/** Returns a new bounty of random type.
|
|
*
|
|
* * Category determines what specific catagory of bounty should be chosen.
|
|
*/
|
|
/proc/random_bounty(category = 0)
|
|
var/bounty_num
|
|
var/chosen_type
|
|
var/bounty_succeeded = FALSE
|
|
var/datum/bounty/item/bounty_ref
|
|
while(!bounty_succeeded)
|
|
if(category && (category != CIV_JOB_RANDOM))
|
|
bounty_num = category
|
|
else
|
|
bounty_num = rand(1, MAXIMUM_BOUNTY_JOBS)
|
|
switch(bounty_num)
|
|
if(CIV_JOB_BASIC)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/assistant))
|
|
if(CIV_JOB_ROBO)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/mech))
|
|
if(CIV_JOB_CHEF)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/chef) + subtypesof(/datum/bounty/reagent/chef))
|
|
if(CIV_JOB_SEC)
|
|
if(prob(75))
|
|
chosen_type = /datum/bounty/patrol
|
|
else
|
|
chosen_type = /datum/bounty/item/contraband
|
|
if(CIV_JOB_DRINK)
|
|
if(prob(50))
|
|
chosen_type = /datum/bounty/reagent/simple_drink
|
|
else
|
|
chosen_type = /datum/bounty/reagent/complex_drink
|
|
if(CIV_JOB_CHEM)
|
|
if(prob(50))
|
|
chosen_type = /datum/bounty/reagent/chemical_simple
|
|
else
|
|
chosen_type = /datum/bounty/reagent/chemical_complex
|
|
if(CIV_JOB_VIRO)
|
|
chosen_type = pick(subtypesof(/datum/bounty/virus))
|
|
if(CIV_JOB_SCI)
|
|
if(prob(50))
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/science))
|
|
else
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/slime))
|
|
if(CIV_JOB_ENG)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/engineering))
|
|
if(CIV_JOB_MINE)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/mining))
|
|
if(CIV_JOB_MED)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/medical))
|
|
if(CIV_JOB_GROW)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/botany))
|
|
if(CIV_JOB_ATMOS)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/atmospherics))
|
|
if(CIV_JOB_BITRUN)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/bitrunning))
|
|
//BUBBER EDIT START
|
|
if(CIV_JOB_SMITH)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/blacksmith))
|
|
if(CIV_JOB_PRISONER)
|
|
chosen_type = pick(subtypesof(/datum/bounty/item/prisoner))
|
|
//BUBBER EDIT END
|
|
bounty_ref = new chosen_type
|
|
if(bounty_ref.can_get())
|
|
bounty_succeeded = TRUE
|
|
else
|
|
qdel(bounty_ref)
|
|
return bounty_ref
|