From 2ac4a8051db8591dc4e2df506cd583560131bd83 Mon Sep 17 00:00:00 2001 From: Geeves Date: Wed, 24 Nov 2021 18:38:21 +0200 Subject: [PATCH] Powered Crossbow Bounty (#12772) * Powered Crossbow Bounty * cl --- code/modules/cargo/bounties/engineer.dm | 8 ++++++ code/modules/cargo/bounty.dm | 29 +++++++++++----------- html/changelogs/geeves-crossbow_bounty.yml | 6 +++++ 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 html/changelogs/geeves-crossbow_bounty.yml diff --git a/code/modules/cargo/bounties/engineer.dm b/code/modules/cargo/bounties/engineer.dm index 0f675ac80b3..99a20023e1b 100644 --- a/code/modules/cargo/bounties/engineer.dm +++ b/code/modules/cargo/bounties/engineer.dm @@ -152,3 +152,11 @@ required_count = 2 random_count = 1 wanted_types = list(/obj/machinery/power/port_gen/pacman) + +/datum/bounty/item/engineer/crossbow + name = "Powered Crossbow" + description = "Mictlanian Democratic Forces require weaponry to assist the TCFL in quelling the unrest following peaceful takeover, please ship us some powered crossbows." + reward_low = 5000 + reward_high = 7500 + required_count = 2 + wanted_types = list(/obj/item/gun/launcher/crossbow) diff --git a/code/modules/cargo/bounty.dm b/code/modules/cargo/bounty.dm index 77fdafa9b63..490c1546e93 100644 --- a/code/modules/cargo/bounty.dm +++ b/code/modules/cargo/bounty.dm @@ -16,7 +16,7 @@ /datum/bounty/New() if(reward_low > 0 && reward_high > reward_low) - reward = round(rand(reward_low, reward_high), 100) + reward = round(rand(reward_low, reward_high), 100) description = replacetext(description, "%DOCKNAME",current_map.dock_name) description = replacetext(description, "%DOCKSHORT",current_map.dock_short) description = replacetext(description, "%BOSSNAME",current_map.boss_name) @@ -166,41 +166,40 @@ // Called lazily at startup to populate bounties_list with random bounties. /datum/controller/subsystem/cargo/proc/setupBounties() - + var/list/assistant_bounties = subtypesof(/datum/bounty/item/assistant) for(var/i = 0; i < BOUNTY_NUM_HIGH; i++) CHECK_TICK - var/datum/bounty/subtype = pick(subtypesof(/datum/bounty/item/assistant)) + var/datum/bounty/subtype = pick(assistant_bounties) try_add_bounty(new subtype) + var/list/robotics_and_science_bounties = subtypesof(/datum/bounty/item/bot) + subtypesof(/datum/bounty/item/science) for(var/i = 0; i < BOUNTY_NUM_HIGH; i++) CHECK_TICK - var/list/subtypes = subtypesof(/datum/bounty/item/bot) - subtypes += subtypesof(/datum/bounty/item/science) - var/datum/bounty/subtype = pick(subtypes) + var/datum/bounty/subtype = pick(robotics_and_science_bounties) try_add_bounty(new subtype) + var/list/chef_bounties = subtypesof(/datum/bounty/item/chef) for(var/i = 0; i < BOUNTY_NUM_MED; i++) CHECK_TICK - var/datum/bounty/subtype = pick(subtypesof(/datum/bounty/item/chef)) + var/datum/bounty/subtype = pick(chef_bounties) try_add_bounty(new subtype) - for(var/i = 0; i < BOUNTY_NUM_MED; i++) + var/list/hydroponics_bounties = subtypesof(/datum/bounty/item/hydroponicist) + for(var/i = 0; i < BOUNTY_NUM_MED; i++) CHECK_TICK - var/datum/bounty/subtype = pick(subtypesof(/datum/bounty/item/hydroponicist)) + var/datum/bounty/subtype = pick(hydroponics_bounties) try_add_bounty(new subtype) + var/list/security_and_engineering_bounties = subtypesof(/datum/bounty/item/security) + subtypesof(/datum/bounty/item/engineer) for(var/i = 0; i < BOUNTY_NUM_HIGH; i++) CHECK_TICK - var/list/subtypes = subtypesof(/datum/bounty/item/security) - subtypes += subtypesof(/datum/bounty/item/engineer) - var/datum/bounty/subtype = pick(subtypes) + var/datum/bounty/subtype = pick(security_and_engineering_bounties) try_add_bounty(new subtype) + var/list/prototype_weapon_and_slime_bounties = subtypesof(/datum/bounty/weapon_prototype) + subtypesof(/datum/bounty/item/slime) for(var/i = 0; i < BOUNTY_NUM_LOW; i++) CHECK_TICK - var/list/subtypes = subtypesof(/datum/bounty/weapon_prototype) - subtypes += subtypesof(/datum/bounty/item/slime) - var/datum/bounty/subtype = pick(subtypes) + var/datum/bounty/subtype = pick(prototype_weapon_and_slime_bounties) try_add_bounty(new subtype) //add one of each reagent, then another one picked at random diff --git a/html/changelogs/geeves-crossbow_bounty.yml b/html/changelogs/geeves-crossbow_bounty.yml new file mode 100644 index 00000000000..25a6c4b6a6c --- /dev/null +++ b/html/changelogs/geeves-crossbow_bounty.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added a Powered Crossbow bounty. Supporting this bounty will help our friends on Mictlan achieve peace once more." \ No newline at end of file