mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
# Conflicts: # .github/CODEOWNERS # .github/workflows/compile_changelogs.yml # .github/workflows/stale.yml # SQL/database_changelog.md # _maps/map_files/CatwalkStation/CatwalkStation_2023.dmm # code/__DEFINES/atom_hud.dm # code/__DEFINES/inventory.dm # code/__DEFINES/mobs.dm # code/__DEFINES/species_clothing_paths.dm # code/__DEFINES/subsystems.dm # code/__DEFINES/surgery.dm # code/__HELPERS/global_lists.dm # code/_globalvars/lists/maintenance_loot.dm # code/_globalvars/traits/_traits.dm # code/controllers/subsystem/minor_mapping.dm # code/controllers/subsystem/processing/quirks.dm # code/controllers/subsystem/shuttle.dm # code/datums/components/palette.dm # code/datums/components/surgery_initiator.dm # code/datums/diseases/advance/advance.dm # code/datums/hud.dm # code/datums/mood.dm # code/datums/mutations/chameleon.dm # code/datums/quirks/negative_quirks/nyctophobia.dm # code/datums/status_effects/debuffs/debuffs.dm # code/datums/status_effects/debuffs/drunk.dm # code/datums/status_effects/debuffs/slime/slime_leech.dm # code/datums/weather/weather.dm # code/game/data_huds.dm # code/game/objects/items.dm # code/game/objects/items/devices/scanners/health_analyzer.dm # code/game/objects/items/frog_statue.dm # code/game/objects/items/rcd/RLD.dm # code/game/objects/items/robot/items/hypo.dm # code/game/objects/items/stacks/medical.dm # code/game/objects/items/stacks/wrap.dm # code/game/objects/items/storage/garment.dm # code/game/objects/items/tools/medical/defib.dm # code/game/objects/items/weaponry.dm # code/game/objects/items/weaponry/melee/misc.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/curtains.dm # code/game/objects/structures/dresser.dm # code/game/objects/structures/girders.dm # code/game/objects/structures/maintenance.dm # code/game/objects/structures/mirror.dm # code/modules/admin/greyscale_modify_menu.dm # code/modules/admin/verbs/light_debug.dm # code/modules/antagonists/ashwalker/ashwalker.dm # code/modules/antagonists/heretic/knowledge/starting_lore.dm # code/modules/antagonists/ninja/ninjaDrainAct.dm # code/modules/art/paintings.dm # code/modules/client/preferences.dm # code/modules/client/verbs/ooc.dm # code/modules/clothing/head/wig.dm # code/modules/events/disease_outbreak.dm # code/modules/holodeck/holo_effect.dm # code/modules/jobs/job_types/head_of_security.dm # code/modules/jobs/job_types/security_officer.dm # code/modules/library/skill_learning/generic_skillchips/point.dm # code/modules/mining/lavaland/ash_flora.dm # code/modules/mining/lavaland/mining_loot/megafauna/ash_drake.dm # code/modules/mob/dead/new_player/new_player.dm # code/modules/mob/living/basic/guardian/guardian.dm # code/modules/mob/living/basic/space_fauna/space_dragon/space_dragon.dm # code/modules/mob/living/carbon/carbon.dm # code/modules/mob/living/carbon/human/human.dm # code/modules/mob/living/carbon/human/human_defines.dm # code/modules/mob/living/carbon/life.dm # code/modules/mob/living/living.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob.dm # code/modules/mob_spawn/ghost_roles/mining_roles.dm # code/modules/mod/mod_control.dm # code/modules/mod/modules/modules_general.dm # code/modules/modular_computers/computers/item/computer_ui.dm # code/modules/paperwork/paper.dm # code/modules/paperwork/paperbin.dm # code/modules/power/lighting/light.dm # code/modules/projectiles/guns/energy/kinetic_accelerator.dm # code/modules/projectiles/projectile.dm # code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm # code/modules/reagents/chemistry/reagents/food_reagents.dm # code/modules/reagents/chemistry/reagents/other_reagents.dm # code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm # code/modules/research/xenobiology/crossbreeding/_clothing.dm # code/modules/research/xenobiology/crossbreeding/prismatic.dm # code/modules/surgery/advanced/brainwashing.dm # code/modules/surgery/advanced/lobotomy.dm # code/modules/surgery/amputation.dm # code/modules/surgery/blood_filter.dm # code/modules/surgery/bodyparts/_bodyparts.dm # code/modules/surgery/brain_surgery.dm # code/modules/surgery/cavity_implant.dm # code/modules/surgery/coronary_bypass.dm # code/modules/surgery/gastrectomy.dm # code/modules/surgery/healing.dm # code/modules/surgery/limb_augmentation.dm # code/modules/surgery/organ_manipulation.dm # code/modules/surgery/revival.dm # code/modules/surgery/sleeper_protocol.dm # code/modules/surgery/surgery_helpers.dm # code/modules/surgery/surgery_step.dm # code/modules/unit_tests/_unit_tests.dm # code/modules/unit_tests/designs.dm # code/modules/unit_tests/icon_state_worn.dm # code/modules/unit_tests/screenshots/screenshot_antag_icons_cultist.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_headrevolutionary.png # code/modules/unit_tests/screenshots/screenshot_antag_icons_provocateur.png # code/modules/unit_tests/screenshots/screenshot_husk_body.png # code/modules/unit_tests/screenshots/screenshot_husk_body_missing_limbs.png # icons/map_icons/clothing/head/_head.dmi # icons/map_icons/clothing/shoes.dmi # icons/map_icons/items/_item.dmi # icons/mob/huds/hud.dmi # icons/mob/inhands/64x64_lefthand.dmi # icons/mob/inhands/64x64_righthand.dmi # icons/obj/machines/computer.dmi # tgui/packages/tgui/interfaces/OperatingComputer.jsx # tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferences/MainPage.tsx # tgui/packages/tgui/interfaces/PreferencesMenu/types.ts # tgui/packages/tgui/interfaces/SurgeryInitiator.tsx # tools/icon_cutter/check.py
106 lines
3.4 KiB
Plaintext
106 lines
3.4 KiB
Plaintext
/datum/bounty
|
|
var/name
|
|
var/description
|
|
VAR_PROTECTED/reward = CARGO_CRATE_VALUE * 5 // In credits.
|
|
var/allow_duplicate = 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
|
|
|
|
/// 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()
|
|
return reward * SSeconomy.bounty_modifier
|
|
|
|
/// 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
|
|
|
|
/** Returns a new bounty of random type, but does not add it to GLOB.bounties_list.
|
|
*
|
|
* * 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
|