diff --git a/code/modules/antagonists/traitor/objectives/destroy_machinery.dm b/code/modules/antagonists/traitor/objectives/destroy_machinery.dm new file mode 100644 index 00000000000..17f93c73e5d --- /dev/null +++ b/code/modules/antagonists/traitor/objectives/destroy_machinery.dm @@ -0,0 +1,76 @@ +/datum/traitor_objective_category/destroy_machinery + name = "Destroy Protolathe" + objectives = list( + /datum/traitor_objective/destroy_machinery = 1, + /datum/traitor_objective/destroy_machinery/high_risk = 1 + ) + +/datum/traitor_objective/destroy_machinery + name = "Destroy the %MACHINE%" + description = "Destroy the %MACHINE% to cause disarray and disrupt the operations of the %JOB%'s department." + + progression_reward = list(2 MINUTES, 8 MINUTES) + telecrystal_reward = list(0, 1) + + progression_maximum = 10 MINUTES + + /// The maximum amount of this type of objective a traitor can have. + var/maximum_allowed = 2 + /// The possible target machinery and the jobs tied to each one. + var/list/applicable_jobs = list( + JOB_RESEARCH_DIRECTOR = /obj/machinery/rnd/production/protolathe/department/science, + JOB_CHIEF_MEDICAL_OFFICER = /obj/machinery/rnd/production/techfab/department/medical, + JOB_CHIEF_ENGINEER = /obj/machinery/rnd/production/protolathe/department/engineering, + JOB_HEAD_OF_PERSONNEL = /obj/machinery/rnd/production/techfab/department/service, + JOB_SHAFT_MINER = /obj/machinery/mineral/ore_redemption, + ) + /// Whether this can bypass the maximum_allowed value or not + var/allow_more_than_max = FALSE + /// The chosen job. Used to check for duplicates + var/chosen_job + +/datum/traitor_objective/destroy_machinery/high_risk + progression_reward = list(5 MINUTES, 10 MINUTES) + telecrystal_reward = list(3, 4) + + progression_minimum = 15 MINUTES + progression_maximum = 30 MINUTES + allow_more_than_max = TRUE + applicable_jobs = list( + JOB_STATION_ENGINEER = /obj/machinery/telecomms/hub, + JOB_SCIENTIST = /obj/machinery/rnd/server, + ) + +/datum/traitor_objective/destroy_machinery/generate_objective(datum/mind/generating_for, list/possible_duplicates) + if(length(possible_duplicates) >= maximum_allowed && !allow_more_than_max) + return FALSE + for(var/datum/traitor_objective/destroy_machinery/objective as anything in possible_duplicates) + applicable_jobs -= objective.chosen_job + if(!length(applicable_jobs)) + return FALSE + var/list/obj/machinery/possible_machines = list() + while(length(possible_machines) <= 0) + var/target_head = pick(applicable_jobs) + var/obj/machinery/machine_to_find = applicable_jobs[target_head] + applicable_jobs -= target_head + + chosen_job = target_head + for(var/obj/machinery/machine as anything in GLOB.machines) + if(istype(machine, machine_to_find) && is_station_level(machine.z)) + possible_machines += machine + + if(!length(possible_machines)) + return FALSE + + for(var/obj/machinery/machine as anything in possible_machines) + AddComponent(/datum/component/traitor_objective_register, machine, succeed_signals = COMSIG_PARENT_QDELETING) + + replace_in_name("%JOB%", lowertext(chosen_job)) + replace_in_name("%MACHINE%", possible_machines[1].name) + return TRUE + + +/datum/traitor_objective/destroy_machinery/is_duplicate(datum/traitor_objective/destroy_machinery/objective_to_compare) + if(objective_to_compare.chosen_job == chosen_job) + return TRUE + return FALSE diff --git a/code/modules/antagonists/traitor/objectives/smuggling.dm b/code/modules/antagonists/traitor/objectives/smuggling.dm deleted file mode 100644 index 6068c8f72bf..00000000000 --- a/code/modules/antagonists/traitor/objectives/smuggling.dm +++ /dev/null @@ -1,120 +0,0 @@ -/datum/traitor_objective_category/smuggle - name = "Smuggling" - objectives = list( - /datum/traitor_objective/smuggle = 1, - ) - -///smuggle! bring a traitor item from its arrival area to the cargo shuttle, where the objective completes on selling the item -/datum/traitor_objective/smuggle - name = "Smuggle %CONTRABAND% from %AREA% off the station via cargo shuttle" - description = "Go to a designated area, pick up syndicate contraband, and get it off the station via the cargo shuttle. \ - You will instantly fail this objective if anyone else picks up your contraband. If you fail, you are liable for the costs \ - of the smuggling item." - - progression_reward = list(5 MINUTES, 9 MINUTES) - telecrystal_reward = list(0, 1) - - ///area type the objective owner must be in to recieve the contraband - var/area/smuggle_spawn_type - ///the contraband that must be exported on the shuttle - var/obj/item/contraband - ///type of contraband to spawn - var/obj/item/contraband_type - /// possible objective items. Mapped by item type = penalty cost for failing - var/list/possible_contrabands = list( - /obj/item/pen/edagger/prototype = 2, - /obj/item/gun/syringe/syndicate/prototype = 4, - /obj/item/reagent_containers/glass/bottle/ritual_wine = 6, //poison kit price - ) - -/datum/traitor_objective/smuggle/is_duplicate(datum/traitor_objective/smuggle/objective_to_compare) - if(objective_to_compare.contraband_type == contraband_type) - return TRUE - //it's too similar if its from the same area - if(objective_to_compare.smuggle_spawn_type == smuggle_spawn_type) - return TRUE - return FALSE - -/datum/traitor_objective/smuggle/generate_ui_buttons(mob/user) - var/list/buttons = list() - if(!contraband) - buttons += add_ui_button("", "Pressing this will materialize the contraband you need to deliver. You must be in [initial(smuggle_spawn_type.name)] to receive it!", "box", "summon_contraband") - return buttons - -/datum/traitor_objective/smuggle/ui_perform_action(mob/living/user, action) - . = ..() - switch(action) - if("summon_contraband") - if(contraband) - return - var/area/player_area = get_area(user) - if(!istype(player_area, smuggle_spawn_type)) - user.balloon_alert(user, "you can't materialize this here!") - return - contraband = new contraband_type(user.drop_location()) - user.put_in_hands(contraband) - user.balloon_alert(user, "[contraband] materializes in your hand") - RegisterSignal(contraband, COMSIG_ITEM_PICKUP, .proc/on_contraband_pickup) - AddComponent(/datum/component/traitor_objective_register, contraband, \ - succeed_signals = COMSIG_ITEM_EXPORTED, \ - fail_signals = list(COMSIG_PARENT_QDELETING), \ - penalty = telecrystal_penalty \ - ) - if(contraband.reagents) - AddComponent(/datum/component/traitor_objective_register, contraband.reagents, \ - fail_signals = list(COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), \ - penalty = telecrystal_penalty) - -/datum/traitor_objective/smuggle/generate_objective(datum/mind/generating_for, list/possible_duplicates) - //anyone working cargo should not get almost free objectives by having direct access to the cargo shuttle - if(generating_for.assigned_role.departments_bitflags & DEPARTMENT_BITFLAG_CARGO) - return FALSE - - //choose starting area to recieve contraband - var/list/possible_areas = GLOB.the_station_areas.Copy() - for(var/area/possible_area as anything in possible_areas) - //remove areas too close to the destination, too obvious for our poor shmuck, or just unfair - if(istype(possible_area, /area/station/cargo) || istype(possible_area, /area/station/hallway) || istype(possible_area, /area/station/security)) - possible_areas -= possible_area - for(var/datum/traitor_objective/smuggle/smuggle_objective as anything in possible_duplicates) - possible_areas -= smuggle_objective.smuggle_spawn_type - possible_contrabands -= smuggle_objective.contraband_type - if(smuggle_objective.objective_state == OBJECTIVE_STATE_INACTIVE || smuggle_objective.objective_state == OBJECTIVE_STATE_ACTIVE) - return FALSE // You can only have 1 objective of this type active and inactive at a time. - if(!length(possible_contrabands)) - return FALSE - if(!length(possible_areas)) - return FALSE - smuggle_spawn_type = pick(possible_areas) - //choose contraband type to spawn when reaching starting area - contraband_type = pick(possible_contrabands) - telecrystal_penalty = possible_contrabands[contraband_type] - replace_in_name("%CONTRABAND%", initial(contraband_type.name)) - replace_in_name("%AREA%", initial(smuggle_spawn_type.name)) - return TRUE - -/datum/traitor_objective/smuggle/ungenerate_objective() - . = ..() - if(contraband) - UnregisterSignal(contraband, COMSIG_ITEM_PICKUP) - contraband = null - -/datum/traitor_objective/smuggle/proc/on_contraband_pickup(datum/source, mob/taker) - SIGNAL_HANDLER - if(taker != handler.owner?.current) - fail_objective(penalty_cost = telecrystal_penalty) - -//smuggling container -/obj/item/reagent_containers/glass/bottle/ritual_wine - name = "ritual wine bottle" - desc = "Contains an incredibly potent mix of various hallucinogenics, herbal extracts, and hard drugs. \ - the Tiger Cooperative praises it as a link to higher powers, but for all intents and purposes this should \ - not be consumed." - list_reagents = list( - //changeling adrenals part - /datum/reagent/drug/methamphetamine = 5, - //hallucinations part - /datum/reagent/drug/mushroomhallucinogen = 35, - //alcoholic part, plus more hallucinations lel - /datum/reagent/consumable/ethanol/ritual_wine = 10, - ) diff --git a/code/modules/antagonists/traitor/objectives/steal.dm b/code/modules/antagonists/traitor/objectives/steal.dm index 69e8a34ead8..ab75198d6b9 100644 --- a/code/modules/antagonists/traitor/objectives/steal.dm +++ b/code/modules/antagonists/traitor/objectives/steal.dm @@ -47,8 +47,8 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) objectives_by_path[typepath] -= source /datum/traitor_objective/steal_item - name = "Steal %ITEM% and place a bug on it. Hold it for %TIME% minutes" - description = "Use the button below to materialize the bug within your hand, where you'll then be able to place it on the item. After that, you must keep it near you for %TIME% minutes" + name = "Steal %ITEM% and place a bug on it." + description = "Use the button below to materialize the bug within your hand, where you'll then be able to place it on the item. Additionally, you can keep it near you for %TIME% minutes, and you will be rewarded with %PROGRESSION% reputation and %TC% telecrystals." progression_minimum = 20 MINUTES progression_reward = 5 MINUTES @@ -70,6 +70,11 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /// Telecrystal reward increase per unit of time. var/minutes_per_telecrystal = 3 + /// Extra TC given for holding the item for the required duration of time. + var/extra_tc = 0 + /// Extra progression given for holding the item for the required duration of time. + var/extra_progression = 0 + abstract_type = /datum/traitor_objective/steal_item /datum/traitor_objective/steal_item/low_risk_cap @@ -78,6 +83,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) progression_reward = list(5 MINUTES, 10 MINUTES) telecrystal_reward = 0 + minutes_per_telecrystal = 6 possible_items = list( /datum/objective_item/steal/low_risk/techboard/borgupload, /datum/objective_item/steal/low_risk/techboard/aiupload, @@ -89,6 +95,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) progression_maximum = 35 MINUTES progression_reward = list(5 MINUTES, 10 MINUTES) telecrystal_reward = 0 + minutes_per_telecrystal = 6 possible_items = list( /datum/objective_item/steal/low_risk/cargo_budget, @@ -170,10 +177,12 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) if(length(target_item.special_equipment)) special_equipment = target_item.special_equipment hold_time_required = rand(hold_time_required[1], hold_time_required[2]) - progression_reward += hold_time_required * (1 MINUTES) - telecrystal_reward += round(hold_time_required / max(minutes_per_telecrystal, 0.1)) + extra_progression += hold_time_required * (1 MINUTES) + extra_tc += round(hold_time_required / max(minutes_per_telecrystal, 0.1)) replace_in_name("%ITEM%", target_item.name) replace_in_name("%TIME%", hold_time_required) + replace_in_name("%TC%", extra_tc) + replace_in_name("%PROGRESSION%", DISPLAY_PROGRESSION(extra_progression)) return TRUE /datum/traitor_objective/steal_item/ungenerate_objective() @@ -195,6 +204,7 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) buttons += add_ui_button("", "Pressing this will materialize a bug in your hand, which you can place on the target item", "wifi", "summon_bug") else if(bug.planted_on) buttons += add_ui_button("[DisplayTimeText(time_fulfilled)]", "This tells you how much time you have spent around the target item after the bug has been planted.", "clock", "none") + buttons += add_ui_button("Skip Time", "Pressing this will succeed the mission. You will not get the extra TC and progression.", "forward-step", "cash_out") return buttons /datum/traitor_objective/steal_item/ui_perform_action(mob/living/user, action) @@ -220,6 +230,10 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) user.put_in_hands(new_item) user.balloon_alert(user, "the equipment materializes in your hand") special_equipment = null + if("cash_out") + if(!bug.planted_on) + return + succeed_objective() /datum/traitor_objective/steal_item/process(delta_time) var/mob/owner = handler.owner?.current @@ -232,6 +246,8 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) return time_fulfilled += delta_time * (1 SECONDS) if(time_fulfilled >= hold_time_required * (1 MINUTES)) + progression_reward += extra_progression + telecrystal_reward += extra_tc succeed_objective() return PROCESS_KILL handler.on_update() @@ -259,4 +275,5 @@ GLOBAL_DATUM_INIT(steal_item_handler, /datum/objective_item_handler, new()) /datum/traitor_objective/steal_item/proc/on_bug_planted(obj/item/source, obj/item/location) SIGNAL_HANDLER - START_PROCESSING(SSprocessing, src) + if(objective_state == OBJECTIVE_STATE_ACTIVE) + START_PROCESSING(SSprocessing, src) diff --git a/code/modules/cargo/exports/traitor.dm b/code/modules/cargo/exports/traitor.dm deleted file mode 100644 index 61128a3ef7d..00000000000 --- a/code/modules/cargo/exports/traitor.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/export/traitor/edagger - cost = CARGO_CRATE_VALUE * 5 - unit_name = "low value contraband" - export_types = list( - /obj/item/pen/edagger/prototype - ) - -/datum/export/traitor/syringegun - cost = CARGO_CRATE_VALUE * 10 - unit_name = "high value contraband" - export_types = list( - /obj/item/gun/syringe/syndicate/prototype - ) - -/datum/export/traitor/ritual_wine - cost = CARGO_CRATE_VALUE * 15 - unit_name = "super high value contraband" - export_types = list( - /obj/item/reagent_containers/glass/bottle/ritual_wine - ) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 71f23069533..954ba49f78e 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -293,15 +293,6 @@ playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 5, TRUE) return COMPONENT_NO_DEFAULT_MESSAGE -///syndicate prototype for smuggling missions -/obj/item/pen/edagger/prototype - name = "odd pen" - desc = "It's an abnormal black ink pen, with weird chunks of metal sticking out of it..." - hidden_name = "prototype hardlight dagger" - hidden_desc = "Waffle Corp R&D's prototype for energy daggers. Hardlight may be inferior \ - to energy weapons, but it's still surprisingly deadly." - hidden_icon = "eprototypedagger" - /obj/item/pen/survival name = "survival pen" desc = "The latest in portable survival technology, this pen was designed as a miniature diamond pickaxe. Watchers find them very desirable for their diamond exterior." diff --git a/code/modules/projectiles/guns/special/syringe_gun.dm b/code/modules/projectiles/guns/special/syringe_gun.dm index a919eb3c3b0..663ed7d2d1a 100644 --- a/code/modules/projectiles/guns/special/syringe_gun.dm +++ b/code/modules/projectiles/guns/special/syringe_gun.dm @@ -129,13 +129,6 @@ can_unsuppress = FALSE //Permanently silenced syringes = list(new /obj/item/reagent_containers/syringe()) -///syndicate prototype for smuggling missions -/obj/item/gun/syringe/syndicate/prototype - name = "prototype dart pistol" - desc = "Cybersun Industries prototype dart pistols. Delivering the syringes at the same \ - speed in a smaller weapon proved to be a surprisingly complicated task." - syringes = list() - /obj/item/gun/syringe/dna name = "modified compact syringe gun" desc = "A syringe gun that has been modified to be compact and fit DNA injectors instead of normal syringes." diff --git a/tgstation.dme b/tgstation.dme index 0758a934fd0..25a3fddbb5c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2207,10 +2207,10 @@ #include "code\modules\antagonists\traitor\objectives\bug_room.dm" #include "code\modules\antagonists\traitor\objectives\destroy_heirloom.dm" #include "code\modules\antagonists\traitor\objectives\destroy_item.dm" +#include "code\modules\antagonists\traitor\objectives\destroy_machinery.dm" #include "code\modules\antagonists\traitor\objectives\hack_comm_console.dm" #include "code\modules\antagonists\traitor\objectives\kill_pet.dm" #include "code\modules\antagonists\traitor\objectives\sleeper_protocol.dm" -#include "code\modules\antagonists\traitor\objectives\smuggling.dm" #include "code\modules\antagonists\traitor\objectives\steal.dm" #include "code\modules\antagonists\traitor\objectives\final_objective\battlecruiser.dm" #include "code\modules\antagonists\traitor\objectives\final_objective\end_reality.dm" @@ -2458,7 +2458,6 @@ #include "code\modules\cargo\exports\seeds.dm" #include "code\modules\cargo\exports\sheets.dm" #include "code\modules\cargo\exports\tools.dm" -#include "code\modules\cargo\exports\traitor.dm" #include "code\modules\cargo\exports\weapons.dm" #include "code\modules\cargo\exports\xenobio.dm" #include "code\modules\cargo\markets\_market.dm"