From 7ed1661a85aa94e55b70ac90bd12443ec532ed0b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 05:15:42 -0500 Subject: [PATCH] improvments --- .../BeachRuins/beach_pirate_crash.dmm | 2 +- .../BeachRuins/beach_treasure_cove.dmm | 3 ++ .../IceRuins/icemoon_crashed_holemaker.dmm | 2 +- .../IceRuins/icemoon_hydroponics_lab.dmm | 2 +- .../icemoon_underground_abandoned_village.dmm | 2 +- .../icemoon_underground_brazillianlab.dmm | 2 +- .../JungleRuins/jungle_cavecrew.dmm | 2 +- .../JungleRuins/jungle_syndicate.dmm | 5 ++- .../RockRuins/rockplanet_distillery.dmm | 3 ++ .../wasteplanet_abandoned_mechbay.dmm | 4 +++ code/controllers/subsystem/overmap.dm | 17 ++++++---- code/datums/ruins/beachplanet.dm | 1 + code/datums/ruins/icemoon.dm | 8 ++--- code/datums/ruins/jungle.dm | 19 +++++++++++- code/datums/ruins/rockplanet.dm | 1 + code/modules/dynamic_missions/mission.dm | 31 ++++++++----------- .../modules/dynamic_missions/mission_board.dm | 7 ++--- .../dynamic_missions/missions/dynamic.dm | 20 +++++++++++- .../dynamic_missions/missions/guarded.dm | 25 ++++++++++++--- .../missions/guarded/nt_files.dm | 19 ------------ .../modules/dynamic_missions/missions/kill.dm | 26 ++++++++++++---- .../missions/kill/frontiersmen.dm | 2 -- .../modules/dynamic_missions/missions/scan.dm | 1 + .../dynamic_missions/missions/simple.dm | 19 ------------ .../missions/simple/blackbox.dm | 12 ------- code/modules/overmap/objects/dynamic_datum.dm | 29 +++++++---------- shiptest.dme | 5 +-- .../tgui/interfaces/MissionBoard/index.tsx | 25 ++++++--------- .../tgui/interfaces/MissionBoard/types.ts | 6 +--- 29 files changed, 154 insertions(+), 146 deletions(-) delete mode 100644 code/modules/dynamic_missions/missions/guarded/nt_files.dm delete mode 100644 code/modules/dynamic_missions/missions/kill/frontiersmen.dm create mode 100644 code/modules/dynamic_missions/missions/scan.dm delete mode 100644 code/modules/dynamic_missions/missions/simple.dm delete mode 100644 code/modules/dynamic_missions/missions/simple/blackbox.dm diff --git a/_maps/RandomRuins/BeachRuins/beach_pirate_crash.dmm b/_maps/RandomRuins/BeachRuins/beach_pirate_crash.dmm index 23267794a2ff..9031ae1c16d8 100644 --- a/_maps/RandomRuins/BeachRuins/beach_pirate_crash.dmm +++ b/_maps/RandomRuins/BeachRuins/beach_pirate_crash.dmm @@ -400,7 +400,7 @@ /obj/effect/turf_decal/weather/sand{ dir = 6 }, -/obj/effect/landmark/mission_poi/kill, +/obj/effect/landmark/mission_poi/main/kill, /turf/open/floor/plating/asteroid/sand, /area/overmap_encounter/planetoid/cave/explored) "jZ" = ( diff --git a/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm b/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm index 997f6bb56703..7df8ed982593 100644 --- a/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm +++ b/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm @@ -1302,6 +1302,9 @@ dir = 8 }, /mob/living/simple_animal/hostile/human/frontier/ranged/officer/neutured, +/obj/effect/landmark/mission_poi/main/kill{ + already_spawned = 1 + }, /turf/open/floor/carpet/red, /area/ruin/beach/treasure_cove) "SX" = ( diff --git a/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm b/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm index 362eaaccf331..7b0dee8fe754 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm @@ -196,7 +196,7 @@ pixel_x = -32 }, /obj/effect/decal/cleanable/dirt/dust, -/obj/effect/landmark/mission_poi/recovery, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/plasteel/dark, /area/ruin/unpowered/crashed_holemaker) "cS" = ( diff --git a/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm b/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm index 9ec1515525c5..9391e7e05f6c 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm @@ -2197,7 +2197,7 @@ /area/ruin/powered/hydroponicslab) "Xb" = ( /obj/structure/table/wood, -/obj/effect/landmark/mission_poi/recovery, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/wood/walnut, /area/ruin/powered/hydroponicslab) "Xt" = ( diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm index 9dc046b1eb6f..250e536c918a 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm @@ -138,7 +138,7 @@ }, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/effect/landmark/mission_poi/recovery, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/wood, /area/ruin/powered) "mI" = ( diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm index 44240c4158b2..d7a70b2fd35a 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm @@ -1007,7 +1007,7 @@ pixel_y = 10 }, /obj/structure/table/wood/fancy/blue, -/obj/effect/landmark/mission_poi/blackbox, +/obj/effect/landmark/mission_poi, /turf/open/floor/carpet/orange{ initial_gas_mix = "ICEMOON_ATMOS" }, diff --git a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm index 1a9e82e12bc9..0a7e99ed7c53 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm @@ -666,7 +666,7 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/effect/landmark/mission_poi/kill, +/obj/effect/landmark/mission_poi/main/kill, /turf/open/floor/plasteel/tech, /area/ruin/jungle/cavecrew/bridge) "iN" = ( diff --git a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm index 1fc59835638f..333a495d4168 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm @@ -56,7 +56,7 @@ /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table, /obj/item/storage/cans/sixbeer, -/obj/effect/landmark/mission_poi/nt_files, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "bS" = ( @@ -129,6 +129,9 @@ name = "Jerry"; unsuitable_atmos_damage = 0 }, +/obj/effect/landmark/mission_poi/main/kill{ + already_spawned = 1 + }, /turf/open/floor/plating, /area/ruin/jungle/syndifort/jerry) "es" = ( diff --git a/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm b/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm index d05a8c37f071..6caaae8da900 100644 --- a/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm +++ b/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm @@ -4406,6 +4406,9 @@ id = "frontier_armory" }, /mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals, +/obj/effect/landmark/mission_poi{ + already_spawned = 1 + }, /turf/open/floor/wood, /area/ruin/rockplanet/distillery/office) "XD" = ( diff --git a/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm b/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm index e1a64004decb..7392cda36fcd 100644 --- a/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm +++ b/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm @@ -1772,6 +1772,7 @@ /obj/effect/turf_decal/siding/thinplating/dark{ dir = 4 }, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plasteel/dark, /area/ruin/wasteplanet/abandoned_mechbay/commandcontrol) "uD" = ( @@ -1931,6 +1932,7 @@ /obj/effect/turf_decal/siding/thinplating/dark{ dir = 10 }, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/plasteel/mono/dark, /area/ruin/wasteplanet/abandoned_mechbay/commandcontrol) "wc" = ( @@ -2779,6 +2781,7 @@ /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer4{ dir = 8 }, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plasteel/dark, /area/ruin/wasteplanet/abandoned_mechbay/commandcontrol) "Hm" = ( @@ -3081,6 +3084,7 @@ pixel_y = 29; pixel_x = 28 }, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plasteel/dark, /area/ruin/wasteplanet/abandoned_mechbay/commandcontrol) "Kj" = ( diff --git a/code/controllers/subsystem/overmap.dm b/code/controllers/subsystem/overmap.dm index 410172e3c3d5..8e9bfd447552 100644 --- a/code/controllers/subsystem/overmap.dm +++ b/code/controllers/subsystem/overmap.dm @@ -17,6 +17,8 @@ SUBSYSTEM_DEF(overmap) ///List of all events var/list/events + ///List of dynamic encounters, just planets rn. + var/list/dynamic_encounters ///Map of tiles at each radius (represented by index) around the sun var/list/list/radius_positions @@ -49,6 +51,7 @@ SUBSYSTEM_DEF(overmap) controlled_ships = list() outposts = list() events = list() + dynamic_encounters = list() generator_type = CONFIG_GET(string/overmap_generator_type) size = CONFIG_GET(number/overmap_size) @@ -79,6 +82,8 @@ SUBSYSTEM_DEF(overmap) return ..() /datum/controller/subsystem/overmap/fire() + if(length(dynamic_encounters) < CONFIG_GET(number/max_overmap_dynamic_events)) + spawn_ruin_level() if(events_enabled) for(var/datum/overmap/event/E as anything in events) if(E.get_nearby_overmap_objects()) @@ -127,10 +132,10 @@ SUBSYSTEM_DEF(overmap) /datum/controller/subsystem/overmap/proc/create_map() if (generator_type == OVERMAP_GENERATOR_SOLAR) spawn_events_in_orbits() - spawn_ruin_levels_in_orbits() else spawn_events() - spawn_ruin_levels() + + spawn_ruin_levels() spawn_outpost() //spawn_initial_ships() @@ -250,11 +255,10 @@ SUBSYSTEM_DEF(overmap) */ /datum/controller/subsystem/overmap/proc/spawn_ruin_levels() for(var/i in 1 to CONFIG_GET(number/max_overmap_dynamic_events)) - new /datum/overmap/dynamic() + spawn_ruin_level() -/datum/controller/subsystem/overmap/proc/spawn_ruin_levels_in_orbits() - for(var/i in 1 to CONFIG_GET(number/max_overmap_dynamic_events)) - new /datum/overmap/dynamic() +/datum/controller/subsystem/overmap/proc/spawn_ruin_level() + new /datum/overmap/dynamic() /** * Reserves a square dynamic encounter area, generates it, and spawns a ruin in it if one is supplied. @@ -503,6 +507,7 @@ SUBSYSTEM_DEF(overmap) overmap_objects = SSovermap.overmap_objects controlled_ships = SSovermap.controlled_ships events = SSovermap.events + dynamic_encounters = SSovermap.dynamic_encounters outposts = SSovermap.outposts radius_positions = SSovermap.radius_positions overmap_vlevel = SSovermap.overmap_vlevel diff --git a/code/datums/ruins/beachplanet.dm b/code/datums/ruins/beachplanet.dm index abd4e782b515..1fc5056f2159 100644 --- a/code/datums/ruins/beachplanet.dm +++ b/code/datums/ruins/beachplanet.dm @@ -39,6 +39,7 @@ description = "A abandoned colony. It seems that this colony was abandoned, for a reason or another" suffix = "beach_treasure_cove.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) + dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen) /datum/map_template/ruin/beachplanet/crashedengie name = "Crashed Engineer Ship" diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index ac89a91aef66..96a710cdcafd 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -10,7 +10,7 @@ description = "An abandoned hydroponics research facility containing hostile plant fauna." suffix = "icemoon_hydroponics_lab.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_SHELTER) - dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox) + dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) /datum/map_template/ruin/icemoon/abandonedvillage name = "Abandoned Village" @@ -18,7 +18,7 @@ description = "Who knows what lies within?" suffix = "icemoon_underground_abandoned_village.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MINOR_LOOT, RUIN_TAG_INHOSPITABLE) - dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox) + dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) /datum/map_template/ruin/icemoon/brazillian_lab name = "Barricaded Compound" @@ -26,7 +26,7 @@ description = "A conspicuous compound in the middle of the cold wasteland. What goodies are inside?" suffix = "icemoon_underground_brazillianlab.dmm" ruin_tags = list(RUIN_TAG_BOSS_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_INHOSPITABLE) - dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox) + dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) /datum/map_template/ruin/icemoon/crashed_holemaker name = "Crashed Holemaker" @@ -34,4 +34,4 @@ description = "Safety records for early Nanotrasen Spaceworks vessels were, and always have been, top of their class. Absolutely no multi-billion credit projects have been painstakingly erased from history. (Citation Needed)" suffix = "icemoon_crashed_holemaker.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MINOR_LOOT, RUIN_TAG_SHELTER) - dynamic_mission_types = list(/datum/mission/dynamic/simple/blackbox) + dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index d623209c3217..16ce88c27cd9 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -10,7 +10,24 @@ description = "A small bunker owned by the Syndicate." suffix = "jungle_syndicate.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/dynamic/simple/guarded/nt_files) + dynamic_mission_types = list( + /datum/mission/dynamic/guarded/nt_files, + /datum/mission/dynamic/kill/jerry + ) + +/datum/mission/dynamic/kill/jerry + name = "FUCKING KIL JERRY THAT SUNOFA BITCH STOLE BY GODDAMN RELINA PLUSHIE" + desc = "I WANT MY FUCKIN PUSHIE BACK KILL HIM AND ILL PAY" + target_type = /mob/living/simple_animal/hostile/human/syndicate + setpiece_item = list( + /obj/item/toy/plush/rilena, + /obj/item/toy/plush/tali + /obj/item/toy/plush/sharai + /obj/item/toy/plush/xader + /obj/item/toy/plush/mora + /obj/item/toy/plush/kari + ) + /datum/map_template/ruin/jungle/interceptor name = "Old Crashed Interceptor" diff --git a/code/datums/ruins/rockplanet.dm b/code/datums/ruins/rockplanet.dm index 7382b2c5768a..44138ed46ce3 100644 --- a/code/datums/ruins/rockplanet.dm +++ b/code/datums/ruins/rockplanet.dm @@ -36,3 +36,4 @@ description = "A former pre-ICW era Nanotrasen outpost converted into a moonshine distillery by Frontiersman bootleggers." id = "rockplanet_distillery" suffix = "rockplanet_distillery.dmm" + dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 538831a5fc9d..6eafa35fd35e 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -73,11 +73,7 @@ return /datum/mission/proc/reward_flavortext() - return list( - MISSION_REWARD_CASH = "[value * 1.2] cr upon completion", - MISSION_REWARD_ITEMS = "A nice slice of ham AND [value] cr", - MISSION_REWARD_REP = "[value] cr and rep with [SSfactions.faction_name(src.faction)]", - ) + return "[value * 1.2] cr upon completion" /datum/mission/proc/start_mission() SSmissions.inactive_missions -= src @@ -89,6 +85,8 @@ /datum/mission/proc/on_planet_load(datum/overmap/dynamic/planet) SIGNAL_HANDLER + // Status of mission is handled by items spawned in mission after this + UnregisterSignal(mission_location, COMSIG_PARENT_QDELETING) if(!active) qdel(src) return @@ -105,23 +103,15 @@ /datum/mission/proc/can_turn_in(atom/movable/item_to_check) return -/datum/mission/proc/turn_in(atom/movable/item_to_turn_in, choice) +/datum/mission/proc/turn_in(atom/movable/item_to_turn_in) if(can_turn_in(item_to_turn_in)) - spawn_reward(item_to_turn_in.loc, choice) + spawn_reward(item_to_turn_in.loc) do_sparks(3, FALSE, get_turf(item_to_turn_in)) qdel(item_to_turn_in) qdel(src) -/datum/mission/proc/spawn_reward(loc, choice) - switch(choice) - if(MISSION_REWARD_CASH) - new /obj/item/spacecash/bundle(loc, value * 1.2) - if(MISSION_REWARD_ITEMS) - new /obj/item/spacecash/bundle(loc, value) - new /obj/item/reagent_containers/food/snacks/spidereggsham(loc) - //Rep probally not coming in this pr i think - if(MISSION_REWARD_REP) - new /obj/item/spacecash/bundle(loc, value * 1.2) +/datum/mission/proc/spawn_reward(loc) + new /obj/item/spacecash/bundle(loc, value * 1.2) /datum/mission/proc/can_complete() return !failed @@ -235,8 +225,9 @@ LAZYREMOVE(bound_atoms, bound) /obj/effect/landmark/mission_poi + name = "mission poi" icon = 'icons/effects/mission_poi.dmi' - icon_state = "main_thing" + icon_state = "side_thing" ///Assume the item we want is included in the map and we simple have to return it var/already_spawned = FALSE ///Only needed if you have multipe missiosn that use the same poi's on the map @@ -270,6 +261,10 @@ qdel(src) return item_of_intrest +/obj/effect/landmark/mission_poi/main + name = "mission focus" + icon_state = "main_thing" + /// Instead of spawning something its used to find a matching item already in the map and returns that. For if you want to use an already exisiting part of the ruin. /obj/effect/landmark/mission_poi/pre_loaded already_spawned = TRUE diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index 6b1f4dd17739..dc114175e55c 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -76,20 +76,19 @@ var/datum/mission/dynamic/mission = locate(params["mission"]) if(!istype(mission, /datum/mission/dynamic)) return - var/option = params["choice"] - turn_in(mission, option) + turn_in(mission) if("eject") id_eject(usr, inserted_scan_id) inserted_scan_id = null . = TRUE -/obj/machinery/computer/mission/proc/turn_in(datum/mission/dynamic/mission, choice) +/obj/machinery/computer/mission/proc/turn_in(datum/mission/dynamic/mission) var/obj/machinery/mission_pad/pad = pad_ref?.resolve() for(var/atom/movable/item_on_pad as anything in get_turf(pad)) if(item_on_pad == pad) continue if(mission.can_turn_in(item_on_pad)) - mission.turn_in(item_on_pad, choice) + mission.turn_in(item_on_pad) return TRUE /// Return all items on pad diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index e1323b474936..37b0dce39d50 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -1,10 +1,14 @@ /datum/mission/dynamic - var/setpiece_poi + var/setpiece_poi = /obj/effect/landmark/mission_poi/main var/setpiece_item ///Specific item uses an exact item, if false it will allow type or any subtype var/specific_item = TRUE var/atom/movable/required_item +/datum/mission/dynamic/generate_mission_details() + . = ..() + setpiece_item = pick(setpiece_item) + /datum/mission/dynamic/spawn_mission_setpiece(datum/overmap/dynamic/planet) for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if(mission_poi.type == setpiece_poi) @@ -24,3 +28,17 @@ else if(istype(item_to_check, required_item.type)) return TRUE + +/datum/mission/dynamic/data_reterival + name = "data recovery" + ///Assumes its a list + setpiece_item = list( + /obj/item/blackbox, + /obj/item/research_notes/loot + ) + +/datum/mission/dynamic/data_reterival/generate_mission_details() + . = ..() + if(ispath(setpiece_item, /obj/item)) + var/obj/item/mission_item = setpiece_item + desc = "We are looking for a [mission_item::name]" diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index 062d917d1bdb..a8a79effb629 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -1,14 +1,14 @@ /obj/effect/landmark/mission_poi/guard icon_state = "guard" -/datum/mission/dynamic/simple/guarded - name = "Item recovery(with friends)" +/datum/mission/dynamic/guarded + name = "item recovery(with friends)" desc = "Kill some guys and take there thingy" var/guard_poi = /obj/effect/landmark/mission_poi/guard var/guard_type var/list/mob/guard_list -/datum/mission/dynamic/simple/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) +/datum/mission/dynamic/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if(mission_name && (mission_name != mission_poi.mission_name)) continue @@ -20,6 +20,23 @@ if(!required_item) CRASH("[src] was unable to find its required landmark") -/datum/mission/dynamic/simple/guarded/proc/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) +/datum/mission/dynamic/guarded/proc/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) + var/guard = guard_poi.use_poi(guard_type) + return guard + +/datum/mission/dynamic/guarded/nt_files + name = "NT asset recovery" + faction = /datum/faction/nt + setpiece_item = /obj/item/documents/nanotrasen + guard_type = /mob/living/simple_animal/hostile/human/syndicate/melee + +/datum/mission/dynamic/guarded/nt_files/generate_mission_details() + . = ..() + name = pick("NT asset recovery", "Asset recovery requested ASAP") + author = "Captain [random_species_name()]" + desc = pick("Look- long story short, I need this folder retrieved. You don't ask why, I make sure you get paid.") + +/datum/mission/dynamic/guarded/nt_files/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) + guard_type = pick(/mob/living/simple_animal/hostile/human/syndicate/melee, /mob/living/simple_animal/hostile/human/syndicate/ranged) var/guard = guard_poi.use_poi(guard_type) return guard diff --git a/code/modules/dynamic_missions/missions/guarded/nt_files.dm b/code/modules/dynamic_missions/missions/guarded/nt_files.dm deleted file mode 100644 index 22a15c7d6c0a..000000000000 --- a/code/modules/dynamic_missions/missions/guarded/nt_files.dm +++ /dev/null @@ -1,19 +0,0 @@ -/obj/effect/landmark/mission_poi/nt_files - icon_state = "main_docs" - -/datum/mission/dynamic/simple/guarded/nt_files - name = "NT asset recovery" - faction = /datum/faction/nt - setpiece_poi = /obj/effect/landmark/mission_poi/nt_files - setpiece_item = /obj/item/documents/nanotrasen - guard_type = /mob/living/simple_animal/hostile/human/syndicate/melee - -/datum/mission/dynamic/simple/guarded/nt_files/generate_mission_details() - name = pick("NT asset recovery", "Asset recovery requested ASAP") - author = "Captain [random_species_name()]" - desc = pick("Look- long story short, I need this folder retrieved. You don't ask why, I make sure you get paid.") - -/datum/mission/dynamic/simple/guarded/nt_files/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) - guard_type = pick(/mob/living/simple_animal/hostile/human/syndicate/melee, /mob/living/simple_animal/hostile/human/syndicate/ranged) - var/guard = guard_poi.use_poi(guard_type) - return guard diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index a2bf938df6c3..a9a641eedd8a 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -1,11 +1,15 @@ -/obj/effect/landmark/mission_poi/kill +/obj/item/dog_tags + name = "dog tags" + icon_state = "skub" + +/obj/effect/landmark/mission_poi/main/kill /datum/mission/dynamic/kill name = null desc = null - setpiece_poi = /obj/effect/landmark/mission_poi/kill - var/mob/target_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite - setpiece_item = /obj/item/folder/documents/syndicate + setpiece_poi = /obj/effect/landmark/mission_poi/main/kill + setpiece_item + var/mob/target_type var/mob/required_target /datum/mission/dynamic/kill/generate_mission_details() @@ -13,15 +17,25 @@ if(!name) name = "[target_type::name] termination" if(!desc) - desc = "Bounty for a high ranking [target_type::name] residing on this planet. They should have identifying dog tags" + desc = "Bounty for a high ranking [target_type::name] residing on this planet. They should have identifying items" /datum/mission/dynamic/kill/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) - required_target = set_bound(mission_poi.use_poi(setpiece_item), mission_poi.loc, null, FALSE, TRUE) + required_target = set_bound(mission_poi.use_poi(target_type), null, FALSE, TRUE) RegisterSignal(required_target, COMSIG_MOB_DEATH, PROC_REF(on_target_death)) /datum/mission/dynamic/kill/proc/on_target_death(mob/living/target) SIGNAL_HANDLER + required_item = new setpiece_item(target.loc) + set_bound(required_item, null, FALSE, TRUE) UnregisterSignal(target, COMSIG_MOB_DEATH) remove_bound(target) required_target = null + +/datum/mission/dynamic/kill/frontiersmen + target_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer + +/datum/mission/dynamic/kill/syndi_docs + target_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite + setpiece_item = /obj/item/folder/documents/syndicate + diff --git a/code/modules/dynamic_missions/missions/kill/frontiersmen.dm b/code/modules/dynamic_missions/missions/kill/frontiersmen.dm deleted file mode 100644 index bb71aa7b2ce2..000000000000 --- a/code/modules/dynamic_missions/missions/kill/frontiersmen.dm +++ /dev/null @@ -1,2 +0,0 @@ -/datum/mission/dynamic/kill/frontiersmen - target_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer diff --git a/code/modules/dynamic_missions/missions/scan.dm b/code/modules/dynamic_missions/missions/scan.dm new file mode 100644 index 000000000000..99c75c082514 --- /dev/null +++ b/code/modules/dynamic_missions/missions/scan.dm @@ -0,0 +1 @@ +/datum/mission/dynamic/scan diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm deleted file mode 100644 index c7d75f09781c..000000000000 --- a/code/modules/dynamic_missions/missions/simple.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/mission/dynamic/simple - setpiece_poi = /obj/effect/landmark/mission_poi/recovery - -/datum/mission/dynamic/simple/spawn_mission_setpiece(datum/overmap/dynamic/planet) - for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(mission_poi.type == setpiece_poi) - //Spawns the item or gets it via use_poi then sets it as bound so the mission fails if its deleted - required_item = set_bound(mission_poi.use_poi(setpiece_item), mission_poi.loc, null, TRUE, TRUE) - return - CRASH("[src] was unable to find its required landmark") - -/datum/mission/dynamic/simple/can_turn_in(atom/movable/item_to_check) - if(istype(required_item)) - if(specific_item) - if(item_to_check == required_item) - return TRUE - else - if(istype(item_to_check, required_item.type)) - return TRUE diff --git a/code/modules/dynamic_missions/missions/simple/blackbox.dm b/code/modules/dynamic_missions/missions/simple/blackbox.dm deleted file mode 100644 index 421b897e5c7c..000000000000 --- a/code/modules/dynamic_missions/missions/simple/blackbox.dm +++ /dev/null @@ -1,12 +0,0 @@ -/datum/mission/dynamic/simple/blackbox - setpiece_item = /obj/item/blackbox - -/datum/mission/dynamic/kill/generate_mission_details() - . = ..() - if(!name) - name = "[setpiece_item::name] recovery" - if(!desc) - desc = "Recover one of our lost [setpiece_item::name] from the location at this planet. We've pinged its location to a local ruin." - -/obj/effect/landmark/mission_poi/recovery - icon_state = "main_blackbox" diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 6abc6d9e5195..2cd2457e1efd 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -28,7 +28,7 @@ ///Preditermined ruin made when the overmap is first created var/selected_ruin ///Fetched before anything is loaded from the ruin datum - var/dynamic_missions + var/dynamic_missions = list() ///The list of mission pois once the planet has acctually loaded the ruin var/list/obj/effect/landmark/mission_poi/spawned_mission_pois /// list of ruins and their target turf, indexed by name @@ -59,13 +59,14 @@ /datum/overmap/dynamic/Initialize(position, load_now=TRUE, ...) . = ..() - + SSovermap.dynamic_encounters += src vlevel_height = CONFIG_GET(number/overmap_encounter_size) vlevel_width = CONFIG_GET(number/overmap_encounter_size) if(load_now) choose_level_type(load_now) /datum/overmap/dynamic/Destroy() + SSovermap.dynamic_encounters -= src for(var/obj/docking_port/stationary/dock as anything in reserve_docks) reserve_docks -= dock qdel(dock) @@ -112,19 +113,12 @@ if(length(mapzone?.get_mind_mobs()) || SSlag_switch.measures[DISABLE_PLANETDEL]) return //Dont fuck over stranded people - log_shuttle("[src] [REF(src)] UNLOAD") - var/list/results = SSovermap.get_unused_overmap_square() - overmap_move(results["x"], results["y"]) + for(var/datum/mission/dynamic/dynamic_mission in dynamic_missions) + if(dynamic_mission.active) + return //Dont fuck over people trying to complete a mission. - for(var/obj/docking_port/stationary/dock as anything in reserve_docks) - reserve_docks -= dock - qdel(dock) - reserve_docks = null - if(mapzone) - mapzone.clear_reservation() - QDEL_NULL(mapzone) - choose_level_type() + qdel(src) /** * Chooses a type of level for the dynamic level to use. @@ -136,14 +130,13 @@ probabilities[initial(planet_type.planet)] = initial(planet_type.weight) planet = SSmapping.planet_types[force_encounter ? force_encounter : pickweightAllowZero(probabilities)] - - if(planet.planet !=DYNAMIC_WORLD_ASTEROID && planet.planet != DYNAMIC_WORLD_SPACERUIN) //these aren't real planets - planet_name = "[gen_planet_name()]" - Rename(planet_name) - token.name = "[planet_name]" + " ([planet.name])" if(planet.planet == DYNAMIC_WORLD_ASTEROID || planet.planet == DYNAMIC_WORLD_SPACERUIN) Rename(planet.name) token.name = "[planet.name]" + else //these aren't real planets + planet_name = "[gen_planet_name()]" + Rename(planet_name) + token.name = "[planet_name]" + " ([planet.name])" token.icon_state = planet.icon_state token.desc = planet.desc diff --git a/shiptest.dme b/shiptest.dme index 527ceb23b1cd..0b66e01228bd 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2084,10 +2084,7 @@ #include "code\modules\dynamic_missions\missions\dynamic.dm" #include "code\modules\dynamic_missions\missions\guarded.dm" #include "code\modules\dynamic_missions\missions\kill.dm" -#include "code\modules\dynamic_missions\missions\simple.dm" -#include "code\modules\dynamic_missions\missions\guarded\nt_files.dm" -#include "code\modules\dynamic_missions\missions\kill\frontiersmen.dm" -#include "code\modules\dynamic_missions\missions\simple\blackbox.dm" +#include "code\modules\dynamic_missions\missions\scan.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index f53fd4dcce43..4525f25bd3a5 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -73,20 +73,15 @@ const MissionsList = (props, context) => { name, author, desc, - rewards = [], + reward, faction, location, x, y, duration, - remaining, - timeStr, - progressStr, - actStr, canTurnIn, validItems, } = mission; - const rewardKeys = Object.keys(rewards); return ( {name} @@ -95,16 +90,14 @@ const MissionsList = (props, context) => { {faction} {desc} - {rewardKeys.map((rewardKey: string) => ( - - ))} + {duration ? missionTimer(mission) : ''} diff --git a/tgui/packages/tgui/interfaces/MissionBoard/types.ts b/tgui/packages/tgui/interfaces/MissionBoard/types.ts index 4c10ded84360..f7b7d63bf4a9 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/types.ts +++ b/tgui/packages/tgui/interfaces/MissionBoard/types.ts @@ -11,7 +11,7 @@ export type Mission = { name: string; author: string; desc: string; - rewards: Reward[]; + reward: string; faction: string; location: string; x: number; @@ -24,7 +24,3 @@ export type Mission = { validItems: Array; }; -export type Reward = { - key: string; - text: string; -};