From f9aa6037f28db8806a51e82575c8bba82e3cdd20 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 15 May 2024 09:55:45 -0500 Subject: [PATCH 01/77] one cargo console --- code/modules/cargo/console.dm | 271 +++++++++++++++++++++++---- code/modules/cargo/expressconsole.dm | 262 -------------------------- shiptest.dme | 1 - 3 files changed, 231 insertions(+), 303 deletions(-) delete mode 100644 code/modules/cargo/expressconsole.dm diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 143480b2bc71..168aff7c53b8 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -1,8 +1,16 @@ -/obj/machinery/computer/cargo - name = "supply console" - desc = "Used to order supplies, approve requests, and control the shuttle." - icon_screen = "supply" - circuit = /obj/item/circuitboard/computer/cargo +#define BEACON_COST 500 +#define SP_LINKED 1 +#define SP_READY 2 +#define SP_LAUNCH 3 +#define SP_UNLINK 4 +#define SP_UNREADY 5 + +/obj/machinery/computer/cargo/express + name = "outpost communications console" + desc = "This console allows the user to communicate with a nearby outpost to \ + purchase supplies and manage missions. Purchases are delivered near-instantly." + icon_screen = "supply_express" + circuit = /obj/item/circuitboard/computer/cargo/express light_color = COLOR_BRIGHT_ORANGE var/requestonly = FALSE @@ -11,14 +19,30 @@ var/safety_warning = "For safety reasons, the automated supply shuttle \ cannot transport live organisms, human remains, classified nuclear weaponry, \ homing beacons or machinery housing any form of artificial intelligence." - var/blockade_warning = "Bluespace instability detected. Shuttle movement impossible." /// radio used by the console to send messages on supply channel var/obj/item/radio/headset/radio /// var that tracks message cooldown var/message_cooldown + var/blockade_warning = "Bluespace instability detected. Delivery impossible." + var/message + /// Number of beacons printed. Used to determine beacon names. + var/printed_beacons = 0 + var/list/supply_pack_data + /// The currently linked supplypod beacon + var/obj/item/supplypod_beacon/beacon + /// Area instance that cargo pods are sent to + var/area/landingzone + /// The pod type used to deliver orders + var/podType = /obj/structure/closet/supplypod/centcompod + /// Cooldown to prevent printing supplypod beacon spam + var/cooldown = 0 + /// Is the console in beacon mode? exists to let beacon know when a pod may come in + var/use_beacon = FALSE + /// The account to charge purchases to, defaults to the cargo budget + var/datum/bank_account/charge_account -/obj/machinery/computer/cargo/request +/obj/machinery/computer/cargo name = "supply request console" desc = "Used to request supplies from cargo." icon_screen = "request" @@ -34,8 +58,11 @@ obj_flags |= EMAGGED else obj_flags &= ~EMAGGED + generate_pack_data() /obj/machinery/computer/cargo/Destroy() + if(beacon) + beacon.unlink_console() QDEL_NULL(radio) return ..() @@ -65,43 +92,63 @@ /obj/machinery/computer/cargo/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) - ui = new(user, src, "Cargo", name) + ui = new(user, src, "OutpostCommunications", name) ui.open() + if(!charge_account) + reconnect() /obj/machinery/computer/cargo/ui_data() + var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location? var/list/data = list() - data["location"] = SSshuttle.supply.getStatusText() - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) + + // not a big fan of get_containing_shuttle + var/obj/docking_port/mobile/D = SSshuttle.get_containing_shuttle(src) + var/datum/overmap/ship/controlled/ship + var/outpost_docked = FALSE if(D) - data["points"] = D.account_balance - data["away"] = SSshuttle.supply.get_docked() == SSshuttle.supply_away_port - data["self_paid"] = self_paid - data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE - var/message = "Remember to stamp and send back the supply manifests." - if(SSshuttle.centcom_message) - message = SSshuttle.centcom_message + ship = D.current_ship + outpost_docked = istype(ship.docked_to, /datum/overmap/outpost) + + data["onShip"] = !isnull(ship) + data["numMissions"] = ship ? LAZYLEN(ship.missions) : 0 + data["maxMissions"] = ship ? ship.max_missions : 0 + data["outpostDocked"] = outpost_docked + data["points"] = charge_account ? charge_account.account_balance : 0 + data["siliconUser"] = user.has_unlimited_silicon_privilege && check_ship_ai_access(user) + data["beaconZone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui + data["usingBeacon"] = use_beacon //is the mode set to deliver to the beacon or the cargobay? + data["canBeacon"] = !use_beacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location? + data["canBuyBeacon"] = charge_account ? (cooldown <= 0 && charge_account.account_balance >= BEACON_COST) : FALSE + data["beaconError"] = use_beacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary + data["hasBeacon"] = beacon != null//is there a linked beacon? + data["beaconName"] = beacon ? beacon.name : "No Beacon Found" + data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons + data["supplies"] = list() + message = "Sales are near-instantaneous - please choose carefully." if(SSshuttle.supplyBlocked) message = blockade_warning + if(use_beacon && !beacon) + message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed + else if (use_beacon && !canBeacon) + message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf data["message"] = message - data["cart"] = list() - for(var/datum/supply_order/SO in SSshuttle.shoppinglist) - data["cart"] += list(list( - "object" = SO.pack.name, - "cost" = SO.pack.cost, - "id" = SO.id, - "orderer" = SO.orderer, - "paid" = !isnull(SO.paying_account) //paid by requester - )) + if(!supply_pack_data) + generate_pack_data() + stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]") + data["supplies"] = supply_pack_data + if (cooldown > 0)//cooldown used for printing beacons + cooldown-- - data["requests"] = list() - for(var/datum/supply_order/SO in SSshuttle.requestlist) - data["requests"] += list(list( - "object" = SO.pack.name, - "cost" = SO.pack.cost, - "orderer" = SO.orderer, - "reason" = SO.reason, - "id" = SO.id - )) + data["shipMissions"] = list() + data["outpostMissions"] = list() + + if(ship) + for(var/datum/mission/M as anything in ship.missions) + data["shipMissions"] += list(M.get_tgui_info()) + if(outpost_docked) + var/datum/overmap/outpost/out = ship.docked_to + for(var/datum/mission/M as anything in out.missions) + data["outpostMissions"] += list(M.get_tgui_info()) return data @@ -132,6 +179,7 @@ . = ..() if(.) return + /* switch(action) if("send") if(!SSshuttle.supply.canMove()) @@ -235,13 +283,156 @@ . = TRUE if(.) post_signal("supply") + */ + switch(action) + if("withdrawCash") + var/val = text2num(params["value"]) + // no giving yourself money + if(!charge_account || !val || val <= 0) + return + if(charge_account.adjust_money(-val)) + var/obj/item/holochip/cash_chip = new /obj/item/holochip(drop_location(), val) + if(ishuman(usr)) + var/mob/living/carbon/human/user = usr + user.put_in_hands(cash_chip) + playsound(src, 'sound/machines/twobeep_high.ogg', 50, TRUE) + src.visible_message("[src] dispenses a holochip.") + return TRUE + + if("LZCargo") + use_beacon = FALSE + if (beacon) + beacon.update_status(SP_UNREADY) //ready light on beacon will turn off + if("LZBeacon") + use_beacon = TRUE + if (beacon) + beacon.update_status(SP_READY) //turns on the beacon's ready light + if("printBeacon") + if(charge_account?.adjust_money(-BEACON_COST)) + cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam + var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location()) + C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc) + printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1 + beacon.name = "Supply Pod Beacon #[printed_beacons]" + if("add") + var/area/ship/current_area = get_area(src) + var/datum/supply_pack/pack = SSshuttle.supply_packs[text2path(params["id"])] + if( \ + !pack || !charge_account?.has_money(pack.cost) || !istype(current_area) || \ + !istype(current_area.mobile_port.current_ship.docked_to, /datum/overmap/outpost) \ + ) + return -/obj/machinery/computer/cargo/proc/post_signal(command) + var/turf/landing_turf + if(!isnull(beacon) && use_beacon) // prioritize beacons over landing in cargobay + landing_turf = get_turf(beacon) + beacon.update_status(SP_LAUNCH) + else if(!use_beacon)// find a suitable supplypod landing zone in cargobay + var/list/empty_turfs = list() + if(!landingzone) + reconnect() + if(!landingzone) + WARNING("[src] couldnt find a Ship/Cargo (aka cargobay) area on a ship, and as such it has set the supplypod landingzone to the area it resides in.") + landingzone = get_area(src) + for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone + if(T.is_blocked_turf()) + continue + empty_turfs += T + CHECK_TICK + landing_turf = pick(empty_turfs) - var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS) + // note that, because of CHECK_TICK above, we aren't sure if we can + // afford the pack, even though we checked earlier. luckily adjust_money + // returns false if the account can't afford the price + if(landing_turf && charge_account.adjust_money(-pack.cost)) + var/name = "*None Provided*" + var/rank = "*None Provided*" + if(ishuman(usr)) + var/mob/living/carbon/human/H = usr + name = H.get_authentification_name() + rank = H.get_assignment(hand_first = TRUE) + else if(issilicon(usr)) + name = usr.real_name + rank = "Silicon" + var/datum/supply_order/SO = new(pack, name, rank, usr.ckey, "") + new /obj/effect/pod_landingzone(landing_turf, podType, SO) + update_appearance() // ?????????????????? + return TRUE - if(!frequency) + if("mission-act") + var/datum/mission/mission = locate(params["ref"]) + var/obj/docking_port/mobile/D = SSshuttle.get_containing_shuttle(src) + var/datum/overmap/ship/controlled/ship = D.current_ship + var/datum/overmap/outpost/outpost = ship.docked_to + if(!istype(outpost) || mission.source_outpost != outpost) // important to check these to prevent href fuckery + return + if(!mission.accepted) + if(LAZYLEN(ship.missions) >= ship.max_missions) + return + mission.accept(ship, loc) + return TRUE + else if(mission.servant == ship) + if(mission.can_complete()) + mission.turn_in() + else + mission.give_up() + return TRUE + +/obj/machinery/computer/cargo/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) + . = ..() + reconnect(port) + +/obj/machinery/computer/cargo/proc/reconnect(obj/docking_port/mobile/port) + if(!port) + var/area/ship/current_area = get_area(src) + if(!istype(current_area)) + return + port = current_area.mobile_port + if(!port) return + charge_account = port.current_ship.ship_account + landingzone = locate(/area/ship/cargo) in port.shuttle_areas + +/obj/machinery/computer/cargo/attackby(obj/item/W, mob/living/user, params) + var/value = W.get_item_credit_value() + if(value && charge_account) + charge_account.adjust_money(value) + to_chat(user, "You deposit [W]. The Vessel Budget is now [charge_account.account_balance] cr.") + qdel(W) + return TRUE + else if(istype(W, /obj/item/supplypod_beacon)) + var/obj/item/supplypod_beacon/sb = W + if (sb.express_console != src) + sb.link_console(src, user) + return TRUE + else + to_chat(user, "[src] is already linked to [sb].") + ..() + +/obj/machinery/computer/cargo/proc/generate_pack_data() + supply_pack_data = list() + for(var/pack in SSshuttle.supply_packs) + var/datum/supply_pack/P = SSshuttle.supply_packs[pack] + if(!supply_pack_data[P.group]) + supply_pack_data[P.group] = list( + "name" = P.group, + "packs" = list() + ) + if((P.hidden)) + continue + supply_pack_data[P.group]["packs"] += list(list( + "name" = P.name, + "cost" = P.cost, + "id" = pack, + "desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name. + )) + +/obj/machinery/computer/cargo/retro + icon = 'icons/obj/machines/retro_computer.dmi' + icon_state = "computer-retro" + deconpath = /obj/structure/frame/computer/retro - var/datum/signal/status_signal = new(list("command" = command)) - frequency.post_signal(src, status_signal) +/obj/machinery/computer/cargo/solgov + icon = 'icons/obj/machines/retro_computer.dmi' + icon_state = "computer-solgov" + deconpath = /obj/structure/frame/computer/solgov diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm deleted file mode 100644 index 81409d63d031..000000000000 --- a/code/modules/cargo/expressconsole.dm +++ /dev/null @@ -1,262 +0,0 @@ -#define BEACON_COST 500 -#define SP_LINKED 1 -#define SP_READY 2 -#define SP_LAUNCH 3 -#define SP_UNLINK 4 -#define SP_UNREADY 5 - -/obj/machinery/computer/cargo/express - name = "outpost communications console" - desc = "This console allows the user to communicate with a nearby outpost to \ - purchase supplies and manage missions. Purchases are delivered near-instantly." - icon_screen = "supply_express" - circuit = /obj/item/circuitboard/computer/cargo/express - var/blockade_warning = "Bluespace instability detected. Delivery impossible." - - var/message - /// Number of beacons printed. Used to determine beacon names. - var/printed_beacons = 0 - var/list/meme_pack_data - /// The currently linked supplypod beacon - var/obj/item/supplypod_beacon/beacon - /// Area instance that cargo pods are sent to - var/area/landingzone - /// The pod type used to deliver orders - var/podType = /obj/structure/closet/supplypod/centcompod - /// Cooldown to prevent printing supplypod beacon spam - var/cooldown = 0 - /// Is the console in beacon mode? exists to let beacon know when a pod may come in - var/use_beacon = FALSE - /// The account to charge purchases to, defaults to the cargo budget - var/datum/bank_account/charge_account - -/obj/machinery/computer/cargo/express/retro - icon = 'icons/obj/machines/retro_computer.dmi' - icon_state = "computer-retro" - deconpath = /obj/structure/frame/computer/retro - -/obj/machinery/computer/cargo/express/solgov - icon = 'icons/obj/machines/retro_computer.dmi' - icon_state = "computer-solgov" - deconpath = /obj/structure/frame/computer/solgov - -/obj/machinery/computer/cargo/express/Initialize() - . = ..() - packin_up() - -/obj/machinery/computer/cargo/express/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) - . = ..() - reconnect(port) - -/obj/machinery/computer/cargo/express/proc/reconnect(obj/docking_port/mobile/port) - if(!port) - var/area/ship/current_area = get_area(src) - if(!istype(current_area)) - return - port = current_area.mobile_port - if(!port) - return - charge_account = port.current_ship.ship_account - landingzone = locate(/area/ship/cargo) in port.shuttle_areas - -/obj/machinery/computer/cargo/express/Destroy() - if(beacon) - beacon.unlink_console() - return ..() - -/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params) - var/value = W.get_item_credit_value() - if(value && charge_account) - charge_account.adjust_money(value) - to_chat(user, "You deposit [W]. The Vessel Budget is now [charge_account.account_balance] cr.") - qdel(W) - return TRUE - else if(istype(W, /obj/item/supplypod_beacon)) - var/obj/item/supplypod_beacon/sb = W - if (sb.express_console != src) - sb.link_console(src, user) - return TRUE - else - to_chat(user, "[src] is already linked to [sb].") - ..() - -/obj/machinery/computer/cargo/express/proc/packin_up() // oh shit, I'm sorry - meme_pack_data = list() // sorry for what? - for(var/pack in SSshuttle.supply_packs) // our quartermaster taught us not to be ashamed of our supply packs - var/datum/supply_pack/P = SSshuttle.supply_packs[pack] // specially since they're such a good price and all - if(!meme_pack_data[P.group]) // yeah, I see that, your quartermaster gave you good advice - meme_pack_data[P.group] = list( // it gets cheaper when I return it - "name" = P.group, // mmhm - "packs" = list() // sometimes, I return it so much, I rip the manifest - ) // see, my quartermaster taught me a few things too - if((P.hidden)) // like, how not to rip the manifest - continue// by using someone else's crate - meme_pack_data[P.group]["packs"] += list(list( - "name" = P.name, - "cost" = P.cost, - "id" = pack, - "desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name. - )) - -/obj/machinery/computer/cargo/express/ui_interact(mob/living/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "OutpostCommunications", name) - ui.open() - if(!charge_account) - reconnect() - -/obj/machinery/computer/cargo/express/ui_data(mob/user) - var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location? - var/list/data = list() - - // not a big fan of get_containing_shuttle - var/obj/docking_port/mobile/D = SSshuttle.get_containing_shuttle(src) - var/datum/overmap/ship/controlled/ship - var/outpost_docked = FALSE - if(D) - ship = D.current_ship - outpost_docked = istype(ship.docked_to, /datum/overmap/outpost) - - data["onShip"] = !isnull(ship) - data["numMissions"] = ship ? LAZYLEN(ship.missions) : 0 - data["maxMissions"] = ship ? ship.max_missions : 0 - data["outpostDocked"] = outpost_docked - data["points"] = charge_account ? charge_account.account_balance : 0 - data["siliconUser"] = user.has_unlimited_silicon_privilege && check_ship_ai_access(user) - data["beaconZone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui - data["usingBeacon"] = use_beacon //is the mode set to deliver to the beacon or the cargobay? - data["canBeacon"] = !use_beacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location? - data["canBuyBeacon"] = charge_account ? (cooldown <= 0 && charge_account.account_balance >= BEACON_COST) : FALSE - data["beaconError"] = use_beacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary - data["hasBeacon"] = beacon != null//is there a linked beacon? - data["beaconName"] = beacon ? beacon.name : "No Beacon Found" - data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons - data["supplies"] = list() - message = "Sales are near-instantaneous - please choose carefully." - if(SSshuttle.supplyBlocked) - message = blockade_warning - if(use_beacon && !beacon) - message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed - else if (use_beacon && !canBeacon) - message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf - data["message"] = message - if(!meme_pack_data) - packin_up() - stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]") - data["supplies"] = meme_pack_data - if (cooldown > 0)//cooldown used for printing beacons - cooldown-- - - data["shipMissions"] = list() - data["outpostMissions"] = list() - - if(ship) - for(var/datum/mission/M as anything in ship.missions) - data["shipMissions"] += list(M.get_tgui_info()) - if(outpost_docked) - var/datum/overmap/outpost/out = ship.docked_to - for(var/datum/mission/M as anything in out.missions) - data["outpostMissions"] += list(M.get_tgui_info()) - - return data - -/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui) - . = ..() - if(.) - return - - switch(action) - if("withdrawCash") - var/val = text2num(params["value"]) - // no giving yourself money - if(!charge_account || !val || val <= 0) - return - if(charge_account.adjust_money(-val)) - var/obj/item/holochip/cash_chip = new /obj/item/holochip(drop_location(), val) - if(ishuman(usr)) - var/mob/living/carbon/human/user = usr - user.put_in_hands(cash_chip) - playsound(src, 'sound/machines/twobeep_high.ogg', 50, TRUE) - src.visible_message("[src] dispenses a holochip.") - return TRUE - - if("LZCargo") - use_beacon = FALSE - if (beacon) - beacon.update_status(SP_UNREADY) //ready light on beacon will turn off - if("LZBeacon") - use_beacon = TRUE - if (beacon) - beacon.update_status(SP_READY) //turns on the beacon's ready light - if("printBeacon") - if(charge_account?.adjust_money(-BEACON_COST)) - cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam - var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location()) - C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc) - printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1 - beacon.name = "Supply Pod Beacon #[printed_beacons]" - - if("add") - var/area/ship/current_area = get_area(src) - var/datum/supply_pack/pack = SSshuttle.supply_packs[text2path(params["id"])] - if( \ - !pack || !charge_account?.has_money(pack.cost) || !istype(current_area) || \ - !istype(current_area.mobile_port.current_ship.docked_to, /datum/overmap/outpost) \ - ) - return - - var/turf/landing_turf - if(!isnull(beacon) && use_beacon) // prioritize beacons over landing in cargobay - landing_turf = get_turf(beacon) - beacon.update_status(SP_LAUNCH) - else if(!use_beacon)// find a suitable supplypod landing zone in cargobay - var/list/empty_turfs = list() - if(!landingzone) - reconnect() - if(!landingzone) - WARNING("[src] couldnt find a Ship/Cargo (aka cargobay) area on a ship, and as such it has set the supplypod landingzone to the area it resides in.") - landingzone = get_area(src) - for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone - if(T.is_blocked_turf()) - continue - empty_turfs += T - CHECK_TICK - landing_turf = pick(empty_turfs) - - // note that, because of CHECK_TICK above, we aren't sure if we can - // afford the pack, even though we checked earlier. luckily adjust_money - // returns false if the account can't afford the price - if(landing_turf && charge_account.adjust_money(-pack.cost)) - var/name = "*None Provided*" - var/rank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr - name = H.get_authentification_name() - rank = H.get_assignment(hand_first = TRUE) - else if(issilicon(usr)) - name = usr.real_name - rank = "Silicon" - var/datum/supply_order/SO = new(pack, name, rank, usr.ckey, "") - new /obj/effect/pod_landingzone(landing_turf, podType, SO) - update_appearance() // ?????????????????? - return TRUE - - if("mission-act") - var/datum/mission/mission = locate(params["ref"]) - var/obj/docking_port/mobile/D = SSshuttle.get_containing_shuttle(src) - var/datum/overmap/ship/controlled/ship = D.current_ship - var/datum/overmap/outpost/outpost = ship.docked_to - if(!istype(outpost) || mission.source_outpost != outpost) // important to check these to prevent href fuckery - return - if(!mission.accepted) - if(LAZYLEN(ship.missions) >= ship.max_missions) - return - mission.accept(ship, loc) - return TRUE - else if(mission.servant == ship) - if(mission.can_complete()) - mission.turn_in() - else - mission.give_up() - return TRUE diff --git a/shiptest.dme b/shiptest.dme index 113d1da2b1ff..95208912ef4c 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1864,7 +1864,6 @@ #include "code\modules\cargo\centcom_podlauncher.dm" #include "code\modules\cargo\export_scanner.dm" #include "code\modules\cargo\exports.dm" -#include "code\modules\cargo\expressconsole.dm" #include "code\modules\cargo\gondolapod.dm" #include "code\modules\cargo\order.dm" #include "code\modules\cargo\packs.dm" From 62784f35b3be916b0ddd78d284ad68ffa5cb2f65 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 15 May 2024 09:57:26 -0500 Subject: [PATCH 02/77] one cargo console --- .../JungleRuins/jungle_cavecrew.dmm | 2 +- .../SpaceRuins/singularity_lab.dmm | 2 +- _maps/outpost/hangar/nt_asteroid_20x20.dmm | 2 +- _maps/outpost/hangar/nt_asteroid_40x20.dmm | 2 +- _maps/outpost/hangar/nt_asteroid_40x40.dmm | 2 +- _maps/outpost/hangar/nt_asteroid_56x20.dmm | 2 +- _maps/outpost/hangar/nt_asteroid_56x40.dmm | 2 +- _maps/outpost/nanotrasen_asteroid.dmm | 2 +- .../independent/independent_beluga.dmm | 2 +- .../shuttles/independent/independent_box.dmm | 2 +- .../independent/independent_boyardee.dmm | 2 +- .../independent/independent_dwayne.dmm | 2 +- .../shuttles/independent/independent_kilo.dmm | 2 +- .../independent/independent_lagoon.dmm | 2 +- .../independent/independent_mudskipper.dmm | 2 +- .../independent/independent_rigger.dmm | 2 +- .../independent/independent_schmiedeberg.dmm | 2 +- .../independent/independent_shetland.dmm | 2 +- _maps/shuttles/inteq/inteq_colossus.dmm | 2 +- _maps/shuttles/inteq/inteq_hound.dmm | 2 +- _maps/shuttles/inteq/inteq_talos.dmm | 2 +- _maps/shuttles/inteq/inteq_valor.dmm | 2 +- _maps/shuttles/inteq/inteq_vaquero.dmm | 2 +- _maps/shuttles/minutemen/minutemen_vela.dmm | 2 +- .../shuttles/nanotrasen/nanotrasen_delta.dmm | 2 +- .../shuttles/nanotrasen/nanotrasen_gecko.dmm | 2 +- .../shuttles/nanotrasen/nanotrasen_heron.dmm | 2 +- _maps/shuttles/nanotrasen/nanotrasen_meta.dmm | 4 +-- .../shuttles/nanotrasen/nanotrasen_mimir.dmm | 2 +- .../shuttles/nanotrasen/nanotrasen_osprey.dmm | 2 +- .../shuttles/nanotrasen/nanotrasen_ranger.dmm | 2 +- .../nanotrasen/nanotrasen_skipper.dmm | 2 +- _maps/shuttles/pgf/pgf_crying_sun.dmm | 2 +- _maps/shuttles/pirate/pirate_ember.dmm | 2 +- _maps/shuttles/roumain/srm_elder.dmm | 2 +- _maps/shuttles/solgov/solgov_chronicle.dmm | 2 +- _maps/shuttles/solgov/solgov_inkwell.dmm | 2 +- _maps/shuttles/solgov/solgov_paracelsus.dmm | 2 +- _maps/shuttles/syndicate/syndicate_aegis.dmm | 2 +- .../syndicate/syndicate_cybersun_kansatsu.dmm | 2 +- .../syndicate/syndicate_gorlex_hyena.dmm | 2 +- .../syndicate/syndicate_gorlex_komodo.dmm | 2 +- .../syndicate/syndicate_litieguai.dmm | 2 +- .../syndicate/syndicate_twinkleshine.dmm | 2 +- .../circuitboards/computer_circuitboards.dm | 2 +- code/modules/cargo/console.dm | 4 +-- code/modules/cargo/supplypod_beacon.dm | 26 +++++++++---------- 47 files changed, 61 insertions(+), 61 deletions(-) diff --git a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm index 928318c23ffe..c38ef5e4ecb9 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm @@ -1762,7 +1762,7 @@ /turf/open/floor/plasteel/tech, /area/ruin/jungle/cavecrew/security) "vr" = ( -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /turf/open/floor/plasteel/patterned, /area/ruin/jungle/cavecrew/cargo) "vH" = ( diff --git a/_maps/RandomRuins/SpaceRuins/singularity_lab.dmm b/_maps/RandomRuins/SpaceRuins/singularity_lab.dmm index 202a6c0c0b74..e135ee830da6 100644 --- a/_maps/RandomRuins/SpaceRuins/singularity_lab.dmm +++ b/_maps/RandomRuins/SpaceRuins/singularity_lab.dmm @@ -3490,7 +3490,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2{ dir = 9 }, -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /turf/open/floor/carpet/nanoweave/beige, /area/ruin/space/has_grav/singularitylab/cargo) "nT" = ( diff --git a/_maps/outpost/hangar/nt_asteroid_20x20.dmm b/_maps/outpost/hangar/nt_asteroid_20x20.dmm index 118f810e93f8..858d984f4603 100644 --- a/_maps/outpost/hangar/nt_asteroid_20x20.dmm +++ b/_maps/outpost/hangar/nt_asteroid_20x20.dmm @@ -370,7 +370,7 @@ }, /area/hangar) "jw" = ( -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /obj/structure/railing{ dir = 8; layer = 4.1 diff --git a/_maps/outpost/hangar/nt_asteroid_40x20.dmm b/_maps/outpost/hangar/nt_asteroid_40x20.dmm index b57c4972362c..312e0443aeea 100644 --- a/_maps/outpost/hangar/nt_asteroid_40x20.dmm +++ b/_maps/outpost/hangar/nt_asteroid_40x20.dmm @@ -839,7 +839,7 @@ }, /area/hangar) "tH" = ( -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /obj/item/toy/plush/knight{ pixel_y = 25; pixel_x = 9 diff --git a/_maps/outpost/hangar/nt_asteroid_40x40.dmm b/_maps/outpost/hangar/nt_asteroid_40x40.dmm index 48649aedf4d8..005b657e38ee 100644 --- a/_maps/outpost/hangar/nt_asteroid_40x40.dmm +++ b/_maps/outpost/hangar/nt_asteroid_40x40.dmm @@ -60,7 +60,7 @@ /obj/effect/turf_decal/techfloor{ dir = 4 }, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/machinery/light/directional/east, diff --git a/_maps/outpost/hangar/nt_asteroid_56x20.dmm b/_maps/outpost/hangar/nt_asteroid_56x20.dmm index 9dac115ca5e7..11ba5baac070 100644 --- a/_maps/outpost/hangar/nt_asteroid_56x20.dmm +++ b/_maps/outpost/hangar/nt_asteroid_56x20.dmm @@ -284,7 +284,7 @@ }, /area/hangar) "kx" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8; pixel_x = 7 }, diff --git a/_maps/outpost/hangar/nt_asteroid_56x40.dmm b/_maps/outpost/hangar/nt_asteroid_56x40.dmm index a3018e28aa32..5d66d8966d0b 100644 --- a/_maps/outpost/hangar/nt_asteroid_56x40.dmm +++ b/_maps/outpost/hangar/nt_asteroid_56x40.dmm @@ -723,7 +723,7 @@ }, /area/hangar) "Ed" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8; pixel_x = 7 }, diff --git a/_maps/outpost/nanotrasen_asteroid.dmm b/_maps/outpost/nanotrasen_asteroid.dmm index a55df014f4f9..99fbf890c8d2 100644 --- a/_maps/outpost/nanotrasen_asteroid.dmm +++ b/_maps/outpost/nanotrasen_asteroid.dmm @@ -5588,7 +5588,7 @@ /turf/open/floor/concrete/reinforced, /area/outpost/maintenance/aft) "tW" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/techfloor{ diff --git a/_maps/shuttles/independent/independent_beluga.dmm b/_maps/shuttles/independent/independent_beluga.dmm index f1595e0ffaa1..ed024c482799 100644 --- a/_maps/shuttles/independent/independent_beluga.dmm +++ b/_maps/shuttles/independent/independent_beluga.dmm @@ -4752,7 +4752,7 @@ /area/ship/crew) "UO" = ( /obj/effect/turf_decal/industrial/traffic/corner, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/machinery/light/directional/south, diff --git a/_maps/shuttles/independent/independent_box.dmm b/_maps/shuttles/independent/independent_box.dmm index 0e1e4e9439b5..577290c6581c 100644 --- a/_maps/shuttles/independent/independent_box.dmm +++ b/_maps/shuttles/independent/independent_box.dmm @@ -1802,7 +1802,7 @@ /obj/effect/turf_decal/corner/opaque/blue{ dir = 4 }, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/machinery/firealarm/directional/south, diff --git a/_maps/shuttles/independent/independent_boyardee.dmm b/_maps/shuttles/independent/independent_boyardee.dmm index 4ae94900b258..65a3b19fa333 100644 --- a/_maps/shuttles/independent/independent_boyardee.dmm +++ b/_maps/shuttles/independent/independent_boyardee.dmm @@ -2634,7 +2634,7 @@ /turf/open/floor/plating, /area/ship/maintenance) "VR" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 4 }, /turf/open/floor/plasteel/mono/white, diff --git a/_maps/shuttles/independent/independent_dwayne.dmm b/_maps/shuttles/independent/independent_dwayne.dmm index 262ac034dc5a..73f7fb2b03c5 100644 --- a/_maps/shuttles/independent/independent_dwayne.dmm +++ b/_maps/shuttles/independent/independent_dwayne.dmm @@ -1981,7 +1981,7 @@ /obj/effect/turf_decal/corner/opaque/blue/half{ dir = 4 }, -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 8 }, /turf/open/floor/plasteel/dark, diff --git a/_maps/shuttles/independent/independent_kilo.dmm b/_maps/shuttles/independent/independent_kilo.dmm index a4c390afde8d..0f1f92a475c8 100644 --- a/_maps/shuttles/independent/independent_kilo.dmm +++ b/_maps/shuttles/independent/independent_kilo.dmm @@ -1252,7 +1252,7 @@ /area/ship/crew) "sW" = ( /obj/effect/turf_decal/industrial/outline/yellow, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/machinery/airalarm/directional/east, diff --git a/_maps/shuttles/independent/independent_lagoon.dmm b/_maps/shuttles/independent/independent_lagoon.dmm index 7e96d8f93b53..7a3b3866dbb1 100644 --- a/_maps/shuttles/independent/independent_lagoon.dmm +++ b/_maps/shuttles/independent/independent_lagoon.dmm @@ -256,7 +256,7 @@ /turf/open/floor/plasteel, /area/ship/external) "bt" = ( -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 4 }, /turf/open/floor/plasteel/patterned/cargo_one, diff --git a/_maps/shuttles/independent/independent_mudskipper.dmm b/_maps/shuttles/independent/independent_mudskipper.dmm index f82cdc7ba748..d7a3341b8927 100644 --- a/_maps/shuttles/independent/independent_mudskipper.dmm +++ b/_maps/shuttles/independent/independent_mudskipper.dmm @@ -913,7 +913,7 @@ /obj/structure/sign/warning/incident{ pixel_x = -32 }, -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 4 }, /turf/open/floor/plasteel/tech/grid, diff --git a/_maps/shuttles/independent/independent_rigger.dmm b/_maps/shuttles/independent/independent_rigger.dmm index daf3cf9ecdb3..42a9f999f3f7 100644 --- a/_maps/shuttles/independent/independent_rigger.dmm +++ b/_maps/shuttles/independent/independent_rigger.dmm @@ -2231,7 +2231,7 @@ /obj/machinery/atmospherics/components/unary/vent_pump/on/layer2{ dir = 4 }, -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /obj/item/radio/intercom/directional/north, /turf/open/floor/carpet/blue, /area/ship/bridge) diff --git a/_maps/shuttles/independent/independent_schmiedeberg.dmm b/_maps/shuttles/independent/independent_schmiedeberg.dmm index 454e7503cb52..ce7b407a4731 100644 --- a/_maps/shuttles/independent/independent_schmiedeberg.dmm +++ b/_maps/shuttles/independent/independent_schmiedeberg.dmm @@ -756,7 +756,7 @@ /turf/open/floor/wood/walnut, /area/ship/crew/canteen) "ka" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/item/radio/intercom/directional/south, diff --git a/_maps/shuttles/independent/independent_shetland.dmm b/_maps/shuttles/independent/independent_shetland.dmm index 13599cc298cf..3f2982869c83 100644 --- a/_maps/shuttles/independent/independent_shetland.dmm +++ b/_maps/shuttles/independent/independent_shetland.dmm @@ -5480,7 +5480,7 @@ /obj/effect/turf_decal/corner/opaque/neutral/three_quarters{ dir = 1 }, -/obj/machinery/computer/cargo/express/retro, +/obj/machinery/computer/cargo/retro, /turf/open/floor/plasteel/telecomms_floor, /area/ship/bridge) "VD" = ( diff --git a/_maps/shuttles/inteq/inteq_colossus.dmm b/_maps/shuttles/inteq/inteq_colossus.dmm index d5ed70873819..f92f355ced7c 100644 --- a/_maps/shuttles/inteq/inteq_colossus.dmm +++ b/_maps/shuttles/inteq/inteq_colossus.dmm @@ -852,7 +852,7 @@ /area/ship/hallway/fore) "iX" = ( /obj/item/radio/intercom/wideband/directional/south, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/effect/turf_decal/borderfloor, diff --git a/_maps/shuttles/inteq/inteq_hound.dmm b/_maps/shuttles/inteq/inteq_hound.dmm index 5616d1d2d4b0..da82ccbf26b7 100644 --- a/_maps/shuttles/inteq/inteq_hound.dmm +++ b/_maps/shuttles/inteq/inteq_hound.dmm @@ -1580,7 +1580,7 @@ dir = 1 }, /obj/effect/turf_decal/steeldecal/steel_decals_central4, -/obj/machinery/computer/cargo/express, +/obj/machinery/computer/cargo, /obj/item/radio/intercom/wideband/directional/north{ pixel_y = 25; pixel_x = 6 diff --git a/_maps/shuttles/inteq/inteq_talos.dmm b/_maps/shuttles/inteq/inteq_talos.dmm index 45ecbf33d0a7..2c6d214e23d7 100644 --- a/_maps/shuttles/inteq/inteq_talos.dmm +++ b/_maps/shuttles/inteq/inteq_talos.dmm @@ -2330,7 +2330,7 @@ /turf/open/floor/plasteel/tech, /area/ship/security/armory) "os" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/corner/opaque/brown{ diff --git a/_maps/shuttles/inteq/inteq_valor.dmm b/_maps/shuttles/inteq/inteq_valor.dmm index b98d0f2f13cd..f6aacdb8dede 100644 --- a/_maps/shuttles/inteq/inteq_valor.dmm +++ b/_maps/shuttles/inteq/inteq_valor.dmm @@ -3940,7 +3940,7 @@ /turf/open/floor/plasteel/patterned, /area/ship/cargo) "Ko" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/effect/turf_decal/corner/opaque/brown{ diff --git a/_maps/shuttles/inteq/inteq_vaquero.dmm b/_maps/shuttles/inteq/inteq_vaquero.dmm index 927f372ab3c5..2dbf88049114 100644 --- a/_maps/shuttles/inteq/inteq_vaquero.dmm +++ b/_maps/shuttles/inteq/inteq_vaquero.dmm @@ -2898,7 +2898,7 @@ /turf/open/floor/plasteel/tech, /area/ship/cargo) "TK" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/corner/opaque/yellow, diff --git a/_maps/shuttles/minutemen/minutemen_vela.dmm b/_maps/shuttles/minutemen/minutemen_vela.dmm index d4ae92298e58..10b4d6b91fe5 100644 --- a/_maps/shuttles/minutemen/minutemen_vela.dmm +++ b/_maps/shuttles/minutemen/minutemen_vela.dmm @@ -6706,7 +6706,7 @@ /turf/open/floor/plasteel/tech/techmaint, /area/ship/crew/toilet) "LB" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /turf/open/floor/plasteel/telecomms_floor, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_delta.dmm b/_maps/shuttles/nanotrasen/nanotrasen_delta.dmm index 04484c12141b..92133f805b5b 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_delta.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_delta.dmm @@ -2351,7 +2351,7 @@ dir = 4 }, /obj/effect/turf_decal/corner/opaque/blue, -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 8 }, /turf/open/floor/plasteel/dark, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_gecko.dmm b/_maps/shuttles/nanotrasen/nanotrasen_gecko.dmm index 8a34bb9ff0ff..41344dc6c26e 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_gecko.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_gecko.dmm @@ -4291,7 +4291,7 @@ /turf/open/floor/plasteel/grimy, /area/ship/crew) "RK" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 4 }, /obj/item/radio/intercom/directional/west, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_heron.dmm b/_maps/shuttles/nanotrasen/nanotrasen_heron.dmm index 107044c9e80f..50b046ac4583 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_heron.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_heron.dmm @@ -10099,7 +10099,7 @@ /turf/open/floor/plasteel/tech, /area/ship/engineering) "LS" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/structure/railing{ diff --git a/_maps/shuttles/nanotrasen/nanotrasen_meta.dmm b/_maps/shuttles/nanotrasen/nanotrasen_meta.dmm index 9abfe4c6c6cb..663a567b8bbc 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_meta.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_meta.dmm @@ -1107,7 +1107,7 @@ /turf/open/floor/plasteel/dark, /area/ship/cargo) "dg" = ( -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 8 }, /obj/effect/turf_decal/corner/opaque/blue/three_quarters{ @@ -2647,7 +2647,7 @@ /area/ship/cargo) "Du" = ( /obj/effect/turf_decal/corner/transparent/neutral/full, -/obj/machinery/computer/cargo/express/retro{ +/obj/machinery/computer/cargo/retro{ dir = 8 }, /obj/effect/decal/cleanable/dirt/dust, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm b/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm index f5ffea852281..928fc6bd90ee 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm @@ -4024,7 +4024,7 @@ /turf/open/floor/plasteel, /area/ship/security/prison) "xT" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /turf/open/floor/plasteel/telecomms_floor, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_osprey.dmm b/_maps/shuttles/nanotrasen/nanotrasen_osprey.dmm index e4f74b4577e2..329ea697dedf 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_osprey.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_osprey.dmm @@ -95,7 +95,7 @@ /obj/structure/disposalpipe/segment{ dir = 8 }, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/corner/opaque/brown{ diff --git a/_maps/shuttles/nanotrasen/nanotrasen_ranger.dmm b/_maps/shuttles/nanotrasen/nanotrasen_ranger.dmm index 288fd6235cf8..92a029bdcddf 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_ranger.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_ranger.dmm @@ -465,7 +465,7 @@ /turf/open/floor/plasteel/white, /area/ship/hallway/port) "eE" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /turf/open/floor/plasteel/tech, diff --git a/_maps/shuttles/nanotrasen/nanotrasen_skipper.dmm b/_maps/shuttles/nanotrasen/nanotrasen_skipper.dmm index bc4db627e44b..92d33ff413d0 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_skipper.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_skipper.dmm @@ -4240,7 +4240,7 @@ "JA" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /turf/open/floor/plasteel/dark, diff --git a/_maps/shuttles/pgf/pgf_crying_sun.dmm b/_maps/shuttles/pgf/pgf_crying_sun.dmm index f06f4e5dbc66..c83a664aa420 100644 --- a/_maps/shuttles/pgf/pgf_crying_sun.dmm +++ b/_maps/shuttles/pgf/pgf_crying_sun.dmm @@ -464,7 +464,7 @@ /turf/open/floor/plasteel/telecomms_floor, /area/ship/hallway/port) "dK" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/structure/catwalk/over/plated_catwalk/dark, diff --git a/_maps/shuttles/pirate/pirate_ember.dmm b/_maps/shuttles/pirate/pirate_ember.dmm index 6173f14db95b..e295f6894d05 100644 --- a/_maps/shuttles/pirate/pirate_ember.dmm +++ b/_maps/shuttles/pirate/pirate_ember.dmm @@ -4794,7 +4794,7 @@ /obj/effect/turf_decal/techfloor{ dir = 4 }, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/machinery/vending/wallmed{ diff --git a/_maps/shuttles/roumain/srm_elder.dmm b/_maps/shuttles/roumain/srm_elder.dmm index ff5841d98df5..5e306ccf8fdc 100644 --- a/_maps/shuttles/roumain/srm_elder.dmm +++ b/_maps/shuttles/roumain/srm_elder.dmm @@ -3573,7 +3573,7 @@ /turf/open/floor/wood/maple, /area/ship/crew/cryo) "Sg" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/spline/fancy/wood{ diff --git a/_maps/shuttles/solgov/solgov_chronicle.dmm b/_maps/shuttles/solgov/solgov_chronicle.dmm index d0359b5ca240..e0c320cea60a 100644 --- a/_maps/shuttles/solgov/solgov_chronicle.dmm +++ b/_maps/shuttles/solgov/solgov_chronicle.dmm @@ -351,7 +351,7 @@ /turf/open/floor/wood, /area/ship/crew) "da" = ( -/obj/machinery/computer/cargo/express/solgov{ +/obj/machinery/computer/cargo/solgov{ dir = 4 }, /obj/item/radio/intercom/directional/west, diff --git a/_maps/shuttles/solgov/solgov_inkwell.dmm b/_maps/shuttles/solgov/solgov_inkwell.dmm index 25c1da558e56..1dac26de9886 100644 --- a/_maps/shuttles/solgov/solgov_inkwell.dmm +++ b/_maps/shuttles/solgov/solgov_inkwell.dmm @@ -2120,7 +2120,7 @@ /turf/open/floor/plasteel/mono, /area/ship/cargo) "nO" = ( -/obj/machinery/computer/cargo/express/solgov, +/obj/machinery/computer/cargo/solgov, /turf/open/floor/wood/maple, /area/ship/bridge) "nR" = ( diff --git a/_maps/shuttles/solgov/solgov_paracelsus.dmm b/_maps/shuttles/solgov/solgov_paracelsus.dmm index 1eb02eac6a21..a9d8dc16418e 100644 --- a/_maps/shuttles/solgov/solgov_paracelsus.dmm +++ b/_maps/shuttles/solgov/solgov_paracelsus.dmm @@ -2725,7 +2725,7 @@ /obj/structure/railing/wood{ dir = 8 }, -/obj/machinery/computer/cargo/express/solgov{ +/obj/machinery/computer/cargo/solgov{ dir = 4 }, /obj/effect/turf_decal/siding/wood{ diff --git a/_maps/shuttles/syndicate/syndicate_aegis.dmm b/_maps/shuttles/syndicate/syndicate_aegis.dmm index e001e89d1383..02d2f27ea512 100644 --- a/_maps/shuttles/syndicate/syndicate_aegis.dmm +++ b/_maps/shuttles/syndicate/syndicate_aegis.dmm @@ -2747,7 +2747,7 @@ /turf/open/floor/mineral/plastitanium/red, /area/ship/hallway/central) "Ae" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/effect/turf_decal/siding/wood{ diff --git a/_maps/shuttles/syndicate/syndicate_cybersun_kansatsu.dmm b/_maps/shuttles/syndicate/syndicate_cybersun_kansatsu.dmm index 41faf816d827..ffc2472b5dec 100644 --- a/_maps/shuttles/syndicate/syndicate_cybersun_kansatsu.dmm +++ b/_maps/shuttles/syndicate/syndicate_cybersun_kansatsu.dmm @@ -258,7 +258,7 @@ /turf/open/floor/plasteel/stairs, /area/ship/cargo) "fk" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /obj/machinery/button/door{ diff --git a/_maps/shuttles/syndicate/syndicate_gorlex_hyena.dmm b/_maps/shuttles/syndicate/syndicate_gorlex_hyena.dmm index 93600539c4b4..acff2c861669 100644 --- a/_maps/shuttles/syndicate/syndicate_gorlex_hyena.dmm +++ b/_maps/shuttles/syndicate/syndicate_gorlex_hyena.dmm @@ -961,7 +961,7 @@ "pI" = ( /obj/item/radio/intercom/wideband/directional/east, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 1 }, /obj/effect/turf_decal/borderfloorblack, diff --git a/_maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm b/_maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm index fc7e7a029b82..a87d7bdaf0b8 100644 --- a/_maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm +++ b/_maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm @@ -3510,7 +3510,7 @@ /turf/open/floor/mineral/plastitanium/red, /area/ship/hallway/central) "HI" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ layer = 3 }, /obj/effect/turf_decal/techfloor{ diff --git a/_maps/shuttles/syndicate/syndicate_litieguai.dmm b/_maps/shuttles/syndicate/syndicate_litieguai.dmm index 1330108a6874..8df7f9dc4353 100644 --- a/_maps/shuttles/syndicate/syndicate_litieguai.dmm +++ b/_maps/shuttles/syndicate/syndicate_litieguai.dmm @@ -2608,7 +2608,7 @@ /turf/open/floor/plasteel/white, /area/ship/hallway/central) "TA" = ( -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8 }, /turf/open/floor/plasteel/dark, diff --git a/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm b/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm index 5878f667db1e..df6d26bcd76c 100644 --- a/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm +++ b/_maps/shuttles/syndicate/syndicate_twinkleshine.dmm @@ -1579,7 +1579,7 @@ /obj/effect/turf_decal/corner/opaque/syndiered/half{ dir = 4 }, -/obj/machinery/computer/cargo/express{ +/obj/machinery/computer/cargo{ dir = 8; icon_state = "computer-left" }, diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 54dcfb36c131..2e0340e872c9 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -383,7 +383,7 @@ /obj/item/circuitboard/computer/cargo/express name = "Outpost Comms Console (Computer Board)" - build_path = /obj/machinery/computer/cargo/express + build_path = /obj/machinery/computer/cargo /obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user) return diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 168aff7c53b8..ae6d8512365a 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -5,7 +5,7 @@ #define SP_UNLINK 4 #define SP_UNREADY 5 -/obj/machinery/computer/cargo/express +/obj/machinery/computer/cargo name = "outpost communications console" desc = "This console allows the user to communicate with a nearby outpost to \ purchase supplies and manage missions. Purchases are delivered near-instantly." @@ -402,7 +402,7 @@ return TRUE else if(istype(W, /obj/item/supplypod_beacon)) var/obj/item/supplypod_beacon/sb = W - if (sb.express_console != src) + if (sb.cargo_console != src) sb.link_console(src, user) return TRUE else diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index 11fd10229e5e..07a300d29ca9 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -7,7 +7,7 @@ lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL - var/obj/machinery/computer/cargo/express/express_console + var/obj/machinery/computer/cargo/cargo_console var/linked = FALSE var/ready = FALSE var/launched = FALSE @@ -49,39 +49,39 @@ /obj/item/supplypod_beacon/examine(user) . = ..() - if(!express_console) + if(!cargo_console) . += "[src] is not currently linked to an Express Supply console." else . += "Alt-click to unlink it from the Express Supply console." /obj/item/supplypod_beacon/Destroy() - if(express_console) - express_console.beacon = null + if(cargo_console) + cargo_console.beacon = null return ..() /obj/item/supplypod_beacon/proc/unlink_console() - if(express_console) - express_console.beacon = null - express_console = null + if(cargo_console) + cargo_console.beacon = null + cargo_console = null update_status(SP_UNLINK) update_status(SP_UNREADY) /obj/item/supplypod_beacon/proc/link_console(obj/machinery/computer/cargo/express/C, mob/living/user) if (C.beacon)//if new console has a beacon, then... C.beacon.unlink_console()//unlink the old beacon from new console - if (express_console)//if this beacon has an express console - express_console.beacon = null//remove the connection the expressconsole has from beacons - express_console = C//set the linked console var to the console - express_console.beacon = src//out with the old in with the news + if (cargo_console)//if this beacon has an express console + cargo_console.beacon = null//remove the connection the expressconsole has from beacons + cargo_console = C//set the linked console var to the console + cargo_console.beacon = src//out with the old in with the news update_status(SP_LINKED) - if (express_console.use_beacon) + if (cargo_console.use_beacon) update_status(SP_READY) to_chat(user, "[src] linked to [C].") /obj/item/supplypod_beacon/AltClick(mob/user) if (!user.canUseTopic(src, !issilicon(user))) return - if (express_console) + if (cargo_console) unlink_console() else to_chat(user, "There is no linked console.") From 6ff0ac361711e4bec159da58c19760c2f9805561 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 15 May 2024 10:17:15 -0500 Subject: [PATCH 03/77] javascript stuff --- code/modules/cargo/console.dm | 9 - tgui/packages/tgui/interfaces/Cargo.js | 533 ------------------ .../OutpostCommunications/Catalog.js | 192 +++++++ .../index.tsx} | 39 +- .../interfaces/OutpostCommunications/types.ts | 28 + 5 files changed, 226 insertions(+), 575 deletions(-) delete mode 100644 tgui/packages/tgui/interfaces/Cargo.js create mode 100644 tgui/packages/tgui/interfaces/OutpostCommunications/Catalog.js rename tgui/packages/tgui/interfaces/{OutpostCommunications.tsx => OutpostCommunications/index.tsx} (88%) create mode 100644 tgui/packages/tgui/interfaces/OutpostCommunications/types.ts diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index ae6d8512365a..aa4d9764072c 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -13,7 +13,6 @@ circuit = /obj/item/circuitboard/computer/cargo/express light_color = COLOR_BRIGHT_ORANGE - var/requestonly = FALSE var/contraband = FALSE var/self_paid = FALSE var/safety_warning = "For safety reasons, the automated supply shuttle \ @@ -42,13 +41,6 @@ /// The account to charge purchases to, defaults to the cargo budget var/datum/bank_account/charge_account -/obj/machinery/computer/cargo - name = "supply request console" - desc = "Used to request supplies from cargo." - icon_screen = "request" - circuit = /obj/item/circuitboard/computer/cargo/request - requestonly = TRUE - /obj/machinery/computer/cargo/Initialize() . = ..() radio = new /obj/item/radio/headset/headset_cargo(src) @@ -154,7 +146,6 @@ /obj/machinery/computer/cargo/ui_static_data(mob/user) var/list/data = list() - data["requestonly"] = requestonly data["supplies"] = list() for(var/pack in SSshuttle.supply_packs) var/datum/supply_pack/P = SSshuttle.supply_packs[pack] diff --git a/tgui/packages/tgui/interfaces/Cargo.js b/tgui/packages/tgui/interfaces/Cargo.js deleted file mode 100644 index 9dfcd417f593..000000000000 --- a/tgui/packages/tgui/interfaces/Cargo.js +++ /dev/null @@ -1,533 +0,0 @@ -import { flow } from 'common/fp'; -import { filter, sortBy } from 'common/collections'; -import { useBackend, useSharedState } from '../backend'; -import { - AnimatedNumber, - Box, - Button, - Flex, - Icon, - Input, - LabeledList, - NoticeBox, - Section, - Stack, - Table, - Tabs, -} from '../components'; -import { formatMoney } from '../format'; -import { Window } from '../layouts'; - -export const Cargo = (props, context) => { - return ( - - - - - - ); -}; - -export const CargoContent = (props, context) => { - const { act, data } = useBackend(context); - const [tab, setTab] = useSharedState(context, 'tab', 'catalog'); - const { requestonly } = data; - const cart = data.cart || []; - const requests = data.requests || []; - return ( - - -
- - setTab('catalog')} - > - Catalog - - 0 && 'yellow'} - selected={tab === 'requests'} - onClick={() => setTab('requests')} - > - Requests ({requests.length}) - - {!requestonly && ( - <> - 0 && 'yellow'} - selected={tab === 'cart'} - onClick={() => setTab('cart')} - > - Checkout ({cart.length}) - - setTab('help')} - > - Help - - - )} - -
- {tab === 'catalog' && } - {tab === 'requests' && } - {tab === 'cart' && } - {tab === 'help' && } -
- ); -}; - -const CargoStatus = (props, context) => { - const { act, data } = useBackend(context); - const { - department, - grocery, - away, - docked, - loan, - loan_dispatched, - location, - message, - points, - requestonly, - can_send, - } = data; - return ( -
- formatMoney(value)} - /> - {' credits'} - - } - > - - - {(docked && !requestonly && can_send && ( -
- ); -}; - -/** - * Take entire supplies tree - * and return a flat supply pack list that matches search, - * sorted by name and only the first page. - * @param {any[]} supplies Supplies list. - * @param {string} search The search term - * @returns {any[]} The flat list of supply packs. - */ -const searchForSupplies = (supplies, search) => { - search = search.toLowerCase(); - - return flow([ - (categories) => categories.flatMap((category) => category.packs), - filter( - (pack) => - pack.name?.toLowerCase().includes(search.toLowerCase()) || - pack.desc?.toLowerCase().includes(search.toLowerCase()) - ), - sortBy((pack) => pack.name), - (packs) => packs.slice(0, 25), - ])(supplies); -}; - -export const CargoCatalog = (props, context) => { - const { express } = props; - const { act, data } = useBackend(context); - - const { self_paid, app_cost } = data; - - const supplies = Object.values(data.supplies); - - const [activeSupplyName, setActiveSupplyName] = useSharedState( - context, - 'supply', - supplies[0]?.name - ); - - const [searchText, setSearchText] = useSharedState( - context, - 'search_text', - '' - ); - - const activeSupply = - activeSupplyName === 'search_results' - ? { packs: searchForSupplies(supplies, searchText) } - : supplies.find((supply) => supply.name === activeSupplyName); - - return ( -
- - act('toggleprivate')} - /> - - ) - } - > - - - - - - - - - - { - if (value === searchText) { - return; - } - - if (value.length) { - // Start showing results - setActiveSupplyName('search_results'); - } else if (activeSupplyName === 'search_results') { - // return to normal category - setActiveSupplyName(supplies[0]?.name); - } - setSearchText(value); - }} - onChange={(e, value) => { - // Allow edge cases like the X button to work - const onInput = e.target?.props?.onInput; - if (onInput) { - onInput(e, value); - } - }} - /> - - - - {supplies.map((supply) => ( - { - setActiveSupplyName(supply.name); - setSearchText(''); - }} - > - {supply.name} ({supply.packs.length}) - - ))} - - - - - {activeSupply?.packs.map((pack) => { - const tags = []; - if (pack.small_item) { - tags.push('Small'); - } - if (pack.access) { - tags.push('Restricted'); - } - return ( - - {pack.name} - - {tags.join(', ')} - - - - - - ); - })} -
-
-
-
- ); -}; - -const CargoRequests = (props, context) => { - const { act, data } = useBackend(context); - const { requestonly, can_send, can_approve_requests } = data; - const requests = data.requests || []; - // Labeled list reimplementation to squeeze extra columns out of it - return ( -
act('denyall')} - /> - ) - } - > - {requests.length === 0 && No Requests} - {requests.length > 0 && ( - - {requests.map((request) => ( - - - #{request.id} - - {request.object} - - {request.orderer} - - - {request.reason} - - - {formatMoney(request.cost)} cr - - {(!requestonly || can_send) && can_approve_requests && ( - -
- )} -
- ); -}; - -const CargoCartButtons = (props, context) => { - const { act, data } = useBackend(context); - const { requestonly, can_send, can_approve_requests } = data; - const cart = data.cart || []; - const total = cart.reduce((total, entry) => total + entry.cost, 0); - if (requestonly || !can_send || !can_approve_requests) { - return null; - } - return ( - <> - - {cart.length === 0 && 'Cart is empty'} - {cart.length === 1 && '1 item'} - {cart.length >= 2 && cart.length + ' items'}{' '} - {total > 0 && `(${formatMoney(total)} cr)`} - - - ); - }; - - const missionValues = (mission: Mission) => ( - - - - {`${mission.value} cr, completed: ${mission.progressStr}`} - - - - - - {mission.timeStr} - - - - - {(showButton && buttonJSX(mission, tooltip, disabled)) || undefined} - - - ); - - const missionJSX = missionsArray.map((mission: Mission) => ( - <> - - {mission.desc} - - - - )); - - return {missionJSX}; -}; diff --git a/tgui/packages/tgui/interfaces/OutpostCommunications/types.ts b/tgui/packages/tgui/interfaces/OutpostCommunications/types.ts index d76af7137ca2..d65d2e3be4c3 100644 --- a/tgui/packages/tgui/interfaces/OutpostCommunications/types.ts +++ b/tgui/packages/tgui/interfaces/OutpostCommunications/types.ts @@ -2,10 +2,6 @@ export type Data = { points: number; outpostDocked: boolean; onShip: boolean; - numMissions: number; - maxMissions: number; - shipMissions: Array; - outpostMissions: Array; beaconZone: string; beaconName: string; hasBeacon: boolean; @@ -14,15 +10,3 @@ export type Data = { printMsg: string; canBuyBeacon: boolean; }; - -export type Mission = { - ref: string; - actStr: string; - name: string; - desc: string; - progressStr: string; - value: number; - remaining: number; - duration: number; - timeStr: string; -}; From df4a601e2781aebd163b67de24f4ddc1506fb710 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 5 Jun 2024 21:28:47 -0500 Subject: [PATCH 14/77] yea --- .../circuitboards/computer_circuitboards.dm | 2 +- .../circuitboards/machine_circuitboards.dm | 5 + code/modules/bounties/bounty_computer.dm | 420 ------------------ code/modules/bounties/bounty_machine.dm | 45 +- code/modules/bounties/bounty_pad.dm | 38 +- shiptest.dme | 2 + 6 files changed, 60 insertions(+), 452 deletions(-) delete mode 100644 code/modules/bounties/bounty_computer.dm diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 47739ded1551..e7231ce33cf0 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -357,7 +357,7 @@ //Supply /obj/item/circuitboard/computer/bounty - name = "\improper Nanotrasen Bounty Console (Computer Board)" + name = "\improper Outpost Bounty Console (Computer Board)" icon_state = "supply" build_path = /obj/machinery/computer/bounty diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 1a4a57d5cbb1..d6dd0dcb1dde 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1392,6 +1392,11 @@ /obj/item/stock_parts/scanning_module = 2, /obj/item/stock_parts/micro_laser = 2) +/obj/item/circuitboard/machine/bountypad + name = "\improper Outpost Bounty Pad (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/bounty_pad + //Misc /obj/item/circuitboard/machine/sheetifier name = "Sheet-meister 2000 (Machine Board)" diff --git a/code/modules/bounties/bounty_computer.dm b/code/modules/bounties/bounty_computer.dm deleted file mode 100644 index 9da9f9a82aaf..000000000000 --- a/code/modules/bounties/bounty_computer.dm +++ /dev/null @@ -1,420 +0,0 @@ -///Percentage of a civilian bounty the civilian will make. -#define CIV_BOUNTY_SPLIT 30 - -/obj/machinery/computer/bounty - name = "\improper Outpost bounty console" - desc = "Used to check and claim bounties offered by the outpost" - icon_screen = "bounty" - icon_keyboard = "id_key" - circuit = /obj/item/circuitboard/computer/bounty - light_color = COLOR_BRIGHT_ORANGE - ///Message to display on the TGUI window. - var/status_report = "Ready for delivery." - ///Reference to the specific pad that the control computer is linked up to. - var/datum/weakref/pad_ref - ///How long does it take to warmup the pad to teleport? - var/warmup_time = warmup_time = 3 SECONDS - ///Is the teleport pad/computer sending something right now? TRUE/FALSE - var/sending = FALSE - ///For the purposes of space pirates, how many points does the control pad have collected. - var/points = 0 - ///Reference to the export report totaling all sent objects and mobs. - var/datum/export_report/total_report - ///Callback holding the sending timer for sending the goods after a delay. - var/sending_timer - ///This is the cargo hold ID used by the piratepad machine. Match these two to link them together. - var/cargo_hold_id - ///Interface name for the ui_interact call for different subtypes. - var/interface_type = "CargoHoldTerminal" - ///Typecast of an inserted, scanned ID card inside the console, as bounties are held within the ID card. - var/obj/item/card/id/inserted_scan_id - -/obj/machinery/computer/bounty/Initialize(mapload) - ..() - if(isnull(nosell_typecache)) - nosell_typecache = typecacheof(/mob/living/silicon/robot) - return INITIALIZE_HINT_LATELOAD - -/obj/machinery/computer/bounty/multitool_act(mob/living/user, obj/item/multitool/I) - . = ..() - if (istype(I) && istype(I.buffer,/obj/machinery/piratepad)) - to_chat(user, span_notice("You link [src] with [I.buffer] in [I] buffer.")) - pad_ref = WEAKREF(I.buffer) - return TRUE - -/obj/machinery/computer/bounty/post_machine_initialize() - . = ..() - if(cargo_hold_id) - for(var/obj/machinery/piratepad/P as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/piratepad)) - if(P.cargo_hold_id == cargo_hold_id) - pad_ref = WEAKREF(P) - return - else - var/obj/machinery/piratepad/pad = locate() in range(4, src) - pad_ref = WEAKREF(pad) - -/obj/machinery/computer/bounty/ui_interact(mob/user, datum/tgui/ui) - . = ..() - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, interface_type, name) - ui.open() - -/obj/machinery/computer/bounty/ui_data(mob/user) - var/list/data = list() - data["points"] = points - data["pad"] = pad_ref?.resolve() ? TRUE : FALSE - data["sending"] = sending - data["status_report"] = status_report - return data - -/obj/machinery/computer/bounty/ui_act(action, params) - . = ..() - if(.) - return - if(!pad_ref?.resolve()) - return - - switch(action) - if("recalc") - recalc() - . = TRUE - if("send") - start_sending() - //We ensure that the holding facility is loaded in time in case we're selling mobs. - //This isn't the prettiest place to put it, but 'start_sending()' is also used by civilian bounty computers - //And we don't need them to also load the holding facility. - SSmapping.lazy_load_template(LAZY_TEMPLATE_KEY_NINJA_HOLDING_FACILITY) - . = TRUE - if("stop") - stop_sending() - . = TRUE - -/// Calculates the predicted value of the items on the pirate pad -/obj/machinery/computer/bounty/proc/recalc() - if(sending) - return - - status_report = "Predicted value: " - var/value = 0 - - var/obj/machinery/piratepad/pad = pad_ref?.resolve() - var/datum/export_report/report = pirate_export_loop(pad) - - for(var/datum/export/exported_datum in report.total_amount) - status_report += exported_datum.total_printout(report,notes = FALSE) - status_report += " " - value += report.total_value[exported_datum] - - if(!value) - status_report += "0" - -/// Deletes and sells the item -/obj/machinery/computer/bounty/proc/send() - if(!sending) - return - - var/obj/machinery/piratepad/pad = pad_ref?.resolve() - var/datum/export_report/report = pirate_export_loop(pad, dry_run = FALSE) - - status_report = "Sold: " - var/value = 0 - for(var/datum/export/exported_datum in report.total_amount) - var/export_text = exported_datum.total_printout(report,notes = FALSE) //Don't want nanotrasen messages, makes no sense here. - if(!export_text) - continue - - status_report += export_text - status_report += " " - value += report.total_value[exported_datum] - - if(!total_report) - total_report = report - else - total_report.exported_atoms += report.exported_atoms - for(var/datum/export/exported_datum in report.total_amount) - total_report.total_amount[exported_datum] += report.total_amount[exported_datum] - total_report.total_value[exported_datum] += report.total_value[exported_datum] - playsound(loc, 'sound/machines/wewewew.ogg', 70, TRUE) - - points += value - - if(!value) - status_report += "Nothing" - - pad.visible_message(span_notice("[pad] activates!")) - flick(pad.sending_state,pad) - pad.icon_state = pad.idle_state - sending = FALSE - -///The loop that calculates the value of stuff on a pirate pad, or plain sell them if dry_run is FALSE. -/obj/machinery/computer/bounty/proc/pirate_export_loop(obj/machinery/piratepad/pad, dry_run = TRUE) - var/datum/export_report/report = new - for(var/atom/movable/item_on_pad as anything in get_turf(pad)) - if(item_on_pad == pad) - continue - var/list/hidden_mobs = list() - var/skip_movable = FALSE - var/list/item_contents = item_on_pad.get_all_contents() - for(var/atom/movable/thing in reverse_range(item_contents)) - ///Don't destroy/sell stuff like the captain's laser gun, or borgs. - if(thing.resistance_flags & INDESTRUCTIBLE || is_type_in_typecache(thing, nosell_typecache)) - skip_movable = TRUE - break - if(isliving(thing)) - hidden_mobs += thing - if(skip_movable) - continue - for(var/mob/living/hidden as anything in hidden_mobs) - ///Sell mobs, but leave their contents intact. - export_single_item(hidden, apply_elastic = FALSE, dry_run = dry_run, external_report = report) - ///there are still licing mobs inside that item. Stop, don't sell it ffs. - if(locate(/mob/living) in item_on_pad.get_all_contents()) - continue - export_item_and_contents(item_on_pad, apply_elastic = FALSE, dry_run = dry_run, delete_unsold = FALSE, external_report = report, ignore_typecache = nosell_typecache) - return report - -/// Prepares to sell the items on the pad -/obj/machinery/computer/bounty/proc/start_sending() - var/obj/machinery/piratepad/pad = pad_ref?.resolve() - if(!pad) - status_report = "No pad detected. Build or link a pad." - pad.audible_message(span_notice("[pad] beeps.")) - return - if(pad?.panel_open) - status_report = "Please screwdrive pad closed to send. " - pad.audible_message(span_notice("[pad] beeps.")) - return - if(sending) - return - sending = TRUE - status_report = "Sending... " - pad.visible_message(span_notice("[pad] starts charging up.")) - pad.icon_state = pad.warmup_state - sending_timer = addtimer(CALLBACK(src, PROC_REF(send)),warmup_time, TIMER_STOPPABLE) - -/// Finishes the sending state of the pad -/obj/machinery/computer/bounty/proc/stop_sending(custom_report) - if(!sending) - return - sending = FALSE - status_report = "Ready for delivery." - if(custom_report) - status_report = custom_report - var/obj/machinery/piratepad/pad = pad_ref?.resolve() - pad.icon_state = pad.idle_state - deltimer(sending_timer) - -/obj/machinery/computer/bounty/attackby(obj/item/I, mob/living/user, params) - if(isidcard(I)) - if(id_insert(user, I, inserted_scan_id)) - inserted_scan_id = I - return TRUE - return ..() - -/obj/machinery/computer/bounty/multitool_act(mob/living/user, obj/item/multitool/I) - if(istype(I) && istype(I.buffer,/obj/machinery/piratepad/civilian)) - to_chat(user, span_notice("You link [src] with [I.buffer] in [I] buffer.")) - pad_ref = WEAKREF(I.buffer) - return TRUE - -/obj/machinery/computer/bounty/post_machine_initialize() - . = ..() - if(cargo_hold_id) - for(var/obj/machinery/piratepad/civilian/C as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/piratepad/civilian)) - if(C.cargo_hold_id == cargo_hold_id) - pad_ref = WEAKREF(C) - return - else - var/obj/machinery/piratepad/civilian/pad = locate() in range(4,src) - pad_ref = WEAKREF(pad) - -/obj/machinery/computer/bounty/recalc() - if(sending) - return FALSE - if(!inserted_scan_id) - status_report = "Please insert your ID first." - playsound(loc, 'sound/machines/synth_no.ogg', 30 , TRUE) - return FALSE - if(!inserted_scan_id.registered_account.civilian_bounty) - status_report = "Please accept a new civilian bounty first." - playsound(loc, 'sound/machines/synth_no.ogg', 30 , TRUE) - return FALSE - status_report = "Civilian Bounty: " - var/obj/machinery/piratepad/civilian/pad = pad_ref?.resolve() - for(var/atom/movable/AM in get_turf(pad)) - if(AM == pad) - continue - if(inserted_scan_id.registered_account.civilian_bounty.applies_to(AM)) - status_report += "Target Applicable." - playsound(loc, 'sound/machines/synth_yes.ogg', 30 , TRUE) - return - status_report += "Not Applicable." - playsound(loc, 'sound/machines/synth_no.ogg', 30 , TRUE) - -/** - * This fully rewrites base behavior in order to only check for bounty objects, and nothing else. - */ -/obj/machinery/computer/bounty/send() - playsound(loc, 'sound/machines/wewewew.ogg', 70, TRUE) - if(!sending) - return - if(!inserted_scan_id) - stop_sending() - return FALSE - if(!inserted_scan_id.registered_account.civilian_bounty) - stop_sending() - return FALSE - var/datum/bounty/curr_bounty = inserted_scan_id.registered_account.civilian_bounty - var/active_stack = 0 - var/obj/machinery/piratepad/civilian/pad = pad_ref?.resolve() - for(var/atom/movable/AM in get_turf(pad)) - if(AM == pad) - continue - if(curr_bounty.applies_to(AM)) - active_stack ++ - curr_bounty.ship(AM) - qdel(AM) - if(active_stack >= 1) - status_report += "Bounty Target Found x[active_stack]. " - else - status_report = "No applicable targets found. Aborting." - stop_sending() - if(curr_bounty.can_claim()) - //Pay for the bounty with the ID's department funds. - status_report += "Bounty completed! Please give your bounty cube to cargo for your automated payout shortly." - inserted_scan_id.registered_account.reset_bounty() - SSeconomy.civ_bounty_tracker++ - - var/obj/item/bounty_cube/reward = new /obj/item/bounty_cube(drop_location()) - reward.set_up(curr_bounty, inserted_scan_id) - - pad.visible_message(span_notice("[pad] activates!")) - flick(pad.sending_state,pad) - pad.icon_state = pad.idle_state - playsound(loc, 'sound/machines/synth_yes.ogg', 30 , TRUE) - sending = FALSE - -///Here is where cargo bounties are added to the player's bank accounts, then adjusted and scaled into a civilian bounty. -/obj/machinery/computer/bounty/proc/add_bounties(cooldown_reduction = 0) - if(!inserted_scan_id || !inserted_scan_id.registered_account) - return - var/datum/bank_account/pot_acc = inserted_scan_id.registered_account - if((pot_acc.civilian_bounty || pot_acc.bounties) && !COOLDOWN_FINISHED(pot_acc, bounty_timer)) - var/curr_time = round((COOLDOWN_TIMELEFT(pot_acc, bounty_timer)) / (1 MINUTES), 0.01) - say("Internal ID network spools coiling, try again in [curr_time] minutes!") - return FALSE - if(!pot_acc.account_job) - say("Requesting ID card has no job assignment registered!") - return FALSE - var/list/datum/bounty/crumbs = list(random_bounty(pot_acc.account_job.bounty_types), // We want to offer 2 bounties from their appropriate job catagories - random_bounty(pot_acc.account_job.bounty_types), // and 1 guarenteed assistant bounty if the other 2 suck. - random_bounty(CIV_JOB_BASIC)) - COOLDOWN_START(pot_acc, bounty_timer, (5 MINUTES) - cooldown_reduction) - pot_acc.bounties = crumbs - -/obj/machinery/computer/bounty/proc/pick_bounty(choice) - if(!inserted_scan_id || !inserted_scan_id.registered_account || !inserted_scan_id.registered_account.bounties || !inserted_scan_id.registered_account.bounties[choice]) - playsound(loc, 'sound/machines/synth_no.ogg', 40 , TRUE) - return - inserted_scan_id.registered_account.civilian_bounty = inserted_scan_id.registered_account.bounties[choice] - inserted_scan_id.registered_account.bounties = null - return inserted_scan_id.registered_account.civilian_bounty - -/obj/machinery/computer/bounty/click_alt(mob/user) - id_eject(user, inserted_scan_id) - return CLICK_ACTION_SUCCESS - -/obj/machinery/computer/bounty/ui_data(mob/user) - var/list/data = list() - data["points"] = points - data["pad"] = pad_ref?.resolve() ? TRUE : FALSE - data["sending"] = sending - data["status_report"] = status_report - data["id_inserted"] = inserted_scan_id - if(inserted_scan_id?.registered_account) - if(inserted_scan_id.registered_account.civilian_bounty) - data["id_bounty_info"] = inserted_scan_id.registered_account.civilian_bounty.description - data["id_bounty_num"] = inserted_scan_id.registered_account.bounty_num() - data["id_bounty_value"] = (inserted_scan_id.registered_account.civilian_bounty.reward) * (CIV_BOUNTY_SPLIT/100) - if(inserted_scan_id.registered_account.bounties) - data["picking"] = TRUE - data["id_bounty_names"] = list(inserted_scan_id.registered_account.bounties[1].name, - inserted_scan_id.registered_account.bounties[2].name, - inserted_scan_id.registered_account.bounties[3].name) - data["id_bounty_infos"] = list(inserted_scan_id.registered_account.bounties[1].description, - inserted_scan_id.registered_account.bounties[2].description, - inserted_scan_id.registered_account.bounties[3].description) - data["id_bounty_values"] = list(inserted_scan_id.registered_account.bounties[1].reward * (CIV_BOUNTY_SPLIT/100), - inserted_scan_id.registered_account.bounties[2].reward * (CIV_BOUNTY_SPLIT/100), - inserted_scan_id.registered_account.bounties[3].reward * (CIV_BOUNTY_SPLIT/100)) - else - data["picking"] = FALSE - - return data - -/obj/machinery/computer/bounty/ui_act(action, params) - . = ..() - if(.) - return - var/obj/machinery/piratepad/civilian/pad = pad_ref?.resolve() - if(!pad) - return - if(!usr.can_perform_action(src) || (machine_stat & (NOPOWER|BROKEN))) - return - switch(action) - if("recalc") - recalc() - if("send") - start_sending() - if("stop") - stop_sending() - if("pick") - pick_bounty(params["value"]) - if("bounty") - add_bounties(pad.get_cooldown_reduction()) - if("eject") - id_eject(usr, inserted_scan_id) - inserted_scan_id = null - . = TRUE - -///Self explanitory, holds the ID card in the console for bounty payout and manipulation. -/obj/machinery/computer/bounty/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target) - var/obj/item/card/id/card_to_insert = inserting_item - var/holder_item = FALSE - - if(!isidcard(card_to_insert)) - card_to_insert = inserting_item.RemoveID() - holder_item = TRUE - - if(!card_to_insert || !user.transferItemToLoc(card_to_insert, src)) - return FALSE - - if(target) - if(holder_item && inserting_item.InsertID(target)) - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) - else - id_eject(user, target) - - user.visible_message(span_notice("[user] inserts \the [card_to_insert] into \the [src]."), - span_notice("You insert \the [card_to_insert] into \the [src].")) - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) - ui_interact(user) - return TRUE - -///Removes A stored ID card. -/obj/machinery/computer/bounty/proc/id_eject(mob/user, obj/target) - if(!target) - to_chat(user, span_warning("That slot is empty!")) - return FALSE - else - target.forceMove(drop_location()) - if(!issilicon(user) && Adjacent(user)) - user.put_in_hands(target) - user.visible_message(span_notice("[user] gets \the [target] from \the [src]."), \ - span_notice("You get \the [target] from \the [src].")) - playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) - inserted_scan_id = null - return TRUE - -#undef CIV_BOUNTY_SPLIT diff --git a/code/modules/bounties/bounty_machine.dm b/code/modules/bounties/bounty_machine.dm index b4a3ea6a2a66..84b91fc1a355 100644 --- a/code/modules/bounties/bounty_machine.dm +++ b/code/modules/bounties/bounty_machine.dm @@ -4,6 +4,49 @@ icon_screen = "bounty" circuit = /obj/item/circuitboard/computer/bounty light_color = COLOR_BRIGHT_ORANGE + ///Reference to the specific pad that the control computer is linked up to. + var/datum/weakref/pad_ref -/obj/machinery/bounty +/obj/machinery/computer/bounty/multitool_act(mob/living/user, obj/item/multitool/I) + . = ..() + if (istype(I) && istype(I.buffer,/obj/machinery/bounty_pad)) + to_chat(user, span_notice("You link [src] with [I.buffer] in [I] buffer.")) + pad_ref = WEAKREF(I.buffer) + return TRUE + +//Pad & Pad Terminal +/obj/machinery/bounty_pad name = "cargo hold pad" + icon_state = "laserboxb0f" + ///This is the icon_state that this telepad uses when it's not in use. + var/idle_state = "laserboxb0" + ///This is the icon_state that this telepad uses when it's warming up for goods teleportation. + var/warmup_state = "laserbox_open" + ///This is the icon_state to flick when the goods are being sent off by the telepad. + var/sending_state = "laserbox_vend" + ///This is the cargo hold ID used by the bounty_control. Match these two to link them together. + var/cargo_hold_id + layer = TABLE_LAYER + resistance_flags = FIRE_PROOF + circuit = /obj/item/circuitboard/machine/bountypad + var/cooldown_reduction = 0 + +/obj/machinery/bounty_pad/multitool_act(mob/living/user, obj/item/multitool/I) + . = ..() + if (istype(I)) + I.buffer = src + balloon_alert(user, "saved to multitool buffer") + return TRUE + +/obj/machinery/bounty_pad/screwdriver_act(mob/living/user, obj/item/tool) + . = ..() + if(!.) + return default_deconstruction_screwdriver(user, warmup_state, idle_state, tool) + +/obj/machinery/bounty_pad/crowbar_act(mob/living/user, obj/item/tool) + . = ..() + if(!.) + return default_deconstruction_crowbar(tool) + +/obj/machinery/bounty_pad/proc/get_cooldown_reduction() + return cooldown_reduction diff --git a/code/modules/bounties/bounty_pad.dm b/code/modules/bounties/bounty_pad.dm index ce88bf95cfad..340d30ed9fab 100644 --- a/code/modules/bounties/bounty_pad.dm +++ b/code/modules/bounties/bounty_pad.dm @@ -1,58 +1,36 @@ //Pad & Pad Terminal /obj/machinery/bounty name = "cargo hold pad" - icon = 'icons/obj/machines/telepad.dmi' - icon_state = "lpad-idle-off" + icon_state = "laserboxb0" ///This is the icon_state that this telepad uses when it's not in use. - var/idle_state = "lpad-idle-off" + var/idle_state = "laserboxb0" ///This is the icon_state that this telepad uses when it's warming up for goods teleportation. - var/warmup_state = "lpad-idle" + var/warmup_state = "laserbox_open" ///This is the icon_state to flick when the goods are being sent off by the telepad. - var/sending_state = "lpad-beam" - ///This is the cargo hold ID used by the piratepad_control. Match these two to link them together. + var/sending_state = "laserbox_vend" + ///This is the cargo hold ID used by the bounty_control. Match these two to link them together. var/cargo_hold_id layer = TABLE_LAYER resistance_flags = FIRE_PROOF circuit = /obj/item/circuitboard/machine/bountypad var/cooldown_reduction = 0 -/obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/multitool/I) +/obj/machinery/bounty/multitool_act(mob/living/user, obj/item/multitool/I) . = ..() if (istype(I)) - I.set_buffer(src) + I.buffer = src balloon_alert(user, "saved to multitool buffer") return TRUE -/obj/machinery/piratepad/screwdriver_act_secondary(mob/living/user, obj/item/screwdriver/screw) - . = ..() - if(!.) - return default_deconstruction_screwdriver(user, "lpad-idle-open", "lpad-idle-off", screw) - -/obj/machinery/piratepad/crowbar_act_secondary(mob/living/user, obj/item/tool) - . = ..() - default_deconstruction_crowbar(tool) - return TRUE - /obj/machinery/bounty/screwdriver_act(mob/living/user, obj/item/tool) . = ..() if(!.) - return default_deconstruction_screwdriver(user, "lpad-idle-open", "lpad-idle-off", tool) + return default_deconstruction_screwdriver(user, warmup_state, idle_state, tool) /obj/machinery/bounty/crowbar_act(mob/living/user, obj/item/tool) . = ..() if(!.) return default_deconstruction_crowbar(tool) -/obj/machinery/bounty/RefreshParts() - . = ..() - var/T = -2 - for(var/datum/stock_part/micro_laser/micro_laser in component_parts) - T += micro_laser.tier - - for(var/datum/stock_part/scanning_module/scanning_module in component_parts) - T += scanning_module.tier - - cooldown_reduction = T * (30 SECONDS) - /obj/machinery/bounty/proc/get_cooldown_reduction() return cooldown_reduction diff --git a/shiptest.dme b/shiptest.dme index e2f54cc10295..270ee7bdb535 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1855,6 +1855,8 @@ #include "code\modules\balloon_alert\balloon_alert.dm" #include "code\modules\bounties\bounty_machine.dm" #include "code\modules\bounties\missions.dm" +#include "code\modules\bounties\missions\acquire_mission.dm" +#include "code\modules\bounties\missions\flavor_text.dm" #include "code\modules\buildmode\bm_mode.dm" #include "code\modules\buildmode\buildmode.dm" #include "code\modules\buildmode\buttons.dm" From 731757ddf72b6a84201283bfafc72f6c41bafa4e Mon Sep 17 00:00:00 2001 From: fallcon Date: Tue, 24 Sep 2024 13:11:39 -0500 Subject: [PATCH 15/77] dynamic missioc code --- code/controllers/subsystem/mapping.dm | 1 + code/datums/ruins.dm | 2 ++ code/modules/bounties/mission_markers.dm | 15 +++++++++++++++ code/modules/overmap/objects/dynamic_datum.dm | 12 ++++++++++-- shiptest.dme | 1 + 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 code/modules/bounties/mission_markers.dm diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 3fecc68fbfe4..cd768d9c2062 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -16,6 +16,7 @@ SUBSYSTEM_DEF(mapping) var/list/ruin_types_probabilities = list() var/list/ruins_templates = list() var/list/planet_types = list() + var/list/mission_pois = list() var/list/maplist var/list/ship_purchase_list diff --git a/code/datums/ruins.dm b/code/datums/ruins.dm index 9b7c86c22b0e..b78e19ddf038 100644 --- a/code/datums/ruins.dm +++ b/code/datums/ruins.dm @@ -17,6 +17,8 @@ var/ruin_type + var/mission_pois + /datum/map_template/ruin/New() if(!name && id) name = id diff --git a/code/modules/bounties/mission_markers.dm b/code/modules/bounties/mission_markers.dm new file mode 100644 index 000000000000..de5ff91cb307 --- /dev/null +++ b/code/modules/bounties/mission_markers.dm @@ -0,0 +1,15 @@ + +/datum/component/mission_poi + + +/obj/effect/landmark/mission_poi + linked_mission + var/setpieces + +/obj/effect/landmark/mission_poi/Initialize + // Needs to see if its a target of a mission then connect itself and the things it spawns to it + if("is_target_of_a_mission") + var/set_piece = p + qdel(src) +/obj/effect/landmark/mission_poi/drill + var/setpieces = list(/obj/structure/vein) diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 1ca28df922aa..1fbc033e0309 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -25,6 +25,12 @@ var/force_encounter ///Ruin types to generate var/ruin_type + ///Preditermined ruin made when the overmap is first created + var/selected_ruin + ///Fetched before anything is loaded from the ruin datum, used for missions + var/mission_pois + ///The list of mission pois once the planet has acctually loaded the ruin + var/spawned_mission_pois /// list of ruins and their target turf, indexed by name var/list/ruin_turfs /// list of ruin templates currently spawned on the planet. @@ -150,6 +156,9 @@ landing_sound = planet.landing_sound preserve_level = planet.preserve_level //it came to me while I was looking at chickens + // use the ruin type in template if it exists, or pick from ruin list if IT exists; otherwise null + selected_ruin = template || (ruin_type ? pickweightAllowZero(SSmapping.ruin_types_probabilities[ruin_type]) : null) + if(vlevel_height >= 255 && vlevel_width >= 255) //little easter egg planet_name = "LV-[pick(rand(11111,99999))]" token.icon_state = "sector" @@ -191,8 +200,6 @@ loading = TRUE log_shuttle("[src] [REF(src)] LEVEL_INIT") - // use the ruin type in template if it exists, or pick from ruin list if IT exists; otherwise null - var/selected_ruin = template || (ruin_type ? pickweightAllowZero(SSmapping.ruin_types_probabilities[ruin_type]) : null) var/list/dynamic_encounter_values = SSovermap.spawn_dynamic_encounter(src, selected_ruin) if(!length(dynamic_encounter_values)) return FALSE @@ -201,6 +208,7 @@ reserve_docks = dynamic_encounter_values[2] ruin_turfs = dynamic_encounter_values[3] spawned_ruins = dynamic_encounter_values[4] + spawned_mission_pois = dynamic_encounter_values[5] loading = FALSE return TRUE diff --git a/shiptest.dme b/shiptest.dme index c435ca03db77..c7b0c0697997 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1869,6 +1869,7 @@ #include "code\modules\awaymissions\mission_code\undergroundoutpost45.dm" #include "code\modules\balloon_alert\balloon_alert.dm" #include "code\modules\bounties\bounty_machine.dm" +#include "code\modules\bounties\mission_markers.dm" #include "code\modules\bounties\missions.dm" #include "code\modules\bounties\missions\acquire_mission.dm" #include "code\modules\bounties\missions\flavor_text.dm" From 47ecd2bd56db53989b813b788d16ab48a7c0830b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 24 Sep 2024 16:03:23 -0500 Subject: [PATCH 16/77] sample missions --- .../IceRuins/icemoon_crashed_holemaker.dmm | 1 + .../IceRuins/icemoon_hydroponics_lab.dmm | 7 +- .../icemoon_underground_abandoned_village.dmm | 1 + .../icemoon_underground_brazillianlab.dmm | 1 + .../{signals_ship.dm => signals_overmap.dm} | 3 + code/__DEFINES/subsystems.dm | 1 + code/controllers/subsystem/missions.dm | 24 +++ code/controllers/subsystem/overmap.dm | 11 +- code/datums/ruins.dm | 3 +- code/datums/ruins/icemoon.dm | 4 + code/modules/bounties/mission_markers.dm | 15 -- code/modules/cargo/console.dm | 1 - code/modules/dynamic_missions/mission.dm | 186 ++++++++++++++++++ .../dynamic_missions/missions/guarded.dm | 25 +++ .../missions/guarded/nt_files.dm | 14 ++ .../dynamic_missions/missions/simple.dm | 20 ++ .../missions/simple/blackbox.dm | 7 + code/modules/overmap/objects/dynamic_datum.dm | 11 +- .../overmap/objects/outpost/outpost.dm | 2 + shiptest.dme | 9 +- 20 files changed, 321 insertions(+), 25 deletions(-) rename code/__DEFINES/dcs/signals/{signals_ship.dm => signals_overmap.dm} (63%) create mode 100644 code/controllers/subsystem/missions.dm delete mode 100644 code/modules/bounties/mission_markers.dm create mode 100644 code/modules/dynamic_missions/mission.dm create mode 100644 code/modules/dynamic_missions/missions/guarded.dm create mode 100644 code/modules/dynamic_missions/missions/guarded/nt_files.dm create mode 100644 code/modules/dynamic_missions/missions/simple.dm create mode 100644 code/modules/dynamic_missions/missions/simple/blackbox.dm diff --git a/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm b/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm index 707be4573d13..152150623524 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm @@ -196,6 +196,7 @@ pixel_x = -32 }, /obj/effect/decal/cleanable/dirt/dust, +/obj/effect/landmark/mission_poi/blackbox, /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 67613238e83d..96ba1763a877 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm @@ -2195,6 +2195,11 @@ }, /turf/open/floor/plasteel/tech, /area/ruin/powered/hydroponicslab) +"Xb" = ( +/obj/structure/table/wood, +/obj/effect/landmark/mission_poi/blackbox, +/turf/open/floor/wood/walnut, +/area/ruin/powered/hydroponicslab) "Xt" = ( /obj/structure/table/wood, /obj/item/folder{ @@ -2912,7 +2917,7 @@ pj da ic We -vH +Xb vH vH aJ diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm index d26f9458a943..14cfb6a2a8d3 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm @@ -138,6 +138,7 @@ }, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, +/obj/effect/landmark/mission_poi/blackbox, /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 d560e98b2f20..44240c4158b2 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_brazillianlab.dmm @@ -1007,6 +1007,7 @@ pixel_y = 10 }, /obj/structure/table/wood/fancy/blue, +/obj/effect/landmark/mission_poi/blackbox, /turf/open/floor/carpet/orange{ initial_gas_mix = "ICEMOON_ATMOS" }, diff --git a/code/__DEFINES/dcs/signals/signals_ship.dm b/code/__DEFINES/dcs/signals/signals_overmap.dm similarity index 63% rename from code/__DEFINES/dcs/signals/signals_ship.dm rename to code/__DEFINES/dcs/signals/signals_overmap.dm index c18a26c5089d..9c9981960ad1 100644 --- a/code/__DEFINES/dcs/signals/signals_ship.dm +++ b/code/__DEFINES/dcs/signals/signals_overmap.dm @@ -1,2 +1,5 @@ ///Sent when a shuttle finishes loading to allow for any machinery that requires a late connection to fire that connection #define COMSIG_SHIP_DONE_CONNECTING "late_connect" + +///Send when a dynamic datum completes load level. +#define COMSIG_OVERMAP_LOADED "overmap_loaded" diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 54874bc9e16b..60640dcc8bc9 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -187,6 +187,7 @@ #define FIRE_PRIORITY_CALLBACKS 600 #define FIRE_PRIORITY_EXPLOSIONS 666 #define FIRE_PRIORITY_TIMER 700 +#define FIRE_PRIORITY_MISSIONS 750 #define FIRE_PRIORITY_SOUND_LOOPS 800 #define FIRE_PRIORITY_OVERMAP_MOVEMENT 850 #define FIRE_PRIORITY_SPEECH_CONTROLLER 900 diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm new file mode 100644 index 000000000000..1d69e4ac9bd6 --- /dev/null +++ b/code/controllers/subsystem/missions.dm @@ -0,0 +1,24 @@ +SUBSYSTEM_DEF(missions) + name = "Missions" + flags = SS_NO_INIT + priority = FIRE_PRIORITY_MISSIONS + var/list/obj/effect/landmark/mission_poi/unallocated_pois = list() + var/list/datum/dynamic_mission/inactive_missions = list() + var/list/datum/dynamic_mission/active_missions = list() + + var/max_active_missions = 5 + +/datum/controller/subsystem/missions/stat_entry(msg) + var/unallocated = unallocated_pois.len + var/inactive_count = inactive_missions.len + var/active_count = active_missions.len + msg = "missions:A[active_count]|I:[inactive_count]|pois:[unallocated]" + return ..() + +/datum/controller/subsystem/missions/fire(resumed) + if(active_missions.len < max_active_missions) + if(inactive_missions.len) + var/datum/dynamic_mission/mission_to_start = inactive_missions[inactive_missions.len] + mission_to_start.start_mission() + + diff --git a/code/controllers/subsystem/overmap.dm b/code/controllers/subsystem/overmap.dm index 113bfefa7a52..410172e3c3d5 100644 --- a/code/controllers/subsystem/overmap.dm +++ b/code/controllers/subsystem/overmap.dm @@ -378,7 +378,16 @@ SUBSYSTEM_DEF(overmap) quaternary_dock.dwidth = 0 docking_ports += quaternary_dock - return list(mapzone, docking_ports, ruin_turfs, ruin_templates) + var/list/spawned_mission_pois = list() + for(var/obj/effect/landmark/mission_poi/mission_poi in SSmissions.unallocated_pois) + if(!vlevel.is_in_bounds(mission_poi)) + continue + + spawned_mission_pois += mission_poi + SSmissions.unallocated_pois -= mission_poi + + + return list(mapzone, docking_ports, ruin_turfs, ruin_templates, spawned_mission_pois) /** * Returns a random, usually empty turf in the overmap diff --git a/code/datums/ruins.dm b/code/datums/ruins.dm index 2080d45186cd..3a4e85857a03 100644 --- a/code/datums/ruins.dm +++ b/code/datums/ruins.dm @@ -18,7 +18,7 @@ var/ruin_type var/ruin_tags = list() - var/mission_pois + var/dynamic_mission_types /datum/map_template/ruin/New() if(!name && id) @@ -26,4 +26,3 @@ mappath = prefix + suffix ..(path = mappath) - diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index 81b7aea8582c..a09acb59e8e0 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -10,6 +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/dynamic_mission/simple/blackbox) /datum/map_template/ruin/icemoon/abandonedvillage name = "Abandoned Village" @@ -17,6 +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/dynamic_mission/simple/blackbox) /datum/map_template/ruin/icemoon/brazillian_lab name = "Barricaded Compound" @@ -24,6 +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/dynamic_mission/simple/blackbox) /datum/map_template/ruin/icemoon/crashed_holemaker name = "Crashed Holemaker" @@ -31,3 +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/dynamic_mission/simple/blackbox) diff --git a/code/modules/bounties/mission_markers.dm b/code/modules/bounties/mission_markers.dm deleted file mode 100644 index de5ff91cb307..000000000000 --- a/code/modules/bounties/mission_markers.dm +++ /dev/null @@ -1,15 +0,0 @@ - -/datum/component/mission_poi - - -/obj/effect/landmark/mission_poi - linked_mission - var/setpieces - -/obj/effect/landmark/mission_poi/Initialize - // Needs to see if its a target of a mission then connect itself and the things it spawns to it - if("is_target_of_a_mission") - var/set_piece = p - qdel(src) -/obj/effect/landmark/mission_poi/drill - var/setpieces = list(/obj/structure/vein) diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 1344bacfc430..2bf47b52d468 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -154,7 +154,6 @@ . = ..() if(.) return - /* switch(action) if("withdrawCash") var/val = text2num(params["value"]) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm new file mode 100644 index 000000000000..849bd28fcd2b --- /dev/null +++ b/code/modules/dynamic_missions/mission.dm @@ -0,0 +1,186 @@ +/datum/dynamic_mission + var/name = "Mission" + var/desc = "Do something for me." + var/value = 1000 /// The mission's payout. + var/duration = 45 MINUTES /// The amount of time in which to complete the mission. + var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. + + /// Should mission value scale proportionally to the deviation from the mission's base duration? + var/dur_value_scaling = FALSE + /// The maximum deviation of the mission's true value from the base value, as a proportion. + var/val_mod_range = 0.1 + /// The maximum deviation of the mission's true duration from the base value, as a proportion. + var/dur_mod_range = 0.1 + + /// The outpost that issued this mission. Passed in New(). + //var/datum/overmap/outpost/source_outpost + var/datum/overmap/mission_location + + var/active = FALSE + var/failed = FALSE + var/dur_timer + + /// Assoc list of atoms "bound" to this mission; each atom is associated with a 2-element list. The first + /// entry in that list is a bool that determines if the mission should fail when the atom qdeletes; the second + /// is a callback to be invoked upon the atom's qdeletion. + var/list/atom/movable/bound_atoms + +/datum/dynamic_mission/New(_location) + var/old_dur = duration + var/val_mod = value * val_mod_range + var/dur_mod = duration * dur_mod_range + // new duration is between + duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) + value = round(rand(value-val_mod, value+val_mod) * (dur_value_scaling ? old_dur / duration : 1), 50) + + //source_outpost = _outpost + mission_location = _location + SSmissions.inactive_missions += list(src) + //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) + return ..() + +/datum/dynamic_mission/proc/on_vital_delete() + qdel(src) + +/datum/dynamic_mission/Destroy() + //UnregisterSignal(source_outpost, COMSIG_PARENT_QDELETING) + UnregisterSignal(mission_location, COMSIG_PARENT_QDELETING, COMSIG_OVERMAP_LOADED) + if(active) + SSmissions.active_missions -= src + else + SSmissions.inactive_missions -= src + //LAZYREMOVE(source_outpost.missions, src) + //source_outpost = null + for(var/bound in bound_atoms) + remove_bound(bound) + deltimer(dur_timer) + return ..() + +/datum/dynamic_mission/proc/start_mission() + SSmissions.inactive_missions -= src + active = TRUE + SSmissions.active_missions += src + +/datum/dynamic_mission/proc/on_planet_load(datum/overmap/dynamic/planet) + SIGNAL_HANDLER + + if(!active) + qdel(src) + return + if(!planet.spawned_mission_pois.len) + stack_trace("[src] failed to start because it had no points of intrest to use for its mission") + qdel(src) + return + + spawn_mission_setpiece(planet) + +/datum/dynamic_mission/proc/spawn_mission_setpiece(datum/overmap/dynamic/planet) + return + +/datum/dynamic_mission/proc/can_turn_in(atom/movable/item_to_check) + return + +/datum/dynamic_mission/proc/turn_in() + qdel(src) + +/datum/dynamic_mission/proc/can_complete() + return !failed + +/datum/dynamic_mission/proc/get_tgui_info() + var/time_remaining = max(dur_timer ? timeleft(dur_timer) : duration, 0) + + var/act_str = "" + if(can_complete()) + act_str = "Turn in" + + return list( + "ref" = REF(src), + "name" = src.name, + "desc" = src.desc, + "value" = src.value, + "duration" = src.duration, + "remaining" = time_remaining, + "timeStr" = time2text(time_remaining, "mm:ss"), + "progressStr" = get_progress_string(), + "actStr" = act_str + ) + +/datum/dynamic_mission/proc/get_progress_string() + return "null" + +/** + * Spawns a "bound" atom of the given type at the given location. When the "bound" atom + * is qdeleted, the passed-in callback is invoked, and, by default, the mission fails. + * + * Intended to be used to spawn mission-linked atoms that can have + * references saved without causing harddels. + * + * Arguments: + * * a_type - The type of the atom to be spawned. Must be of type /atom/movable. + * * a_loc - The location to spawn the bound atom at. + * * destroy_cb - The callback to invoke when the bound atom is qdeleted. Default is null. + * * fail_on_delete - Bool; whether the mission should fail when the bound atom is qdeleted. Default TRUE. + * * sparks - Whether to spawn sparks after spawning the bound atom. Default TRUE. + */ +/datum/dynamic_mission/proc/spawn_bound(atom/movable/a_type, a_loc, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) + if(!ispath(a_type, /atom/movable)) + CRASH("[src] attempted to spawn bound atom of invalid type [a_type]!") + var/atom/movable/bound = new a_type(a_loc) + if(sparks) + do_sparks(3, FALSE, get_turf(bound)) + LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) + RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) + return bound + +/** + * Removes the given atom from the mission's bound items, then qdeletes it. + * Does not invoke the callback or fail the mission; optionally creates sparks. + * + * Arguments: + * * bound - The bound atom to recall. + * * sparks - Whether to spawn sparks on the turf the bound atom is located on. Default TRUE. + */ +/datum/dynamic_mission/proc/recall_bound(atom/movable/bound, sparks = TRUE) + if(sparks) + do_sparks(3, FALSE, get_turf(bound)) + remove_bound(bound) + qdel(bound) + +/// Signal handler for the qdeletion of bound atoms. +/datum/dynamic_mission/proc/bound_deleted(atom/movable/bound, force) + SIGNAL_HANDLER + var/list/bound_info = bound_atoms[bound] + // first value in bound_info is whether to fail on item destruction + failed = bound_info[1] + // second value is callback to fire on atom destruction + if(bound_info[2] != null) + var/datum/callback/CB = bound_info[2] + CB.Invoke() + remove_bound(bound) + +/** + * Removes the given bound atom from the list of bound atoms. + * Does not invoke the associated callback or fail the mission. + * + * Arguments: + * * bound - The bound atom to remove. + */ +/datum/dynamic_mission/proc/remove_bound(atom/movable/bound) + UnregisterSignal(bound, COMSIG_PARENT_QDELETING) + // delete the callback + qdel(LAZYACCESSASSOC(bound_atoms, bound, 2)) + // remove info from our list + LAZYREMOVE(bound_atoms, bound) + +/obj/effect/landmark/mission_poi + +/obj/effect/landmark/mission_poi/Initialize() + . = ..() + SSmissions.unallocated_pois += list(src) + +/obj/effect/landmark/mission_poi/Destroy() + SSmissions.unallocated_pois -= src + . = ..() + diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm new file mode 100644 index 000000000000..b5daa36c5fed --- /dev/null +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -0,0 +1,25 @@ +/obj/effect/landmark/mission_poi/guard + +/datum/dynamic_mission/simple/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/dynamic_mission/simple/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) + for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) + if((!required_item) && mission_poi.type == setpiece_poi) + required_item = new setpiece_item(mission_poi.loc) + RegisterSignal(required_item, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + qdel(mission_poi) + if(mission_poi.type == guard_poi) + guard_list += list(spawn_guard(mission_poi)) + + if(!required_item) + CRASH("[src] was unable to find its required landmark") + +/datum/dynamic_mission/simple/guarded/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) + var/guard = new guard_type(guard_poi.loc) + qdel(guard_poi) + return guard diff --git a/code/modules/dynamic_missions/missions/guarded/nt_files.dm b/code/modules/dynamic_missions/missions/guarded/nt_files.dm new file mode 100644 index 000000000000..66a585965536 --- /dev/null +++ b/code/modules/dynamic_missions/missions/guarded/nt_files.dm @@ -0,0 +1,14 @@ +/obj/effect/landmark/mission_poi/nt_files + +/datum/dynamic_mission/simple/guarded/nt_files + name = "NT asset recovery" + desc = "We lost some really important files and we cant send the real guys in can you handle it?" + 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/dynamic_mission/simple/guarded/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 = new guard_type(guard_poi.loc) + qdel(guard_poi) + return guard diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm new file mode 100644 index 000000000000..c331ba0f3209 --- /dev/null +++ b/code/modules/dynamic_missions/missions/simple.dm @@ -0,0 +1,20 @@ +/datum/dynamic_mission/simple + name = "Item recovery" + desc = "Retrive this thing for us and we will pay you" + var/setpiece_poi + var/setpiece_item + var/required_item + +/datum/dynamic_mission/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) + required_item = new setpiece_item(mission_poi.loc) + RegisterSignal(required_item, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + qdel(mission_poi) + return + CRASH("[src] was unable to find its required landmark") + +/datum/dynamic_mission/simple/can_turn_in(atom/movable/item_to_check) + if(item_to_check == required_item) + return TRUE + diff --git a/code/modules/dynamic_missions/missions/simple/blackbox.dm b/code/modules/dynamic_missions/missions/simple/blackbox.dm new file mode 100644 index 000000000000..ad831fc9e89e --- /dev/null +++ b/code/modules/dynamic_missions/missions/simple/blackbox.dm @@ -0,0 +1,7 @@ +/datum/dynamic_mission/simple/blackbox + name = "Blackbox recovery" + setpiece_poi = /obj/effect/landmark/mission_poi/blackbox + setpiece_item = /obj/item/blackbox + required_item + +/obj/effect/landmark/mission_poi/blackbox diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 1fbc033e0309..6abc6d9e5195 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -27,10 +27,10 @@ var/ruin_type ///Preditermined ruin made when the overmap is first created var/selected_ruin - ///Fetched before anything is loaded from the ruin datum, used for missions - var/mission_pois + ///Fetched before anything is loaded from the ruin datum + var/dynamic_missions ///The list of mission pois once the planet has acctually loaded the ruin - var/spawned_mission_pois + var/list/obj/effect/landmark/mission_poi/spawned_mission_pois /// list of ruins and their target turf, indexed by name var/list/ruin_turfs /// list of ruin templates currently spawned on the planet. @@ -158,6 +158,10 @@ // use the ruin type in template if it exists, or pick from ruin list if IT exists; otherwise null selected_ruin = template || (ruin_type ? pickweightAllowZero(SSmapping.ruin_types_probabilities[ruin_type]) : null) + var/datum/map_template/ruin/used_ruin = ispath(selected_ruin) ? (new selected_ruin()) : selected_ruin + if(istype(used_ruin)) + for(var/mission_type in used_ruin.dynamic_mission_types) + dynamic_missions += new mission_type(src) if(vlevel_height >= 255 && vlevel_width >= 255) //little easter egg planet_name = "LV-[pick(rand(11111,99999))]" @@ -210,6 +214,7 @@ spawned_ruins = dynamic_encounter_values[4] spawned_mission_pois = dynamic_encounter_values[5] + SEND_SIGNAL(src, COMSIG_OVERMAP_LOADED) loading = FALSE return TRUE diff --git a/code/modules/overmap/objects/outpost/outpost.dm b/code/modules/overmap/objects/outpost/outpost.dm index a34e637e24d7..9528cccdfdef 100644 --- a/code/modules/overmap/objects/outpost/outpost.dm +++ b/code/modules/overmap/objects/outpost/outpost.dm @@ -42,6 +42,8 @@ /// List of missions that can be accepted at this outpost. Missions which have been accepted are removed from this list. var/list/datum/mission/missions + var/list/datum/dynamic_mission/dynamic_missions + /datum/overmap/outpost/Initialize(position, ...) . = ..() // init our template vars with the correct singletons diff --git a/shiptest.dme b/shiptest.dme index 8c930d951d26..5390fa26f987 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -163,7 +163,7 @@ #include "code\__DEFINES\dcs\helpers.dm" #include "code\__DEFINES\dcs\signals\signals.dm" #include "code\__DEFINES\dcs\signals\signals_mod.dm" -#include "code\__DEFINES\dcs\signals\signals_ship.dm" +#include "code\__DEFINES\dcs\signals\signals_overmap.dm" #include "code\__DEFINES\dcs\signals\signals_storage.dm" #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_carbon.dm" #include "code\__DEFINES\dcs\signals\signals_obj\signals_object.dm" @@ -357,6 +357,7 @@ #include "code\controllers\subsystem\mapping.dm" #include "code\controllers\subsystem\materials.dm" #include "code\controllers\subsystem\metrics.dm" +#include "code\controllers\subsystem\missions.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\moods.dm" #include "code\controllers\subsystem\mouse_entered.dm" @@ -1868,7 +1869,6 @@ #include "code\modules\awaymissions\mission_code\undergroundoutpost45.dm" #include "code\modules\balloon_alert\balloon_alert.dm" #include "code\modules\bounties\bounty_machine.dm" -#include "code\modules\bounties\mission_markers.dm" #include "code\modules\bounties\missions.dm" #include "code\modules\bounties\missions\acquire_mission.dm" #include "code\modules\bounties\missions\flavor_text.dm" @@ -2082,6 +2082,11 @@ #include "code\modules\disks\disk.dm" #include "code\modules\donator\_donator.dm" #include "code\modules\donator\ianthewanderer.dm" +#include "code\modules\dynamic_missions\mission.dm" +#include "code\modules\dynamic_missions\missions\guarded.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\simple\blackbox.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm" From ac6903b4a53f44edadda5f5a0247a26f53708ade Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 24 Sep 2024 17:34:41 -0500 Subject: [PATCH 17/77] alot of stuff related to dynamic missions --- .../JungleRuins/jungle_syndicate.dmm | 4 + code/controllers/subsystem/faction.dm | 10 +++ code/datums/ruins/jungle.dm | 1 + .../circuitboards/computer_circuitboards.dm | 7 +- .../circuitboards/machine_circuitboards.dm | 5 -- code/modules/bounties/bounty_machine.dm | 52 ------------ code/modules/bounties/bounty_pad.dm | 36 -------- code/modules/dynamic_missions/mission.dm | 21 ++++- .../modules/dynamic_missions/mission_board.dm | 19 +++++ .../dynamic_missions/missions/guarded.dm | 6 +- .../missions/guarded/nt_files.dm | 10 ++- .../dynamic_missions/missions/simple.dm | 3 +- .../missions/simple/blackbox.dm | 1 + .../overmap/objects/outpost/outpost.dm | 6 +- icons/effects/mission_poi.dmi | Bin 0 -> 1096 bytes shiptest.dme | 2 +- .../tgui/interfaces/MissionBoard/index.tsx | 80 ++++++++++++++++++ .../tgui/interfaces/MissionBoard/types.ts | 20 +++++ 18 files changed, 176 insertions(+), 107 deletions(-) delete mode 100644 code/modules/bounties/bounty_machine.dm delete mode 100644 code/modules/bounties/bounty_pad.dm create mode 100644 code/modules/dynamic_missions/mission_board.dm create mode 100644 icons/effects/mission_poi.dmi create mode 100644 tgui/packages/tgui/interfaces/MissionBoard/index.tsx create mode 100644 tgui/packages/tgui/interfaces/MissionBoard/types.ts diff --git a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm index 2eba13537777..1fc59835638f 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm @@ -56,6 +56,7 @@ /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table, /obj/item/storage/cans/sixbeer, +/obj/effect/landmark/mission_poi/nt_files, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "bS" = ( @@ -154,6 +155,7 @@ /area/ruin/jungle/syndifort) "eU" = ( /obj/structure/chair/plastic, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "eW" = ( @@ -762,6 +764,7 @@ /obj/structure/sign/poster/contraband/peacemaker{ pixel_x = 32 }, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "xm" = ( @@ -941,6 +944,7 @@ "BC" = ( /obj/structure/chair/plastic, /obj/machinery/light/small/directional/north, +/obj/effect/landmark/mission_poi/guard, /turf/open/floor/plating/rust, /area/ruin/jungle/syndifort) "BH" = ( diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm index 106fb4687b83..258ee273e9ae 100644 --- a/code/controllers/subsystem/faction.dm +++ b/code/controllers/subsystem/faction.dm @@ -30,3 +30,13 @@ SUBSYSTEM_DEF(factions) if(faction.type == path) return faction stack_trace("we did not return any faction with path [path]") + +/datum/controller/subsystem/factions/proc/faction_name(path_or_type) + var/datum/faction/faction + if(istype(path_or_type, /datum/faction)) + faction = path_or_type + else if(ispath(path_or_type)) + faction = faction_path_to_datum(path_or_type) + else + return "Unknown Faction" + return faction.name diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index faaefea4fd8b..246880691dfb 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -10,6 +10,7 @@ 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/dynamic_mission/simple/guarded/nt_files) /datum/map_template/ruin/jungle/interceptor name = "Old Crashed Interceptor" diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 878d839ade6a..08997d700c98 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -359,7 +359,12 @@ /obj/item/circuitboard/computer/bounty name = "\improper Outpost Bounty Console (Computer Board)" icon_state = "supply" - build_path = /obj/machinery/computer/bounty + build_path = /obj/machinery/computer/mission + +/obj/item/circuitboard/computer/mission + name = "\improper Outpost Mission Console" + icon_state = "supply" + build_path = /obj/machinery/computer/mission /obj/item/circuitboard/computer/cargo name = "Outpost Comms Console (Computer Board)" diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 9294408d3c98..af7addd21a95 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1381,11 +1381,6 @@ /obj/item/stock_parts/scanning_module = 2, /obj/item/stock_parts/micro_laser = 2) -/obj/item/circuitboard/machine/bountypad - name = "\improper Outpost Bounty Pad (Computer Board)" - icon_state = "supply" - build_path = /obj/machinery/bounty_pad - /obj/item/circuitboard/machine/abductor name = "alien board (Report This)" icon_state = "abductor_mod" diff --git a/code/modules/bounties/bounty_machine.dm b/code/modules/bounties/bounty_machine.dm deleted file mode 100644 index 84b91fc1a355..000000000000 --- a/code/modules/bounties/bounty_machine.dm +++ /dev/null @@ -1,52 +0,0 @@ -/obj/machinery/computer/bounty - name = "\improper Outpost bounty console" - desc = "Used to check and claim bounties offered by the outpost" - icon_screen = "bounty" - circuit = /obj/item/circuitboard/computer/bounty - light_color = COLOR_BRIGHT_ORANGE - ///Reference to the specific pad that the control computer is linked up to. - var/datum/weakref/pad_ref - -/obj/machinery/computer/bounty/multitool_act(mob/living/user, obj/item/multitool/I) - . = ..() - if (istype(I) && istype(I.buffer,/obj/machinery/bounty_pad)) - to_chat(user, span_notice("You link [src] with [I.buffer] in [I] buffer.")) - pad_ref = WEAKREF(I.buffer) - return TRUE - -//Pad & Pad Terminal -/obj/machinery/bounty_pad - name = "cargo hold pad" - icon_state = "laserboxb0f" - ///This is the icon_state that this telepad uses when it's not in use. - var/idle_state = "laserboxb0" - ///This is the icon_state that this telepad uses when it's warming up for goods teleportation. - var/warmup_state = "laserbox_open" - ///This is the icon_state to flick when the goods are being sent off by the telepad. - var/sending_state = "laserbox_vend" - ///This is the cargo hold ID used by the bounty_control. Match these two to link them together. - var/cargo_hold_id - layer = TABLE_LAYER - resistance_flags = FIRE_PROOF - circuit = /obj/item/circuitboard/machine/bountypad - var/cooldown_reduction = 0 - -/obj/machinery/bounty_pad/multitool_act(mob/living/user, obj/item/multitool/I) - . = ..() - if (istype(I)) - I.buffer = src - balloon_alert(user, "saved to multitool buffer") - return TRUE - -/obj/machinery/bounty_pad/screwdriver_act(mob/living/user, obj/item/tool) - . = ..() - if(!.) - return default_deconstruction_screwdriver(user, warmup_state, idle_state, tool) - -/obj/machinery/bounty_pad/crowbar_act(mob/living/user, obj/item/tool) - . = ..() - if(!.) - return default_deconstruction_crowbar(tool) - -/obj/machinery/bounty_pad/proc/get_cooldown_reduction() - return cooldown_reduction diff --git a/code/modules/bounties/bounty_pad.dm b/code/modules/bounties/bounty_pad.dm deleted file mode 100644 index 340d30ed9fab..000000000000 --- a/code/modules/bounties/bounty_pad.dm +++ /dev/null @@ -1,36 +0,0 @@ -//Pad & Pad Terminal -/obj/machinery/bounty - name = "cargo hold pad" - icon_state = "laserboxb0" - ///This is the icon_state that this telepad uses when it's not in use. - var/idle_state = "laserboxb0" - ///This is the icon_state that this telepad uses when it's warming up for goods teleportation. - var/warmup_state = "laserbox_open" - ///This is the icon_state to flick when the goods are being sent off by the telepad. - var/sending_state = "laserbox_vend" - ///This is the cargo hold ID used by the bounty_control. Match these two to link them together. - var/cargo_hold_id - layer = TABLE_LAYER - resistance_flags = FIRE_PROOF - circuit = /obj/item/circuitboard/machine/bountypad - var/cooldown_reduction = 0 - -/obj/machinery/bounty/multitool_act(mob/living/user, obj/item/multitool/I) - . = ..() - if (istype(I)) - I.buffer = src - balloon_alert(user, "saved to multitool buffer") - return TRUE - -/obj/machinery/bounty/screwdriver_act(mob/living/user, obj/item/tool) - . = ..() - if(!.) - return default_deconstruction_screwdriver(user, warmup_state, idle_state, tool) - -/obj/machinery/bounty/crowbar_act(mob/living/user, obj/item/tool) - . = ..() - if(!.) - return default_deconstruction_crowbar(tool) - -/obj/machinery/bounty/proc/get_cooldown_reduction() - return cooldown_reduction diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 849bd28fcd2b..7b2df78ddca0 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -1,6 +1,8 @@ /datum/dynamic_mission var/name = "Mission" + var/author = "" var/desc = "Do something for me." + var/faction = /datum/faction/independent var/value = 1000 /// The mission's payout. var/duration = 45 MINUTES /// The amount of time in which to complete the mission. var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. @@ -39,10 +41,9 @@ //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) - return ..() -/datum/dynamic_mission/proc/on_vital_delete() - qdel(src) + generate_mission_details() + return ..() /datum/dynamic_mission/Destroy() //UnregisterSignal(source_outpost, COMSIG_PARENT_QDELETING) @@ -58,9 +59,17 @@ deltimer(dur_timer) return ..() +/datum/dynamic_mission/proc/on_vital_delete() + qdel(src) + +/datum/dynamic_mission/proc/generate_mission_details() + author = random_species_name() + return + /datum/dynamic_mission/proc/start_mission() SSmissions.inactive_missions -= src active = TRUE + dur_timer = addtimer(VARSET_CALLBACK(src, failed, TRUE), duration, TIMER_STOPPABLE) SSmissions.active_missions += src /datum/dynamic_mission/proc/on_planet_load(datum/overmap/dynamic/planet) @@ -98,7 +107,11 @@ return list( "ref" = REF(src), "name" = src.name, + "author" = src.author, "desc" = src.desc, + "faction" = SSfactions.faction_name(src.faction), + "x" = mission_location.x, + "y" = mission_location.y, "value" = src.value, "duration" = src.duration, "remaining" = time_remaining, @@ -175,6 +188,8 @@ LAZYREMOVE(bound_atoms, bound) /obj/effect/landmark/mission_poi + icon = 'icons/effects/mission_poi.dmi' + icon_state = "main_thingy" /obj/effect/landmark/mission_poi/Initialize() . = ..() diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm new file mode 100644 index 000000000000..bed9ba7d3918 --- /dev/null +++ b/code/modules/dynamic_missions/mission_board.dm @@ -0,0 +1,19 @@ +/obj/machinery/computer/mission + name = "\improper Outpost mission board" + desc = "Used to check and claim missions offered by the outpost" + icon_screen = "bounty" + circuit = /obj/item/circuitboard/computer/mission + light_color = COLOR_BRIGHT_ORANGE + +/obj/machinery/computer/mission/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "MissionBoard", name) + ui.open() + +/obj/machinery/computer/mission/ui_data(mob/user) + var/list/data = list() + data["missions"] = list() + for(var/datum/dynamic_mission/M as anything in SSmissions.active_missions) + data["missions"] += list(M.get_tgui_info()) + return data diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index b5daa36c5fed..40d6c5ff1ea6 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -1,4 +1,5 @@ /obj/effect/landmark/mission_poi/guard + icon_state = "guard" /datum/dynamic_mission/simple/guarded name = "Item recovery(with friends)" @@ -10,8 +11,7 @@ /datum/dynamic_mission/simple/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if((!required_item) && mission_poi.type == setpiece_poi) - required_item = new setpiece_item(mission_poi.loc) - RegisterSignal(required_item, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + required_item = spawn_bound(setpiece_item, mission_poi.loc, null, TRUE, TRUE) qdel(mission_poi) if(mission_poi.type == guard_poi) guard_list += list(spawn_guard(mission_poi)) @@ -19,7 +19,7 @@ if(!required_item) CRASH("[src] was unable to find its required landmark") -/datum/dynamic_mission/simple/guarded/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) +/datum/dynamic_mission/simple/guarded/proc/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) var/guard = new guard_type(guard_poi.loc) qdel(guard_poi) return guard diff --git a/code/modules/dynamic_missions/missions/guarded/nt_files.dm b/code/modules/dynamic_missions/missions/guarded/nt_files.dm index 66a585965536..faa864cb1da2 100644 --- a/code/modules/dynamic_missions/missions/guarded/nt_files.dm +++ b/code/modules/dynamic_missions/missions/guarded/nt_files.dm @@ -1,13 +1,19 @@ /obj/effect/landmark/mission_poi/nt_files + icon_state = "main_docs" /datum/dynamic_mission/simple/guarded/nt_files name = "NT asset recovery" - desc = "We lost some really important files and we cant send the real guys in can you handle it?" + 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/dynamic_mission/simple/guarded/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) +/datum/dynamic_mission/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/dynamic_mission/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 = new guard_type(guard_poi.loc) qdel(guard_poi) diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm index c331ba0f3209..944affc5b0ef 100644 --- a/code/modules/dynamic_missions/missions/simple.dm +++ b/code/modules/dynamic_missions/missions/simple.dm @@ -8,8 +8,7 @@ /datum/dynamic_mission/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) - required_item = new setpiece_item(mission_poi.loc) - RegisterSignal(required_item, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + required_item = spawn_bound(setpiece_item, mission_poi.loc, null, TRUE, TRUE) qdel(mission_poi) return CRASH("[src] was unable to find its required landmark") diff --git a/code/modules/dynamic_missions/missions/simple/blackbox.dm b/code/modules/dynamic_missions/missions/simple/blackbox.dm index ad831fc9e89e..edf2d2254df4 100644 --- a/code/modules/dynamic_missions/missions/simple/blackbox.dm +++ b/code/modules/dynamic_missions/missions/simple/blackbox.dm @@ -5,3 +5,4 @@ required_item /obj/effect/landmark/mission_poi/blackbox + icon_state = "main_blackbox" diff --git a/code/modules/overmap/objects/outpost/outpost.dm b/code/modules/overmap/objects/outpost/outpost.dm index 9528cccdfdef..0d74691deb16 100644 --- a/code/modules/overmap/objects/outpost/outpost.dm +++ b/code/modules/overmap/objects/outpost/outpost.dm @@ -118,6 +118,9 @@ // Shamelessly cribbed from how Elite: Dangerous does station names. /datum/overmap/outpost/proc/gen_outpost_name() + return "[random_species_name()] [pick(GLOB.station_suffixes)]" + +/proc/random_species_name() var/person_name if(prob(40)) // fun fact: "Hutton" is in last_names @@ -132,8 +135,7 @@ person_name = kepori_name() if(4) person_name = vox_name() - - return "[person_name] [pick(GLOB.station_suffixes)]" + return person_name /datum/overmap/outpost/proc/fill_missions() while(LAZYLEN(missions) < max_missions) diff --git a/icons/effects/mission_poi.dmi b/icons/effects/mission_poi.dmi new file mode 100644 index 0000000000000000000000000000000000000000..82de250c3162d3838d0f4c7d410ea2e8e0dcb26a GIT binary patch literal 1096 zcmV-O1h@N%P)@q5%OTA|^sXM0EfF7#A5lJUll! zVIUnqQ)7S*2^VN+Xh}&)K|nwi6%{%OLJUsvZ|6E&JDJdx$85>GUN*EXzPEAoV zDI7*RCl(eKD=RAi002=#EHo`59vKpFUP4JdDGdz`Iyg8H5fL379X2*LBqSsp92}8Y zutop?00DGTPE!Ct=GbNc005ABR9JLGWpiV4X>fFDZ*Bkpc$`yKaB_9`^iy#0_2eo` zEh^5;&r`5fFwryM;w;ZhDainGjE%TBGg33tGfE(w;*!LYR3K9+H!(9Wz9b_vFI|a? zGbOXA7$|7S#hF%=n41b=!<80irlb<76l`izPGWL)Qho(-s#EfliwUYsFHI~;!KF%B z!PU&Cy$pkg5-aZ!qRT-YmB3N+3TIY3%U>j1EeQLP?X(k9hp9<_b8mmoY>;4?-TkgjP<1}&Wt-ogIsiW(9A;1eTk0)n%!$bk5M4Zxrb5P<)=<6S`f0sxo3 zuK>7;q6iG&8eRPc2!qowhzmeG{T!FHJ&N~`mcI32LYLX3+Hi6lH0q*VsUr-oy02s#J1T&rtJ2n*agg= zJtX%J5P!H&RNRG1Yc(4m{*Wwre7S7^$^6Okk;fmG+Xm!HGC++C@cnogu=N z{zy}j!nH8~^X8Ohv`W)w06eGZsu}_ literal 0 HcmV?d00001 diff --git a/shiptest.dme b/shiptest.dme index 5390fa26f987..ddd9732557de 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1868,7 +1868,6 @@ #include "code\modules\awaymissions\mission_code\stationCollision.dm" #include "code\modules\awaymissions\mission_code\undergroundoutpost45.dm" #include "code\modules\balloon_alert\balloon_alert.dm" -#include "code\modules\bounties\bounty_machine.dm" #include "code\modules\bounties\missions.dm" #include "code\modules\bounties\missions\acquire_mission.dm" #include "code\modules\bounties\missions\flavor_text.dm" @@ -2083,6 +2082,7 @@ #include "code\modules\donator\_donator.dm" #include "code\modules\donator\ianthewanderer.dm" #include "code\modules\dynamic_missions\mission.dm" +#include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\missions\guarded.dm" #include "code\modules\dynamic_missions\missions\simple.dm" #include "code\modules\dynamic_missions\missions\guarded\nt_files.dm" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx new file mode 100644 index 000000000000..9c31835650f3 --- /dev/null +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -0,0 +1,80 @@ +import { useBackend, useSharedState } from '../../backend'; +import { + ProgressBar, + Section, + Tabs, + Button, + LabeledList, + Box, + Stack, +} from '../../components'; +import { Window } from '../../layouts'; + +import { Mission, Data } from './types'; + +export const MissionBoard = (props, context) => { + const { act, data } = useBackend(context); + const {} = data; + return ( + + + + + + ); +}; + +const MissionsContent = (props, context) => { + const { data } = useBackend(context); + const { missions } = data; + return ( +
+ +
+ ); +}; + +const MissionsList = (props, context) => { + const missionsArray = props.missions as Array; + const { act } = useBackend(context); + + const missionValues = (mission: Mission) => ( + + + + {`${mission.value} cr`} + + + + + + + + ); + + const missionJSX = missionsArray.map((mission: Mission) => ( +
+ + {mission.x} + {','} + {mission.y} + + {mission.author} + {mission.faction} + {mission.desc} + + {missionValues(mission)} + + +
+ )); + + return <>{missionJSX}; +}; diff --git a/tgui/packages/tgui/interfaces/MissionBoard/types.ts b/tgui/packages/tgui/interfaces/MissionBoard/types.ts new file mode 100644 index 000000000000..99d8072f3428 --- /dev/null +++ b/tgui/packages/tgui/interfaces/MissionBoard/types.ts @@ -0,0 +1,20 @@ +export type Data = { + missions: Array; +}; + + +export type Mission = { + ref: string; + actStr: string; + name: string; + author: string; + desc: string; + faction: string; + x: number; + y: number; + progressStr: string; + value: number; + remaining: number; + duration: number; + timeStr: string; +}; From c808e4e788566ef0dcdcea8969427fd65a5a65dc Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 24 Sep 2024 17:47:37 -0500 Subject: [PATCH 18/77] ui tweaks --- .../missions => dynamic_missions}/flavor_text.dm | 0 shiptest.dme | 2 +- tgui/packages/tgui/interfaces/MissionBoard/index.tsx | 12 ++++++------ 3 files changed, 7 insertions(+), 7 deletions(-) rename code/modules/{bounties/missions => dynamic_missions}/flavor_text.dm (100%) diff --git a/code/modules/bounties/missions/flavor_text.dm b/code/modules/dynamic_missions/flavor_text.dm similarity index 100% rename from code/modules/bounties/missions/flavor_text.dm rename to code/modules/dynamic_missions/flavor_text.dm diff --git a/shiptest.dme b/shiptest.dme index ddd9732557de..b099dcaa7fe1 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1870,7 +1870,6 @@ #include "code\modules\balloon_alert\balloon_alert.dm" #include "code\modules\bounties\missions.dm" #include "code\modules\bounties\missions\acquire_mission.dm" -#include "code\modules\bounties\missions\flavor_text.dm" #include "code\modules\buildmode\bm_mode.dm" #include "code\modules\buildmode\buildmode.dm" #include "code\modules\buildmode\buttons.dm" @@ -2081,6 +2080,7 @@ #include "code\modules\disks\disk.dm" #include "code\modules\donator\_donator.dm" #include "code\modules\donator\ianthewanderer.dm" +#include "code\modules\dynamic_missions\flavor_text.dm" #include "code\modules\dynamic_missions\mission.dm" #include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\missions\guarded.dm" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 9c31835650f3..db390cb557a7 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -60,20 +60,20 @@ const MissionsList = (props, context) => { ); const missionJSX = missionsArray.map((mission: Mission) => ( -
- + + {mission.x} {','} {mission.y} - {mission.author} - {mission.faction} - {mission.desc} + {mission.author} + {mission.faction} + {mission.desc} {missionValues(mission)} -
+ )); return <>{missionJSX}; From 207c19f3559cbbb005f491bf383680eadbe4e4cb Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 26 Sep 2024 15:44:33 -0500 Subject: [PATCH 19/77] tweaks to ui to return a proc instead of pure cr value --- code/modules/dynamic_missions/mission.dm | 30 +++++++++++-------- .../tgui/interfaces/MissionBoard/index.tsx | 27 ++++++----------- .../tgui/interfaces/MissionBoard/types.ts | 2 +- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 7b2df78ddca0..c46de4ee5300 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -4,9 +4,13 @@ var/desc = "Do something for me." var/faction = /datum/faction/independent var/value = 1000 /// The mission's payout. - var/duration = 45 MINUTES /// The amount of time in which to complete the mission. + var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. + /// The outpost that issued this mission. Passed in New(). + //var/datum/overmap/outpost/source_outpost + var/datum/overmap/mission_location + /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. @@ -14,9 +18,7 @@ /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 - /// The outpost that issued this mission. Passed in New(). - //var/datum/overmap/outpost/source_outpost - var/datum/overmap/mission_location + var/active = FALSE var/failed = FALSE @@ -28,12 +30,12 @@ var/list/atom/movable/bound_atoms /datum/dynamic_mission/New(_location) - var/old_dur = duration - var/val_mod = value * val_mod_range - var/dur_mod = duration * dur_mod_range - // new duration is between - duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) - value = round(rand(value-val_mod, value+val_mod) * (dur_value_scaling ? old_dur / duration : 1), 50) + if(duration) + var/old_dur = duration + var/val_mod = value * val_mod_range + var/dur_mod = duration * dur_mod_range + duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) + value = round(rand(value-val_mod, value+val_mod) * (dur_value_scaling ? old_dur / duration : 1), 50) //source_outpost = _outpost mission_location = _location @@ -69,7 +71,8 @@ /datum/dynamic_mission/proc/start_mission() SSmissions.inactive_missions -= src active = TRUE - dur_timer = addtimer(VARSET_CALLBACK(src, failed, TRUE), duration, TIMER_STOPPABLE) + if(duration) + dur_timer = addtimer(VARSET_CALLBACK(src, failed, TRUE), duration, TIMER_STOPPABLE) SSmissions.active_missions += src /datum/dynamic_mission/proc/on_planet_load(datum/overmap/dynamic/planet) @@ -112,7 +115,7 @@ "faction" = SSfactions.faction_name(src.faction), "x" = mission_location.x, "y" = mission_location.y, - "value" = src.value, + "rewards" = src.reward_flavortext(), "duration" = src.duration, "remaining" = time_remaining, "timeStr" = time2text(time_remaining, "mm:ss"), @@ -187,6 +190,9 @@ // remove info from our list LAZYREMOVE(bound_atoms, bound) +/datum/dynamic_mission/proc/reward_flavortext() + return "[value] cr upon completion" + /obj/effect/landmark/mission_poi icon = 'icons/effects/mission_poi.dmi' icon_state = "main_thingy" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index db390cb557a7..32831ad6c41d 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -39,24 +39,14 @@ const MissionsList = (props, context) => { const { act } = useBackend(context); const missionValues = (mission: Mission) => ( - - - - {`${mission.value} cr`} - - - - - - - + ); const missionJSX = missionsArray.map((mission: Mission) => ( @@ -70,6 +60,7 @@ const MissionsList = (props, context) => { {mission.faction} {mission.desc} + {mission.rewards} {missionValues(mission)} diff --git a/tgui/packages/tgui/interfaces/MissionBoard/types.ts b/tgui/packages/tgui/interfaces/MissionBoard/types.ts index 99d8072f3428..4c68d5ab56d7 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/types.ts +++ b/tgui/packages/tgui/interfaces/MissionBoard/types.ts @@ -9,11 +9,11 @@ export type Mission = { name: string; author: string; desc: string; + rewards: string; faction: string; x: number; y: number; progressStr: string; - value: number; remaining: number; duration: number; timeStr: string; From 3d5708cb6dc0cab5f0d41169fa6f630249de52cf Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 26 Sep 2024 19:37:20 -0500 Subject: [PATCH 20/77] alot of small tweaks for rewards ui --- code/__DEFINES/economy.dm | 4 + code/modules/dynamic_missions/mission.dm | 32 +++-- .../modules/dynamic_missions/mission_board.dm | 121 +++++++++++++++++- .../dynamic_missions/missions/simple.dm | 10 +- .../missions/simple/blackbox.dm | 2 +- .../tgui/interfaces/MissionBoard/index.tsx | 93 ++++++++++---- .../tgui/interfaces/MissionBoard/types.ts | 14 +- 7 files changed, 235 insertions(+), 41 deletions(-) diff --git a/code/__DEFINES/economy.dm b/code/__DEFINES/economy.dm index c31bffa08bf3..22dc4789d566 100644 --- a/code/__DEFINES/economy.dm +++ b/code/__DEFINES/economy.dm @@ -14,3 +14,7 @@ #define ACCOUNT_SEC_NAME "Defense Budget" #define NO_FREEBIES "commies go home" + +#define MISSION_REWARD_CASH 0 +#define MISSION_REWARD_ITEMS 1 +#define MISSION_REWARD_REP 2 diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index c46de4ee5300..59edb44bb8eb 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -7,6 +7,7 @@ var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. + var/location_specific = TRUE /// The outpost that issued this mission. Passed in New(). //var/datum/overmap/outpost/source_outpost var/datum/overmap/mission_location @@ -18,8 +19,6 @@ /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 - - var/active = FALSE var/failed = FALSE var/dur_timer @@ -32,9 +31,9 @@ /datum/dynamic_mission/New(_location) if(duration) var/old_dur = duration - var/val_mod = value * val_mod_range var/dur_mod = duration * dur_mod_range duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) + var/val_mod = value * val_mod_range value = round(rand(value-val_mod, value+val_mod) * (dur_value_scaling ? old_dur / duration : 1), 50) //source_outpost = _outpost @@ -68,6 +67,13 @@ author = random_species_name() return +/datum/dynamic_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)]", + ) + /datum/dynamic_mission/proc/start_mission() SSmissions.inactive_missions -= src active = TRUE @@ -100,27 +106,38 @@ /datum/dynamic_mission/proc/can_complete() return !failed -/datum/dynamic_mission/proc/get_tgui_info() +/datum/dynamic_mission/proc/get_tgui_info(var/list/items_on_pad) var/time_remaining = max(dur_timer ? timeleft(dur_timer) : duration, 0) var/act_str = "" if(can_complete()) act_str = "Turn in" + var/can_turn_in = FALSE + var/list/acceptable_items = list() + for(var/atom/movable/item_on_pad in items_on_pad) + if(can_turn_in(item_on_pad)) + acceptable_items += list(item_on_pad.name) + can_turn_in = TRUE + break + return list( "ref" = REF(src), "name" = src.name, "author" = src.author, "desc" = src.desc, + "rewards" = src.reward_flavortext(), "faction" = SSfactions.faction_name(src.faction), + "location" = "X[mission_location.x]/Y[mission_location.y]: [mission_location.name]", "x" = mission_location.x, "y" = mission_location.y, - "rewards" = src.reward_flavortext(), "duration" = src.duration, "remaining" = time_remaining, "timeStr" = time2text(time_remaining, "mm:ss"), "progressStr" = get_progress_string(), - "actStr" = act_str + "actStr" = act_str, + "canTurnIn" = can_turn_in, + "validItems" = acceptable_items ) /datum/dynamic_mission/proc/get_progress_string() @@ -190,9 +207,6 @@ // remove info from our list LAZYREMOVE(bound_atoms, bound) -/datum/dynamic_mission/proc/reward_flavortext() - return "[value] cr upon completion" - /obj/effect/landmark/mission_poi icon = 'icons/effects/mission_poi.dmi' icon_state = "main_thingy" diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index bed9ba7d3918..6622aaf50b87 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -4,6 +4,116 @@ icon_screen = "bounty" circuit = /obj/item/circuitboard/computer/mission light_color = COLOR_BRIGHT_ORANGE + var/datum/weakref/pad_ref + var/obj/item/card/id/inserted_scan_id + var/sending = FALSE + +/obj/machinery/computer/mission/LateInitialize() + . = ..() + var/obj/machinery/mission_pad/pad = locate() in range(4,src) + pad_ref = WEAKREF(pad) + +/obj/machinery/computer/mission/attackby(obj/item/I, mob/living/user, params) + if(isidcard(I)) + if(id_insert(user, I, inserted_scan_id)) + inserted_scan_id = I + return TRUE + return ..() + +/obj/machinery/computer/mission/AltClick(mob/user) + id_eject(user, inserted_scan_id) + return TRUE + +/obj/machinery/computer/mission/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target) + var/obj/item/card/id/card_to_insert = inserting_item + var/holder_item = FALSE + + if(!isidcard(card_to_insert)) + card_to_insert = inserting_item.RemoveID() + holder_item = TRUE + + if(!card_to_insert || !user.transferItemToLoc(card_to_insert, src)) + return FALSE + + if(target) + if(holder_item && inserting_item.InsertID(target)) + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + else + id_eject(user, target) + + user.visible_message(span_notice("[user] inserts \the [card_to_insert] into \the [src]."), + span_notice("You insert \the [card_to_insert] into \the [src].")) + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + ui_interact(user) + return TRUE + +/obj/machinery/computer/mission/proc/id_eject(mob/user, obj/target) + if(!target) + to_chat(user, span_warning("That slot is empty!")) + return FALSE + else + target.forceMove(drop_location()) + if(!issilicon(user) && Adjacent(user)) + user.put_in_hands(target) + user.visible_message(span_notice("[user] gets \the [target] from \the [src]."), \ + span_notice("You get \the [target] from \the [src].")) + playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE) + inserted_scan_id = null + return TRUE + +/// Prepares to sell the items on the pad +/obj/machinery/computer/mission/proc/start_sending() + var/obj/machinery/mission_pad/pad = pad_ref?.resolve() + if(!pad) + pad.audible_message(span_notice("[pad] beeps.")) + return + if(pad?.panel_open) + pad.audible_message(span_notice("[pad] beeps.")) + return + if(sending) + return + sending = TRUE + pad.visible_message(span_notice("[pad] starts charging up.")) + //pad.icon_state = pad.warmup_state + //sending_timer = addtimer(CALLBACK(src, PROC_REF(send)),warmup_time, TIMER_STOPPABLE) + +/obj/machinery/computer/mission/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + var/obj/machinery/mission_pad/pad = pad_ref?.resolve() + if(!pad) + return + //if(!usr.can_perform_action(src) || (machine_stat & (NOPOWER|BROKEN))) + // return + switch(action) + if("recalc") + recalc() + if("send") + var/datum/dynamic_mission/mission = locate(params["mission"]) + if(!istype(mission, /datum/dynamic_mission)) + return + var/option = params["choice"] + turn_in(mission, option) + if("eject") + id_eject(usr, inserted_scan_id) + inserted_scan_id = null + . = TRUE + +/obj/machinery/computer/mission/proc/turn_in(datum/dynamic_mission/mission, choice) + return + +/// Return all items on pad +/obj/machinery/computer/mission/proc/recalc() + var/obj/machinery/mission_pad/pad = pad_ref?.resolve() + var/list/items_to_check = list() + for(var/atom/movable/item_on_pad as anything in get_turf(pad)) + if(item_on_pad == pad) + continue + items_to_check += list(item_on_pad) + //show_message(item_on_pad) + if(items_to_check.len) + return items_to_check /obj/machinery/computer/mission/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -14,6 +124,15 @@ /obj/machinery/computer/mission/ui_data(mob/user) var/list/data = list() data["missions"] = list() + var/list/items_on_pad = recalc() for(var/datum/dynamic_mission/M as anything in SSmissions.active_missions) - data["missions"] += list(M.get_tgui_info()) + data["missions"] += list(M.get_tgui_info(items_on_pad)) + data["pad"] = pad_ref?.resolve() ? TRUE : FALSE + data["id_inserted"] = inserted_scan_id ? TRUE : FALSE + data["sending"] = sending return data + +/obj/machinery/mission_pad + name = "\improper Outpost mission turn-in pad" + icon = 'icons/obj/telescience.dmi' + icon_state = "lpad-idle-o" diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm index 944affc5b0ef..14de8a10f035 100644 --- a/code/modules/dynamic_missions/missions/simple.dm +++ b/code/modules/dynamic_missions/missions/simple.dm @@ -3,7 +3,7 @@ desc = "Retrive this thing for us and we will pay you" var/setpiece_poi var/setpiece_item - var/required_item + var/atom/movable/required_item /datum/dynamic_mission/simple/spawn_mission_setpiece(datum/overmap/dynamic/planet) for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) @@ -14,6 +14,8 @@ CRASH("[src] was unable to find its required landmark") /datum/dynamic_mission/simple/can_turn_in(atom/movable/item_to_check) - if(item_to_check == required_item) - return TRUE - + if(istype(required_item)) + if(item_to_check == required_item) + return TRUE + 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 index edf2d2254df4..47284891340b 100644 --- a/code/modules/dynamic_missions/missions/simple/blackbox.dm +++ b/code/modules/dynamic_missions/missions/simple/blackbox.dm @@ -1,8 +1,8 @@ /datum/dynamic_mission/simple/blackbox name = "Blackbox recovery" + desc = "Recover one of our lost blackboxes from the location at this planet. We've pinged its location to a local ruin." setpiece_poi = /obj/effect/landmark/mission_poi/blackbox setpiece_item = /obj/item/blackbox - required_item /obj/effect/landmark/mission_poi/blackbox icon_state = "main_blackbox" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 32831ad6c41d..1457fb1af3c8 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -2,15 +2,14 @@ import { useBackend, useSharedState } from '../../backend'; import { ProgressBar, Section, - Tabs, Button, LabeledList, Box, - Stack, + AnimatedNumber, } from '../../components'; import { Window } from '../../layouts'; -import { Mission, Data } from './types'; +import { Mission, Data, Reward } from './types'; export const MissionBoard = (props, context) => { const { act, data } = useBackend(context); @@ -25,10 +24,35 @@ export const MissionBoard = (props, context) => { }; const MissionsContent = (props, context) => { - const { data } = useBackend(context); - const { missions } = data; + const { act, data } = useBackend(context); + const { missions, pad, id_inserted, sending } = data; return ( -
+
+
); @@ -36,7 +60,8 @@ const MissionsContent = (props, context) => { const MissionsList = (props, context) => { const missionsArray = props.missions as Array; - const { act } = useBackend(context); + const { act, data } = useBackend(context); + const { pad, id_inserted, sending } = data; const missionValues = (mission: Mission) => ( { > ); - const missionJSX = missionsArray.map((mission: Mission) => ( - - - {mission.x} - {','} - {mission.y} - - {mission.author} - {mission.faction} - {mission.desc} - - {mission.rewards} - {missionValues(mission)} - - - - )); + const missionJSX = missionsArray.map((mission: Mission) => { + const { ref, name, author, desc, rewards = [], faction, location, x, y, duration, remaining, timeStr, progressStr, actStr, canTurnIn, validItems} = mission; + const rewardKeys = Object.keys(rewards); + return ( + + {name} + + {location} + + {author} + {faction} + {desc} + + {rewardKeys.map((rewardKey: string) => ( + + ))} + + {duration ? missionValues(mission) : 'No time limit'} + + {validItems.map((validItem: string) => ( + {validItem} + ))} + + + + ); + }); return <>{missionJSX}; }; diff --git a/tgui/packages/tgui/interfaces/MissionBoard/types.ts b/tgui/packages/tgui/interfaces/MissionBoard/types.ts index 4c68d5ab56d7..4c10ded84360 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/types.ts +++ b/tgui/packages/tgui/interfaces/MissionBoard/types.ts @@ -1,20 +1,30 @@ export type Data = { missions: Array; + pad: Boolean; + id_inserted: Boolean; + sending: Boolean; }; - export type Mission = { ref: string; actStr: string; name: string; author: string; desc: string; - rewards: string; + rewards: Reward[]; faction: string; + location: string; x: number; y: number; progressStr: string; remaining: number; duration: number; timeStr: string; + canTurnIn: Boolean; + validItems: Array; +}; + +export type Reward = { + key: string; + text: string; }; From a0e7aa6ca6b36fd1fbaa90113718d2d2f456a24b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 27 Sep 2024 11:51:02 -0500 Subject: [PATCH 21/77] tweaks to allow a bit more leway in what we use as a poi item --- code/modules/dynamic_missions/mission.dm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 59edb44bb8eb..d8e53cb2b9c6 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -210,6 +210,10 @@ /obj/effect/landmark/mission_poi icon = 'icons/effects/mission_poi.dmi' icon_state = "main_thingy" + ///Assume the item we want is included in the map and we simple have to return it + var/already_spawned = FALSE + ///Only used if we dont pass a type in the mission. + var/type_to_spawn /obj/effect/landmark/mission_poi/Initialize() . = ..() @@ -219,3 +223,17 @@ SSmissions.unallocated_pois -= src . = ..() +/obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) + if(istype(_type_to_spawn)) + type_to_spawn = _type_to_spawn + if(already_spawned) + for(var/atom/movable/item_in_poi as anything in get_turf(src)) + if(istype(item_in_poi, type_to_spawn)) + return item_in_poi + stack_trace("[src] is meant to have its item prespawned but could not find it on its tile, resorting to spawning the type instead.") + return new type_to_spawn(loc) + +/// 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 + From d53677594fcdd2bce723762d7b42937640a929b4 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 27 Sep 2024 13:11:02 -0500 Subject: [PATCH 22/77] removes stuff related to sending and tweaks missions to allow non-specific items --- code/__DEFINES/economy.dm | 6 +- code/modules/dynamic_missions/mission.dm | 68 ++++++++++++++----- .../modules/dynamic_missions/mission_board.dm | 26 ++----- .../dynamic_missions/missions/guarded.dm | 8 +-- .../missions/guarded/nt_files.dm | 3 +- .../dynamic_missions/missions/simple.dm | 16 +++-- .../tgui/interfaces/MissionBoard/index.tsx | 14 +--- 7 files changed, 77 insertions(+), 64 deletions(-) diff --git a/code/__DEFINES/economy.dm b/code/__DEFINES/economy.dm index 22dc4789d566..7ff2cb1b984f 100644 --- a/code/__DEFINES/economy.dm +++ b/code/__DEFINES/economy.dm @@ -15,6 +15,6 @@ #define NO_FREEBIES "commies go home" -#define MISSION_REWARD_CASH 0 -#define MISSION_REWARD_ITEMS 1 -#define MISSION_REWARD_REP 2 +#define MISSION_REWARD_CASH "cash" +#define MISSION_REWARD_ITEMS "items" +#define MISSION_REWARD_REP "rep" diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index d8e53cb2b9c6..3353fb6d8a96 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -15,7 +15,7 @@ /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. - var/val_mod_range = 0.1 + var/val_mod_range = 0.2 /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 @@ -29,13 +29,6 @@ var/list/atom/movable/bound_atoms /datum/dynamic_mission/New(_location) - if(duration) - var/old_dur = duration - var/dur_mod = duration * dur_mod_range - duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) - var/val_mod = value * val_mod_range - value = round(rand(value-val_mod, value+val_mod) * (dur_value_scaling ? old_dur / duration : 1), 50) - //source_outpost = _outpost mission_location = _location SSmissions.inactive_missions += list(src) @@ -64,14 +57,23 @@ qdel(src) /datum/dynamic_mission/proc/generate_mission_details() + var/val_mod = value * val_mod_range + value = rand(value-val_mod, value+val_mod) + if(duration) + var/old_dur = duration + var/dur_mod = duration * dur_mod_range + duration = round(rand(duration-dur_mod, duration+dur_mod), 30 SECONDS) + value = value * (dur_value_scaling ? old_dur / duration : 1) + value = round(value, 50) + author = random_species_name() return /datum/dynamic_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)]", + 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)]", ) /datum/dynamic_mission/proc/start_mission() @@ -100,13 +102,28 @@ /datum/dynamic_mission/proc/can_turn_in(atom/movable/item_to_check) return -/datum/dynamic_mission/proc/turn_in() - qdel(src) +/datum/dynamic_mission/proc/turn_in(atom/movable/item_to_turn_in, choice) + if(can_turn_in(item_to_turn_in)) + spawn_reward(item_to_turn_in.loc, choice) + do_sparks(3, FALSE, get_turf(item_to_turn_in)) + qdel(item_to_turn_in) + qdel(src) + +/datum/dynamic_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/dynamic_mission/proc/can_complete() return !failed -/datum/dynamic_mission/proc/get_tgui_info(var/list/items_on_pad) +/datum/dynamic_mission/proc/get_tgui_info(list/items_on_pad) var/time_remaining = max(dur_timer ? timeleft(dur_timer) : duration, 0) var/act_str = "" @@ -167,6 +184,13 @@ RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) return bound +/datum/dynamic_mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) + if(sparks) + do_sparks(3, FALSE, get_turf(bound)) + LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) + RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) + return bound + /** * Removes the given atom from the mission's bound items, then qdeletes it. * Does not invoke the callback or fail the mission; optionally creates sparks. @@ -224,14 +248,22 @@ . = ..() /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) - if(istype(_type_to_spawn)) + var/atom/item_of_intrest + //Only use the type_to_spawn we have if a type is not passed + if(ispath(_type_to_spawn)) type_to_spawn = _type_to_spawn - if(already_spawned) + if(already_spawned) //Search for the item for(var/atom/movable/item_in_poi as anything in get_turf(src)) if(istype(item_in_poi, type_to_spawn)) - return item_in_poi + item_of_intrest = item_in_poi stack_trace("[src] is meant to have its item prespawned but could not find it on its tile, resorting to spawning the type instead.") - return new type_to_spawn(loc) + else //Spawn the item + item_of_intrest = new type_to_spawn(loc) + // We dont have an item to return + if(!istype(item_of_intrest)) + CRASH("[src] did not return a item_of_intrest") + qdel(src) + return item_of_intrest /// 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 diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index 6622aaf50b87..dfc61e9c377b 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -6,7 +6,6 @@ light_color = COLOR_BRIGHT_ORANGE var/datum/weakref/pad_ref var/obj/item/card/id/inserted_scan_id - var/sending = FALSE /obj/machinery/computer/mission/LateInitialize() . = ..() @@ -61,22 +60,6 @@ inserted_scan_id = null return TRUE -/// Prepares to sell the items on the pad -/obj/machinery/computer/mission/proc/start_sending() - var/obj/machinery/mission_pad/pad = pad_ref?.resolve() - if(!pad) - pad.audible_message(span_notice("[pad] beeps.")) - return - if(pad?.panel_open) - pad.audible_message(span_notice("[pad] beeps.")) - return - if(sending) - return - sending = TRUE - pad.visible_message(span_notice("[pad] starts charging up.")) - //pad.icon_state = pad.warmup_state - //sending_timer = addtimer(CALLBACK(src, PROC_REF(send)),warmup_time, TIMER_STOPPABLE) - /obj/machinery/computer/mission/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if(.) @@ -101,7 +84,13 @@ . = TRUE /obj/machinery/computer/mission/proc/turn_in(datum/dynamic_mission/mission, choice) - return + 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) + return TRUE /// Return all items on pad /obj/machinery/computer/mission/proc/recalc() @@ -129,7 +118,6 @@ data["missions"] += list(M.get_tgui_info(items_on_pad)) data["pad"] = pad_ref?.resolve() ? TRUE : FALSE data["id_inserted"] = inserted_scan_id ? TRUE : FALSE - data["sending"] = sending return data /obj/machinery/mission_pad diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index 40d6c5ff1ea6..521ac497b4e2 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -11,15 +11,13 @@ /datum/dynamic_mission/simple/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if((!required_item) && mission_poi.type == setpiece_poi) - required_item = spawn_bound(setpiece_item, mission_poi.loc, null, TRUE, TRUE) - qdel(mission_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) if(mission_poi.type == guard_poi) guard_list += list(spawn_guard(mission_poi)) - if(!required_item) CRASH("[src] was unable to find its required landmark") /datum/dynamic_mission/simple/guarded/proc/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) - var/guard = new guard_type(guard_poi.loc) - qdel(guard_poi) + 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 index faa864cb1da2..15196d93e258 100644 --- a/code/modules/dynamic_missions/missions/guarded/nt_files.dm +++ b/code/modules/dynamic_missions/missions/guarded/nt_files.dm @@ -15,6 +15,5 @@ /datum/dynamic_mission/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 = new guard_type(guard_poi.loc) - qdel(guard_poi) + var/guard = guard_poi.use_poi(guard_type) return guard diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm index 14de8a10f035..577adfcde74d 100644 --- a/code/modules/dynamic_missions/missions/simple.dm +++ b/code/modules/dynamic_missions/missions/simple.dm @@ -3,19 +3,23 @@ desc = "Retrive this thing for us and we will pay you" var/setpiece_poi 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/dynamic_mission/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) - required_item = spawn_bound(setpiece_item, mission_poi.loc, null, TRUE, TRUE) - qdel(mission_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/dynamic_mission/simple/can_turn_in(atom/movable/item_to_check) if(istype(required_item)) - if(item_to_check == required_item) - return TRUE - if(istype(item_to_check, required_item.type)) - return TRUE + 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/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 1457fb1af3c8..f13e4936643a 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -37,13 +37,6 @@ const MissionsContent = (props, context) => { disabled={!pad || !id_inserted} onClick={() => act('recalc')} /> - ))} - {duration ? missionValues(mission) : 'No time limit'} + {duration ? missionTimer(mission) : ''} {validItems.map((validItem: string) => ( {validItem} From 5447f9c812a595a174cf969cc082570fa1b0f685 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 29 Sep 2024 13:33:28 -0500 Subject: [PATCH 26/77] changes path for this --- .../IceRuins/icemoon_crashed_holemaker.dmm | 2 +- .../RandomRuins/IceRuins/icemoon_hydroponics_lab.dmm | 2 +- .../icemoon_underground_abandoned_village.dmm | 2 +- .../dynamic_missions/missions/guarded/nt_files.dm | 2 +- code/modules/dynamic_missions/missions/simple.dm | 3 +-- .../dynamic_missions/missions/simple/blackbox.dm | 12 ++++++++---- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm b/_maps/RandomRuins/IceRuins/icemoon_crashed_holemaker.dmm index 152150623524..362eaaccf331 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/blackbox, +/obj/effect/landmark/mission_poi/recovery, /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 96ba1763a877..9ec1515525c5 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/blackbox, +/obj/effect/landmark/mission_poi/recovery, /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 14cfb6a2a8d3..9dc046b1eb6f 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/blackbox, +/obj/effect/landmark/mission_poi/recovery, /turf/open/floor/wood, /area/ruin/powered) "mI" = ( diff --git a/code/modules/dynamic_missions/missions/guarded/nt_files.dm b/code/modules/dynamic_missions/missions/guarded/nt_files.dm index 578390c9d1d3..22a15c7d6c0a 100644 --- a/code/modules/dynamic_missions/missions/guarded/nt_files.dm +++ b/code/modules/dynamic_missions/missions/guarded/nt_files.dm @@ -11,7 +11,7 @@ /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") + 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) diff --git a/code/modules/dynamic_missions/missions/simple.dm b/code/modules/dynamic_missions/missions/simple.dm index 50ee535e46fb..c7d75f09781c 100644 --- a/code/modules/dynamic_missions/missions/simple.dm +++ b/code/modules/dynamic_missions/missions/simple.dm @@ -1,6 +1,5 @@ /datum/mission/dynamic/simple - name = "Item recovery" - desc = "Retrive this thing for us and we will pay you" + 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) diff --git a/code/modules/dynamic_missions/missions/simple/blackbox.dm b/code/modules/dynamic_missions/missions/simple/blackbox.dm index 9f81b61d9841..421b897e5c7c 100644 --- a/code/modules/dynamic_missions/missions/simple/blackbox.dm +++ b/code/modules/dynamic_missions/missions/simple/blackbox.dm @@ -1,8 +1,12 @@ /datum/mission/dynamic/simple/blackbox - name = "Blackbox recovery" - desc = "Recover one of our lost blackboxes from the location at this planet. We've pinged its location to a local ruin." - setpiece_poi = /obj/effect/landmark/mission_poi/blackbox setpiece_item = /obj/item/blackbox -/obj/effect/landmark/mission_poi/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" From 7ed1661a85aa94e55b70ac90bd12443ec532ed0b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 05:15:42 -0500 Subject: [PATCH 27/77] 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; -}; From 5d9cc9c9f1a1e1136c8182d01a5f0a826daa2983 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 06:52:52 -0500 Subject: [PATCH 28/77] the drill --- .../SpaceRuins/corporate_mining.dmm | 7 ++- code/__DEFINES/dcs/signals/signals.dm | 4 ++ code/datums/ruins/jungle.dm | 8 +-- code/datums/ruins/space.dm | 1 + .../bounties/missions/drill_mission.dm | 24 ------- .../dynamic_missions/missions/drill.dm | 62 +++++++++++++++++++ .../modules/dynamic_missions/missions/scan.dm | 1 - config/game_options.txt | 4 +- shiptest.dme | 2 +- 9 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 code/modules/dynamic_missions/missions/drill.dm delete mode 100644 code/modules/dynamic_missions/missions/scan.dm diff --git a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm index a2cb21cd1c1c..82f88860ef1d 100644 --- a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm +++ b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm @@ -2100,6 +2100,11 @@ "UA" = ( /turf/closed/wall/rust, /area/ruin/space/has_grav/corporatemine/crewquarters) +"Vj" = ( +/obj/structure/vein/asteroid, +/obj/effect/landmark/mission_poi/drill, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space) "Vr" = ( /obj/structure/grille/broken, /obj/item/shard, @@ -3719,7 +3724,7 @@ Al Al VM VM -VM +Vj VM kp bl diff --git a/code/__DEFINES/dcs/signals/signals.dm b/code/__DEFINES/dcs/signals/signals.dm index 38f7d8692853..4d9927bfea23 100644 --- a/code/__DEFINES/dcs/signals/signals.dm +++ b/code/__DEFINES/dcs/signals/signals.dm @@ -695,6 +695,10 @@ // Called by parent when pausing spawning, returns bool: (datum/source, spawning_started) #define COMSIG_SPAWNER_TOGGLE_SPAWNING "spawner_toggle" +// Drill signals +// Called when a mission drill finishes sampling +#define COMSIG_DRILL_SAMPLES_DONE "spawner_toggle" + ///Beam Signals /// Called before beam is redrawn #define COMSIG_BEAM_BEFORE_DRAW "beam_before_draw" diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index 16ce88c27cd9..e6be9dd1de45 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -21,10 +21,10 @@ 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/tali, + /obj/item/toy/plush/sharai, + /obj/item/toy/plush/xader, + /obj/item/toy/plush/mora, /obj/item/toy/plush/kari ) diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index f8cda3a84426..dcf258a702f4 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -12,6 +12,7 @@ name = "Corporate Mining Module" description = "An old and rusty mining facility, with big ore potential." ruin_tags = list(RUIN_TAG_NO_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_SHELTER) + dynamic_mission_types = list(/datum/mission/dynamic/drill) /datum/map_template/ruin/space/bigderelict1 id = "bigderelict1" diff --git a/code/modules/bounties/missions/drill_mission.dm b/code/modules/bounties/missions/drill_mission.dm index 307d73d59592..2d351e47a7f2 100644 --- a/code/modules/bounties/missions/drill_mission.dm +++ b/code/modules/bounties/missions/drill_mission.dm @@ -67,27 +67,3 @@ class_wanted = 3 num_wanted = 8 -/* - Core sampling drill -*/ - -/obj/machinery/drill/mission - name = "core sampling research drill" - desc = "A specialized laser drill designed to extract geological samples." - - var/num_current = 0 - var/mission_class - var/num_wanted - -/obj/machinery/drill/mission/examine() - . = ..() - . += "The drill contains [num_current] of the [num_wanted] samples needed." - -/obj/machinery/drill/mission/start_mining() - if(mining.vein_class < mission_class && mining) - say("Error: A vein class of [mission_class] or greater is required for operation.") - return - . = ..() - -/obj/machinery/drill/mission/mine_success() - num_current++ diff --git a/code/modules/dynamic_missions/missions/drill.dm b/code/modules/dynamic_missions/missions/drill.dm new file mode 100644 index 000000000000..debf539fa09a --- /dev/null +++ b/code/modules/dynamic_missions/missions/drill.dm @@ -0,0 +1,62 @@ +/obj/effect/landmark/mission_poi/drill + +/datum/mission/dynamic/drill + name = "drill mission" + desc = "get this drill back up and running and send us proof" + setpiece_item = /obj/item/drill_readout + var/drill_type = /obj/machinery/drill/mission/ruin + /// What signal will spawn the required item + var/mission_main_signal = COMSIG_DRILL_SAMPLES_DONE + +/datum/mission/dynamic/drill/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) + var/drill_obj = set_bound(mission_poi.use_poi(drill_type), null, FALSE, TRUE) + RegisterSignal(drill_obj, mission_main_signal, PROC_REF(on_drill_done)) + +/datum/mission/dynamic/drill/proc/on_drill_done(obj/machinery/drill/drill_obj) + SIGNAL_HANDLER + + required_item = new setpiece_item(drill_obj.loc) + set_bound(required_item, null, FALSE, TRUE) + UnregisterSignal(drill_obj, mission_main_signal) + remove_bound(drill_obj) + +/* + Core sampling drill +*/ + +/obj/machinery/drill/mission + name = "core sampling research drill" + desc = "A specialized laser drill designed to extract geological samples." + + var/num_current = 0 + var/mission_class + var/num_wanted + +/obj/machinery/drill/mission/examine() + . = ..() + . += "The drill contains [num_current] of the [num_wanted] samples needed." + +/obj/machinery/drill/mission/start_mining() + if(mining.vein_class < mission_class && mining) + say("Error: A vein class of [mission_class] or greater is required for operation.") + return + . = ..() + +/obj/machinery/drill/mission/mine_success() + num_current++ + if(num_current == num_wanted) + SEND_SIGNAL(src, COMSIG_DRILL_SAMPLES_DONE) + +/obj/machinery/drill/mission/ruin + name = "industrial grade mining drill" + desc = "A large scale laser drill. It's able to mine vast amounts of minerals from near-surface ore pockets, this one is designed for mining outposts." + mission_class = 4 + num_wanted = 15 + +/obj/item/drill_readout + name = "drill debug information" + desc = "Created by a mining outpost drill." + icon = 'icons/obj/bureaucracy.dmi' + icon_state = "paper" + item_state = "paper" + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/dynamic_missions/missions/scan.dm b/code/modules/dynamic_missions/missions/scan.dm deleted file mode 100644 index 99c75c082514..000000000000 --- a/code/modules/dynamic_missions/missions/scan.dm +++ /dev/null @@ -1 +0,0 @@ -/datum/mission/dynamic/scan diff --git a/config/game_options.txt b/config/game_options.txt index 135123b845ad..f73fbdd2a56b 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -572,10 +572,10 @@ MAX_OVERMAP_EVENT_CLUSTERS 6 MAX_OVERMAP_EVENTS 50 ## Put the maximum amount of dynamic overmap locations here -MAX_OVERMAP_DYNAMIC_EVENTS 10 +MAX_OVERMAP_DYNAMIC_EVENTS 30 ## Size of the overmap squared -OVERMAP_SIZE 12 +OVERMAP_SIZE 30 ## Which overmap generator to use ## Valid values are: "random", "solar_system" diff --git a/shiptest.dme b/shiptest.dme index 0b66e01228bd..9be6c33b59b0 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2081,10 +2081,10 @@ #include "code\modules\dynamic_missions\mission.dm" #include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\spawner.dm" +#include "code\modules\dynamic_missions\missions\drill.dm" #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\scan.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm" From ec7a6d1506ba83a47782adbad826e48eba9048a2 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 07:05:34 -0500 Subject: [PATCH 29/77] maps --- _maps/RandomRuins/SpaceRuins/corporate_mining.dmm | 5 ++++- _maps/outpost/indie_space.dmm | 14 ++++++++++++-- _maps/outpost/nanotrasen_asteroid.dmm | 6 ------ _maps/outpost/nanotrasen_ice.dmm | 12 ++++-------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm index 82f88860ef1d..6ee8b6c2ff98 100644 --- a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm +++ b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm @@ -2101,7 +2101,10 @@ /turf/closed/wall/rust, /area/ruin/space/has_grav/corporatemine/crewquarters) "Vj" = ( -/obj/structure/vein/asteroid, +/obj/structure/vein/asteroid{ + vein_class = 4; + mining_charges = 30 + }, /obj/effect/landmark/mission_poi/drill, /turf/open/floor/plating/asteroid/airless, /area/ruin/space) diff --git a/_maps/outpost/indie_space.dmm b/_maps/outpost/indie_space.dmm index 86a2a8d102b1..059074a68aa6 100644 --- a/_maps/outpost/indie_space.dmm +++ b/_maps/outpost/indie_space.dmm @@ -659,6 +659,11 @@ }, /turf/open/floor/plasteel, /area/outpost/hallway/central) +"ej" = ( +/obj/effect/turf_decal/corner/opaque/brown/full, +/obj/machinery/computer/mission, +/turf/open/floor/plasteel/patterned, +/area/outpost/cargo) "em" = ( /turf/closed/indestructible/reinforced, /area/outpost/external) @@ -5803,6 +5808,11 @@ }, /turf/open/floor/plasteel, /area/outpost/hallway/central) +"Jy" = ( +/obj/effect/turf_decal/corner/opaque/brown/full, +/obj/machinery/mission_pad, +/turf/open/floor/plasteel/patterned, +/area/outpost/cargo) "JA" = ( /obj/machinery/firealarm/directional/north, /obj/machinery/disposal/bin, @@ -17203,7 +17213,7 @@ HD Uw uw qN -UB +Jy UB gT FE @@ -17326,7 +17336,7 @@ HD Uw PI js -UB +ej yv Sl gO diff --git a/_maps/outpost/nanotrasen_asteroid.dmm b/_maps/outpost/nanotrasen_asteroid.dmm index cc6986e98b8d..35215a879a97 100644 --- a/_maps/outpost/nanotrasen_asteroid.dmm +++ b/_maps/outpost/nanotrasen_asteroid.dmm @@ -6155,7 +6155,6 @@ /obj/effect/turf_decal/techfloor{ dir = 5 }, -/obj/machinery/computer/bounty, /turf/open/floor/plasteel/tech, /area/outpost/hallway/fore) "vO" = ( @@ -7393,7 +7392,6 @@ /obj/effect/turf_decal/techfloor{ dir = 9 }, -/obj/machinery/computer/bounty, /turf/open/floor/plasteel/tech, /area/outpost/hallway/fore) "Aa" = ( @@ -10716,9 +10714,6 @@ /turf/open/floor/wood, /area/outpost/crew/library) "LE" = ( -/obj/machinery/computer/bounty{ - dir = 8 - }, /obj/effect/turf_decal/techfloor{ dir = 4 }, @@ -14879,7 +14874,6 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/machinery/computer/bounty, /turf/open/floor/plasteel/tech, /area/outpost/hallway/fore) "ZV" = ( diff --git a/_maps/outpost/nanotrasen_ice.dmm b/_maps/outpost/nanotrasen_ice.dmm index 70fb809c4c95..6dcf0e270061 100644 --- a/_maps/outpost/nanotrasen_ice.dmm +++ b/_maps/outpost/nanotrasen_ice.dmm @@ -898,13 +898,14 @@ /obj/effect/turf_decal/siding/white{ dir = 10 }, -/obj/structure/table/reinforced, /obj/machinery/newscaster/directional/south, -/obj/item/newspaper, /obj/machinery/camera{ dir = 4 }, /obj/machinery/firealarm/directional/west, +/obj/machinery/computer/mission{ + dir = 1 + }, /turf/open/floor/plasteel/dark, /area/outpost/cargo/smeltery) "gG" = ( @@ -3048,9 +3049,7 @@ /obj/effect/turf_decal/siding/white{ dir = 6 }, -/obj/structure/chair{ - dir = 1 - }, +/obj/machinery/mission_pad, /turf/open/floor/plasteel/dark, /area/outpost/cargo/smeltery) "us" = ( @@ -7419,9 +7418,6 @@ /obj/effect/turf_decal/siding/white{ dir = 8 }, -/obj/structure/chair{ - dir = 4 - }, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4{ dir = 5 }, From 0fe0ed56b062d59122e5e996376f62629feeed20 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 07:09:38 -0500 Subject: [PATCH 30/77] not real --- shiptest.dme | 1 - 1 file changed, 1 deletion(-) diff --git a/shiptest.dme b/shiptest.dme index d751db100d33..776d919e1f63 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -164,7 +164,6 @@ #include "code\__DEFINES\dcs\signals\signals_mod.dm" #include "code\__DEFINES\dcs\signals\signals_overmap.dm" #include "code\__DEFINES\dcs\signals\signals_reagent.dm" -#include "code\__DEFINES\dcs\signals\signals_ship.dm" #include "code\__DEFINES\dcs\signals\signals_storage.dm" #include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_carbon.dm" #include "code\__DEFINES\dcs\signals\signals_obj\signals_object.dm" From ede1794b30be379e5b775f6cfd7b3980c46eb29e Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 16:40:33 -0500 Subject: [PATCH 31/77] examine --- code/modules/dynamic_missions/mission.dm | 11 ++++---- .../dynamic_missions/missions/guarded.dm | 2 +- code/modules/overmap/_overmap_datum.dm | 27 +++++++++++++++++++ code/modules/overmap/overmap_token.dm | 4 +++ code/modules/tgui/external.dm | 4 +-- config/game_options.txt | 6 ++--- .../tgui/interfaces/OvermapExamine/index.tsx | 18 +++++++++++++ 7 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 tgui/packages/tgui/interfaces/OvermapExamine/index.tsx diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 6eafa35fd35e..cc610d28d73b 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -8,7 +8,7 @@ var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. ///Only needed if you have multipe missiosn that use the same poi's on the map - var/mission_name + var/mission_index var/location_specific = TRUE /// The outpost that issued this mission. Passed in New(). @@ -230,9 +230,9 @@ 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 - var/mission_name - ///Only used if we dont pass a type in the mission. + ///Only needed if you have multipe missiosn that would otherwise use the same poi's + var/mission_index = null + ///Prefered over the passed one, used for varediting primarly. var/type_to_spawn /obj/effect/landmark/mission_poi/Initialize() @@ -245,8 +245,7 @@ /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) var/atom/item_of_intrest - //Only use the type_to_spawn we have if a type is not passed - if(ispath(_type_to_spawn)) + if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(already_spawned) //Search for the item for(var/atom/movable/item_in_poi as anything in get_turf(src)) diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index a8a79effb629..6baabeaf0ca2 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -10,7 +10,7 @@ /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)) + if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) continue if((!required_item) && 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 diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 5244f2850188..8e9fdbc4f06f 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -414,3 +414,30 @@ dock_to_adjust.forceMove(locate(new_dock_location[1], new_dock_location[2], dock_to_adjust.z)) dock_to_adjust.dheight = new_dheight dock_to_adjust.dwidth = new_dwidth + +/obj/overmap/ui_status(mob/user, datum/ui_state/state) + return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE + +/obj/overmap/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if (!ui) + ui = new(user, src, "OvermapExamine") + ui.open() + +/obj/overmap/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + +/datum/overmap/ui_data(mob/user) + var/list/data = list() + data["ref"] = REF(src) + data["name"] = name + data["ascii"] = char_rep + data["dockedTo"] = docked_to + data["docked"] = list() + for(var/datum/overmap/docked in contents) + var/list/this = list() + this["ref"] = REF(src) + this["name"] = name + return data diff --git a/code/modules/overmap/overmap_token.dm b/code/modules/overmap/overmap_token.dm index 4d4ca6d23bda..22c0e78fa52a 100644 --- a/code/modules/overmap/overmap_token.dm +++ b/code/modules/overmap/overmap_token.dm @@ -101,3 +101,7 @@ cam_background.icon_state = "clear" cam_background.fill_rect(1, 1, size_x, size_y) return TRUE + +/obj/overmap/examine(mob/user) + . = ..() + parent.ui_interact(user) diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index de99b3dc1179..5d6030b5ce91 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -15,7 +15,7 @@ * optional ui datum/tgui The UI to be updated, if it exists. */ /datum/proc/ui_interact(mob/user, datum/tgui/ui) - return FALSE // Not implemented. + return FALSE /** * public @@ -28,7 +28,7 @@ * return list Data to be sent to the UI. */ /datum/proc/ui_data(mob/user) - return list() // Not implemented. + return list() /** * public diff --git a/config/game_options.txt b/config/game_options.txt index f73fbdd2a56b..a6eef310f5f9 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -566,12 +566,12 @@ ECONOMY ## Overmap Settings ## ## Put max amount of different event clusters you want to spawn here -MAX_OVERMAP_EVENT_CLUSTERS 6 +MAX_OVERMAP_EVENT_CLUSTERS 10 ## Put the maximum amount of overmap events here -MAX_OVERMAP_EVENTS 50 +MAX_OVERMAP_EVENTS 250 -## Put the maximum amount of dynamic overmap locations here +## Put the maximum amount of dynamic (runtime loaded) overmap locations here MAX_OVERMAP_DYNAMIC_EVENTS 30 ## Size of the overmap squared diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx new file mode 100644 index 000000000000..5ee468792d23 --- /dev/null +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -0,0 +1,18 @@ +import { useBackend, useLocalState } from '../../backend'; + +import { Window } from '../../layouts'; + +export type OvermapData = { + name: string; + ascii: string; +}; + +export const OvermapExamine = (props, context) => { + const { act, data } = useBackend(context); + const { name, ascii } = data; + return ( + + {ascii} + + ); +}; From 441e16f40c8d720dd6cc0e36953695cbc075bed7 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 18:40:53 -0500 Subject: [PATCH 32/77] tgui --- code/modules/overmap/_overmap_datum.dm | 28 +++++----- code/modules/overmap/overmap_token.dm | 45 +++++++++++++--- .../tgui/interfaces/OvermapExamine/index.tsx | 53 +++++++++++++++++-- 3 files changed, 103 insertions(+), 23 deletions(-) diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 8e9fdbc4f06f..898af6abe9a3 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -415,29 +415,31 @@ dock_to_adjust.dheight = new_dheight dock_to_adjust.dwidth = new_dwidth -/obj/overmap/ui_status(mob/user, datum/ui_state/state) +/datum/overmap/ui_status(mob/user, datum/ui_state/state) return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE -/obj/overmap/ui_interact(mob/user, datum/tgui/ui) +/datum/overmap/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if (!ui) ui = new(user, src, "OvermapExamine") ui.open() -/obj/overmap/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) +/datum/overmap/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() if(.) return /datum/overmap/ui_data(mob/user) - var/list/data = list() - data["ref"] = REF(src) - data["name"] = name - data["ascii"] = char_rep - data["dockedTo"] = docked_to - data["docked"] = list() + . = list() + .["ref"] = REF(src) + .["name"] = name + .["ascii"] = char_rep + .["x"] = x || docked_to.x + .["y"] = y || docked_to.y + .["dockedTo"] = docked_to + .["docked"] = list() for(var/datum/overmap/docked in contents) - var/list/this = list() - this["ref"] = REF(src) - this["name"] = name - return data + var/list/docked_list = list() + docked_list["ref"] = REF(src) + docked_list["name"] = name + .["docked"] = docked_list diff --git a/code/modules/overmap/overmap_token.dm b/code/modules/overmap/overmap_token.dm index 22c0e78fa52a..d91a12853c8f 100644 --- a/code/modules/overmap/overmap_token.dm +++ b/code/modules/overmap/overmap_token.dm @@ -1,5 +1,6 @@ /obj/overmap icon = 'icons/misc/overmap.dmi' + mouse_opacity = 2 ///~~If we need to render a map for cameras and helms for this object~~ basically can you look at and use this as a ship or station. var/render_map = FALSE /// The parent overmap datum for this overmap token that has all of the actual functionality. @@ -46,13 +47,6 @@ QDEL_NULL(cam_background) return ..() -/obj/overmap/attack_ghost(mob/user) - . = ..() - var/turf/jump_to_turf = parent.get_jump_to_turf() - if(!jump_to_turf) - return - user.abstract_move(jump_to_turf) - /obj/overmap/vv_edit_var(var_name, var_value) switch(var_name) if(NAMEOF(src, render_map)) @@ -84,6 +78,7 @@ parent.Rename(var_value) return TRUE return ..() + /** * Updates the screen object, which is displayed on all connected helms */ @@ -102,6 +97,42 @@ cam_background.fill_rect(1, 1, size_x, size_y) return TRUE +/obj/overmap/proc/choose_token(mob/user) + var/nearby_objects = SSovermap.overmap_container[parent.x][parent.y] + if(length(nearby_objects) <= 1) + return src + + var/list/choices_to_options = list() //Dict of object name | dict of object processing settings + var/list/choices = list() + for(var/datum/overmap/nearby_object in nearby_objects) + if(!nearby_object.token) + continue + var/obj/overmap/token = nearby_object.token + var/option_name = token.name + choices_to_options[option_name] = token + choices += list("[option_name]" = image(icon = token.icon, icon_state = token.icon_state)) + + var/picked = show_radial_menu(user, src, choices, radius = 42, require_near = FALSE) + var/obj/overmap/picked_token = choices_to_options[picked] + if(!isobj(picked_token)) + return src + return picked_token + +/obj/overmap/Click(location, control, params) + var/obj/overmap/token = choose_token(usr) + if(token.flags_1 & INITIALIZED_1) + SEND_SIGNAL(token, COMSIG_CLICK, location, control, params, usr) + + usr.ClickOn(token, params) + +/obj/overmap/attack_ghost(mob/user) + if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND) + return TRUE + var/turf/jump_to_turf = parent.get_jump_to_turf() + if(!jump_to_turf) + return + user.abstract_move(jump_to_turf) + /obj/overmap/examine(mob/user) . = ..() parent.ui_interact(user) diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx index 5ee468792d23..758db7f6564e 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -1,18 +1,65 @@ import { useBackend, useLocalState } from '../../backend'; +import { + Button, + Box, + Divider, + Flex, + Icon, + Input, + Section, + LabeledList, + ProgressBar, + AnimatedNumber, +} from '../../components'; +import { ButtonInput } from '../../components/Button'; import { Window } from '../../layouts'; export type OvermapData = { + ref: string; name: string; ascii: string; + x: number; + y: number; + dockedTo: TokenData; + docked: TokenData[]; +}; + +export type TokenData = { + ref: string; + name: string; }; export const OvermapExamine = (props, context) => { const { act, data } = useBackend(context); - const { name, ascii } = data; + const { name, ascii, x, y, dockedTo, docked = []} = data; + return ( - - {ascii} + + +
+ + + X + + /Y + + + + + {dockedTo.name} + + + + {docked.map((docked_datum) => ( + + {docked_datum.name} + + ))} + + +
+
); }; From a8a7e773afec93ba2dc9a635adcac7fa88b39b24 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 12 Oct 2024 21:04:18 -0500 Subject: [PATCH 33/77] improvments to overmap ui thing --- code/modules/overmap/_overmap_datum.dm | 77 ++++++++++++++----- code/modules/overmap/objects/dynamic_datum.dm | 16 ++++ .../tgui/interfaces/MissionBoard/index.tsx | 2 +- .../tgui/interfaces/OvermapExamine/index.tsx | 61 ++++++++++++--- 4 files changed, 125 insertions(+), 31 deletions(-) diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 898af6abe9a3..552befb5ed64 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -415,31 +415,72 @@ dock_to_adjust.dheight = new_dheight dock_to_adjust.dwidth = new_dwidth -/datum/overmap/ui_status(mob/user, datum/ui_state/state) - return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE - /datum/overmap/ui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if (!ui) - ui = new(user, src, "OvermapExamine") - ui.open() - -/datum/overmap/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() - if(.) - return + if(user.client) + var/datum/overmap_inspect/overmap_inspect = new(src, user) + overmap_inspect.ui_interact(user) /datum/overmap/ui_data(mob/user) . = list() - .["ref"] = REF(src) - .["name"] = name + . += basic_ui_data() .["ascii"] = char_rep + .["desc"] = (isobj(token)) ? token.desc : "" .["x"] = x || docked_to.x .["y"] = y || docked_to.y - .["dockedTo"] = docked_to + + .["dockedTo"] = list() + if(docked_to) + .["dockedTo"] += docked_to.basic_ui_data() + .["docked"] = list() for(var/datum/overmap/docked in contents) - var/list/docked_list = list() - docked_list["ref"] = REF(src) - docked_list["name"] = name - .["docked"] = docked_list + .["docked"] += list(docked.basic_ui_data()) + +/datum/overmap/proc/basic_ui_data() + return list( + "ref" = REF(src), + "name" = name + ) + +/datum/overmap_inspect + var/datum/overmap/focus + var/mob/inspector + +/datum/overmap_inspect/New(datum/overmap/focus, mob/inspector) + . = ..() + src.focus = focus + src.inspector = inspector + RegisterSignal(src.focus, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) + RegisterSignal(src.inspector, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) + +/datum/overmap_inspect/Destroy() + UnregisterSignal(focus, COMSIG_PARENT_QDELETING) + UnregisterSignal(inspector, COMSIG_PARENT_QDELETING) + focus = null + inspector = null + . = ..() + +/datum/overmap_inspect/ui_status(mob/user, datum/ui_state/state) + if(!isdatum(focus)) + return UI_CLOSE + return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE + +/datum/overmap_inspect/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if (!ui) + ui = new(user, src, "OvermapExamine") + ui.open() + +/datum/overmap_inspect/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + switch(action) + if("inspect") + var/datum/overmap/token = locate(params["ref"]) + if(isdatum(token)) + focus = token + +/datum/overmap_inspect/ui_data(mob/user) + return focus.ui_data(user) diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 2cd2457e1efd..a955c9a3ba0e 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -211,6 +211,22 @@ loading = FALSE return TRUE +/datum/overmap/dynamic/ui_data(mob/user) + . = ..() + .["active_missions"] = list() + .["inactive_missions"] = list() + for(var/datum/mission/dynamic/mission as anything in dynamic_missions) + if(mission.active) + .["active_missions"] += list(list( + "ref" = REF(mission), + "name" = mission.name, + )) + else + .["inactive_missions"] += list(list( + "ref" = REF(mission), + "name" = mission.name, + )) + /datum/overmap/dynamic/empty name = "Empty Space" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 4525f25bd3a5..3d1ba5c99c7d 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -9,7 +9,7 @@ import { } from '../../components'; import { Window } from '../../layouts'; -import { Mission, Data, Reward } from './types'; +import { Mission, Data } from './types'; export const MissionBoard = (props, context) => { const { act, data } = useBackend(context); diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx index 758db7f6564e..365f1c43946a 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -19,10 +19,13 @@ export type OvermapData = { ref: string; name: string; ascii: string; + desc: string; x: number; y: number; dockedTo: TokenData; docked: TokenData[]; + active_missions: MissionData[] | null; + inactive_missions: MissionData[] | null; }; export type TokenData = { @@ -30,12 +33,17 @@ export type TokenData = { name: string; }; +export type MissionData = { + ref: string; + name: string; +}; + export const OvermapExamine = (props, context) => { const { act, data } = useBackend(context); - const { name, ascii, x, y, dockedTo, docked = []} = data; + const { name, ascii, desc, x, y, dockedTo, docked = [] } = data; return ( - +
@@ -45,18 +53,47 @@ export const OvermapExamine = (props, context) => { /Y - - - {dockedTo.name} - - - - {docked.map((docked_datum) => ( + {desc} + {dockedTo.ref && ( + - {docked_datum.name} + {dockedTo.name}{' '} + - ))} - + + )} + {docked.length != 0 && ( + + {docked.map((docked_datum) => ( + + {docked_datum.name}{' '} + + + ))} + + )} + {data.active_missions?.map((mission) => ( + {mission.name} + ))} + {data.inactive_missions?.map((mission) => ( + {mission.name} + ))}
From 0d7c46e00be5f5b3c44acb544d9a2d55c319d1a8 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 13 Oct 2024 14:48:40 -0500 Subject: [PATCH 34/77] elite missions --- code/modules/dynamic_missions/missions/kill.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index a9a641eedd8a..5edfd7aad988 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -39,3 +39,20 @@ target_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite setpiece_item = /obj/item/folder/documents/syndicate +/datum/mission/dynamic/kill/megafauna + +/datum/mission/dynamic/kill/megafauna/generate_mission_details() + target_type = pick( + /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner, + /mob/living/simple_animal/hostile/megafauna/claw, + ) + +/datum/mission/dynamic/kill/elite + +/datum/mission/dynamic/kill/elite/generate_mission_details() + target_type = pick( + /mob/living/simple_animal/hostile/asteroid/elite/broodmother, + /mob/living/simple_animal/hostile/asteroid/elite/herald, + /mob/living/simple_animal/hostile/asteroid/elite/legionnaire, + /mob/living/simple_animal/hostile/asteroid/elite/pandora + ) From bcc7714bdd20ac955fc1702feb9ab9b0ca145c63 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 13 Oct 2024 17:47:13 -0500 Subject: [PATCH 35/77] missions and stuff --- .../JungleRuins/jungle_bombed_starport.dmm | 1 + .../lavaland_abandonedlisteningpost.dmm | 1 + _maps/RandomRuins/SpaceRuins/power_puzzle.dmm | 6 +-- code/datums/ruins/jungle.dm | 1 + code/datums/ruins/lavaland.dm | 1 + code/datums/ruins/space.dm | 1 + .../mission_code/undergroundoutpost45.dm | 39 ------------------- code/modules/dynamic_missions/mission.dm | 7 ++-- .../dynamic_missions/missions/dynamic.dm | 39 ++++++++++++++++--- .../modules/dynamic_missions/missions/kill.dm | 4 +- .../dynamic_missions/missions/signaled.dm | 17 ++++++++ code/modules/overmap/objects/dynamic_datum.dm | 2 +- shiptest.dme | 2 +- 13 files changed, 67 insertions(+), 54 deletions(-) delete mode 100644 code/modules/awaymissions/mission_code/undergroundoutpost45.dm create mode 100644 code/modules/dynamic_missions/missions/signaled.dm diff --git a/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm b/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm index 77c280d07e90..1cef88927090 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm @@ -7415,6 +7415,7 @@ /area/overmap_encounter/planetoid/jungle/explored) "YA" = ( /obj/machinery/blackbox_recorder, +/obj/effect/landmark/mission_poi/main/blackbox, /turf/open/floor/mineral/plastitanium/red, /area/ruin/jungle/starport/tower) "YC" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm b/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm index 8cc99b4a591a..846527608fd0 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm @@ -151,6 +151,7 @@ /obj/effect/turf_decal/siding/thinplating/dark{ dir = 4 }, +/obj/effect/landmark/mission_poi/main/blackbox, /turf/open/floor/plasteel/dark, /area/ruin/unpowered/listening_post/operations) "db" = ( diff --git a/_maps/RandomRuins/SpaceRuins/power_puzzle.dmm b/_maps/RandomRuins/SpaceRuins/power_puzzle.dmm index 3d05cfb13d35..87abeb36a536 100644 --- a/_maps/RandomRuins/SpaceRuins/power_puzzle.dmm +++ b/_maps/RandomRuins/SpaceRuins/power_puzzle.dmm @@ -1216,7 +1216,7 @@ /obj/structure/chair/office{ dir = 8 }, -/obj/machinery/firealarm/directional/north, +/obj/machinery/firealarm/directional/east, /turf/open/floor/plasteel, /area/ruin/space/has_grav/powerpuzzle/secure) "jy" = ( @@ -3506,9 +3506,7 @@ /turf/open/floor/plasteel/dark, /area/ruin/space/has_grav/powerpuzzle/secure) "UV" = ( -/obj/structure/salvageable/computer{ - dir = 1 - }, +/obj/effect/landmark/mission_poi/main, /obj/machinery/door/poddoor/shutters{ id = "vaultshutters2" }, diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index e6be9dd1de45..cdd9bd774b1f 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -49,6 +49,7 @@ description = "A bombed out airbase from the ICW, taken back over by nature" suffix = "jungle_bombed_starport.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE) + dynamic_mission_types = list(/datum/mission/dynamic/blackbox) /datum/map_template/ruin/jungle/medtech name = "MedTech facility" diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index f94d75bd71f9..7a60d4e1223f 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -41,3 +41,4 @@ id = "abandonedlistening" description = "An abandoned Cybersun listening post. Seems like the Ramzi Clique has an interest in the site." suffix = "lavaland_abandonedlisteningpost.dmm" + dynamic_mission_types = list(/datum/mission/dynamic/blackbox) diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index dcf258a702f4..02afd5ac6274 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -36,6 +36,7 @@ description = "an abandoned secure storage location. there is no power left in the batteries and the former ocupants locked it pretty tight before leaving.\ You will have to power areas to raise the bolts on the doors. look out for secrets." ruin_tags = list(RUIN_TAG_MINOR_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) + dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) /datum/map_template/ruin/space/astraeus id = "astraeus" diff --git a/code/modules/awaymissions/mission_code/undergroundoutpost45.dm b/code/modules/awaymissions/mission_code/undergroundoutpost45.dm deleted file mode 100644 index 415303202430..000000000000 --- a/code/modules/awaymissions/mission_code/undergroundoutpost45.dm +++ /dev/null @@ -1,39 +0,0 @@ -// undergroundoutpost45 - -//Areas -/area/awaymission/undergroundoutpost45 - name = "space" - icon_state = "awaycontent1" - -/area/awaymission/undergroundoutpost45/central - name = "UO45 Central Hall" - icon_state = "awaycontent2" - -/area/awaymission/undergroundoutpost45/crew_quarters - name = "UO45 Crew Quarters" - icon_state = "awaycontent3" - -/area/awaymission/undergroundoutpost45/engineering - name = "UO45 Engineering" - icon_state = "awaycontent4" - -/area/awaymission/undergroundoutpost45/mining - name = "UO45 Mining" - icon_state = "awaycontent5" - -/area/awaymission/undergroundoutpost45/research - name = "UO45 Research" - icon_state = "awaycontent6" - -/area/awaymission/undergroundoutpost45/gateway - name = "UO45 Gateway" - icon_state = "awaycontent7" - -/area/awaymission/undergroundoutpost45/caves - name = "UO45 Caves" - icon_state = "awaycontent8" - always_unpowered = TRUE - power_environ = FALSE - power_equip = FALSE - power_light = FALSE - poweralm = FALSE diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index cc610d28d73b..b38acb55b1d3 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -7,7 +7,7 @@ var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. - ///Only needed if you have multipe missiosn that use the same poi's on the map + ///Only needed if you have multipe missiosn that use the same poi's on the map. Set at new. var/mission_index var/location_specific = TRUE @@ -31,9 +31,10 @@ /// is a callback to be invoked upon the atom's qdeletion. var/list/atom/movable/bound_atoms -/datum/mission/New(_location) +/datum/mission/New(location, mission_index) //source_outpost = _outpost - mission_location = _location + src.mission_location = location + src.mission_index = mission_index SSmissions.inactive_missions += list(src) //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index 37b0dce39d50..64bb787299f8 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -11,15 +11,31 @@ /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) + if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) + continue + if(istype(mission_poi, setpiece_poi)) //Spawns the item or gets it via use_poi then sets it as bound so the mission fails if its deleted spawn_main_piece(planet, mission_poi) - return - CRASH("[src] was unable to find its required landmark") + break + + spawn_custom_pois(planet) + + // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own + for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) + if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) + continue + mission_poi.use_poi() + + if(!isatom(setpiece_item)) + CRASH("[src] was unable to find its required landmark") /datum/mission/dynamic/proc/spawn_main_piece(datum/overmap/dynamic/planet, obj/effect/landmark/mission_poi/mission_poi) required_item = set_bound(mission_poi.use_poi(setpiece_item), mission_poi.loc, null, TRUE, TRUE) +/// For handling logic outside of main piece thats too complex for the basic reiteration or you want to not require indexs to match. +/datum/mission/dynamic/proc/spawn_custom_pois(datum/overmap/dynamic/planet) + return + /datum/mission/dynamic/can_turn_in(atom/movable/item_to_check) if(istype(required_item)) if(specific_item) @@ -31,10 +47,10 @@ /datum/mission/dynamic/data_reterival name = "data recovery" - ///Assumes its a list setpiece_item = list( /obj/item/blackbox, - /obj/item/research_notes/loot + /obj/item/research_notes/loot, + /obj/item/documents ) /datum/mission/dynamic/data_reterival/generate_mission_details() @@ -42,3 +58,16 @@ if(ispath(setpiece_item, /obj/item)) var/obj/item/mission_item = setpiece_item desc = "We are looking for a [mission_item::name]" + +/obj/effect/landmark/mission_poi/main/blackbox + icon_state = "main_blackbox" + already_spawned = TRUE + +/obj/effect/landmark/mission_poi/main/blackbox/use_poi(_type_to_spawn) + var/obj/machinery/blackbox_recorder/recorder = ..() + if(istype(recorder, /obj/machinery/blackbox_recorder)) + if(istype(recorder.stored, /obj/item/blackbox)) + return recorder.stored + +/datum/mission/dynamic/blackbox + setpiece_item = /obj/machinery/blackbox_recorder diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index 5edfd7aad988..ac84c751d618 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -46,6 +46,7 @@ /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner, /mob/living/simple_animal/hostile/megafauna/claw, ) + . = ..() /datum/mission/dynamic/kill/elite @@ -54,5 +55,6 @@ /mob/living/simple_animal/hostile/asteroid/elite/broodmother, /mob/living/simple_animal/hostile/asteroid/elite/herald, /mob/living/simple_animal/hostile/asteroid/elite/legionnaire, - /mob/living/simple_animal/hostile/asteroid/elite/pandora + /mob/living/simple_animal/hostile/asteroid/elite/pandora, ) + . = ..() diff --git a/code/modules/dynamic_missions/missions/signaled.dm b/code/modules/dynamic_missions/missions/signaled.dm new file mode 100644 index 000000000000..a41f5018164e --- /dev/null +++ b/code/modules/dynamic_missions/missions/signaled.dm @@ -0,0 +1,17 @@ +/datum/mission/dynamic/signaled + var/registered_type + var/atom/movable/registered_item + /// What signal will spawn the required item + var/mission_main_signal + +/datum/mission/dynamic/signaled/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) + var/registered_item = set_bound(mission_poi.use_poi(registered_type), null, FALSE, TRUE) + RegisterSignal(registered_item, mission_main_signal, PROC_REF(on_signaled)) + +/datum/mission/dynamic/signaled/proc/on_signaled(atom/movable/registered_item) + SIGNAL_HANDLER + + required_item = new setpiece_item(registered_item.loc) + set_bound(required_item, null, FALSE, TRUE) + UnregisterSignal(registered_item, mission_main_signal) + remove_bound(registered_item) diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index a955c9a3ba0e..94e7b5610442 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -154,7 +154,7 @@ var/datum/map_template/ruin/used_ruin = ispath(selected_ruin) ? (new selected_ruin()) : selected_ruin if(istype(used_ruin)) for(var/mission_type in used_ruin.dynamic_mission_types) - dynamic_missions += new mission_type(src) + dynamic_missions += new mission_type(src, 1 + length(dynamic_missions)) if(vlevel_height >= 255 && vlevel_width >= 255) //little easter egg planet_name = "LV-[pick(rand(11111,99999))]" diff --git a/shiptest.dme b/shiptest.dme index 776d919e1f63..f048fca934d8 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1844,7 +1844,6 @@ #include "code\modules\awaymissions\mission_code\research.dm" #include "code\modules\awaymissions\mission_code\snowdin.dm" #include "code\modules\awaymissions\mission_code\spacebattle.dm" -#include "code\modules\awaymissions\mission_code\undergroundoutpost45.dm" #include "code\modules\balloon_alert\balloon_alert.dm" #include "code\modules\buildmode\bm_mode.dm" #include "code\modules\buildmode\buildmode.dm" @@ -2061,6 +2060,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\signaled.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm" From dd3b79f146474fbd7ca62f6cd7a61c2ea8b3a37d Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 13 Oct 2024 18:12:39 -0500 Subject: [PATCH 36/77] simplifys some behavoir --- code/datums/ruins/space.dm | 2 +- code/modules/dynamic_missions/mission.dm | 3 + .../dynamic_missions/missions/drill.dm | 62 ------------------- .../dynamic_missions/missions/guarded.dm | 8 +-- .../dynamic_missions/missions/signaled.dm | 49 +++++++++++++++ shiptest.dme | 1 - 6 files changed, 55 insertions(+), 70 deletions(-) delete mode 100644 code/modules/dynamic_missions/missions/drill.dm diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 02afd5ac6274..7a56e1587919 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -12,7 +12,7 @@ name = "Corporate Mining Module" description = "An old and rusty mining facility, with big ore potential." ruin_tags = list(RUIN_TAG_NO_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_SHELTER) - dynamic_mission_types = list(/datum/mission/dynamic/drill) + dynamic_mission_types = list(/datum/mission/dynamic/signaled/drill) /datum/map_template/ruin/space/bigderelict1 id = "bigderelict1" diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index b38acb55b1d3..84cec4025ec8 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -4,6 +4,7 @@ var/desc = "Do something for me." var/faction = /datum/faction/independent var/value = 1000 /// The mission's payout. + var/atom/movable/mission_reward var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. @@ -113,6 +114,8 @@ /datum/mission/proc/spawn_reward(loc) new /obj/item/spacecash/bundle(loc, value * 1.2) + if(ispath(mission_reward)) + new mission_reward(loc) /datum/mission/proc/can_complete() return !failed diff --git a/code/modules/dynamic_missions/missions/drill.dm b/code/modules/dynamic_missions/missions/drill.dm deleted file mode 100644 index debf539fa09a..000000000000 --- a/code/modules/dynamic_missions/missions/drill.dm +++ /dev/null @@ -1,62 +0,0 @@ -/obj/effect/landmark/mission_poi/drill - -/datum/mission/dynamic/drill - name = "drill mission" - desc = "get this drill back up and running and send us proof" - setpiece_item = /obj/item/drill_readout - var/drill_type = /obj/machinery/drill/mission/ruin - /// What signal will spawn the required item - var/mission_main_signal = COMSIG_DRILL_SAMPLES_DONE - -/datum/mission/dynamic/drill/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) - var/drill_obj = set_bound(mission_poi.use_poi(drill_type), null, FALSE, TRUE) - RegisterSignal(drill_obj, mission_main_signal, PROC_REF(on_drill_done)) - -/datum/mission/dynamic/drill/proc/on_drill_done(obj/machinery/drill/drill_obj) - SIGNAL_HANDLER - - required_item = new setpiece_item(drill_obj.loc) - set_bound(required_item, null, FALSE, TRUE) - UnregisterSignal(drill_obj, mission_main_signal) - remove_bound(drill_obj) - -/* - Core sampling drill -*/ - -/obj/machinery/drill/mission - name = "core sampling research drill" - desc = "A specialized laser drill designed to extract geological samples." - - var/num_current = 0 - var/mission_class - var/num_wanted - -/obj/machinery/drill/mission/examine() - . = ..() - . += "The drill contains [num_current] of the [num_wanted] samples needed." - -/obj/machinery/drill/mission/start_mining() - if(mining.vein_class < mission_class && mining) - say("Error: A vein class of [mission_class] or greater is required for operation.") - return - . = ..() - -/obj/machinery/drill/mission/mine_success() - num_current++ - if(num_current == num_wanted) - SEND_SIGNAL(src, COMSIG_DRILL_SAMPLES_DONE) - -/obj/machinery/drill/mission/ruin - name = "industrial grade mining drill" - desc = "A large scale laser drill. It's able to mine vast amounts of minerals from near-surface ore pockets, this one is designed for mining outposts." - mission_class = 4 - num_wanted = 15 - -/obj/item/drill_readout - name = "drill debug information" - desc = "Created by a mining outpost drill." - icon = 'icons/obj/bureaucracy.dmi' - icon_state = "paper" - item_state = "paper" - w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index 6baabeaf0ca2..1c2e770131f6 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -8,17 +8,13 @@ var/guard_type var/list/mob/guard_list -/datum/mission/dynamic/guarded/spawn_mission_setpiece(datum/overmap/dynamic/planet) +/datum/mission/dynamic/guarded/spawn_custom_pois(datum/overmap/dynamic/planet) + . = ..() for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) continue - if((!required_item) && 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) if(mission_poi.type == guard_poi) guard_list += list(spawn_guard(mission_poi)) - if(!required_item) - CRASH("[src] was unable to find its required landmark") /datum/mission/dynamic/guarded/proc/spawn_guard(obj/effect/landmark/mission_poi/guard_poi) var/guard = guard_poi.use_poi(guard_type) diff --git a/code/modules/dynamic_missions/missions/signaled.dm b/code/modules/dynamic_missions/missions/signaled.dm index a41f5018164e..17fda4bc99d1 100644 --- a/code/modules/dynamic_missions/missions/signaled.dm +++ b/code/modules/dynamic_missions/missions/signaled.dm @@ -15,3 +15,52 @@ set_bound(required_item, null, FALSE, TRUE) UnregisterSignal(registered_item, mission_main_signal) remove_bound(registered_item) + +/obj/effect/landmark/mission_poi/drill + +/datum/mission/dynamic/signaled/drill + name = "drill mission" + desc = "get this drill back up and running and send us proof" + registered_type = /obj/machinery/drill/mission/ruin + setpiece_item = /obj/item/drill_readout + mission_main_signal = COMSIG_DRILL_SAMPLES_DONE + +/* + * Core sampling drill +*/ +/obj/machinery/drill/mission + name = "core sampling research drill" + desc = "A specialized laser drill designed to extract geological samples." + + var/num_current = 0 + var/mission_class + var/num_wanted + +/obj/machinery/drill/mission/examine() + . = ..() + . += "The drill contains [num_current] of the [num_wanted] samples needed." + +/obj/machinery/drill/mission/start_mining() + if(mining.vein_class < mission_class && mining) + say("Error: A vein class of [mission_class] or greater is required for operation.") + return + . = ..() + +/obj/machinery/drill/mission/mine_success() + num_current++ + if(num_current == num_wanted) + SEND_SIGNAL(src, COMSIG_DRILL_SAMPLES_DONE) + +/obj/machinery/drill/mission/ruin + name = "industrial grade mining drill" + desc = "A large scale laser drill. It's able to mine vast amounts of minerals from near-surface ore pockets, this one is designed for mining outposts." + mission_class = 4 + num_wanted = 15 + +/obj/item/drill_readout + name = "drill debug information" + desc = "Created by a mining outpost drill." + icon = 'icons/obj/bureaucracy.dmi' + icon_state = "paper" + item_state = "paper" + w_class = WEIGHT_CLASS_SMALL diff --git a/shiptest.dme b/shiptest.dme index f048fca934d8..fa1df3ff63d3 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2056,7 +2056,6 @@ #include "code\modules\dynamic_missions\mission.dm" #include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\spawner.dm" -#include "code\modules\dynamic_missions\missions\drill.dm" #include "code\modules\dynamic_missions\missions\dynamic.dm" #include "code\modules\dynamic_missions\missions\guarded.dm" #include "code\modules\dynamic_missions\missions\kill.dm" From f07ed203fcd36dd0687dea83ddc037eb290beb7e Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 13 Oct 2024 20:03:12 -0500 Subject: [PATCH 37/77] more tweaks and improvments --- .../icemoon_underground_abandoned_village.dmm | 21 +++++++++++-- .../JungleRuins/jungle_cavecrew.dmm | 11 ++++++- .../SpaceRuins/corporate_mining.dmm | 30 ++++++++++++++++--- code/__DEFINES/dcs/signals/signals.dm | 2 +- code/datums/ruins/icemoon.dm | 5 +++- code/datums/ruins/jungle.dm | 5 +++- code/game/objects/items/documents.dm | 2 +- code/modules/dynamic_missions/mission.dm | 1 + .../dynamic_missions/missions/dynamic.dm | 1 - .../dynamic_missions/missions/guarded.dm | 1 - .../dynamic_missions/missions/signaled.dm | 9 +++++- 11 files changed, 73 insertions(+), 15 deletions(-) diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm index 360c3052ab35..80c9c060b7e6 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm @@ -79,6 +79,14 @@ /obj/item/reagent_containers/food/drinks/beer, /turf/open/floor/plating/ice/icemoon, /area/overmap_encounter/planetoid/cave/explored) +"hY" = ( +/obj/structure/vein/ice/classthree{ + vein_class = 4; + mining_charges = 30 + }, +/obj/effect/landmark/mission_poi/main/drill, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/overmap_encounter/planetoid/cave/explored) "iz" = ( /obj/structure/fence/door/opened{ dir = 8 @@ -477,6 +485,13 @@ /obj/structure/chair/comfy/orange/directional/east, /turf/open/floor/carpet, /area/ruin/powered) +"OI" = ( +/obj/effect/landmark/mission_poi/guard{ + type_to_spawn = /mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals; + mission_index = 1 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/overmap_encounter/planetoid/cave/explored) "Pp" = ( /obj/machinery/vending/snack/random, /turf/open/floor/holofloor/wood, @@ -982,7 +997,7 @@ Og Og Og zT -Og +OI Og zT Og @@ -1071,10 +1086,10 @@ Vn Og zT Og -Og -Og Bq Og +hY +Og Og Og Gy diff --git a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm index 2593a09c8628..364db910e1c7 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm @@ -666,7 +666,9 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/effect/landmark/mission_poi/main/kill, +/obj/effect/landmark/mission_poi/main/kill{ + mission_index = 1 + }, /turf/open/floor/plasteel/tech, /area/ruin/jungle/cavecrew/bridge) "iN" = ( @@ -2179,6 +2181,9 @@ pixel_x = -5; pixel_y = -3 }, +/obj/effect/landmark/mission_poi/main{ + mission_index = 2 + }, /turf/open/floor/plasteel/tech, /area/ruin/jungle/cavecrew/bridge) "Al" = ( @@ -2736,6 +2741,10 @@ dir = 10 }, /obj/machinery/light/directional/south, +/obj/effect/landmark/mission_poi/guard{ + type_to_spawn = /mob/living/simple_animal/hostile/human/frontier/ranged/neutered; + mission_index = 2 + }, /turf/open/floor/plasteel/dark, /area/ruin/jungle/cavecrew/bridge) "Ir" = ( diff --git a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm index 6ee8b6c2ff98..a5098437fdc7 100644 --- a/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm +++ b/_maps/RandomRuins/SpaceRuins/corporate_mining.dmm @@ -179,6 +179,14 @@ }, /turf/open/floor/plasteel/tech, /area/ruin/space/has_grav/corporatemine/bridge) +"fd" = ( +/obj/effect/decal/cleanable/blood/splatter, +/obj/effect/landmark/mission_poi/guard{ + mission_index = 1; + type_to_spawn = /mob/living/simple_animal/hostile/asteroid/hivelord + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space) "fi" = ( /obj/structure/chair/office/light{ dir = 4 @@ -1093,6 +1101,20 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel/airless, /area/ruin/space/has_grav/corporatemine) +"zQ" = ( +/obj/effect/landmark/mission_poi/guard{ + mission_index = 1; + type_to_spawn = /mob/living/simple_animal/hostile/asteroid/hivelord + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space) +"Aa" = ( +/obj/effect/landmark/mission_poi{ + mission_index = 1; + type_to_spawn = /obj/structure/spawner/burrow/asteroid + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/space) "Ac" = ( /obj/structure/railing, /obj/structure/cable{ @@ -2105,7 +2127,7 @@ vein_class = 4; mining_charges = 30 }, -/obj/effect/landmark/mission_poi/drill, +/obj/effect/landmark/mission_poi/main/drill, /turf/open/floor/plating/asteroid/airless, /area/ruin/space) "Vr" = ( @@ -3729,7 +3751,7 @@ VM VM Vj VM -kp +fd bl VM Pn @@ -3830,7 +3852,7 @@ Al Al Iv VM -VM +zQ VM rG Bp @@ -3937,7 +3959,7 @@ VM VM bl VM -VM +Aa VM VM VM diff --git a/code/__DEFINES/dcs/signals/signals.dm b/code/__DEFINES/dcs/signals/signals.dm index 824ddd262c9e..d4b7cf830ac3 100644 --- a/code/__DEFINES/dcs/signals/signals.dm +++ b/code/__DEFINES/dcs/signals/signals.dm @@ -700,7 +700,7 @@ // Drill signals // Called when a mission drill finishes sampling -#define COMSIG_DRILL_SAMPLES_DONE "spawner_toggle" +#define COMSIG_DRILL_SAMPLES_DONE "drill_done" ///Beam Signals /// Called before beam is redrawn diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index 96a710cdcafd..b09ee6c5acc3 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -18,7 +18,10 @@ 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/data_reterival) + dynamic_mission_types = list( + /datum/mission/dynamic/data_reterival, + /datum/mission/dynamic/signaled/drill + ) /datum/map_template/ruin/icemoon/brazillian_lab name = "Barricaded Compound" diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index cdd9bd774b1f..cae05df5d5e7 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -64,7 +64,10 @@ description = "A frontiersmen base, hidden within a cave. They don't seem friendly" suffix = "jungle_cavecrew.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE, RUIN_TAG_MAJOR_LOOT) - dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen) + dynamic_mission_types = list( + /datum/mission/dynamic/kill/frontiersmen, + /datum/mission/dynamic/data_reterival + ) /datum/map_template/ruin/jungle/library name = "Abandoned Library" diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index 2fb225fd2fb9..175e4d1f4162 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -54,7 +54,7 @@ var/forgedseal = 0 var/copy_type = null -/obj/item/documents/photocopy/New(loc, obj/item/documents/copy=null) +/obj/item/documents/photocopy/New(loc, obj/item/documents/copy = null) ..() if(copy) copy_type = copy.type diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 84cec4025ec8..6a7cfacf3ea7 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -71,6 +71,7 @@ value = value * (dur_value_scaling ? old_dur / duration : 1) value = round(value, 50) + faction = pick(faction) author = random_species_name() return diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index 64bb787299f8..da78bc586c23 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -48,7 +48,6 @@ /datum/mission/dynamic/data_reterival name = "data recovery" setpiece_item = list( - /obj/item/blackbox, /obj/item/research_notes/loot, /obj/item/documents ) diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index 1c2e770131f6..5baee2942b33 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -24,7 +24,6 @@ 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() . = ..() diff --git a/code/modules/dynamic_missions/missions/signaled.dm b/code/modules/dynamic_missions/missions/signaled.dm index 17fda4bc99d1..e641925f7103 100644 --- a/code/modules/dynamic_missions/missions/signaled.dm +++ b/code/modules/dynamic_missions/missions/signaled.dm @@ -16,11 +16,18 @@ UnregisterSignal(registered_item, mission_main_signal) remove_bound(registered_item) -/obj/effect/landmark/mission_poi/drill +/obj/effect/landmark/mission_poi/main/drill /datum/mission/dynamic/signaled/drill name = "drill mission" desc = "get this drill back up and running and send us proof" + faction = list( + /datum/faction/nt, + /datum/faction/nt/ns_logi, + /datum/faction/nt/vigilitas, + /datum/faction/frontier, + /datum/faction/independent + ) registered_type = /obj/machinery/drill/mission/ruin setpiece_item = /obj/item/drill_readout mission_main_signal = COMSIG_DRILL_SAMPLES_DONE From 869485c140c38309453c74464023589e7b8dca1c Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 13 Oct 2024 23:14:05 -0500 Subject: [PATCH 38/77] coomit --- code/controllers/configuration/entries/game_options.dm | 3 +++ code/controllers/subsystem/missions.dm | 4 +--- code/modules/dynamic_missions/mission.dm | 10 ++++++++-- code/modules/dynamic_missions/missions/dynamic.dm | 2 ++ config/game_options.txt | 5 ++++- tgui/packages/tgui/interfaces/MissionBoard/index.tsx | 5 +++-- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index ac7298dc100d..e8835e73ec77 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -431,3 +431,6 @@ max_val = 255 config_entry_value = 127 min_val = 127 + +/datum/config_entry/number/max_dynamic_missions + config_entry_value = 6 diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index 9515503965a8..7f90c31b7a51 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -6,8 +6,6 @@ SUBSYSTEM_DEF(missions) var/list/datum/mission/dynamic/inactive_missions = list() var/list/datum/mission/dynamic/active_missions = list() - var/max_active_missions = 5 - /datum/controller/subsystem/missions/stat_entry(msg) var/unallocated = unallocated_pois.len var/inactive_count = inactive_missions.len @@ -16,7 +14,7 @@ SUBSYSTEM_DEF(missions) return ..() /datum/controller/subsystem/missions/fire(resumed) - if(active_missions.len < max_active_missions) + if(active_missions.len < CONFIG_GET(number/max_dynamic_missions)) if(inactive_missions.len) var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len] mission_to_start.start_mission() diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 6a7cfacf3ea7..be1017a8edbf 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -59,6 +59,7 @@ return ..() /datum/mission/proc/on_vital_delete() + SSblackbox.record_feedback("tally", "mission_vital_delete", 1, src.type) qdel(src) /datum/mission/proc/generate_mission_details() @@ -76,9 +77,13 @@ return /datum/mission/proc/reward_flavortext() - return "[value * 1.2] cr upon completion" + var/reward_string = "[value] cr upon completion" + if(ispath(mission_reward)) + reward_string += "along with [mission_reward::name]" + return reward_string /datum/mission/proc/start_mission() + SSblackbox.record_feedback("tally", "mission_started", 1, src.type) SSmissions.inactive_missions -= src active = TRUE if(duration) @@ -108,6 +113,7 @@ /datum/mission/proc/turn_in(atom/movable/item_to_turn_in) if(can_turn_in(item_to_turn_in)) + SSblackbox.record_feedback("tally", "mission_turned_in", 1, src.type) spawn_reward(item_to_turn_in.loc) do_sparks(3, FALSE, get_turf(item_to_turn_in)) qdel(item_to_turn_in) @@ -141,7 +147,7 @@ "name" = src.name, "author" = src.author, "desc" = src.desc, - "rewards" = src.reward_flavortext(), + "reward" = src.reward_flavortext(), "faction" = SSfactions.faction_name(src.faction), "location" = "X[mission_location.x]/Y[mission_location.y]: [mission_location.name]", "x" = mission_location.x, diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index da78bc586c23..877d29f8890e 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -59,6 +59,8 @@ desc = "We are looking for a [mission_item::name]" /obj/effect/landmark/mission_poi/main/blackbox + name = "blackbox recovery" + desc = "Recover some lost logs from this ruin's blackbox recorder." icon_state = "main_blackbox" already_spawned = TRUE diff --git a/config/game_options.txt b/config/game_options.txt index a6eef310f5f9..1f9377ade4a5 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -572,7 +572,7 @@ MAX_OVERMAP_EVENT_CLUSTERS 10 MAX_OVERMAP_EVENTS 250 ## Put the maximum amount of dynamic (runtime loaded) overmap locations here -MAX_OVERMAP_DYNAMIC_EVENTS 30 +MAX_OVERMAP_DYNAMIC_EVENTS 100 ## Size of the overmap squared OVERMAP_SIZE 30 @@ -584,6 +584,9 @@ OVERMAP_GENERATOR_TYPE solar_system ## Size of overmap encounters, vertical and width with a 3 tile border OVERMAP_ENCOUNTER_SIZE 127 +## Max dynamic mission count +MAX_DYNAMIC_MISSIONS 10 + ## The time required before a ship is allowed to bluespace jump. -1 disables it entirely ## In deciseconds, valid values are -1 to INFINITY BLUESPACE_JUMP_WAIT 12000 diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 3d1ba5c99c7d..79cc866a0d36 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -90,13 +90,14 @@ const MissionsList = (props, context) => { {faction} {desc} + {reward} {duration ? missionTimer(mission) : ''} From 8422ad230d4cd1429a725115d5a008d5a3b4e6ab Mon Sep 17 00:00:00 2001 From: fallcon Date: Mon, 14 Oct 2024 00:23:31 -0500 Subject: [PATCH 39/77] program --- .../file_system/programs/missionboard.dm | 24 +++++++++++++++++++ shiptest.dme | 1 + .../tgui/interfaces/MissionBoard/index.tsx | 2 -- tgui/packages/tgui/interfaces/NtosMission.tsx | 12 ++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 code/modules/modular_computers/file_system/programs/missionboard.dm create mode 100644 tgui/packages/tgui/interfaces/NtosMission.tsx diff --git a/code/modules/modular_computers/file_system/programs/missionboard.dm b/code/modules/modular_computers/file_system/programs/missionboard.dm new file mode 100644 index 000000000000..cce7c7bae4c2 --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/missionboard.dm @@ -0,0 +1,24 @@ + +/datum/computer_file/program/ + filename = "aidiag" + filedesc = "NT FRK" + program_icon_state = "generic" + extended_desc = "Mission viewer." + size = 12 + requires_ntnet = TRUE + usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP + transfer_access = ACCESS_HEADS + available_on_ntnet = TRUE + tgui_id = "NtosAiRestorer" + /// Variable dictating if we are in the process of restoring the AI in the inserted intellicard + var/restoring = FALSE + +ui_data(mob/user) + var/list/data = list() + data["missions"] = list() + var/list/items_on_pad = recalc() + for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + data["missions"] += list(M.get_tgui_info(items_on_pad)) + data["pad"] = pad_ref?.resolve() ? TRUE : FALSE + data["id_inserted"] = inserted_scan_id ? TRUE : FALSE + return data diff --git a/shiptest.dme b/shiptest.dme index fa1df3ff63d3..ec36bdae8736 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2827,6 +2827,7 @@ #include "code\modules\modular_computers\file_system\programs\cargoship.dm" #include "code\modules\modular_computers\file_system\programs\configurator.dm" #include "code\modules\modular_computers\file_system\programs\file_browser.dm" +#include "code\modules\modular_computers\file_system\programs\missionboard.dm" #include "code\modules\modular_computers\file_system\programs\ntdownloader.dm" #include "code\modules\modular_computers\file_system\programs\ntmonitor.dm" #include "code\modules\modular_computers\file_system\programs\ntnrc_client.dm" diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 79cc866a0d36..8c330b95e2a6 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -12,8 +12,6 @@ import { Window } from '../../layouts'; import { Mission, Data } from './types'; export const MissionBoard = (props, context) => { - const { act, data } = useBackend(context); - const {} = data; return ( diff --git a/tgui/packages/tgui/interfaces/NtosMission.tsx b/tgui/packages/tgui/interfaces/NtosMission.tsx new file mode 100644 index 000000000000..58263a599b15 --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosMission.tsx @@ -0,0 +1,12 @@ +import { NtosWindow } from '../layouts'; +import { MissionsContent } from './MissionBoard'; + +export const NtosMission = () => { + return ( + + + + + + ); +}; From 7b0b760db33bce5a5d359f6b479f025ab2be00a7 Mon Sep 17 00:00:00 2001 From: fallcon Date: Tue, 15 Oct 2024 08:05:22 -0500 Subject: [PATCH 40/77] the file system --- .../file_system/programs/missionboard.dm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/code/modules/modular_computers/file_system/programs/missionboard.dm b/code/modules/modular_computers/file_system/programs/missionboard.dm index cce7c7bae4c2..44e291b95520 100644 --- a/code/modules/modular_computers/file_system/programs/missionboard.dm +++ b/code/modules/modular_computers/file_system/programs/missionboard.dm @@ -1,7 +1,6 @@ - -/datum/computer_file/program/ - filename = "aidiag" - filedesc = "NT FRK" +/datum/computer_file/program/mission + filename = "missionviewer" + filedesc = "Mission viewer" program_icon_state = "generic" extended_desc = "Mission viewer." size = 12 @@ -9,16 +8,15 @@ usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP transfer_access = ACCESS_HEADS available_on_ntnet = TRUE - tgui_id = "NtosAiRestorer" + tgui_id = "NtosMission" /// Variable dictating if we are in the process of restoring the AI in the inserted intellicard var/restoring = FALSE -ui_data(mob/user) +/datum/computer_file/program/mission/ui_data(mob/user) var/list/data = list() data["missions"] = list() - var/list/items_on_pad = recalc() for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) - data["missions"] += list(M.get_tgui_info(items_on_pad)) - data["pad"] = pad_ref?.resolve() ? TRUE : FALSE - data["id_inserted"] = inserted_scan_id ? TRUE : FALSE + data["missions"] += list(M.get_tgui_info()) + data["pad"] = FALSE + data["id_inserted"] = FALSE return data From 4b72aaa9b6b2ba9a72393429e5966180af004c77 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 15 Oct 2024 15:02:21 -0500 Subject: [PATCH 41/77] small tweaks to tgui --- code/controllers/subsystem/missions.dm | 2 -- code/modules/dynamic_missions/mission.dm | 2 +- code/modules/dynamic_missions/missions/dynamic.dm | 4 ++-- .../file_system/programs/missionboard.dm | 10 ++++------ tgui/packages/tgui/interfaces/MissionBoard/index.tsx | 5 ++--- tgui/packages/tgui/interfaces/NtosMission.tsx | 2 +- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index 7f90c31b7a51..b46aa2c0c0a7 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -18,5 +18,3 @@ SUBSYSTEM_DEF(missions) if(inactive_missions.len) var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len] mission_to_start.start_mission() - - diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index be1017a8edbf..68ace3f179ad 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -127,7 +127,7 @@ /datum/mission/proc/can_complete() return !failed -/datum/mission/proc/get_tgui_info(list/items_on_pad) +/datum/mission/proc/get_tgui_info(list/items_on_pad = list()) var/time_remaining = max(dur_timer ? timeleft(dur_timer) : duration, 0) var/act_str = "" diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index 877d29f8890e..d20e6d248197 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -59,8 +59,6 @@ desc = "We are looking for a [mission_item::name]" /obj/effect/landmark/mission_poi/main/blackbox - name = "blackbox recovery" - desc = "Recover some lost logs from this ruin's blackbox recorder." icon_state = "main_blackbox" already_spawned = TRUE @@ -71,4 +69,6 @@ return recorder.stored /datum/mission/dynamic/blackbox + name = "blackbox recovery" + desc = "Recover some lost logs from this ruin's blackbox recorder." setpiece_item = /obj/machinery/blackbox_recorder diff --git a/code/modules/modular_computers/file_system/programs/missionboard.dm b/code/modules/modular_computers/file_system/programs/missionboard.dm index 44e291b95520..8c496227875c 100644 --- a/code/modules/modular_computers/file_system/programs/missionboard.dm +++ b/code/modules/modular_computers/file_system/programs/missionboard.dm @@ -1,16 +1,14 @@ /datum/computer_file/program/mission filename = "missionviewer" filedesc = "Mission viewer" - program_icon_state = "generic" - extended_desc = "Mission viewer." - size = 12 + program_icon_state = "bountyboard" + extended_desc = "A multi-platform network for placing requests across the sector, with payment across the network being possible.." requires_ntnet = TRUE - usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP + size = 10 + usage_flags = ALL transfer_access = ACCESS_HEADS available_on_ntnet = TRUE tgui_id = "NtosMission" - /// Variable dictating if we are in the process of restoring the AI in the inserted intellicard - var/restoring = FALSE /datum/computer_file/program/mission/ui_data(mob/user) var/list/data = list() diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 8c330b95e2a6..bb8a1d14b822 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -21,7 +21,7 @@ export const MissionBoard = (props, context) => { ); }; -const MissionsContent = (props, context) => { +export const MissionsContent = (props, context) => { const { act, data } = useBackend(context); const { missions, pad, id_inserted, sending } = data; return ( @@ -97,9 +97,8 @@ const MissionsList = (props, context) => { > Turn in - {duration ? missionTimer(mission) : ''} - + {validItems.map((validItem: string) => ( {validItem} ))} diff --git a/tgui/packages/tgui/interfaces/NtosMission.tsx b/tgui/packages/tgui/interfaces/NtosMission.tsx index 58263a599b15..7a402e3381c3 100644 --- a/tgui/packages/tgui/interfaces/NtosMission.tsx +++ b/tgui/packages/tgui/interfaces/NtosMission.tsx @@ -3,7 +3,7 @@ import { MissionsContent } from './MissionBoard'; export const NtosMission = () => { return ( - + From f366ac36baf1dce2ffbab9d65387076bf0223437 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 06:40:31 -0500 Subject: [PATCH 42/77] if location_sepcific --- code/modules/dynamic_missions/mission.dm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 68ace3f179ad..29bc6c17a2ec 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -19,7 +19,7 @@ /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. - var/val_mod_range = 0.2 + var/val_mod_range = 0.3 /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 @@ -34,19 +34,22 @@ /datum/mission/New(location, mission_index) //source_outpost = _outpost - src.mission_location = location + //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) src.mission_index = mission_index SSmissions.inactive_missions += list(src) - //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) - RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) - RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) + + if(location_specific) + src.mission_location = location + RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) + RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) generate_mission_details() return ..() /datum/mission/Destroy() //UnregisterSignal(source_outpost, COMSIG_PARENT_QDELETING) - UnregisterSignal(mission_location, COMSIG_PARENT_QDELETING, COMSIG_OVERMAP_LOADED) + if(location_specific) + UnregisterSignal(mission_location, COMSIG_PARENT_QDELETING, COMSIG_OVERMAP_LOADED) if(active) SSmissions.active_missions -= src else From a742e105241cbdf038f7c4fff18990fab34aa6f9 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 10:06:29 -0500 Subject: [PATCH 43/77] plently of small tweaks --- code/controllers/subsystem/missions.dm | 1 + code/datums/ruins/icemoon.dm | 7 +++ code/datums/ruins/jungle.dm | 6 ++- .../blackmarket_items/consumables.dm | 14 +++--- code/modules/dynamic_missions/mission.dm | 9 +++- .../modules/dynamic_missions/mission_board.dm | 8 ++-- .../dynamic_missions/missions/dynamic.dm | 1 + .../dynamic_missions/missions/guarded.dm | 8 +++- .../modules/dynamic_missions/missions/kill.dm | 5 ++- .../dynamic_missions/missions/signaled.dm | 3 ++ code/modules/hydroponics/fermenting_barrel.dm | 22 ++++++++- .../computers/item/tablet_presets.dm | 1 + .../file_system/programs/missionboard.dm | 4 +- .../tgui/interfaces/MissionBoard/index.tsx | 45 +++++++++++-------- .../tgui/interfaces/MissionBoard/types.ts | 1 + .../{NtosMission.tsx => NtosMission.js} | 2 +- 16 files changed, 97 insertions(+), 40 deletions(-) rename tgui/packages/tgui/interfaces/{NtosMission.tsx => NtosMission.js} (83%) diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index b46aa2c0c0a7..4e2cb7d99465 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -16,5 +16,6 @@ SUBSYSTEM_DEF(missions) /datum/controller/subsystem/missions/fire(resumed) if(active_missions.len < CONFIG_GET(number/max_dynamic_missions)) if(inactive_missions.len) + //Has the pleasnt result of grabbing the most recent mission, idealy this means a freshly created planet var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len] mission_to_start.start_mission() diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index 956243e78db1..458370243f1d 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -45,4 +45,11 @@ description = "Records show this settlement as belonging to the SRM, but no one has heard from them as of late. I wonder what happened?" suffix = "icemoon_ice_lodge.dmm" ruin_tags = list(RUIN_TAG_HARD_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) + dynamic_mission_types = list(/datum/mission/dynamic/fallen_montagne) +/datum/mission/dynamic/fallen_montagne + name = "dark signal investigation" + desc = "We've lost contact with one of our lodges but there signal has gone dark. We suspect they may have been assulted by a hostile faction. If they are KIA please retrive the Montagne's body." + mission_reward = /obj/structure/fermenting_barrel/trickwine + faction = /datum/faction/srm + setpiece_item = /mob/living/carbon/human diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index cae05df5d5e7..28b4159a168b 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -16,8 +16,10 @@ ) /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" + name = "FUCKING KIL JERRY THAT SUNOFA BITCH STOLE BY GODDAMN RELINA PLUSHIE!!" + desc = "I WANT MY FUCKIN PUSHIE BACK KILL HIM AND ILL PAY!" + author = "I FUCKING WANT HIM HUNG." + mission_reward = /obj/item/poster/random_rilena target_type = /mob/living/simple_animal/hostile/human/syndicate setpiece_item = list( /obj/item/toy/plush/rilena, diff --git a/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm b/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm index 2d9f3af83c06..4a02d1a6e07d 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/consumables.dm @@ -76,12 +76,14 @@ availability_prob = 40 /datum/blackmarket_item/consumable/trickwine/spawn_item(loc) - var/trickwine = pick(list(/obj/item/reagent_containers/food/drinks/breakawayflask/vintage/ashwine, - /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/icewine, - /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/shockwine, - /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/hearthwine, - /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/forcewine, - /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/prismwine)) + var/trickwine = pick(list( + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/ashwine, + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/icewine, + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/shockwine, + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/hearthwine, + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/forcewine, + /obj/item/reagent_containers/food/drinks/breakawayflask/vintage/prismwine + )) return new trickwine(loc) /datum/blackmarket_item/consumable/stimpack diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 29bc6c17a2ec..2ff6a1e93fec 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -4,7 +4,7 @@ var/desc = "Do something for me." var/faction = /datum/faction/independent var/value = 1000 /// The mission's payout. - var/atom/movable/mission_reward + var/mission_reward var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. @@ -23,6 +23,7 @@ /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 + var/time_issued var/active = FALSE var/failed = FALSE var/dur_timer @@ -77,18 +78,21 @@ faction = pick(faction) author = random_species_name() + mission_reward = pick(mission_reward) return /datum/mission/proc/reward_flavortext() var/reward_string = "[value] cr upon completion" if(ispath(mission_reward)) - reward_string += "along with [mission_reward::name]" + var/atom/reward = mission_reward + reward_string += " along with [reward::name]" return reward_string /datum/mission/proc/start_mission() SSblackbox.record_feedback("tally", "mission_started", 1, src.type) SSmissions.inactive_missions -= src active = TRUE + time_issued = station_time_timestamp() if(duration) dur_timer = addtimer(VARSET_CALLBACK(src, failed, TRUE), duration, TIMER_STOPPABLE) SSmissions.active_missions += src @@ -155,6 +159,7 @@ "location" = "X[mission_location.x]/Y[mission_location.y]: [mission_location.name]", "x" = mission_location.x, "y" = mission_location.y, + "timeIssued" = time_issued, "duration" = src.duration, "remaining" = time_remaining, "timeStr" = time2text(time_remaining, "mm:ss"), diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index dc114175e55c..761ac34b30f5 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -1,6 +1,6 @@ /obj/machinery/computer/mission name = "\improper Outpost mission board" - desc = "Used to check and claim missions offered by the outpost" + desc = "Used to check and claim missions offered by the outpost." icon_screen = "bounty" circuit = /obj/item/circuitboard/computer/mission light_color = COLOR_BRIGHT_ORANGE @@ -9,8 +9,10 @@ /obj/machinery/computer/mission/LateInitialize() . = ..() - var/obj/machinery/mission_pad/pad = locate() in range(4,src) - pad_ref = WEAKREF(pad) + if(istype(get_area(src.loc), /area/outpost)) + var/obj/machinery/mission_pad/pad = locate() in range(4,src) + pad_ref = WEAKREF(pad) + desc += "This one is not linked to any outpost." /obj/machinery/computer/mission/attackby(obj/item/I, mob/living/user, params) if(isidcard(I)) diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index d20e6d248197..d0722c4a2c8c 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -1,4 +1,5 @@ /datum/mission/dynamic + value = 2000 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 diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index 5baee2942b33..cb3a7e65b8ca 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -22,12 +22,18 @@ /datum/mission/dynamic/guarded/nt_files name = "NT asset recovery" + value = 1250 + mission_reward = list( + /obj/item/gun/energy/e_gun/old, + /obj/item/gun/energy/laser/retro, + /obj/item/gun/energy/laser/captain + ) faction = /datum/faction/nt setpiece_item = /obj/item/documents/nanotrasen /datum/mission/dynamic/guarded/nt_files/generate_mission_details() . = ..() - name = pick("NT asset recovery", "Asset recovery requested ASAP") + 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.") diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index ac84c751d618..3f0ff3d137ec 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -17,7 +17,7 @@ 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 items" + 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(target_type), null, FALSE, TRUE) @@ -33,9 +33,12 @@ required_target = null /datum/mission/dynamic/kill/frontiersmen + value = 2500 + mission_reward = /obj/item/gun/ballistic/automatic/pistol/mauler target_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer /datum/mission/dynamic/kill/syndi_docs + value = 3000 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/signaled.dm b/code/modules/dynamic_missions/missions/signaled.dm index e641925f7103..bebc53feaafb 100644 --- a/code/modules/dynamic_missions/missions/signaled.dm +++ b/code/modules/dynamic_missions/missions/signaled.dm @@ -21,6 +21,7 @@ /datum/mission/dynamic/signaled/drill name = "drill mission" desc = "get this drill back up and running and send us proof" + value = 3000 faction = list( /datum/faction/nt, /datum/faction/nt/ns_logi, @@ -58,9 +59,11 @@ if(num_current == num_wanted) SEND_SIGNAL(src, COMSIG_DRILL_SAMPLES_DONE) +//I want this to be a 3x3 machine in future /obj/machinery/drill/mission/ruin name = "industrial grade mining drill" desc = "A large scale laser drill. It's able to mine vast amounts of minerals from near-surface ore pockets, this one is designed for mining outposts." + anchored = TRUE mission_class = 4 num_wanted = 15 diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 6f1b40b3dc9d..24f0481f5ebd 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -77,15 +77,33 @@ return ..() /obj/structure/fermenting_barrel/gunpowder - name = "Gunpowder Barrel" + name = "gunpowder barrel" desc = "A wooden barrel packed with gunpowder. You should probably keep this away from sparks or open fires." /obj/structure/fermenting_barrel/gunpowder/Initialize() . = ..() reagents.add_reagent(/datum/reagent/gunpowder, 200) +/obj/structure/fermenting_barrel/trickwine + name = "barrel of trickwine" + desc = "finely crafted trickwine." + +/obj/structure/fermenting_barrel/trickwine/Initialize() + . = ..() + var/datum/reagent/trickwine_type + trickwine_type = pick(list( + /datum/reagent/consumable/ethanol/trickwine/ash_wine, + /datum/reagent/consumable/ethanol/trickwine/ice_wine, + /datum/reagent/consumable/ethanol/trickwine/shock_wine, + /datum/reagent/consumable/ethanol/trickwine/hearth_wine, + /datum/reagent/consumable/ethanol/trickwine/force_wine, + /datum/reagent/consumable/ethanol/trickwine/prism_wine + )) + reagents.add_reagent(trickwine_type, 200) + name = "barrel of [trickwine_type::name]" + /obj/structure/fermenting_barrel/distiller - name = "Distiller" + name = "distiller" icon_state = "distiller" closed_state = "distiller" desc = "A repurposed barrel and keg host to a special culture of bacteria native to Illestren" diff --git a/code/modules/modular_computers/computers/item/tablet_presets.dm b/code/modules/modular_computers/computers/item/tablet_presets.dm index f74cc016ad3b..d2d16e483765 100644 --- a/code/modules/modular_computers/computers/item/tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/tablet_presets.dm @@ -29,6 +29,7 @@ install_component(new /obj/item/computer_hardware/network_card) install_component(new /obj/item/computer_hardware/printer/mini) hard_drive.store_file(new /datum/computer_file/program/shipping) + \hard_drive.store_file(new /datum/computer_file/program/mission) /// Given by the syndicate as part of the contract uplink bundle - loads in the Contractor Uplink. /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize() diff --git a/code/modules/modular_computers/file_system/programs/missionboard.dm b/code/modules/modular_computers/file_system/programs/missionboard.dm index 8c496227875c..c273bb77f7fd 100644 --- a/code/modules/modular_computers/file_system/programs/missionboard.dm +++ b/code/modules/modular_computers/file_system/programs/missionboard.dm @@ -5,13 +5,11 @@ extended_desc = "A multi-platform network for placing requests across the sector, with payment across the network being possible.." requires_ntnet = TRUE size = 10 - usage_flags = ALL - transfer_access = ACCESS_HEADS available_on_ntnet = TRUE tgui_id = "NtosMission" /datum/computer_file/program/mission/ui_data(mob/user) - var/list/data = list() + var/list/data = get_header_data() data["missions"] = list() for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) data["missions"] += list(M.get_tgui_info()) diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index bb8a1d14b822..d229785f395f 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -23,10 +23,10 @@ export const MissionBoard = (props, context) => { export const MissionsContent = (props, context) => { const { act, data } = useBackend(context); - const { missions, pad, id_inserted, sending } = data; + const { missions, pad, id_inserted } = data; return (
- {duration ? missionTimer(mission) : ''} - - {validItems.map((validItem: string) => ( - {validItem} - ))} + + {pad ? ( + + + + {validItems.map((validItem: string) => ( + {validItem} + ))} + + ) : null} - ); }); diff --git a/tgui/packages/tgui/interfaces/MissionBoard/types.ts b/tgui/packages/tgui/interfaces/MissionBoard/types.ts index f7b7d63bf4a9..2d63c4023996 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/types.ts +++ b/tgui/packages/tgui/interfaces/MissionBoard/types.ts @@ -17,6 +17,7 @@ export type Mission = { x: number; y: number; progressStr: string; + timeIssued: string; remaining: number; duration: number; timeStr: string; diff --git a/tgui/packages/tgui/interfaces/NtosMission.tsx b/tgui/packages/tgui/interfaces/NtosMission.js similarity index 83% rename from tgui/packages/tgui/interfaces/NtosMission.tsx rename to tgui/packages/tgui/interfaces/NtosMission.js index 7a402e3381c3..847e047aa278 100644 --- a/tgui/packages/tgui/interfaces/NtosMission.tsx +++ b/tgui/packages/tgui/interfaces/NtosMission.js @@ -3,7 +3,7 @@ import { MissionsContent } from './MissionBoard'; export const NtosMission = () => { return ( - + From 37f459ac118bb973c0a4cf8d4e3abffb81cae17d Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 13:38:45 -0500 Subject: [PATCH 44/77] mission --- .../IceRuins/icemoon_ice_lodge.dmm | 9 +++--- .../JungleRuins/jungle_interceptor.dmm | 28 ++++------------ .../JungleRuins/jungle_syndicate.dmm | 19 ++++++++--- code/__DEFINES/mission.dm | 6 ++++ code/controllers/subsystem/missions.dm | 11 ++++--- code/modules/dynamic_missions/mission.dm | 32 ++++++++++++++++++- .../dynamic_missions/missions/dynamic.dm | 18 ++++++++--- .../surgery/organs/augments_internal.dm | 8 +++++ config/game_options.txt | 2 +- shiptest.dme | 1 + .../tgui/interfaces/OvermapExamine/index.tsx | 16 ++++++---- 11 files changed, 103 insertions(+), 47 deletions(-) create mode 100644 code/__DEFINES/mission.dm diff --git a/_maps/RandomRuins/IceRuins/icemoon_ice_lodge.dmm b/_maps/RandomRuins/IceRuins/icemoon_ice_lodge.dmm index 87fc7ea3d267..b6fdfb18cfb2 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_ice_lodge.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_ice_lodge.dmm @@ -103,7 +103,6 @@ dir = 6 }, /obj/structure/destructible/tribal_torch/lit{ - pixel_y = 0; pixel_x = 10 }, /turf/open/floor/wood/ebony, @@ -122,7 +121,6 @@ }, /obj/effect/decal/cleanable/dirt, /obj/structure/sign/poster/contraband/backdoor_xeno_babes_6{ - pixel_y = 0; pixel_x = 30 }, /obj/item/reagent_containers/food/drinks/bottle/absinthe{ @@ -1724,7 +1722,6 @@ pixel_x = 5 }, /obj/item/storage/box/ammo/c38{ - pixel_y = 0; pixel_x = -11 }, /obj/item/storage/box/ammo/c38{ @@ -2355,7 +2352,6 @@ pixel_x = 4 }, /obj/item/candle/infinite{ - pixel_y = 0; pixel_x = 10 }, /obj/item/candle/infinite{ @@ -3408,6 +3404,10 @@ range_light = 5 }, /obj/effect/mob_spawn/human/corpse/srm/montagne, +/obj/effect/landmark/mission_poi/main{ + mission_index = 1; + already_spawned = 1 + }, /turf/open/floor/wood/maple, /area/ruin/powered/icemoon/lodge/cellar) "Yo" = ( @@ -3426,7 +3426,6 @@ pixel_x = 1 }, /obj/item/toy/cards/deck{ - pixel_y = 0; pixel_x = -4 }, /obj/item/storage/pill_bottle/dice{ diff --git a/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm b/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm index 4d17f130e1ae..3d371042eb85 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm @@ -2634,9 +2634,7 @@ /area/overmap_encounter/planetoid/jungle/explored) "wI" = ( /obj/machinery/power/terminal, -/obj/structure/cable/orange{ - icon_state = "0-1" - }, +/obj/structure/cable/orange, /obj/structure/cable/orange{ icon_state = "1-5" }, @@ -3251,9 +3249,7 @@ icon_state = "1-2" }, /obj/machinery/door/airlock/security, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/door/firedoor/border_only{ dir = 1 }, @@ -3650,9 +3646,7 @@ dir = 4 }, /obj/structure/catwalk/over/plated_catwalk/dark, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /turf/open/floor/plating, /area/overmap_encounter/planetoid/jungle/explored) "FQ" = ( @@ -4769,9 +4763,7 @@ /area/overmap_encounter/planetoid/jungle/explored) "OL" = ( /obj/machinery/power/terminal, -/obj/structure/cable/orange{ - icon_state = "0-1" - }, +/obj/structure/cable/orange, /obj/effect/turf_decal/industrial/warning{ dir = 1 }, @@ -4812,9 +4804,7 @@ /area/overmap_encounter/planetoid/jungle/explored) "OW" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/item/stack/cable_coil/cut/orange, /turf/open/floor/plating/rust, /area/overmap_encounter/planetoid/jungle/explored) @@ -5274,9 +5264,7 @@ /area/ruin/jungle/interceptor/starhall) "ST" = ( /obj/machinery/power/terminal, -/obj/structure/cable/orange{ - icon_state = "0-1" - }, +/obj/structure/cable/orange, /obj/effect/turf_decal/industrial/warning{ dir = 1 }, @@ -5437,9 +5425,7 @@ /turf/open/floor/plating, /area/ruin/jungle/interceptor/starhall) "Up" = ( -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/item/stack/cable_coil/cut/orange, /obj/effect/decal/cleanable/dirt, /turf/open/floor/plating, diff --git a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm index 333a495d4168..6d4f1a2391f2 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm @@ -56,7 +56,9 @@ /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table, /obj/item/storage/cans/sixbeer, -/obj/effect/landmark/mission_poi/main, +/obj/effect/landmark/mission_poi/main{ + blocks_emissive = 1 + }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "bS" = ( @@ -130,7 +132,8 @@ unsuitable_atmos_damage = 0 }, /obj/effect/landmark/mission_poi/main/kill{ - already_spawned = 1 + already_spawned = 1; + mission_index = 2 }, /turf/open/floor/plating, /area/ruin/jungle/syndifort/jerry) @@ -158,7 +161,9 @@ /area/ruin/jungle/syndifort) "eU" = ( /obj/structure/chair/plastic, -/obj/effect/landmark/mission_poi/guard, +/obj/effect/landmark/mission_poi/guard{ + mission_index = 1 + }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "eW" = ( @@ -767,7 +772,9 @@ /obj/structure/sign/poster/contraband/peacemaker{ pixel_x = 32 }, -/obj/effect/landmark/mission_poi/guard, +/obj/effect/landmark/mission_poi/guard{ + mission_index = 1 + }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) "xm" = ( @@ -947,7 +954,9 @@ "BC" = ( /obj/structure/chair/plastic, /obj/machinery/light/small/directional/north, -/obj/effect/landmark/mission_poi/guard, +/obj/effect/landmark/mission_poi/guard{ + mission_index = 1 + }, /turf/open/floor/plating/rust, /area/ruin/jungle/syndifort) "BH" = ( diff --git a/code/__DEFINES/mission.dm b/code/__DEFINES/mission.dm new file mode 100644 index 000000000000..302da340edd8 --- /dev/null +++ b/code/__DEFINES/mission.dm @@ -0,0 +1,6 @@ +/// If this is deleted, so is the mission +#define MISSION_IMPORTANCE_CRITICAL "mission_critical" +/// If this and all other important missiosn are deleted, the mission is deleted +#define MISSION_IMPORTANCE_IMPORTANT "misison_important" +/// Relevent for the mission but can be deleted for free. +#define MISSION_IMPORTANCE_RELEVENT "mission_relevent" diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index 4e2cb7d99465..dd4b98a90d3e 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -15,7 +15,10 @@ SUBSYSTEM_DEF(missions) /datum/controller/subsystem/missions/fire(resumed) if(active_missions.len < CONFIG_GET(number/max_dynamic_missions)) - if(inactive_missions.len) - //Has the pleasnt result of grabbing the most recent mission, idealy this means a freshly created planet - var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len] - mission_to_start.start_mission() + for(var/i in 1 to inactive_missions.len) + //Make sure we dont ONLY take the one of the top. + if(prob(50)) + //Has the pleasnt result of grabbing the most recent mission, idealy this means a freshly created planet + var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len - (i - 1)] + mission_to_start.start_mission() + break diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 2ff6a1e93fec..625c4cab94bb 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -194,6 +194,7 @@ do_sparks(3, FALSE, get_turf(bound)) LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) + AddComponent(bound, MISSION_IMPORTANCE_CRITICAL, src) return bound /datum/mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) @@ -201,6 +202,7 @@ do_sparks(3, FALSE, get_turf(bound)) LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) + AddComponent(bound, MISSION_IMPORTANCE_CRITICAL, src) return bound /** @@ -276,8 +278,8 @@ // We dont have an item to return if(!istype(item_of_intrest)) CRASH("[src] did not return a item_of_intrest") + . = item_of_intrest qdel(src) - return item_of_intrest /obj/effect/landmark/mission_poi/main name = "mission focus" @@ -287,3 +289,31 @@ /obj/effect/landmark/mission_poi/pre_loaded already_spawned = TRUE +/// Shows examine hints on how it relates to a mission +/datum/component/mission_important + dupe_mode = COMPONENT_DUPE_UNIQUE + var/importance_level + var/datum/weakref/mission_ref + +/datum/component/mission_important/Initialize(_importance_level = MISSION_IMPORTANCE_RELEVENT, _mission) + if(_importance_level) + importance_level = _importance_level + if(isdatum(_mission)) + mission_ref = WEAKREF(_mission) + if(isatom(parent)) + RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_atom_examine)) + +/datum/component/mission_important/proc/on_atom_examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + if(!isdatum(mission_ref.resolve())) + examine_list += span_notice("[src] was useful to a mission") + return + + switch(importance_level) + if(MISSION_IMPORTANCE_CRITICAL) + examine_list += span_notice("[src] is critical to a mission") + if(MISSION_IMPORTANCE_IMPORTANT) + examine_list += span_notice("[src] is important to a mission") + if(MISSION_IMPORTANCE_RELEVENT) + examine_list += span_notice("[src] is relevent to a mission") diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index d0722c4a2c8c..f9c94439c2dd 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -11,26 +11,36 @@ setpiece_item = pick(setpiece_item) /datum/mission/dynamic/spawn_mission_setpiece(datum/overmap/dynamic/planet) + if(isnull(mission_index)) + stack_trace("[src] does not have a mission index") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) continue + if(!istype(mission_poi, /obj/effect/landmark/mission_poi/main)) + continue + if(istype(mission_poi, setpiece_poi)) //Spawns the item or gets it via use_poi then sets it as bound so the mission fails if its deleted - spawn_main_piece(planet, mission_poi) + spawn_main_piece(mission_poi, planet) break spawn_custom_pois(planet) // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) + if(isnull(mission_poi.mission_index) || isnull(mission_index)) + continue + if((mission_index != mission_poi.mission_index)) + continue + if(istype(mission_poi, /obj/effect/landmark/mission_poi/main)) continue mission_poi.use_poi() if(!isatom(setpiece_item)) - CRASH("[src] was unable to find its required landmark") + stack_trace("[src] was unable to find its required landmark") + qdel(src) -/datum/mission/dynamic/proc/spawn_main_piece(datum/overmap/dynamic/planet, obj/effect/landmark/mission_poi/mission_poi) +/datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) required_item = set_bound(mission_poi.use_poi(setpiece_item), mission_poi.loc, null, TRUE, TRUE) /// For handling logic outside of main piece thats too complex for the basic reiteration or you want to not require indexs to match. diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 022292c282b8..af8baad83c59 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -167,6 +167,14 @@ if(owner || !(organ_flags & ORGAN_FAILING)) SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "mindscrew", /datum/mood_event/mindscrew) +/obj/item/organ/cyberimp/brain/datachip + name = "Nanotrasen brain datachip" + desc = "Covered in serial codes and warnings. That data must be important." + +/obj/item/organ/cyberimp/brain/datachip/Insert() + . = ..() + to_chat(owner, span_notice("you feel well versed in the sales of donkpockets and other Donk Co. products")) + //[[[[MOUTH]]]] /obj/item/organ/cyberimp/mouth zone = BODY_ZONE_PRECISE_MOUTH diff --git a/config/game_options.txt b/config/game_options.txt index 1f9377ade4a5..8ec1c8fa7b64 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -585,7 +585,7 @@ OVERMAP_GENERATOR_TYPE solar_system OVERMAP_ENCOUNTER_SIZE 127 ## Max dynamic mission count -MAX_DYNAMIC_MISSIONS 10 +MAX_DYNAMIC_MISSIONS 100 ## The time required before a ship is allowed to bluespace jump. -1 disables it entirely ## In deciseconds, valid values are -1 to INFINITY diff --git a/shiptest.dme b/shiptest.dme index afefe486eafe..fceb2adee267 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -95,6 +95,7 @@ #include "code\__DEFINES\melee.dm" #include "code\__DEFINES\menu.dm" #include "code\__DEFINES\misc.dm" +#include "code\__DEFINES\mission.dm" #include "code\__DEFINES\mobs.dm" #include "code\__DEFINES\mod.dm" #include "code\__DEFINES\monkeys.dm" diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx index 365f1c43946a..330ec73dd8d2 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -88,12 +88,16 @@ export const OvermapExamine = (props, context) => { ))} )} - {data.active_missions?.map((mission) => ( - {mission.name} - ))} - {data.inactive_missions?.map((mission) => ( - {mission.name} - ))} + + {data.active_missions?.map((mission) => ( + {mission.name} + ))} + + + {data.inactive_missions?.map((mission) => ( + {mission.name} + ))} +
From 784933e2e5453bd51753144e1b80dd9ac51a497d Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 20:49:58 -0500 Subject: [PATCH 45/77] signaled baby --- .../BeachRuins/beach_treasure_cove.dmm | 4 +- .../icemoon_underground_abandoned_village.dmm | 22 ++++---- code/datums/ruins/beachplanet.dm | 4 +- code/datums/ruins/jungle.dm | 6 +-- code/datums/ruins/rockplanet.dm | 2 +- code/modules/dynamic_missions/mission.dm | 39 ++++++-------- .../dynamic_missions/missions/dynamic.dm | 12 ++--- .../modules/dynamic_missions/missions/kill.dm | 53 +++++++------------ 8 files changed, 61 insertions(+), 81 deletions(-) diff --git a/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm b/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm index 42ab3ccfeb43..12a14ec02430 100644 --- a/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm +++ b/_maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm @@ -1298,7 +1298,9 @@ }, /mob/living/simple_animal/hostile/human/frontier/ranged/officer/neutured, /obj/effect/landmark/mission_poi/main/kill{ - already_spawned = 1 + already_spawned = 1; + type_to_spawn = /mob/living/simple_animal/hostile/human/frontier/ranged/officer/neutured; + mission_index = 1 }, /turf/open/floor/carpet/red, /area/ruin/beach/treasure_cove) diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm index 902ad83bc577..14d1ac883243 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm @@ -23,9 +23,7 @@ /obj/effect/turf_decal/corner/opaque/black{ dir = 1 }, -/obj/effect/turf_decal/corner/opaque/black{ - dir = 2 - }, +/obj/effect/turf_decal/corner/opaque/black, /turf/open/floor/plasteel, /area/ruin/powered) "cB" = ( @@ -84,7 +82,9 @@ vein_class = 4; mining_charges = 30 }, -/obj/effect/landmark/mission_poi/main/drill, +/obj/effect/landmark/mission_poi/main/drill{ + mission_index = 2 + }, /turf/open/floor/plating/asteroid/snow/icemoon, /area/overmap_encounter/planetoid/cave/explored) "iz" = ( @@ -146,7 +146,9 @@ }, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/effect/landmark/mission_poi/main, +/obj/effect/landmark/mission_poi/main{ + mission_index = 1 + }, /turf/open/floor/wood, /area/ruin/powered) "mI" = ( @@ -213,9 +215,7 @@ /obj/effect/turf_decal/corner/opaque/black{ dir = 1 }, -/obj/effect/turf_decal/corner/opaque/black{ - dir = 2 - }, +/obj/effect/turf_decal/corner/opaque/black, /turf/open/floor/plasteel, /area/ruin/powered) "tg" = ( @@ -257,9 +257,7 @@ /obj/effect/turf_decal/corner/opaque/black{ dir = 1 }, -/obj/effect/turf_decal/corner/opaque/black{ - dir = 2 - }, +/obj/effect/turf_decal/corner/opaque/black, /turf/open/floor/plasteel, /area/ruin/powered) "us" = ( @@ -488,7 +486,7 @@ "OI" = ( /obj/effect/landmark/mission_poi/guard{ type_to_spawn = /mob/living/simple_animal/hostile/human/frontier/ranged/trooper/internals; - mission_index = 1 + mission_index = 2 }, /turf/open/floor/plating/asteroid/snow/icemoon, /area/overmap_encounter/planetoid/cave/explored) diff --git a/code/datums/ruins/beachplanet.dm b/code/datums/ruins/beachplanet.dm index 1fc5056f2159..ce4e7cd0c04d 100644 --- a/code/datums/ruins/beachplanet.dm +++ b/code/datums/ruins/beachplanet.dm @@ -31,7 +31,7 @@ description = "A small pirate outpost formed from the remains of a wrecked shuttle." suffix = "beach_pirate_crash.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/dynamic/kill/frontiersmen) + dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/frontiersmen) /datum/map_template/ruin/beachplanet/treasurecove name = "Treasure Cove" @@ -39,7 +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) + dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/frontiersmen) /datum/map_template/ruin/beachplanet/crashedengie name = "Crashed Engineer Ship" diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index 28b4159a168b..91bf42ed6305 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -12,10 +12,10 @@ ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) dynamic_mission_types = list( /datum/mission/dynamic/guarded/nt_files, - /datum/mission/dynamic/kill/jerry + /datum/mission/dynamic/signaled/kill/jerry ) -/datum/mission/dynamic/kill/jerry +/datum/mission/dynamic/signaled/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!" author = "I FUCKING WANT HIM HUNG." @@ -67,7 +67,7 @@ suffix = "jungle_cavecrew.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE, RUIN_TAG_MAJOR_LOOT) dynamic_mission_types = list( - /datum/mission/dynamic/kill/frontiersmen, + /datum/mission/dynamic/signaled/kill/frontiersmen, /datum/mission/dynamic/data_reterival ) diff --git a/code/datums/ruins/rockplanet.dm b/code/datums/ruins/rockplanet.dm index 44138ed46ce3..3d879c3eb202 100644 --- a/code/datums/ruins/rockplanet.dm +++ b/code/datums/ruins/rockplanet.dm @@ -36,4 +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) + dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/frontiersmen) diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 625c4cab94bb..352cb070c808 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -106,7 +106,7 @@ qdel(src) return if(!planet.spawned_mission_pois.len) - stack_trace("[src] failed to start because it had no points of intrest to use for its mission") + stack_trace("[src] failed to start because it had no points of interest to use for its mission") qdel(src) return @@ -190,11 +190,7 @@ if(!ispath(a_type, /atom/movable)) CRASH("[src] attempted to spawn bound atom of invalid type [a_type]!") var/atom/movable/bound = new a_type(a_loc) - if(sparks) - do_sparks(3, FALSE, get_turf(bound)) - LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) - RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) - AddComponent(bound, MISSION_IMPORTANCE_CRITICAL, src) + set_bound(bound, destroy_cb, fail_on_delete, sparks) return bound /datum/mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) @@ -202,7 +198,7 @@ do_sparks(3, FALSE, get_turf(bound)) LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) RegisterSignal(bound, COMSIG_PARENT_QDELETING, PROC_REF(bound_deleted)) - AddComponent(bound, MISSION_IMPORTANCE_CRITICAL, src) + bound.AddComponent(/datum/component/mission_important, MISSION_IMPORTANCE_CRITICAL, src) return bound /** @@ -265,30 +261,27 @@ . = ..() /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) - var/atom/item_of_intrest + var/atom/item_of_interest if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(already_spawned) //Search for the item for(var/atom/movable/item_in_poi as anything in get_turf(src)) if(istype(item_in_poi, type_to_spawn)) - item_of_intrest = item_in_poi - stack_trace("[src] is meant to have its item prespawned but could not find it on its tile, resorting to spawning the type instead.") + item_of_interest = item_in_poi + if(item_of_interest) + stack_trace("[src] is meant to have its item prespawned but could not find it on its tile.") else //Spawn the item - item_of_intrest = new type_to_spawn(loc) + item_of_interest = new type_to_spawn(loc) // We dont have an item to return - if(!istype(item_of_intrest)) - CRASH("[src] did not return a item_of_intrest") - . = item_of_intrest - qdel(src) + if(!istype(item_of_interest)) + stack_trace("[src] did not return a item_of_interest") + QDEL_IN(src, 0) + return item_of_interest /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 - /// Shows examine hints on how it relates to a mission /datum/component/mission_important dupe_mode = COMPONENT_DUPE_UNIQUE @@ -307,13 +300,13 @@ SIGNAL_HANDLER if(!isdatum(mission_ref.resolve())) - examine_list += span_notice("[src] was useful to a mission") + examine_list += span_notice("[parent] was useful to a mission") return switch(importance_level) if(MISSION_IMPORTANCE_CRITICAL) - examine_list += span_notice("[src] is critical to a mission") + examine_list += span_notice("[parent] is critical to a mission") if(MISSION_IMPORTANCE_IMPORTANT) - examine_list += span_notice("[src] is important to a mission") + examine_list += span_notice("[parent] is important to a mission") if(MISSION_IMPORTANCE_RELEVENT) - examine_list += span_notice("[src] is relevent to a mission") + examine_list += span_notice("[parent] is relevent to a mission") diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index f9c94439c2dd..519a3e57744d 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -28,7 +28,7 @@ // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(isnull(mission_poi.mission_index) || isnull(mission_index)) + if(isnull(mission_poi.mission_index)) continue if((mission_index != mission_poi.mission_index)) continue @@ -36,12 +36,12 @@ continue mission_poi.use_poi() - if(!isatom(setpiece_item)) - stack_trace("[src] was unable to find its required landmark") - qdel(src) - /datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) - required_item = set_bound(mission_poi.use_poi(setpiece_item), mission_poi.loc, null, TRUE, TRUE) + required_item = mission_poi.use_poi(setpiece_item) + set_bound(required_item, mission_poi.loc, null, TRUE, TRUE) + if(!isatom(required_item)) + stack_trace("[src] did not generate a required item.") + qdel(src) /// For handling logic outside of main piece thats too complex for the basic reiteration or you want to not require indexs to match. /datum/mission/dynamic/proc/spawn_custom_pois(datum/overmap/dynamic/planet) diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index 3f0ff3d137ec..58e45b847474 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -4,57 +4,44 @@ /obj/effect/landmark/mission_poi/main/kill -/datum/mission/dynamic/kill +/datum/mission/dynamic/signaled/kill name = null desc = null setpiece_poi = /obj/effect/landmark/mission_poi/main/kill - setpiece_item - var/mob/target_type - var/mob/required_target + mission_main_signal = COMSIG_MOB_DEATH -/datum/mission/dynamic/kill/generate_mission_details() +/datum/mission/dynamic/signaled/kill/generate_mission_details() . = ..() - 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 items." - -/datum/mission/dynamic/kill/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) - 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 + registered_type = pick(registered_type) + if(ispath(registered_type)) + if(!name) + name = "[registered_type::name] termination" + if(!desc) + desc = "Bounty for a high ranking [registered_type::name] residing on this planet. They should have identifying items." + +/datum/mission/dynamic/signaled/kill/frontiersmen value = 2500 mission_reward = /obj/item/gun/ballistic/automatic/pistol/mauler - target_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer + registered_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer -/datum/mission/dynamic/kill/syndi_docs +/datum/mission/dynamic/signaled/kill/syndi_docs value = 3000 - target_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite + registered_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite setpiece_item = /obj/item/folder/documents/syndicate -/datum/mission/dynamic/kill/megafauna +/datum/mission/dynamic/signaled/kill/megafauna -/datum/mission/dynamic/kill/megafauna/generate_mission_details() - target_type = pick( +/datum/mission/dynamic/signaled/kill/megafauna/generate_mission_details() + registered_type = pick( /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner, /mob/living/simple_animal/hostile/megafauna/claw, ) . = ..() -/datum/mission/dynamic/kill/elite +/datum/mission/dynamic/signaled/kill/elite -/datum/mission/dynamic/kill/elite/generate_mission_details() - target_type = pick( +/datum/mission/dynamic/signaled/kill/elite/generate_mission_details() + registered_type = pick( /mob/living/simple_animal/hostile/asteroid/elite/broodmother, /mob/living/simple_animal/hostile/asteroid/elite/herald, /mob/living/simple_animal/hostile/asteroid/elite/legionnaire, From cc2d06a3b3f008139e0ad91b94a46210d65d984c Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 21:22:13 -0500 Subject: [PATCH 46/77] more changes! --- .../JungleRuins/jungle_cavecrew.dmm | 2 +- code/__HELPERS/unsorted.dm | 2 +- code/datums/ruins/jungle.dm | 4 +- code/game/machinery/bounty_board.dm | 191 ------------------ code/modules/dynamic_missions/mission.dm | 2 + .../modules/dynamic_missions/mission_board.dm | 53 +++++ .../dynamic_missions/missions/dynamic.dm | 7 +- .../dynamic_missions/missions/guarded.dm | 28 +-- .../modules/dynamic_missions/missions/kill.dm | 7 +- .../computers/item/tablet_presets.dm | 2 +- .../file_system/programs/bounty_board.dm | 121 +---------- .../file_system/programs/missionboard.dm | 18 -- .../research/designs/autolathe_designs.dm | 2 +- shiptest.dme | 2 - 14 files changed, 80 insertions(+), 361 deletions(-) delete mode 100644 code/game/machinery/bounty_board.dm delete mode 100644 code/modules/modular_computers/file_system/programs/missionboard.dm diff --git a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm index d68fdf5a2288..7bcf858eecaf 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm @@ -3229,7 +3229,7 @@ /obj/effect/turf_decal/industrial/hatch/yellow, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/crate/secure/loot, -/obj/item/wallframe/bounty_board, +/obj/item/wallframe/bounty_viewer, /turf/open/floor/plasteel/patterned/cargo_one, /area/ruin/jungle/cavecrew/cargo) "Nf" = ( diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 7bd6f72771cc..ab45be40343b 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -681,7 +681,7 @@ GLOBAL_LIST_INIT(WALLITEMS, typecacheof(list( /obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller, /obj/item/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth, /obj/structure/mirror, /obj/structure/cabinet, /obj/machinery/computer/security/telescreen/entertainment, - /obj/structure/sign/picture_frame, /obj/machinery/bounty_board + /obj/structure/sign/picture_frame, /obj/machinery/bounty_viewer ))) GLOBAL_LIST_INIT(WALLITEMS_EXTERNAL, typecacheof(list( diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index 91bf42ed6305..c6ffbb3f8c49 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -11,7 +11,7 @@ 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/guarded/nt_files, + /datum/mission/dynamic/nt_files, /datum/mission/dynamic/signaled/kill/jerry ) @@ -20,7 +20,7 @@ desc = "I WANT MY FUCKIN PUSHIE BACK KILL HIM AND ILL PAY!" author = "I FUCKING WANT HIM HUNG." mission_reward = /obj/item/poster/random_rilena - target_type = /mob/living/simple_animal/hostile/human/syndicate + registered_type = /mob/living/simple_animal/hostile/human/syndicate setpiece_item = list( /obj/item/toy/plush/rilena, /obj/item/toy/plush/tali, diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm deleted file mode 100644 index 4cc3413fe9d9..000000000000 --- a/code/game/machinery/bounty_board.dm +++ /dev/null @@ -1,191 +0,0 @@ -GLOBAL_LIST_EMPTY(allbountyboards) -GLOBAL_LIST_EMPTY(request_list) -/** - * A machine that acts basically like a quest board. - * Enables crew to create requests, crew can sign up to perform the request, and the requester can chose who to pay-out. - */ -/obj/machinery/bounty_board - name = "bounty board" - desc = "Alows you to place requests for goods and services across the sector, as well as pay those who actually did it." - icon = 'icons/obj/terminals.dmi' - icon_state = "request_kiosk" - light_color = LIGHT_COLOR_GREEN - ///Reference to the currently logged in user. - var/datum/bank_account/current_user - ///The station request datum being affected by UI actions. - var/datum/station_request/active_request - ///Value of the currently bounty input - var/bounty_value = 1 - ///Text of the currently written bounty - var/bounty_text = "" - -/obj/machinery/bounty_board/Initialize(mapload, ndir, building) - . = ..() - GLOB.allbountyboards += src - if(building) - setDir(ndir) - pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) - pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0 - -/obj/machinery/bounty_board/Destroy() - GLOB.allbountyboards -= src - . = ..() - -/obj/machinery/bounty_board/attackby(obj/item/I, mob/living/user, params) - . = ..() - if(istype(I,/obj/item/card/bank)) - var/obj/item/card/bank/current_card = I - if(current_card.registered_account) - current_user = current_card.registered_account - return TRUE - to_chat(user, "There's no account assigned with this ID.") - return TRUE - if(I.tool_behaviour == TOOL_WRENCH) - to_chat(user, "You start [anchored ? "un" : ""]securing [name]...") - I.play_tool_sound(src) - if(I.use_tool(src, user, 30)) - playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) - if(machine_stat & BROKEN) - to_chat(user, "The broken remains of [src] fall on the ground.") - new /obj/item/stack/sheet/metal(loc, 3) - new /obj/item/shard(loc) - else - to_chat(user, "You [anchored ? "un" : ""]secure [name].") - new /obj/item/wallframe/bounty_board(loc) - qdel(src) - -/obj/machinery/bounty_board/ui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if(!ui) - ui = new(user, src, "RequestKiosk", name) - ui.open() - -/obj/machinery/bounty_board/ui_data(mob/user) - var/list/data = list() - var/list/formatted_requests = list() - var/list/formatted_applicants = list() - for(var/i in GLOB.request_list) - if(!i) - continue - var/datum/station_request/request = i - formatted_requests += list(list("owner" = request.owner, "value" = request.value, "description" = request.description, "acc_number" = request.req_number)) - if(request.applicants) - for(var/datum/bank_account/j in request.applicants) - formatted_applicants += list(list("name" = j.account_holder, "request_id" = request.owner_account.account_id, "requestee_id" = j.account_id)) - var/obj/item/card/bank/bank_card = user.get_bankcard() - if(bank_card?.registered_account) - current_user = bank_card.registered_account - if(current_user) - data["accountName"] = current_user.account_holder - data["requests"] = formatted_requests - data["applicants"] = formatted_applicants - data["bountyValue"] = bounty_value - data["bountyText"] = bounty_text - return data - -/obj/machinery/bounty_board/ui_act(action, list/params) - . = ..() - if(.) - return - - var/current_ref_num = params["request"] - var/current_app_num = params["applicant"] - var/datum/bank_account/request_target - if(current_ref_num) - for(var/datum/station_request/i in GLOB.request_list) - if("[i.req_number]" == "[current_ref_num]") - active_request = i - break - if(active_request) - for(var/datum/bank_account/j in active_request.applicants) - if("[j.account_id]" == "[current_app_num]") - request_target = j - break - switch(action) - if("createBounty") - if(!current_user || !bounty_text) - playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - for(var/datum/station_request/i in GLOB.request_list) - if("[i.req_number]" == "[current_user.account_id]") - say("Account already has active bounty.") - return - var/datum/station_request/curr_request = new /datum/station_request(current_user.account_holder, bounty_value,bounty_text,current_user.account_id, current_user) - GLOB.request_list += list(curr_request) - for(var/obj/i in GLOB.allbountyboards) - i.say("New bounty has been added!") - playsound(i.loc, 'sound/effects/cashregister.ogg', 30, TRUE) - if("apply") - if(!current_user) - say("Please swipe a valid ID first.") - return TRUE - if(current_user.account_holder == active_request.owner) - playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - active_request.applicants += list(current_user) - if("payApplicant") - if(!current_user) - return - if(!current_user.has_money(active_request.value) || (current_user.account_holder != active_request.owner)) - playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE) - return - request_target.transfer_money(current_user, active_request.value) - say("Paid out [active_request.value] credits.") - return TRUE - if("clear") - if(current_user) - current_user = null - say("Account Reset.") - return TRUE - if("deleteRequest") - if(!active_request || !current_user) - playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return FALSE - if(active_request?.owner != current_user?.account_holder) - playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - say("Deleted current request.") - GLOB.request_list.Remove(active_request) - return TRUE - if("bountyVal") - bounty_value = text2num(params["bountyval"]) - if(!bounty_value) - bounty_value = 1 - if("bountyText") - bounty_text = (params["bountytext"]) - . = TRUE - -/obj/item/wallframe/bounty_board - name = "disassembled bounty board" - desc = "Used to build a new bounty board, just secure to the wall." - icon_state = "request_kiosk" - custom_materials = list(/datum/material/iron=14000, /datum/material/glass=8000) - result_path = /obj/machinery/bounty_board - inverse = FALSE - -/** - * A combined all in one datum that stores everything about the request, the requester's account, as well as the requestee's account - * All of this is passed to the Request Console UI in order to present in organized way. - */ -/datum/station_request - ///Name of the Request Owner. - var/owner - ///Value of the request. - var/value - ///Text description of the request to be shown within the UI. - var/description - ///Internal number of the request for organizing. Id card number. - var/req_number - ///The account of the request owner. - var/datum/bank_account/owner_account - ///the account of the request fulfiller. - var/list/applicants = list() - -/datum/station_request/New(owned, newvalue, newdescription, reqnum, own_account) - . = ..() - owner = owned - value = newvalue - description = newdescription - req_number = reqnum - if(istype(own_account, /datum/bank_account)) - owner_account = own_account diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 352cb070c808..8cc55c0d7b69 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -264,6 +264,8 @@ var/atom/item_of_interest if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn + if(!ispath(type_to_spawn)) + stack_track("[src] didnt get passed a type.") if(already_spawned) //Search for the item for(var/atom/movable/item_in_poi as anything in get_turf(src)) if(istype(item_in_poi, type_to_spawn)) diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index 761ac34b30f5..454c834e184e 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -125,3 +125,56 @@ name = "\improper Outpost mission turn-in pad" icon = 'icons/obj/telescience.dmi' icon_state = "lpad-idle-o" + +/obj/machinery/bounty_viewer + name = "bounty viewer" + desc = "A multi-platform network for placing requests across the sector, this one is view only." + icon = 'icons/obj/terminals.dmi' + icon_state = "request_kiosk" + light_color = LIGHT_COLOR_GREEN + +/obj/machinery/bounty_viewer/Initialize(mapload, ndir, building) + . = ..() + if(building) + setDir(ndir) + pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) + pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0 + +/obj/machinery/bounty_viewer/attackby(obj/item/I, mob/living/user, params) + . = ..() + if(I.tool_behaviour == TOOL_WRENCH) + to_chat(user, "You start [anchored ? "un" : ""]securing [name]...") + I.play_tool_sound(src) + if(I.use_tool(src, user, 30)) + playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) + if(machine_stat & BROKEN) + to_chat(user, "The broken remains of [src] fall on the ground.") + new /obj/item/stack/sheet/metal(loc, 3) + new /obj/item/shard(loc) + else + to_chat(user, "You [anchored ? "un" : ""]secure [name].") + new /obj/item/wallframe/bounty_viewer(loc) + qdel(src) + +/obj/machinery/bounty_viewer/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "MissionBoard", name) + ui.open() + +/obj/machinery/bounty_viewer/ui_data(mob/user) + var/list/data = list() + data["missions"] = list() + for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + data["missions"] += list(M.get_tgui_info()) + data["pad"] = FALSE + data["id_inserted"] = FALSE + return data + +/obj/item/wallframe/bounty_viewer + name = "disassembled bounty viewer" + desc = "Used to build a new bounty viewer, just secure to the wall." + icon_state = "request_kiosk" + custom_materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) + result_path = /obj/machinery/bounty_viewer + inverse = FALSE diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index 519a3e57744d..b6edb649457a 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -28,12 +28,11 @@ // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(isnull(mission_poi.mission_index)) + if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) continue - if((mission_index != mission_poi.mission_index)) - continue - if(istype(mission_poi, /obj/effect/landmark/mission_poi/main)) + if(istype(mission_poi, /obj/effect/landmark/mission_poi/main) || !ispath(mission_poi.type_to_spawn)) continue + mission_poi.use_poi() /datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm index cb3a7e65b8ca..78cf4c5ec99b 100644 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ b/code/modules/dynamic_missions/missions/guarded.dm @@ -1,26 +1,7 @@ /obj/effect/landmark/mission_poi/guard icon_state = "guard" -/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/guarded/spawn_custom_pois(datum/overmap/dynamic/planet) - . = ..() - for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) - continue - if(mission_poi.type == guard_poi) - guard_list += list(spawn_guard(mission_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 +/datum/mission/dynamic/nt_files name = "NT asset recovery" value = 1250 mission_reward = list( @@ -31,13 +12,8 @@ faction = /datum/faction/nt setpiece_item = /obj/item/documents/nanotrasen -/datum/mission/dynamic/guarded/nt_files/generate_mission_details() +/datum/mission/dynamic/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/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index 58e45b847474..8bd0edfff69b 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -13,11 +13,12 @@ /datum/mission/dynamic/signaled/kill/generate_mission_details() . = ..() registered_type = pick(registered_type) - if(ispath(registered_type)) + if(ispath(registered_type, /mob)) + var/mob/mission_mob = registered_type if(!name) - name = "[registered_type::name] termination" + name = "[mission_mob::name] termination" if(!desc) - desc = "Bounty for a high ranking [registered_type::name] residing on this planet. They should have identifying items." + desc = "Bounty for a high ranking [mission_mob::name] residing on this planet. They should have identifying items." /datum/mission/dynamic/signaled/kill/frontiersmen value = 2500 diff --git a/code/modules/modular_computers/computers/item/tablet_presets.dm b/code/modules/modular_computers/computers/item/tablet_presets.dm index d2d16e483765..58fc17f2d6a1 100644 --- a/code/modules/modular_computers/computers/item/tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/tablet_presets.dm @@ -29,7 +29,7 @@ install_component(new /obj/item/computer_hardware/network_card) install_component(new /obj/item/computer_hardware/printer/mini) hard_drive.store_file(new /datum/computer_file/program/shipping) - \hard_drive.store_file(new /datum/computer_file/program/mission) + \hard_drive.store_file(new /datum/computer_file/program/bounty_board) /// Given by the syndicate as part of the contract uplink bundle - loads in the Contractor Uplink. /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize() diff --git a/code/modules/modular_computers/file_system/programs/bounty_board.dm b/code/modules/modular_computers/file_system/programs/bounty_board.dm index b3b9051e5b8f..fb575c6f0af6 100644 --- a/code/modules/modular_computers/file_system/programs/bounty_board.dm +++ b/code/modules/modular_computers/file_system/programs/bounty_board.dm @@ -1,120 +1,19 @@ +///I will work on reimplmenting player bounties! /datum/computer_file/program/bounty_board filename = "bountyboard" - filedesc = "Bounty Board Request Network" + filedesc = "Bounty Network Viewer" program_icon_state = "bountyboard" - extended_desc = "A multi-platform network for placing requests across the sector, with payment across the network being possible.." + extended_desc = "A multi-platform network for placing requests across the sector, modular software cant handle item transfer so this is only for viewing." requires_ntnet = TRUE size = 10 - tgui_id = "NtosRequestKiosk" - ///Reference to the currently logged in user. - var/datum/bank_account/current_user - ///The station request datum being affected by UI actions. - var/datum/station_request/active_request - ///Value of the currently bounty input - var/bounty_value = 1 - ///Text of the currently written bounty - var/bounty_text = "" - ///Has the app been added to the network yet? - var/networked = FALSE + available_on_ntnet = TRUE + tgui_id = "NtosMission" /datum/computer_file/program/bounty_board/ui_data(mob/user) var/list/data = get_header_data() - var/list/formatted_requests = list() - var/list/formatted_applicants = list() - var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD] - if(!networked) - GLOB.allbountyboards += computer - networked = TRUE - if(card_slot && card_slot.bank_card && card_slot.bank_card.registered_account) - current_user = card_slot.bank_card.registered_account - for(var/i in GLOB.request_list) - if(!i) - continue - var/datum/station_request/request = i - formatted_requests += list(list("owner" = request.owner, "value" = request.value, "description" = request.description, "acc_number" = request.req_number)) - if(request.applicants) - for(var/datum/bank_account/j in request.applicants) - formatted_applicants += list(list("name" = j.account_holder, "request_id" = request.owner_account.account_id, "requestee_id" = j.account_id)) - if(current_user) - data["accountName"] = current_user.account_holder - data["requests"] = formatted_requests - data["applicants"] = formatted_applicants - data["bountyValue"] = bounty_value - data["bountyText"] = bounty_text + data["missions"] = list() + for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + data["missions"] += list(M.get_tgui_info()) + data["pad"] = FALSE + data["id_inserted"] = FALSE return data - -/datum/computer_file/program/bounty_board/ui_act(action, list/params) - . = ..() - if(.) - return - var/current_ref_num = params["request"] - var/current_app_num = params["applicant"] - var/datum/bank_account/request_target - if(current_ref_num) - for(var/datum/station_request/i in GLOB.request_list) - if("[i.req_number]" == "[current_ref_num]") - active_request = i - break - if(active_request) - for(var/datum/bank_account/j in active_request.applicants) - if("[j.account_id]" == "[current_app_num]") - request_target = j - break - switch(action) - if("createBounty") - if(!current_user || !bounty_text) - playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - for(var/datum/station_request/i in GLOB.request_list) - if("[i.req_number]" == "[current_user.account_id]") - computer.say("Account already has active bounty.") - return - var/datum/station_request/curr_request = new /datum/station_request(current_user.account_holder, bounty_value,bounty_text,current_user.account_id, current_user) - GLOB.request_list += list(curr_request) - for(var/obj/i in GLOB.allbountyboards) - i.say("New bounty has been added!") - playsound(i.loc, 'sound/effects/cashregister.ogg', 30, TRUE) - return TRUE - if("apply") - if(!current_user) - computer.say("Please swipe a valid ID first.") - return TRUE - if(current_user.account_holder == active_request.owner) - playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - active_request.applicants += list(current_user) - if("payApplicant") - if(!current_user) - return - if(!current_user.has_money(active_request.value) || (current_user.account_holder != active_request.owner)) - playsound(computer, 'sound/machines/buzz-sigh.ogg', 30, TRUE) - return - request_target.transfer_money(current_user, active_request.value) - computer.say("Paid out [active_request.value] credits.") - return TRUE - if("clear") - if(current_user) - current_user = null - computer.say("Account Reset.") - return TRUE - if("deleteRequest") - if(!current_user) - playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - if(active_request.owner != current_user.account_holder) - playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE) - return TRUE - computer.say("Deleted current request.") - GLOB.request_list.Remove(active_request) - return TRUE - if("bountyVal") - bounty_value = text2num(params["bountyval"]) - if(!bounty_value) - bounty_value = 1 - if("bountyText") - bounty_text = (params["bountytext"]) - . = TRUE - -/datum/computer_file/program/bounty_board/Destroy() - GLOB.allbountyboards -= computer - . = ..() diff --git a/code/modules/modular_computers/file_system/programs/missionboard.dm b/code/modules/modular_computers/file_system/programs/missionboard.dm deleted file mode 100644 index c273bb77f7fd..000000000000 --- a/code/modules/modular_computers/file_system/programs/missionboard.dm +++ /dev/null @@ -1,18 +0,0 @@ -/datum/computer_file/program/mission - filename = "missionviewer" - filedesc = "Mission viewer" - program_icon_state = "bountyboard" - extended_desc = "A multi-platform network for placing requests across the sector, with payment across the network being possible.." - requires_ntnet = TRUE - size = 10 - available_on_ntnet = TRUE - tgui_id = "NtosMission" - -/datum/computer_file/program/mission/ui_data(mob/user) - var/list/data = get_header_data() - data["missions"] = list() - for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) - data["missions"] += list(M.get_tgui_info()) - data["pad"] = FALSE - data["id_inserted"] = FALSE - return data diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 5ac2370dc694..cfbf587a453e 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -727,7 +727,7 @@ id = "bountyboard_frame" build_type = AUTOLATHE materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) - build_path = /obj/item/wallframe/bounty_board + build_path = /obj/item/wallframe/bounty_viewer category = list("initial", "Construction") /datum/design/syringe diff --git a/shiptest.dme b/shiptest.dme index fceb2adee267..34ad95207f1e 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -889,7 +889,6 @@ #include "code\game\machinery\autolathe.dm" #include "code\game\machinery\bank_machine.dm" #include "code\game\machinery\beacon.dm" -#include "code\game\machinery\bounty_board.dm" #include "code\game\machinery\buttons.dm" #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" @@ -2812,7 +2811,6 @@ #include "code\modules\modular_computers\file_system\programs\cargoship.dm" #include "code\modules\modular_computers\file_system\programs\configurator.dm" #include "code\modules\modular_computers\file_system\programs\file_browser.dm" -#include "code\modules\modular_computers\file_system\programs\missionboard.dm" #include "code\modules\modular_computers\file_system\programs\ntdownloader.dm" #include "code\modules\modular_computers\file_system\programs\ntmonitor.dm" #include "code\modules\modular_computers\file_system\programs\ntnrc_client.dm" From 6b99bf10e340ccfcc9ef00f9c982a5c00ef322f8 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 21:55:47 -0500 Subject: [PATCH 47/77] more changes, removes awaymission areas. --- .../LavaRuins/lavaland_crashed_starwalker.dmm | 5 +- _maps/map_files/generic/CentCom.dmm | 14 +- _maps/map_files/generic/blank.dmm | 14 +- code/datums/ruins/lavaland.dm | 7 + code/game/area/areas/away_content.dm | 30 +--- code/game/turfs/open/dirtystation.dm | 3 +- .../awaymissions/mission_code/Academy.dm | 31 ----- .../awaymissions/mission_code/Cabin.dm | 37 ----- .../awaymissions/mission_code/caves.dm | 30 ---- .../awaymissions/mission_code/centcomAway.dm | 36 ----- .../awaymissions/mission_code/challenge.dm | 17 --- .../awaymissions/mission_code/murderdome.dm | 5 - .../awaymissions/mission_code/research.dm | 64 --------- .../awaymissions/mission_code/snowdin.dm | 131 ------------------ .../awaymissions/mission_code/spacebattle.dm | 43 ------ code/modules/dynamic_missions/landmark.dm | 60 ++++++++ code/modules/dynamic_missions/mission.dm | 43 ------ .../modules/dynamic_missions/mission_board.dm | 29 ++-- .../dynamic_missions/missions/dynamic.dm | 17 +++ .../dynamic_missions/missions/guarded.dm | 19 --- .../modules/dynamic_missions/missions/kill.dm | 3 +- shiptest.dme | 2 +- .../tgui/interfaces/OvermapTokenManager.tsx | 6 + 23 files changed, 126 insertions(+), 520 deletions(-) create mode 100644 code/modules/dynamic_missions/landmark.dm delete mode 100644 code/modules/dynamic_missions/missions/guarded.dm diff --git a/_maps/RandomRuins/LavaRuins/lavaland_crashed_starwalker.dmm b/_maps/RandomRuins/LavaRuins/lavaland_crashed_starwalker.dmm index 336588e2d807..d25f4a667b47 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_crashed_starwalker.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_crashed_starwalker.dmm @@ -34,9 +34,7 @@ /obj/machinery/atmospherics/pipe/simple/orange/hidden{ dir = 8 }, -/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer4, /obj/structure/cable/orange{ icon_state = "5-8" @@ -2541,6 +2539,7 @@ pixel_x = 32 }, /obj/effect/decal/cleanable/dirt, +/obj/effect/landmark/mission_poi/main/blackbox, /turf/open/floor/plating/asteroid/basalt/lava_land_surface/lit, /area/ruin/unpowered/crashed_starwalker) "PH" = ( diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 229134b7eac7..dc3ae26b3e20 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -3964,34 +3964,34 @@ /area/centcom/evac) "aLV" = ( /turf/closed/indestructible/riveted, -/area/awaymission/errorroom) +/area/errorroom) "aLW" = ( /turf/closed/mineral/ash_rock, -/area/awaymission/errorroom) +/area/errorroom) "aLX" = ( /obj/structure/speaking_tile, /turf/closed/mineral/ash_rock, -/area/awaymission/errorroom) +/area/errorroom) "aLY" = ( /obj/item/rupee, /turf/open/floor/plating/ashplanet/wateryrock{ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "aLZ" = ( /turf/open/floor/plating/ashplanet/wateryrock{ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "aMa" = ( /obj/effect/landmark/error, /turf/open/floor/plating/ashplanet/wateryrock{ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "aMb" = ( /obj/structure/signpost/salvation{ icon = 'icons/obj/structures.dmi'; @@ -4002,7 +4002,7 @@ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "aMc" = ( /obj/structure/lattice, /turf/open/space, diff --git a/_maps/map_files/generic/blank.dmm b/_maps/map_files/generic/blank.dmm index b918e3fcaead..522ed46ce706 100644 --- a/_maps/map_files/generic/blank.dmm +++ b/_maps/map_files/generic/blank.dmm @@ -4,17 +4,17 @@ /area/space) "b" = ( /turf/closed/indestructible/riveted, -/area/awaymission/errorroom) +/area/errorroom) "p" = ( /turf/closed/mineral/ash_rock, -/area/awaymission/errorroom) +/area/errorroom) "t" = ( /obj/effect/landmark/error, /turf/open/floor/plating/ashplanet/wateryrock{ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "D" = ( /turf/closed/indestructible/riveted, /area/start) @@ -24,7 +24,7 @@ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "I" = ( /turf/open/floor/holofloor/hyperspace, /area/space) @@ -49,17 +49,17 @@ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "R" = ( /obj/structure/speaking_tile, /turf/closed/mineral/ash_rock, -/area/awaymission/errorroom) +/area/errorroom) "T" = ( /turf/open/floor/plating/ashplanet/wateryrock{ initial_gas_mix = "o2=22;n2=82;TEMP=293.15"; planetary_atmos = 0 }, -/area/awaymission/errorroom) +/area/errorroom) "U" = ( /obj/effect/landmark/start/new_player, /turf/open/floor/plating, diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 7a60d4e1223f..0d7ece39d8b2 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -29,12 +29,19 @@ id = "wreck_factory" description = "A Nanotrasen processing facility, assaulted by a pirate raid that has killed most of the staff. The offices however, remain unbreached for now." suffix = "lavaland_surface_wrecked_factory.dmm" + dynamic_mission_types = list(/datum/mission/dynamic/nanotrasen_docs) + +/datum/mission/dynamic/nanotrasen_docs + name = "Recover some nanotrasen files." + value = 2500 + setpiece_item = /obj/item/documents/nanotrasen /datum/map_template/ruin/lavaland/fallenstar name = "Crashed Starwalker" id = "crashed_star" description = "A crashed pirate ship. It would seem that it's crew died a while ago." suffix = "lavaland_crashed_starwalker.dmm" + dynamic_mission_types = list(/datum/mission/dynamic/blackbox) /datum/map_template/ruin/lavaland/abandonedlisteningpost name = "Abandoned Listening Post" diff --git a/code/game/area/areas/away_content.dm b/code/game/area/areas/away_content.dm index 53ccc590c72a..04b9b3badcbc 100644 --- a/code/game/area/areas/away_content.dm +++ b/code/game/area/areas/away_content.dm @@ -1,33 +1,7 @@ -/* -Unused icons for new areas are "awaycontent1" ~ "awaycontent30" -*/ - - -// Away Missions -/area/awaymission - name = "Strange Location" +/area/errorroom + name = "Super Secret Room" icon_state = "away" has_gravity = STANDARD_GRAVITY ambientsounds = AWAY_MISSION sound_environment = SOUND_ENVIRONMENT_ROOM - -/area/awaymission/beach - name = "Beach" - icon_state = "away" - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - requires_power = FALSE - has_gravity = STANDARD_GRAVITY - ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg','sound/ambience/ambiodd.ogg','sound/ambience/ambinice.ogg') - -/area/awaymission/errorroom - name = "Super Secret Room" - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - has_gravity = STANDARD_GRAVITY - -/area/awaymission/vr - name = "Virtual Reality" - icon_state = "awaycontent1" - requires_power = FALSE dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - var/pacifist = TRUE // if when you enter this zone, you become a pacifist or not - var/death = FALSE // if when you enter this zone, you die diff --git a/code/game/turfs/open/dirtystation.dm b/code/game/turfs/open/dirtystation.dm index 29e13585bb7d..ad0110abeb80 100644 --- a/code/game/turfs/open/dirtystation.dm +++ b/code/game/turfs/open/dirtystation.dm @@ -53,8 +53,7 @@ return //Bathrooms. Blood, vomit, and shavings in the sinks. - var/static/list/bathroom_dirt_areas = typecacheof(list( /area/ship/crew/toilet, - /area/awaymission/research/interior/bathroom)) + var/static/list/bathroom_dirt_areas = typecacheof(list(/area/ship/crew/toilet)) if(is_type_in_typecache(A, bathroom_dirt_areas)) if(prob(40)) if(prob(90)) diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm index 850d0e91ba09..58c25bf0bf64 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -1,34 +1,3 @@ - -//Academy Areas - -/area/awaymission/academy - name = "Academy Asteroids" - icon_state = "away" - -/area/awaymission/academy/headmaster - name = "Academy Fore Block" - icon_state = "away1" - -/area/awaymission/academy/classrooms - name = "Academy Classroom Block" - icon_state = "away2" - -/area/awaymission/academy/academyaft - name = "Academy Ship Aft Block" - icon_state = "away3" - -/area/awaymission/academy/academygate - name = "Academy Gateway" - icon_state = "away4" - -/area/awaymission/academy/academycellar - name = "Academy Cellar" - icon_state = "away4" - -/area/awaymission/academy/academyengine - name = "Academy Engine" - icon_state = "away4" - //Academy Items /obj/item/paper/fluff/awaymissions/academy/console_maint diff --git a/code/modules/awaymissions/mission_code/Cabin.dm b/code/modules/awaymissions/mission_code/Cabin.dm index bfbb8bbf52ea..2e289579be1a 100644 --- a/code/modules/awaymissions/mission_code/Cabin.dm +++ b/code/modules/awaymissions/mission_code/Cabin.dm @@ -1,40 +1,3 @@ - -/*Cabin areas*/ -/area/awaymission/cabin - name = "Cabin" - icon_state = "away2" - requires_power = TRUE - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - -/area/awaymission/cabin/snowforest - name = "Snow Forest" - icon_state = "away" - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - -/area/awaymission/cabin/snowforest/sovietsurface - name = "Snow Forest" - icon_state = "awaycontent29" - requires_power = FALSE - -/area/awaymission/cabin/lumbermill - name = "Lumbermill" - icon_state = "away3" - requires_power = FALSE - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - -/area/awaymission/cabin/caves/sovietcave - name = "Soviet Bunker" - icon_state = "awaycontent4" - -/area/awaymission/cabin/caves - name = "North Snowdin Caves" - icon_state = "awaycontent15" - dynamic_lighting = DYNAMIC_LIGHTING_FORCED - -/area/awaymission/cabin/caves/mountain - name = "North Snowdin Mountains" - icon_state = "awaycontent24" - /obj/structure/firepit name = "firepit" desc = "Warm and toasty." diff --git a/code/modules/awaymissions/mission_code/caves.dm b/code/modules/awaymissions/mission_code/caves.dm index abaaceefd604..8ace0c86bb0c 100644 --- a/code/modules/awaymissions/mission_code/caves.dm +++ b/code/modules/awaymissions/mission_code/caves.dm @@ -1,33 +1,3 @@ -//Areas - -/area/awaymission/caves/BMP_asteroid - name = "\improper BMP Asteroid Level 1" - icon_state = "awaycontent1" - -/area/awaymission/caves/BMP_asteroid/level_two - name = "\improper BMP Asteroid Level 2" - icon_state = "awaycontent2" - -/area/awaymission/caves/BMP_asteroid/level_three - name = "\improper BMP Asteroid Level 3" - icon_state = "awaycontent3" - -/area/awaymission/caves/BMP_asteroid/level_four - name = "\improper BMP Asteroid Level 4" - icon_state = "awaycontent4" - -/area/awaymission/caves/research - name = "Research Outpost" - icon_state = "awaycontent5" - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - -/area/awaymission/caves/northblock //engineering, bridge (not really north but it doesnt really need its own APC) - -/area/awaymission/caves/listeningpost - name = "Listening Post" - icon_state = "awaycontent6" - requires_power = FALSE - //caves papers /obj/item/paper/crumpled/awaymissions/caves/unsafe_area diff --git a/code/modules/awaymissions/mission_code/centcomAway.dm b/code/modules/awaymissions/mission_code/centcomAway.dm index 60741701b4d8..7bcafb0d1345 100644 --- a/code/modules/awaymissions/mission_code/centcomAway.dm +++ b/code/modules/awaymissions/mission_code/centcomAway.dm @@ -1,39 +1,3 @@ -//centcomAway areas - -/area/awaymission/centcomAway - name = "XCC-P5831" - icon_state = "away" - requires_power = FALSE - -/area/awaymission/centcomAway/general - name = "XCC-P5831" - ambientsounds = list('sound/ambience/ambigen3.ogg') - -/area/awaymission/centcomAway/maint - name = "XCC-P5831 Maintenance" - icon_state = "away1" - ambientsounds = list('sound/ambience/ambisin1.ogg') - -/area/awaymission/centcomAway/thunderdome - name = "XCC-P5831 Thunderdome" - icon_state = "away2" - ambientsounds = list('sound/ambience/ambisin2.ogg') - -/area/awaymission/centcomAway/cafe - name = "XCC-P5831 Kitchen Arena" - icon_state = "away3" - ambientsounds = list('sound/ambience/ambisin3.ogg') - -/area/awaymission/centcomAway/courtroom - name = "XCC-P5831 Courtroom" - icon_state = "away4" - ambientsounds = list('sound/ambience/ambisin4.ogg') - -/area/awaymission/centcomAway/hangar - name = "XCC-P5831 Hangars" - icon_state = "away4" - ambientsounds = list('sound/ambience/ambigen5.ogg') - //centcomAway items /obj/item/paper/pamphlet/centcom/visitor_info diff --git a/code/modules/awaymissions/mission_code/challenge.dm b/code/modules/awaymissions/mission_code/challenge.dm index 6f8bb473b77a..9e8abe6356b6 100644 --- a/code/modules/awaymissions/mission_code/challenge.dm +++ b/code/modules/awaymissions/mission_code/challenge.dm @@ -1,20 +1,3 @@ -//Challenge Areas - -/area/awaymission/challenge/start - name = "Where Am I?" - icon_state = "away" - -/area/awaymission/challenge/main - name = "Danger Room" - icon_state = "away1" - requires_power = FALSE - -/area/awaymission/challenge/end - name = "Administration" - icon_state = "away2" - requires_power = FALSE - - /obj/machinery/power/emitter/energycannon name = "Energy Cannon" desc = "A heavy duty industrial laser." diff --git a/code/modules/awaymissions/mission_code/murderdome.dm b/code/modules/awaymissions/mission_code/murderdome.dm index 914a1f2828c7..10bb96c12baa 100644 --- a/code/modules/awaymissions/mission_code/murderdome.dm +++ b/code/modules/awaymissions/mission_code/murderdome.dm @@ -1,8 +1,3 @@ -/area/awaymission/vr/murderdome - name = "Murderdome" - icon_state = "awaycontent8" - pacifist = FALSE - /obj/structure/window/reinforced/fulltile/indestructable name = "robust window" flags_1 = PREVENT_CLICK_UNDER_1 | NODECONSTRUCT_1 diff --git a/code/modules/awaymissions/mission_code/research.dm b/code/modules/awaymissions/mission_code/research.dm index b3e4ff8b863b..de1a8c88e574 100644 --- a/code/modules/awaymissions/mission_code/research.dm +++ b/code/modules/awaymissions/mission_code/research.dm @@ -1,67 +1,3 @@ -//Research Base Areas//-- - -/area/awaymission/research - name = "Research Outpost" - icon_state = "away" - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - -/area/awaymission/research/interior - name = "Research Inside" - requires_power = TRUE - icon_state = "away2" - -/area/awaymission/research/interior/cryo - name = "Research Cryostasis Room" - icon_state = "medbay" - -/area/awaymission/research/interior/clonestorage - name = "Research Clone Storage" - icon_state = "cloning" - -/area/awaymission/research/interior/genetics - name = "Research Genetics Research" - icon_state = "genetics" - -/area/awaymission/research/interior/engineering - name = "Research Engineering" - icon_state = "engine" - -/area/awaymission/research/interior/security - name = "Research Security" - icon_state = "security" - -/area/awaymission/research/interior/secure - name = "Research Secure Vault" - -/area/awaymission/research/interior/maint - name = "Research Maintenance" - icon_state = "maintcentral" - -/area/awaymission/research/interior/dorm - name = "Research Dorms" - icon_state = "Sleep" - -/area/awaymission/research/interior/escapepods - name = "Research Escape Wing" - icon_state = "exit" - -/area/awaymission/research/interior/gateway - name = "Research Gateway" - icon_state = "start" - -/area/awaymission/research/interior/bathroom - name = "Research Bathrooms" - icon_state = "restrooms" - -/area/awaymission/research/interior/medbay - name = "Research Medbay" - icon_state = "medbay" - -/area/awaymission/research/exterior - name = "Research Exterior" - icon_state = "unknown" - - //research papers /obj/item/paper/crumpled/awaymissions/research/sensitive_info diff --git a/code/modules/awaymissions/mission_code/snowdin.dm b/code/modules/awaymissions/mission_code/snowdin.dm index a240bf9f8404..9cfd3249db2b 100644 --- a/code/modules/awaymissions/mission_code/snowdin.dm +++ b/code/modules/awaymissions/mission_code/snowdin.dm @@ -1,134 +1,3 @@ -//Snow Valley Areas//-- - -/area/awaymission/snowdin - name = "Snowdin" - icon_state = "awaycontent1" - requires_power = FALSE - dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - -/area/awaymission/snowdin/outside - name = "Snowdin Tundra Plains" - icon_state = "awaycontent25" - -/area/awaymission/snowdin/post - name = "Snowdin Outpost" - icon_state = "awaycontent2" - requires_power = TRUE - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - -/area/awaymission/snowdin/post/medbay - name = "Snowdin Outpost - Medbay" - icon_state = "awaycontent3" - -/area/awaymission/snowdin/post/secpost - name = "Snowdin Outpost - Security Checkpoint" - icon_state = "awaycontent4" - -/area/awaymission/snowdin/post/hydro - name = "Snowdin Outpost - Hydroponics" - icon_state = "awaycontent5" - -/area/awaymission/snowdin/post/messhall - name = "Snowdin Outpost - Mess Hall" - icon_state = "awaycontent6" - -/area/awaymission/snowdin/post/gateway - name = "Snowdin Outpost - Gateway" - icon_state = "awaycontent7" - -/area/awaymission/snowdin/post/dorm - name = "Snowdin Outpost - Dorms" - icon_state = "awaycontent8" - -/area/awaymission/snowdin/post/kitchen - name = "Snowdin Outpost - Kitchen" - icon_state = "awaycontent9" - -/area/awaymission/snowdin/post/engineering - name = "Snowdin Outpost - Engineering" - icon_state = "awaycontent10" - -/area/awaymission/snowdin/post/custodials - name = "Snowdin Outpost - Custodials" - icon_state = "awaycontent11" - -/area/awaymission/snowdin/post/research - name = "Snowdin Outpost - Research Area" - icon_state = "awaycontent12" - -/area/awaymission/snowdin/post/garage - name = "Snowdin Outpost - Garage" - icon_state = "awaycontent13" - -/area/awaymission/snowdin/post/minipost - name = "Snowdin Outpost - Recon Post" - icon_state = "awaycontent19" - -/area/awaymission/snowdin/post/mining_main - name = "Snowdin Outpost - Mining Post" - icon_state = "awaycontent21" - -/area/awaymission/snowdin/post/mining_main/mechbay - name = "Snowdin Outpost - Mining Post Mechbay" - icon_state = "awaycontent25" - -/area/awaymission/snowdin/post/mining_main/robotics - name = "Snowdin Outpost - Mining Post Robotics" - icon_state = "awaycontent26" - -/area/awaymission/snowdin/post/cavern1 - name = "Snowdin Outpost - Cavern Outpost 1" - icon_state = "awaycontent27" - -/area/awaymission/snowdin/post/cavern2 - name = "Snowdin Outpost - Cavern Outpost 2" - icon_state = "awaycontent28" - -/area/awaymission/snowdin/post/mining_dock - name = "Snowdin Outpost - Underground Mine Post" - icon_state = "awaycontent22" - -/area/awaymission/snowdin/post/broken_shuttle - name = "Snowdin Outpost - Broken Transit Shuttle" - icon_state = "awaycontent20" - requires_power = FALSE - -/area/awaymission/snowdin/igloo - name = "Snowdin Igloos" - icon_state = "awaycontent14" - dynamic_lighting = DYNAMIC_LIGHTING_FORCED - -/area/awaymission/snowdin/cave - name = "Snowdin Caves" - icon_state = "awaycontent15" - dynamic_lighting = DYNAMIC_LIGHTING_FORCED - -/area/awaymission/snowdin/cave/cavern - name = "Snowdin Depths" - icon_state = "awaycontent23" - -/area/awaymission/snowdin/cave/mountain - name = "Snowdin Mountains" - icon_state = "awaycontent24" - - -/area/awaymission/snowdin/base - name = "Snowdin Main Base" - icon_state = "awaycontent16" - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - requires_power = TRUE - -/area/awaymission/snowdin/dungeon1 - name = "Snowdin Depths" - icon_state = "awaycontent17" - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - -/area/awaymission/snowdin/sekret - name = "Snowdin Operations" - icon_state = "awaycontent18" - dynamic_lighting = DYNAMIC_LIGHTING_ENABLED - requires_power = TRUE - //liquid plasma!!!!!!// /turf/open/floor/plasteel/dark/snowdin diff --git a/code/modules/awaymissions/mission_code/spacebattle.dm b/code/modules/awaymissions/mission_code/spacebattle.dm index f0131d830cd0..9a63a6fdbfa9 100644 --- a/code/modules/awaymissions/mission_code/spacebattle.dm +++ b/code/modules/awaymissions/mission_code/spacebattle.dm @@ -1,46 +1,3 @@ -//Spacebattle Areas - -/area/awaymission/spacebattle - name = "Space Battle" - icon_state = "awaycontent1" - requires_power = FALSE - -/area/awaymission/spacebattle/cruiser - name = "\improper Nanotrasen Cruiser" - icon_state = "awaycontent2" - -/area/awaymission/spacebattle/syndicate1 - name = "Syndicate Assault Ship 1" - icon_state = "awaycontent3" - -/area/awaymission/spacebattle/syndicate2 - name = "Syndicate Assault Ship 2" - icon_state = "awaycontent4" - -/area/awaymission/spacebattle/syndicate3 - name = "Syndicate Assault Ship 3" - icon_state = "awaycontent5" - -/area/awaymission/spacebattle/syndicate4 - name = "Syndicate War Sphere 1" - icon_state = "awaycontent6" - -/area/awaymission/spacebattle/syndicate5 - name = "Syndicate War Sphere 2" - icon_state = "awaycontent7" - -/area/awaymission/spacebattle/syndicate6 - name = "Syndicate War Sphere 3" - icon_state = "awaycontent8" - -/area/awaymission/spacebattle/syndicate7 - name = "Syndicate Fighter" - icon_state = "awaycontent9" - -/area/awaymission/spacebattle/secret - name = "Hidden Chamber" - icon_state = "awaycontent10" - /mob/living/simple_animal/hostile/human/syndicate/ranged/spacebattle loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier, /obj/item/gun/ballistic/automatic/smg/cobra, diff --git a/code/modules/dynamic_missions/landmark.dm b/code/modules/dynamic_missions/landmark.dm new file mode 100644 index 000000000000..31d4b6e46aaa --- /dev/null +++ b/code/modules/dynamic_missions/landmark.dm @@ -0,0 +1,60 @@ +/obj/effect/landmark/mission_poi + name = "mission poi" + icon = 'icons/effects/mission_poi.dmi' + 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 would otherwise use the same poi's + var/mission_index = null + ///Prefered over the passed one, used for varediting primarly. + var/type_to_spawn + +/obj/effect/landmark/mission_poi/Initialize() + . = ..() + SSmissions.unallocated_pois += list(src) + +/obj/effect/landmark/mission_poi/Destroy() + SSmissions.unallocated_pois -= src + . = ..() + +/obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) + var/atom/item_of_interest + if(!ispath(type_to_spawn)) + type_to_spawn = _type_to_spawn + if(!ispath(type_to_spawn)) + stack_trace("[src] didnt get passed a type.") + if(already_spawned) //Search for the item + for(var/atom/movable/item_in_poi as anything in get_turf(src)) + if(istype(item_in_poi, type_to_spawn)) + item_of_interest = item_in_poi + if(!item_of_interest) + stack_trace("[src] is meant to have its item prespawned but could not find it on its tile.") + else //Spawn the item + item_of_interest = new type_to_spawn(loc) + // We dont have an item to return + if(!istype(item_of_interest)) + stack_trace("[src] did not return a item_of_interest") + QDEL_IN(src, 0) + return item_of_interest + +/obj/effect/landmark/mission_poi/main + name = "mission focus" + icon_state = "main_thing" + +/obj/effect/landmark/mission_poi/guard + icon_state = "guard" + +/obj/effect/landmark/mission_poi/remover + +/obj/effect/landmark/mission_poi/remover/use_poi(_type_to_spawn) + if(!ispath(type_to_spawn)) + type_to_spawn = _type_to_spawn + if(!ispath(type_to_spawn)) + stack_trace("[src] didnt get passed a type.") + if(already_spawned) //Search for the item + for(var/atom/movable/item_in_poi as anything in get_turf(src)) + if(istype(item_in_poi, type_to_spawn)) + qdel(item_in_poi) + return + stack_trace("[src] didnt remove anything somehow") + diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/dynamic_missions/mission.dm index 8cc55c0d7b69..fed93feaefbb 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/dynamic_missions/mission.dm @@ -241,49 +241,6 @@ // remove info from our list LAZYREMOVE(bound_atoms, bound) -/obj/effect/landmark/mission_poi - name = "mission poi" - icon = 'icons/effects/mission_poi.dmi' - 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 would otherwise use the same poi's - var/mission_index = null - ///Prefered over the passed one, used for varediting primarly. - var/type_to_spawn - -/obj/effect/landmark/mission_poi/Initialize() - . = ..() - SSmissions.unallocated_pois += list(src) - -/obj/effect/landmark/mission_poi/Destroy() - SSmissions.unallocated_pois -= src - . = ..() - -/obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) - var/atom/item_of_interest - if(!ispath(type_to_spawn)) - type_to_spawn = _type_to_spawn - if(!ispath(type_to_spawn)) - stack_track("[src] didnt get passed a type.") - if(already_spawned) //Search for the item - for(var/atom/movable/item_in_poi as anything in get_turf(src)) - if(istype(item_in_poi, type_to_spawn)) - item_of_interest = item_in_poi - if(item_of_interest) - stack_trace("[src] is meant to have its item prespawned but could not find it on its tile.") - else //Spawn the item - item_of_interest = new type_to_spawn(loc) - // We dont have an item to return - if(!istype(item_of_interest)) - stack_trace("[src] did not return a item_of_interest") - QDEL_IN(src, 0) - return item_of_interest - -/obj/effect/landmark/mission_poi/main - name = "mission focus" - icon_state = "main_thing" - /// Shows examine hints on how it relates to a mission /datum/component/mission_important dupe_mode = COMPONENT_DUPE_UNIQUE diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/dynamic_missions/mission_board.dm index 454c834e184e..722d4dc31571 100644 --- a/code/modules/dynamic_missions/mission_board.dm +++ b/code/modules/dynamic_missions/mission_board.dm @@ -124,7 +124,7 @@ /obj/machinery/mission_pad name = "\improper Outpost mission turn-in pad" icon = 'icons/obj/telescience.dmi' - icon_state = "lpad-idle-o" + icon_state = "pad-idle" /obj/machinery/bounty_viewer name = "bounty viewer" @@ -140,21 +140,20 @@ pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0 -/obj/machinery/bounty_viewer/attackby(obj/item/I, mob/living/user, params) +/obj/machinery/bounty_viewer/wrench_act(mob/living/user, obj/item/I) . = ..() - if(I.tool_behaviour == TOOL_WRENCH) - to_chat(user, "You start [anchored ? "un" : ""]securing [name]...") - I.play_tool_sound(src) - if(I.use_tool(src, user, 30)) - playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) - if(machine_stat & BROKEN) - to_chat(user, "The broken remains of [src] fall on the ground.") - new /obj/item/stack/sheet/metal(loc, 3) - new /obj/item/shard(loc) - else - to_chat(user, "You [anchored ? "un" : ""]secure [name].") - new /obj/item/wallframe/bounty_viewer(loc) - qdel(src) + to_chat(user, span_notice("You start [anchored ? "un" : ""]securing [name]...")) + I.play_tool_sound(src) + if(I.use_tool(src, user, 30)) + playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) + if(machine_stat & BROKEN) + to_chat(user, span_warning("The broken remains of [src] fall on the ground.")) + new /obj/item/stack/sheet/metal(loc, 3) + new /obj/item/shard(loc) + else + to_chat(user, span_notice("You [anchored ? "un" : ""]secure [name].")) + new /obj/item/wallframe/bounty_viewer(loc) + qdel(src) /obj/machinery/bounty_viewer/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/dynamic_missions/missions/dynamic.dm index b6edb649457a..b6181918a579 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/dynamic_missions/missions/dynamic.dm @@ -82,3 +82,20 @@ name = "blackbox recovery" desc = "Recover some lost logs from this ruin's blackbox recorder." setpiece_item = /obj/machinery/blackbox_recorder + +/datum/mission/dynamic/nt_files + name = "NT asset recovery" + value = 1250 + mission_reward = list( + /obj/item/gun/energy/e_gun/old, + /obj/item/gun/energy/laser/retro, + /obj/item/gun/energy/laser/captain + ) + faction = /datum/faction/nt + setpiece_item = /obj/item/documents/nanotrasen + +/datum/mission/dynamic/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.") diff --git a/code/modules/dynamic_missions/missions/guarded.dm b/code/modules/dynamic_missions/missions/guarded.dm deleted file mode 100644 index 78cf4c5ec99b..000000000000 --- a/code/modules/dynamic_missions/missions/guarded.dm +++ /dev/null @@ -1,19 +0,0 @@ -/obj/effect/landmark/mission_poi/guard - icon_state = "guard" - -/datum/mission/dynamic/nt_files - name = "NT asset recovery" - value = 1250 - mission_reward = list( - /obj/item/gun/energy/e_gun/old, - /obj/item/gun/energy/laser/retro, - /obj/item/gun/energy/laser/captain - ) - faction = /datum/faction/nt - setpiece_item = /obj/item/documents/nanotrasen - -/datum/mission/dynamic/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.") diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/dynamic_missions/missions/kill.dm index 8bd0edfff69b..ca322b0de599 100644 --- a/code/modules/dynamic_missions/missions/kill.dm +++ b/code/modules/dynamic_missions/missions/kill.dm @@ -8,6 +8,7 @@ name = null desc = null setpiece_poi = /obj/effect/landmark/mission_poi/main/kill + setpiece_item = /obj/item/dog_tags mission_main_signal = COMSIG_MOB_DEATH /datum/mission/dynamic/signaled/kill/generate_mission_details() @@ -18,7 +19,7 @@ if(!name) name = "[mission_mob::name] termination" if(!desc) - desc = "Bounty for a high ranking [mission_mob::name] residing on this planet. They should have identifying items." + desc = "Bounty for a high ranking [mission_mob::name] residing on this planet. They should have identifying dogtags." /datum/mission/dynamic/signaled/kill/frontiersmen value = 2500 diff --git a/shiptest.dme b/shiptest.dme index 34ad95207f1e..c17fe1c8a2e8 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2052,11 +2052,11 @@ #include "code\modules\disks\disk.dm" #include "code\modules\donator\_donator.dm" #include "code\modules\donator\ianthewanderer.dm" +#include "code\modules\dynamic_missions\landmark.dm" #include "code\modules\dynamic_missions\mission.dm" #include "code\modules\dynamic_missions\mission_board.dm" #include "code\modules\dynamic_missions\spawner.dm" #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\signaled.dm" #include "code\modules\economy\_economy.dm" diff --git a/tgui/packages/tgui/interfaces/OvermapTokenManager.tsx b/tgui/packages/tgui/interfaces/OvermapTokenManager.tsx index a5870a83eca4..2879c6cb25c9 100644 --- a/tgui/packages/tgui/interfaces/OvermapTokenManager.tsx +++ b/tgui/packages/tgui/interfaces/OvermapTokenManager.tsx @@ -28,7 +28,9 @@ type OvermapDatumData = { type OvermapTokenManagerData = Record; enum DatumType { + outpost = '/datum/overmap/outpost', ship = '/datum/overmap/ship', + dynamic = '/datum/overmap/dynamic', event = '/datum/overmap/event', star = '/datum/overmap/star', all = '***', @@ -36,8 +38,12 @@ enum DatumType { const tokenTypeToName = (type: DatumType) => { switch (type) { + case DatumType.outpost: + return 'Outpost'; case DatumType.ship: return 'Ship'; + case DatumType.dynamic: + return 'Dynamic Event'; case DatumType.event: return 'Event'; case DatumType.star: From e962a220e2680b5b1b05e441a4d7d73385eeb6ce Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 18 Oct 2024 23:39:30 -0500 Subject: [PATCH 48/77] repaths these to make more sense --- .../JungleRuins/jungle_syndicate.dmm | 9 ++-- .../lavaland_abandonedlisteningpost.dmm | 24 +++------- .../lavaland_surface_buried_shrine.dmm | 3 ++ .../lavaland_surface_wrecked_factory.dmm | 26 ++++++++++- .../RockRuins/rockplanet_distillery.dmm | 35 +++++---------- code/datums/ruins/lavaland.dm | 24 +++++++++- .../dynamic/_dynamic.dm} | 45 ------------------- .../missions => missions/dynamic}/kill.dm | 0 code/modules/missions/dynamic/missions.dm | 44 ++++++++++++++++++ .../missions => missions/dynamic}/signaled.dm | 0 .../landmark.dm | 0 .../{dynamic_missions => missions}/mission.dm | 2 + .../mission_board.dm | 0 .../{dynamic_missions => missions}/spawner.dm | 0 shiptest.dme | 15 ++++--- 15 files changed, 125 insertions(+), 102 deletions(-) rename code/modules/{dynamic_missions/missions/dynamic.dm => missions/dynamic/_dynamic.dm} (60%) rename code/modules/{dynamic_missions/missions => missions/dynamic}/kill.dm (100%) create mode 100644 code/modules/missions/dynamic/missions.dm rename code/modules/{dynamic_missions/missions => missions/dynamic}/signaled.dm (100%) rename code/modules/{dynamic_missions => missions}/landmark.dm (100%) rename code/modules/{dynamic_missions => missions}/mission.dm (99%) rename code/modules/{dynamic_missions => missions}/mission_board.dm (100%) rename code/modules/{dynamic_missions => missions}/spawner.dm (100%) diff --git a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm index 6d4f1a2391f2..aa006c63ef05 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm @@ -162,7 +162,8 @@ "eU" = ( /obj/structure/chair/plastic, /obj/effect/landmark/mission_poi/guard{ - mission_index = 1 + mission_index = 1; + type_to_spawn = /mob/living/simple_animal/hostile/human/syndicate/ranged }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) @@ -773,7 +774,8 @@ pixel_x = 32 }, /obj/effect/landmark/mission_poi/guard{ - mission_index = 1 + mission_index = 1; + type_to_spawn = /mob/living/simple_animal/hostile/human/syndicate }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) @@ -955,7 +957,8 @@ /obj/structure/chair/plastic, /obj/machinery/light/small/directional/north, /obj/effect/landmark/mission_poi/guard{ - mission_index = 1 + mission_index = 1; + type_to_spawn = /mob/living/simple_animal/hostile/human/syndicate }, /turf/open/floor/plating/rust, /area/ruin/jungle/syndifort) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm b/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm index 846527608fd0..2c89f3270f04 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_abandonedlisteningpost.dmm @@ -187,9 +187,7 @@ "dJ" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/effect/decal/cleanable/dirt/dust, -/obj/effect/turf_decal/siding/wood{ - dir = 2 - }, +/obj/effect/turf_decal/siding/wood, /turf/open/floor/carpet/nanoweave/red, /area/ruin/unpowered/listening_post/commons) "dM" = ( @@ -299,9 +297,7 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/effect/turf_decal/siding/thinplating/dark{ dir = 1 @@ -465,9 +461,7 @@ /turf/open/floor/carpet/nanoweave/red, /area/ruin/unpowered/listening_post/commons) "hA" = ( -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /obj/machinery/power/terminal{ dir = 1 }, @@ -1764,9 +1758,7 @@ /turf/open/floor/plasteel/dark, /area/ruin/unpowered/listening_post/operations) "FW" = ( -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /obj/machinery/power/smes/engineering, /turf/open/floor/plating, /area/ruin/unpowered/listening_post/engineering) @@ -2200,9 +2192,7 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/effect/turf_decal/siding/thinplating/dark{ dir = 8 @@ -2472,9 +2462,7 @@ /obj/structure/cable{ icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plasteel/dark, diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_buried_shrine.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_buried_shrine.dmm index 17094a2d2bff..80dd1309bc1f 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_buried_shrine.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_buried_shrine.dmm @@ -1250,6 +1250,9 @@ "EE" = ( /obj/structure/stone_tile/center/burnt, /obj/structure/stone_tile/surrounding/burnt, +/obj/effect/landmark/mission_poi/main{ + mission_index = 1 + }, /turf/open/lava/smooth/lava_land_surface, /area/ruin/unpowered/buried_shrine) "Fo" = ( diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm index 768c6275cf56..d8ded574598a 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm @@ -77,6 +77,19 @@ /obj/item/spacecash/bundle/c1000, /obj/item/stock_parts/cell/gun/upgraded, /obj/structure/safe, +/obj/effect/landmark/mission_poi/main{ + mission_index = 1; + already_spawned = 1; + type_to_spawn = /obj/item/documents/nanotrasen + }, +/obj/effect/landmark/mission_poi/remover{ + type_to_spawn = /obj/item/spacecash/bundle/c1000; + mission_index = 1 + }, +/obj/effect/landmark/mission_poi/remover{ + type_to_spawn = /obj/item/spacecash/bundle/c1000; + mission_index = 1 + }, /turf/open/floor/carpet/blue, /area/ruin/lavaland/factory/manager_office) "aW" = ( @@ -229,6 +242,11 @@ /obj/effect/decal/cleanable/blood{ icon_state = "bubblegumfoot" }, +/obj/effect/landmark/mission_poi/main/implanted{ + mission_index = 3; + type_to_spawn = /mob/living/carbon/human; + already_spawned = 1 + }, /turf/open/floor/concrete/pavement/lava, /area/overmap_encounter/planetoid/lava/explored) "cx" = ( @@ -4834,8 +4852,7 @@ icon_state = "gibmid2" }, /obj/effect/decal/cleanable/blood{ - icon_state = "trails_2"; - dir = 2 + icon_state = "trails_2" }, /turf/open/floor/plasteel/dark, /area/ruin/lavaland/factory/dorms) @@ -5105,6 +5122,11 @@ /obj/structure/sign/poster/official/enlist{ pixel_y = 32 }, +/obj/effect/landmark/mission_poi/main{ + mission_index = 2; + type_to_spawn = /obj/item/clothing/accessory/medal/gold/captain; + already_spawned = 1 + }, /turf/open/floor/wood, /area/ruin/lavaland/factory/adminstrative) "YU" = ( diff --git a/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm b/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm index 675f0162a1bb..678bed938bc4 100644 --- a/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm +++ b/_maps/RandomRuins/RockRuins/rockplanet_distillery.dmm @@ -746,9 +746,7 @@ /turf/open/floor/wood, /area/ruin/rockplanet/distillery/office) "ir" = ( -/obj/structure/cable/yellow{ - icon_state = "0-1" - }, +/obj/structure/cable/yellow, /obj/machinery/porta_turret/ship/weak, /turf/open/floor/plating/asteroid/rockplanet/cracked/lit, /area/ruin/rockplanet/distillery/office) @@ -778,9 +776,7 @@ /obj/structure/window/reinforced{ dir = 8 }, -/obj/machinery/power/smes/shuttle/micro/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/micro/precharged, /obj/machinery/door/poddoor/shutters/preopen{ id = "pod_window" }, @@ -1100,9 +1096,7 @@ /turf/open/floor/pod/rockplanet, /area/ruin/rockplanet/distillery/shuttle) "mK" = ( -/turf/open/floor/plasteel/stairs/wood{ - color = "#5B3E1D" - }, +/turf/open/floor/plasteel/stairs/wood, /area/ruin/rockplanet/distillery/saloon) "mX" = ( /obj/effect/turf_decal/siding/wood{ @@ -2422,9 +2416,7 @@ /obj/effect/turf_decal/spline/fancy/opaque/white{ dir = 9 }, -/obj/effect/turf_decal/trimline/opaque/neutral/filled/corner{ - dir = 2 - }, +/obj/effect/turf_decal/trimline/opaque/neutral/filled/corner, /turf/open/floor/plasteel/patterned/rockplanet/lit, /area/overmap_encounter/planetoid/rockplanet/explored) "Bn" = ( @@ -2652,9 +2644,7 @@ /turf/open/floor/pod, /area/ruin/rockplanet/distillery/crew) "DX" = ( -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /obj/structure/cable/yellow{ icon_state = "1-10" }, @@ -3594,9 +3584,7 @@ }, /obj/effect/decal/cleanable/dirt/dust, /obj/machinery/power/apc/auto_name/directional/east, -/obj/structure/cable/yellow{ - icon_state = "0-1" - }, +/obj/structure/cable/yellow, /obj/machinery/light/small/directional/south, /turf/open/floor/pod/rockplanet, /area/ruin/rockplanet/distillery) @@ -3670,9 +3658,7 @@ /turf/open/floor/plasteel/patterned/brushed, /area/ruin/rockplanet/distillery/engineering) "PI" = ( -/obj/machinery/power/shuttle/engine/electric{ - dir = 4 - }, +/obj/machinery/power/shuttle/engine/electric, /obj/structure/cable/yellow{ icon_state = "0-4" }, @@ -4407,7 +4393,8 @@ }, /mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals, /obj/effect/landmark/mission_poi{ - already_spawned = 1 + already_spawned = 1; + type_to_spawn = /mob/living/simple_animal/hostile/human/frontier/ranged/officer/internals }, /turf/open/floor/wood, /area/ruin/rockplanet/distillery/office) @@ -4549,9 +4536,7 @@ /obj/structure/window/reinforced{ dir = 1 }, -/obj/machinery/power/smes/shuttle/micro/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/micro/precharged, /obj/machinery/door/poddoor/shutters/preopen{ id = "pod_window" }, diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 0d7ece39d8b2..7495ae9d9697 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -17,6 +17,7 @@ id = "buried_shrine" description = "An ancient temple belonging to some long-gone inhabitants, wrecked and buried by the volcanic activity of it's home planet." suffix = "lavaland_surface_buried_shrine.dmm" + dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/elite) /datum/map_template/ruin/lavaland/lava_canyon name = "Lava Canyon" @@ -29,13 +30,32 @@ id = "wreck_factory" description = "A Nanotrasen processing facility, assaulted by a pirate raid that has killed most of the staff. The offices however, remain unbreached for now." suffix = "lavaland_surface_wrecked_factory.dmm" - dynamic_mission_types = list(/datum/mission/dynamic/nanotrasen_docs) + dynamic_mission_types = list( + /datum/mission/dynamic/nanotrasen_docs, + /datum/mission/dynamic/captain_medal, + /datum/mission/dynamic/brainchip + ) /datum/mission/dynamic/nanotrasen_docs - name = "Recover some nanotrasen files." + name = "recover some nanotrasen files." value = 2500 setpiece_item = /obj/item/documents/nanotrasen +/datum/mission/dynamic/captain_medal + name = "recover my lost medal." + value = 1250 + setpiece_item = /obj/item/documents/nanotrasen + +/datum/mission/dynamic/brainchip + name = "one of our cargo techs died with some important tech in his head. get it back" + setpiece_item = /mob/living/carbon/human + +/obj/effect/landmark/mission_poi/main/implanted/use_poi(_type_to_spawn) + var/mob/living/carbon/human/implanted = ..() + if(istype(implanted, /mob/living/carbon/human)) + var/obj/item/organ/implant = new /obj/item/organ/cyberimp/brain/datachip() + implant.Insert(implanted) + /datum/map_template/ruin/lavaland/fallenstar name = "Crashed Starwalker" id = "crashed_star" diff --git a/code/modules/dynamic_missions/missions/dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm similarity index 60% rename from code/modules/dynamic_missions/missions/dynamic.dm rename to code/modules/missions/dynamic/_dynamic.dm index b6181918a579..deecb6ca4546 100644 --- a/code/modules/dynamic_missions/missions/dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -54,48 +54,3 @@ else if(istype(item_to_check, required_item.type)) return TRUE - -/datum/mission/dynamic/data_reterival - name = "data recovery" - setpiece_item = list( - /obj/item/research_notes/loot, - /obj/item/documents - ) - -/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]" - -/obj/effect/landmark/mission_poi/main/blackbox - icon_state = "main_blackbox" - already_spawned = TRUE - -/obj/effect/landmark/mission_poi/main/blackbox/use_poi(_type_to_spawn) - var/obj/machinery/blackbox_recorder/recorder = ..() - if(istype(recorder, /obj/machinery/blackbox_recorder)) - if(istype(recorder.stored, /obj/item/blackbox)) - return recorder.stored - -/datum/mission/dynamic/blackbox - name = "blackbox recovery" - desc = "Recover some lost logs from this ruin's blackbox recorder." - setpiece_item = /obj/machinery/blackbox_recorder - -/datum/mission/dynamic/nt_files - name = "NT asset recovery" - value = 1250 - mission_reward = list( - /obj/item/gun/energy/e_gun/old, - /obj/item/gun/energy/laser/retro, - /obj/item/gun/energy/laser/captain - ) - faction = /datum/faction/nt - setpiece_item = /obj/item/documents/nanotrasen - -/datum/mission/dynamic/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.") diff --git a/code/modules/dynamic_missions/missions/kill.dm b/code/modules/missions/dynamic/kill.dm similarity index 100% rename from code/modules/dynamic_missions/missions/kill.dm rename to code/modules/missions/dynamic/kill.dm diff --git a/code/modules/missions/dynamic/missions.dm b/code/modules/missions/dynamic/missions.dm new file mode 100644 index 000000000000..ac949e9e3d69 --- /dev/null +++ b/code/modules/missions/dynamic/missions.dm @@ -0,0 +1,44 @@ +/datum/mission/dynamic/data_reterival + name = "data recovery" + setpiece_item = list( + /obj/item/research_notes/loot, + /obj/item/documents + ) + +/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]" + +/obj/effect/landmark/mission_poi/main/blackbox + icon_state = "main_blackbox" + already_spawned = TRUE + +/obj/effect/landmark/mission_poi/main/blackbox/use_poi(_type_to_spawn) + var/obj/machinery/blackbox_recorder/recorder = ..() + if(istype(recorder, /obj/machinery/blackbox_recorder)) + if(istype(recorder.stored, /obj/item/blackbox)) + return recorder.stored + +/datum/mission/dynamic/blackbox + name = "blackbox recovery" + desc = "Recover some lost logs from this ruin's blackbox recorder." + setpiece_item = /obj/machinery/blackbox_recorder + +/datum/mission/dynamic/nt_files + name = "NT asset recovery" + value = 1250 + mission_reward = list( + /obj/item/gun/energy/e_gun/old, + /obj/item/gun/energy/laser/retro, + /obj/item/gun/energy/laser/captain + ) + faction = /datum/faction/nt + setpiece_item = /obj/item/documents/nanotrasen + +/datum/mission/dynamic/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.") diff --git a/code/modules/dynamic_missions/missions/signaled.dm b/code/modules/missions/dynamic/signaled.dm similarity index 100% rename from code/modules/dynamic_missions/missions/signaled.dm rename to code/modules/missions/dynamic/signaled.dm diff --git a/code/modules/dynamic_missions/landmark.dm b/code/modules/missions/landmark.dm similarity index 100% rename from code/modules/dynamic_missions/landmark.dm rename to code/modules/missions/landmark.dm diff --git a/code/modules/dynamic_missions/mission.dm b/code/modules/missions/mission.dm similarity index 99% rename from code/modules/dynamic_missions/mission.dm rename to code/modules/missions/mission.dm index fed93feaefbb..264eb186f1b2 100644 --- a/code/modules/dynamic_missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -194,6 +194,8 @@ return bound /datum/mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) + if(!istype(bound, /atom/movable)) + CRASH("[src] bad type! [bound]") if(sparks) do_sparks(3, FALSE, get_turf(bound)) LAZYSET(bound_atoms, bound, list(fail_on_delete, destroy_cb)) diff --git a/code/modules/dynamic_missions/mission_board.dm b/code/modules/missions/mission_board.dm similarity index 100% rename from code/modules/dynamic_missions/mission_board.dm rename to code/modules/missions/mission_board.dm diff --git a/code/modules/dynamic_missions/spawner.dm b/code/modules/missions/spawner.dm similarity index 100% rename from code/modules/dynamic_missions/spawner.dm rename to code/modules/missions/spawner.dm diff --git a/shiptest.dme b/shiptest.dme index c17fe1c8a2e8..5b6fe80f251c 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2052,13 +2052,6 @@ #include "code\modules\disks\disk.dm" #include "code\modules\donator\_donator.dm" #include "code\modules\donator\ianthewanderer.dm" -#include "code\modules\dynamic_missions\landmark.dm" -#include "code\modules\dynamic_missions\mission.dm" -#include "code\modules\dynamic_missions\mission_board.dm" -#include "code\modules\dynamic_missions\spawner.dm" -#include "code\modules\dynamic_missions\missions\dynamic.dm" -#include "code\modules\dynamic_missions\missions\kill.dm" -#include "code\modules\dynamic_missions\missions\signaled.dm" #include "code\modules\economy\_economy.dm" #include "code\modules\economy\account.dm" #include "code\modules\economy\pay_stand.dm" @@ -2405,6 +2398,14 @@ #include "code\modules\mining\lavaland\ash_flora.dm" #include "code\modules\mining\lavaland\necropolis_chests.dm" #include "code\modules\mining\lavaland\ruins\gym.dm" +#include "code\modules\missions\landmark.dm" +#include "code\modules\missions\mission.dm" +#include "code\modules\missions\mission_board.dm" +#include "code\modules\missions\spawner.dm" +#include "code\modules\missions\dynamic\_dynamic.dm" +#include "code\modules\missions\dynamic\kill.dm" +#include "code\modules\missions\dynamic\missions.dm" +#include "code\modules\missions\dynamic\signaled.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" From 38e9f82888e0e97c005e422d14c2183bd41a622d Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 19 Oct 2024 00:01:14 -0500 Subject: [PATCH 49/77] tweaks to verbs to speed this up --- code/modules/admin/verbs/outpost.dm | 2 +- .../admin/verbs/overmap_token_manager.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/admin/verbs/shuttlepanel.dm | 2 +- code/modules/overmap/_overmap_datum.dm | 69 ------------------ code/modules/overmap/view_overmap_verb.dm | 70 +++++++++++++++++++ 6 files changed, 74 insertions(+), 73 deletions(-) diff --git a/code/modules/admin/verbs/outpost.dm b/code/modules/admin/verbs/outpost.dm index 25632838f45f..acace102e9b8 100644 --- a/code/modules/admin/verbs/outpost.dm +++ b/code/modules/admin/verbs/outpost.dm @@ -19,7 +19,7 @@ /client/proc/spawn_outpost() set name = "Spawn Outpost" - set category = "Event.Spawning" + set category = "Event.Overmap" set desc = "Spawns the selected /datum/overmap/outpost subtype." if(!holder) diff --git a/code/modules/admin/verbs/overmap_token_manager.dm b/code/modules/admin/verbs/overmap_token_manager.dm index 1dc57b17b05e..1555d38531ea 100644 --- a/code/modules/admin/verbs/overmap_token_manager.dm +++ b/code/modules/admin/verbs/overmap_token_manager.dm @@ -1,6 +1,6 @@ /client/proc/overmap_datum_token_manager() set name = "Overmap Datum Token Manager" - set category = "Admin.Game" + set category = "Event.Overmap" set desc = "Manage the tokens of the overmap datum." var/static/datum/overmap_datum_token_manager/manager diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 853d33e1b61b..b95381d4230f 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -832,7 +832,7 @@ /client/proc/spawn_ruin() set name = "Spawn Planet/Ruin" - set category = "Event.Spawning" + set category = "Event.Overmap" if(!check_rights(R_ADMIN) || !check_rights(R_SPAWN)) return diff --git a/code/modules/admin/verbs/shuttlepanel.dm b/code/modules/admin/verbs/shuttlepanel.dm index bb3bd11b7f42..33bb0aba8c5f 100644 --- a/code/modules/admin/verbs/shuttlepanel.dm +++ b/code/modules/admin/verbs/shuttlepanel.dm @@ -1,5 +1,5 @@ /datum/admins/proc/open_shuttlepanel() - set category = "Event" + set category = "Event.Overmap" set name = "Shuttle Manipulator" set desc = "Opens the shuttle manipulator UI." diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 552befb5ed64..60f11ef4efbd 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -415,72 +415,3 @@ dock_to_adjust.dheight = new_dheight dock_to_adjust.dwidth = new_dwidth -/datum/overmap/ui_interact(mob/user, datum/tgui/ui) - . = ..() - if(user.client) - var/datum/overmap_inspect/overmap_inspect = new(src, user) - overmap_inspect.ui_interact(user) - -/datum/overmap/ui_data(mob/user) - . = list() - . += basic_ui_data() - .["ascii"] = char_rep - .["desc"] = (isobj(token)) ? token.desc : "" - .["x"] = x || docked_to.x - .["y"] = y || docked_to.y - - .["dockedTo"] = list() - if(docked_to) - .["dockedTo"] += docked_to.basic_ui_data() - - .["docked"] = list() - for(var/datum/overmap/docked in contents) - .["docked"] += list(docked.basic_ui_data()) - -/datum/overmap/proc/basic_ui_data() - return list( - "ref" = REF(src), - "name" = name - ) - -/datum/overmap_inspect - var/datum/overmap/focus - var/mob/inspector - -/datum/overmap_inspect/New(datum/overmap/focus, mob/inspector) - . = ..() - src.focus = focus - src.inspector = inspector - RegisterSignal(src.focus, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) - RegisterSignal(src.inspector, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) - -/datum/overmap_inspect/Destroy() - UnregisterSignal(focus, COMSIG_PARENT_QDELETING) - UnregisterSignal(inspector, COMSIG_PARENT_QDELETING) - focus = null - inspector = null - . = ..() - -/datum/overmap_inspect/ui_status(mob/user, datum/ui_state/state) - if(!isdatum(focus)) - return UI_CLOSE - return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE - -/datum/overmap_inspect/ui_interact(mob/user, datum/tgui/ui) - ui = SStgui.try_update_ui(user, src, ui) - if (!ui) - ui = new(user, src, "OvermapExamine") - ui.open() - -/datum/overmap_inspect/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) - . = ..() - if(.) - return - switch(action) - if("inspect") - var/datum/overmap/token = locate(params["ref"]) - if(isdatum(token)) - focus = token - -/datum/overmap_inspect/ui_data(mob/user) - return focus.ui_data(user) diff --git a/code/modules/overmap/view_overmap_verb.dm b/code/modules/overmap/view_overmap_verb.dm index 0f844b82c782..de7c069e1edb 100644 --- a/code/modules/overmap/view_overmap_verb.dm +++ b/code/modules/overmap/view_overmap_verb.dm @@ -7,3 +7,73 @@ return SSovermap.overmap_container_view(usr) + +/datum/overmap/ui_interact(mob/user, datum/tgui/ui) + . = ..() + if(user.client) + var/datum/overmap_inspect/overmap_inspect = new(src, user) + overmap_inspect.ui_interact(user) + +/datum/overmap/ui_data(mob/user) + . = list() + . += basic_ui_data() + .["ascii"] = char_rep + .["desc"] = (isobj(token)) ? token.desc : "" + .["x"] = x || docked_to.x + .["y"] = y || docked_to.y + + .["dockedTo"] = list() + if(docked_to) + .["dockedTo"] += docked_to.basic_ui_data() + + .["docked"] = list() + for(var/datum/overmap/docked in contents) + .["docked"] += list(docked.basic_ui_data()) + +/datum/overmap/proc/basic_ui_data() + return list( + "ref" = REF(src), + "name" = name + ) + +/datum/overmap_inspect + var/datum/overmap/focus + var/mob/inspector + +/datum/overmap_inspect/New(datum/overmap/focus, mob/inspector) + . = ..() + src.focus = focus + src.inspector = inspector + RegisterSignal(src.focus, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) + RegisterSignal(src.inspector, COMSIG_PARENT_QDELETING, PROC_REF(qdel)) + +/datum/overmap_inspect/Destroy() + UnregisterSignal(focus, COMSIG_PARENT_QDELETING) + UnregisterSignal(inspector, COMSIG_PARENT_QDELETING) + focus = null + inspector = null + . = ..() + +/datum/overmap_inspect/ui_status(mob/user, datum/ui_state/state) + if(!isdatum(focus)) + return UI_CLOSE + return (ismob(user)) ? UI_INTERACTIVE : UI_CLOSE + +/datum/overmap_inspect/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if (!ui) + ui = new(user, src, "OvermapExamine") + ui.open() + +/datum/overmap_inspect/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + switch(action) + if("inspect") + var/datum/overmap/token = locate(params["ref"]) + if(isdatum(token)) + focus = token + +/datum/overmap_inspect/ui_data(mob/user) + return focus.ui_data(user) From 7d0004c047b30f8d01cd8386b1defaf034e14a7a Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 19 Oct 2024 17:24:12 -0500 Subject: [PATCH 50/77] more improvments --- code/modules/admin/verbs/randomverbs.dm | 9 +------- code/modules/missions/dynamic/_dynamic.dm | 9 +++++--- code/modules/missions/dynamic/signaled.dm | 9 ++++++-- code/modules/missions/landmark.dm | 7 +++++- code/modules/missions/mission.dm | 2 +- code/modules/overmap/_overmap_datum.dm | 2 ++ code/modules/overmap/objects/dynamic_datum.dm | 11 ++++++++++ code/modules/overmap/overmap_token.dm | 4 ++-- .../overmap/{view_overmap_verb.dm => tgui.dm} | 9 +++++++- config/game_options.txt | 2 +- shiptest.dme | 2 +- .../tgui/interfaces/OvermapExamine/index.tsx | 22 +++++++++---------- 12 files changed, 56 insertions(+), 32 deletions(-) rename code/modules/overmap/{view_overmap_verb.dm => tgui.dm} (91%) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b95381d4230f..1dd0d8e89f4d 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -882,14 +882,7 @@ encounter.choose_level_type(FALSE) if(!ruin_target) encounter.ruin_type = null - encounter.preserve_level = TRUE - encounter.load_level() - - message_admins(span_big("Click here to jump to the overmap token: " + ADMIN_JMP(encounter.token))) - message_admins(span_big("Click here to jump to the overmap dock: " + ADMIN_JMP(encounter.reserve_docks[1]))) - for(var/ruin in encounter.ruin_turfs) - var/turf/ruin_turf = encounter.ruin_turfs[ruin] - message_admins(span_big("Click here to jump to \"[ruin]\": " + ADMIN_JMP(ruin_turf))) + encounter.admin_load() /client/proc/smite(mob/living/target as mob) set name = "Smite" diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index deecb6ca4546..9a5ff9073737 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -33,12 +33,15 @@ if(istype(mission_poi, /obj/effect/landmark/mission_poi/main) || !ispath(mission_poi.type_to_spawn)) continue - mission_poi.use_poi() + var/atom/poi_result = mission_poi.use_poi() + if(isatom(poi_result)) + poi_result.AddComponent(/datum/component/mission_important, MISSION_IMPORTANCE_RELEVENT, src) /datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) required_item = mission_poi.use_poi(setpiece_item) - set_bound(required_item, mission_poi.loc, null, TRUE, TRUE) - if(!isatom(required_item)) + if(isatom(required_item)) + set_bound(required_item, null, TRUE, TRUE) + else stack_trace("[src] did not generate a required item.") qdel(src) diff --git a/code/modules/missions/dynamic/signaled.dm b/code/modules/missions/dynamic/signaled.dm index bebc53feaafb..62f1bdf56cb4 100644 --- a/code/modules/missions/dynamic/signaled.dm +++ b/code/modules/missions/dynamic/signaled.dm @@ -5,8 +5,13 @@ var/mission_main_signal /datum/mission/dynamic/signaled/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) - var/registered_item = set_bound(mission_poi.use_poi(registered_type), null, FALSE, TRUE) - RegisterSignal(registered_item, mission_main_signal, PROC_REF(on_signaled)) + registered_item = mission_poi.use_poi(registered_type) + if(isatom(required_item)) + registered_item = set_bound(registered_item, null, FALSE, TRUE) + RegisterSignal(registered_item, mission_main_signal, PROC_REF(on_signaled)) + else + stack_trace("[src] did not generate a required item.") + qdel(src) /datum/mission/dynamic/signaled/proc/on_signaled(atom/movable/registered_item) SIGNAL_HANDLER diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index 31d4b6e46aaa..ef2f764fb3fb 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -2,6 +2,9 @@ name = "mission poi" icon = 'icons/effects/mission_poi.dmi' icon_state = "side_thing" + layer = LOW_LANDMARK_LAYER + invisibility = INVISIBILITY_ABSTRACT + var/use_count = 1 ///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 would otherwise use the same poi's @@ -19,6 +22,7 @@ /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) var/atom/item_of_interest + use_count-- if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(!ispath(type_to_spawn)) @@ -34,7 +38,8 @@ // We dont have an item to return if(!istype(item_of_interest)) stack_trace("[src] did not return a item_of_interest") - QDEL_IN(src, 0) + if(use_count <= 0) + qdel(src) return item_of_interest /obj/effect/landmark/mission_poi/main diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 264eb186f1b2..b0dd735557e9 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -190,7 +190,7 @@ if(!ispath(a_type, /atom/movable)) CRASH("[src] attempted to spawn bound atom of invalid type [a_type]!") var/atom/movable/bound = new a_type(a_loc) - set_bound(bound, destroy_cb, fail_on_delete, sparks) + set_bound(bound, destroy_c, fail_on_delete, sparks) return bound /datum/mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 60f11ef4efbd..66ddd6454a53 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -415,3 +415,5 @@ dock_to_adjust.dheight = new_dheight dock_to_adjust.dwidth = new_dwidth +/datum/overmap/proc/admin_load() + return diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 94e7b5610442..a5d0d9a10e18 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -211,6 +211,17 @@ loading = FALSE return TRUE +/datum/overmap/dynamic/admin_load() + preserve_level = TRUE + message_admins("Generating [src], this may take some time!") + load_level() + + message_admins(span_big("Click here to jump to the overmap token: " + ADMIN_JMP(token))) + message_admins(span_big("Click here to jump to the overmap dock: " + ADMIN_JMP(reserve_docks[1]))) + for(var/ruin in ruin_turfs) + var/turf/ruin_turf = ruin_turfs[ruin] + message_admins(span_big("Click here to jump to \"[ruin]\": " + ADMIN_JMP(ruin_turf))) + /datum/overmap/dynamic/ui_data(mob/user) . = ..() .["active_missions"] = list() diff --git a/code/modules/overmap/overmap_token.dm b/code/modules/overmap/overmap_token.dm index d91a12853c8f..905a2c7b88b3 100644 --- a/code/modules/overmap/overmap_token.dm +++ b/code/modules/overmap/overmap_token.dm @@ -114,12 +114,12 @@ var/picked = show_radial_menu(user, src, choices, radius = 42, require_near = FALSE) var/obj/overmap/picked_token = choices_to_options[picked] - if(!isobj(picked_token)) - return src return picked_token /obj/overmap/Click(location, control, params) var/obj/overmap/token = choose_token(usr) + if(!isobj(token)) + return if(token.flags_1 & INITIALIZED_1) SEND_SIGNAL(token, COMSIG_CLICK, location, control, params, usr) diff --git a/code/modules/overmap/view_overmap_verb.dm b/code/modules/overmap/tgui.dm similarity index 91% rename from code/modules/overmap/view_overmap_verb.dm rename to code/modules/overmap/tgui.dm index de7c069e1edb..f77e181fa7f8 100644 --- a/code/modules/overmap/view_overmap_verb.dm +++ b/code/modules/overmap/tgui.dm @@ -10,6 +10,8 @@ /datum/overmap/ui_interact(mob/user, datum/tgui/ui) . = ..() + if(!check_rights(R_DEBUG)) + return if(user.client) var/datum/overmap_inspect/overmap_inspect = new(src, user) overmap_inspect.ui_interact(user) @@ -72,8 +74,13 @@ switch(action) if("inspect") var/datum/overmap/token = locate(params["ref"]) - if(isdatum(token)) + if(istype(token, /datum/overmap)) focus = token + if("load") + if(!check_rights(R_DEBUG)) + return + if(istype(focus, /datum/overmap)) + focus.admin_load() /datum/overmap_inspect/ui_data(mob/user) return focus.ui_data(user) diff --git a/config/game_options.txt b/config/game_options.txt index 8ec1c8fa7b64..1f9377ade4a5 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -585,7 +585,7 @@ OVERMAP_GENERATOR_TYPE solar_system OVERMAP_ENCOUNTER_SIZE 127 ## Max dynamic mission count -MAX_DYNAMIC_MISSIONS 100 +MAX_DYNAMIC_MISSIONS 10 ## The time required before a ship is allowed to bluespace jump. -1 disables it entirely ## In deciseconds, valid values are -1 to INFINITY diff --git a/shiptest.dme b/shiptest.dme index 5b6fe80f251c..72f7d5234c7d 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2872,7 +2872,7 @@ #include "code\modules\overmap\helm.dm" #include "code\modules\overmap\overmap_token.dm" #include "code\modules\overmap\overmap_turf.dm" -#include "code\modules\overmap\view_overmap_verb.dm" +#include "code\modules\overmap\tgui.dm" #include "code\modules\overmap\objects\dynamic_datum.dm" #include "code\modules\overmap\objects\event_datum.dm" #include "code\modules\overmap\objects\star.dm" diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx index 330ec73dd8d2..58aeb0323f74 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -22,20 +22,15 @@ export type OvermapData = { desc: string; x: number; y: number; - dockedTo: TokenData; - docked: TokenData[]; - active_missions: MissionData[] | null; - inactive_missions: MissionData[] | null; + dockedTo: NameAndRef; + docked: NameAndRef[]; + active_missions: NameAndRef[] | null; + inactive_missions: NameAndRef[] | null; }; -export type TokenData = { - ref: string; +type NameAndRef = { name: string; -}; - -export type MissionData = { ref: string; - name: string; }; export const OvermapExamine = (props, context) => { @@ -43,9 +38,12 @@ export const OvermapExamine = (props, context) => { const { name, ascii, desc, x, y, dockedTo, docked = [] } = data; return ( - + -
+
act('load')}>Load} + > X From 2b2aa8663559fd6e7d2cfbdbfe79d4547adcc649 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 22 Oct 2024 16:44:54 -0500 Subject: [PATCH 51/77] more! --- code/modules/missions/dynamic/_dynamic.dm | 4 ++++ code/modules/missions/landmark.dm | 2 -- code/modules/missions/mission.dm | 2 +- code/modules/overmap/tgui.dm | 6 ++++++ tgui/packages/tgui/interfaces/OvermapExamine/index.tsx | 4 ++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 9a5ff9073737..92ea398f8367 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -14,6 +14,8 @@ if(isnull(mission_index)) stack_trace("[src] does not have a mission index") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) + if(mission_poi.use_count <= 0) + qdel(mission_poi) if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) continue if(!istype(mission_poi, /obj/effect/landmark/mission_poi/main)) @@ -28,6 +30,8 @@ // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) + if(mission_poi.use_count <= 0) + qdel(mission_poi) if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) continue if(istype(mission_poi, /obj/effect/landmark/mission_poi/main) || !ispath(mission_poi.type_to_spawn)) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index ef2f764fb3fb..bea61957b042 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -38,8 +38,6 @@ // We dont have an item to return if(!istype(item_of_interest)) stack_trace("[src] did not return a item_of_interest") - if(use_count <= 0) - qdel(src) return item_of_interest /obj/effect/landmark/mission_poi/main diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index b0dd735557e9..264eb186f1b2 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -190,7 +190,7 @@ if(!ispath(a_type, /atom/movable)) CRASH("[src] attempted to spawn bound atom of invalid type [a_type]!") var/atom/movable/bound = new a_type(a_loc) - set_bound(bound, destroy_c, fail_on_delete, sparks) + set_bound(bound, destroy_cb, fail_on_delete, sparks) return bound /datum/mission/proc/set_bound(atom/movable/bound, destroy_cb = null, fail_on_delete = TRUE, sparks = TRUE) diff --git a/code/modules/overmap/tgui.dm b/code/modules/overmap/tgui.dm index f77e181fa7f8..e991b1e49753 100644 --- a/code/modules/overmap/tgui.dm +++ b/code/modules/overmap/tgui.dm @@ -81,6 +81,12 @@ return if(istype(focus, /datum/overmap)) focus.admin_load() + if("inspect_mission") + var/datum/mission/dynamic/mission = locate(params["ref"]) + if("load_mission") + var/datum/mission/dynamic/mission = locate(params["ref"]) + if(istype(mission, /datum/mission)) + mission.start_mission() /datum/overmap_inspect/ui_data(mob/user) return focus.ui_data(user) diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx index 58aeb0323f74..40dad58f4649 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx @@ -88,12 +88,12 @@ export const OvermapExamine = (props, context) => { )} {data.active_missions?.map((mission) => ( - {mission.name} + {mission.name} ))} {data.inactive_missions?.map((mission) => ( - {mission.name} + {mission.name} ))} From 103e74b22a0d13a49516246b940fe209a9be8ec0 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 23 Oct 2024 10:51:52 -0500 Subject: [PATCH 52/77] weakrefing mission pois on late init --- code/modules/missions/landmark.dm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index bea61957b042..32300f52c494 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -7,6 +7,8 @@ var/use_count = 1 ///Assume the item we want is included in the map and we simple have to return it var/already_spawned = FALSE + ///Grabbed as apart of late init to ensure that the item of intrest cant move + var/datum/weakref/prespawned_weakref ///Only needed if you have multipe missiosn that would otherwise use the same poi's var/mission_index = null ///Prefered over the passed one, used for varediting primarly. @@ -16,6 +18,12 @@ . = ..() SSmissions.unallocated_pois += list(src) +/obj/effect/landmark/mission_poi/LateInitialize() + . = ..() + if(already_spawned && type_to_spawn) + var/atom/item_of_interest = search_poi() + prespawned_weakref = WEAKREF(item_of_interest) + /obj/effect/landmark/mission_poi/Destroy() SSmissions.unallocated_pois -= src . = ..() @@ -26,20 +34,27 @@ if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(!ispath(type_to_spawn)) - stack_trace("[src] didnt get passed a type.") + CRASH("[src] didnt get passed a type.") if(already_spawned) //Search for the item - for(var/atom/movable/item_in_poi as anything in get_turf(src)) - if(istype(item_in_poi, type_to_spawn)) - item_of_interest = item_in_poi + item_of_interest = search_poi() if(!item_of_interest) - stack_trace("[src] is meant to have its item prespawned but could not find it on its tile.") + CRASH("[src] is meant to have its item prespawned but could not find it on its tile.") else //Spawn the item item_of_interest = new type_to_spawn(loc) // We dont have an item to return if(!istype(item_of_interest)) - stack_trace("[src] did not return a item_of_interest") + CRASH("[src] did not return a item_of_interest") return item_of_interest +/obj/effect/landmark/mission_poi/proc/search_poi() + if(isweakref(prespawned_weakref)) + var/atom/prespawned_item = prespawned_weakref.resolve() + if(istype(prespawned_item, type_to_spawn)) + return prespawned_item + for(var/atom/movable/item_in_poi as anything in get_turf(src)) + if(istype(item_in_poi, type_to_spawn)) + return item_in_poi + /obj/effect/landmark/mission_poi/main name = "mission focus" icon_state = "main_thing" From ec5f4364abcf34474e9ab6d4e37d60331a0b8578 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 23 Oct 2024 11:07:39 -0500 Subject: [PATCH 53/77] autodocing some stuff and starts a readme --- code/modules/missions/dynamic/_dynamic.dm | 5 ++++- code/modules/missions/mission.dm | 16 ++++++++++------ code/modules/missions/mission_board.dm | 4 +--- code/modules/missions/readme.md | 7 +++++++ 4 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 code/modules/missions/readme.md diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 92ea398f8367..4bdb8c8f6b8c 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -1,9 +1,12 @@ /datum/mission/dynamic value = 2000 + /// Which landmark we will search for in spawned_mission_pois of the planet var/setpiece_poi = /obj/effect/landmark/mission_poi/main + /// Item that will be spawned at the setpiece_poi var/setpiece_item - ///Specific item uses an exact item, if false it will allow type or any subtype + /// Specific item uses an exact item, if false it will allow type or any subtype var/specific_item = TRUE + /// The item that you can turn in to complete the mission. If specific_item is false it uses the type of the item. var/atom/movable/required_item /datum/mission/dynamic/generate_mission_details() diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 264eb186f1b2..e94094e55931 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -3,17 +3,20 @@ var/author = "" var/desc = "Do something for me." var/faction = /datum/faction/independent - var/value = 1000 /// The mission's payout. + /// The mission's payout. + var/value = 1000 + /// Optional var to give an item upon completion along with value var/mission_reward - var/duration /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit - var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. + /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit + var/duration + /// The relative probability of this mission being selected. 0-weight missions are never selected. + var/weight = 0 - ///Only needed if you have multipe missiosn that use the same poi's on the map. Set at new. + /// Only needed if you have multipe missiosn that use the same poi's on the map. Set at new. var/mission_index var/location_specific = TRUE - /// The outpost that issued this mission. Passed in New(). - //var/datum/overmap/outpost/source_outpost + /// The location the mission is relient on, often pulling varibles from it or will delete itself if the mission_location is deleted. Passed in New(). var/datum/overmap/mission_location /// Should mission value scale proportionally to the deviation from the mission's base duration? @@ -23,6 +26,7 @@ /// The maximum deviation of the mission's true duration from the base value, as a proportion. var/dur_mod_range = 0.1 + /// Timestamp for when the mission was activated var/time_issued var/active = FALSE var/failed = FALSE diff --git a/code/modules/missions/mission_board.dm b/code/modules/missions/mission_board.dm index 722d4dc31571..d19c78334d99 100644 --- a/code/modules/missions/mission_board.dm +++ b/code/modules/missions/mission_board.dm @@ -10,7 +10,7 @@ /obj/machinery/computer/mission/LateInitialize() . = ..() if(istype(get_area(src.loc), /area/outpost)) - var/obj/machinery/mission_pad/pad = locate() in range(4,src) + var/obj/machinery/mission_pad/pad = locate() in range(2,src) pad_ref = WEAKREF(pad) desc += "This one is not linked to any outpost." @@ -69,8 +69,6 @@ var/obj/machinery/mission_pad/pad = pad_ref?.resolve() if(!pad) return - //if(!usr.can_perform_action(src) || (machine_stat & (NOPOWER|BROKEN))) - // return switch(action) if("recalc") recalc() diff --git a/code/modules/missions/readme.md b/code/modules/missions/readme.md new file mode 100644 index 000000000000..83de87aef2e8 --- /dev/null +++ b/code/modules/missions/readme.md @@ -0,0 +1,7 @@ +# Dynamic Missions + +## About +A massive rework to missions with the core goal of making them more intresting and feeding into our existing loop better + +## Variables + From 4de8b7e60bb11a50ba3a60871370f8991bcb4c77 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 24 Oct 2024 16:33:32 -0500 Subject: [PATCH 54/77] more improvments --- .../JungleRuins/jungle_syndicate.dmm | 3 +- .../lavaland_surface_wrecked_factory.dmm | 10 ----- code/datums/ruins/lavaland.dm | 6 ++- code/modules/missions/dynamic/_dynamic.dm | 45 +++++++++---------- code/modules/missions/dynamic/signaled.dm | 4 +- code/modules/missions/landmark.dm | 12 +++-- code/modules/missions/mission.dm | 22 +++++---- .../overmap/{tgui.dm => overmap_inspect.dm} | 2 +- shiptest.dme | 2 +- .../index.tsx | 2 +- 10 files changed, 53 insertions(+), 55 deletions(-) rename code/modules/overmap/{tgui.dm => overmap_inspect.dm} (98%) rename tgui/packages/tgui/interfaces/{OvermapExamine => OvermapInspect}/index.tsx (97%) diff --git a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm index aa006c63ef05..839041da4d5d 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_syndicate.dmm @@ -57,7 +57,8 @@ /obj/structure/table, /obj/item/storage/cans/sixbeer, /obj/effect/landmark/mission_poi/main{ - blocks_emissive = 1 + blocks_emissive = 1; + mission_index = 1 }, /turf/open/floor/plating, /area/ruin/jungle/syndifort) diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm index d8ded574598a..1458a1f0c475 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_wrecked_factory.dmm @@ -71,7 +71,6 @@ /turf/open/floor/plating/moss, /area/overmap_encounter/planetoid/lava/explored) "aM" = ( -/obj/item/documents/nanotrasen, /obj/item/spacecash/bundle/c1000, /obj/item/spacecash/bundle/c1000, /obj/item/spacecash/bundle/c1000, @@ -79,17 +78,8 @@ /obj/structure/safe, /obj/effect/landmark/mission_poi/main{ mission_index = 1; - already_spawned = 1; type_to_spawn = /obj/item/documents/nanotrasen }, -/obj/effect/landmark/mission_poi/remover{ - type_to_spawn = /obj/item/spacecash/bundle/c1000; - mission_index = 1 - }, -/obj/effect/landmark/mission_poi/remover{ - type_to_spawn = /obj/item/spacecash/bundle/c1000; - mission_index = 1 - }, /turf/open/floor/carpet/blue, /area/ruin/lavaland/factory/manager_office) "aW" = ( diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 7495ae9d9697..aaac437efd7b 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -50,11 +50,15 @@ name = "one of our cargo techs died with some important tech in his head. get it back" setpiece_item = /mob/living/carbon/human +/obj/effect/landmark/mission_poi/main/implanted + var/implant_type = /obj/item/organ/cyberimp/brain/datachip + /obj/effect/landmark/mission_poi/main/implanted/use_poi(_type_to_spawn) var/mob/living/carbon/human/implanted = ..() if(istype(implanted, /mob/living/carbon/human)) - var/obj/item/organ/implant = new /obj/item/organ/cyberimp/brain/datachip() + var/obj/item/organ/implant = new implant_type() implant.Insert(implanted) + return implant /datum/map_template/ruin/lavaland/fallenstar name = "Crashed Starwalker" diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 4bdb8c8f6b8c..6dbe5034f1a3 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -13,39 +13,38 @@ . = ..() setpiece_item = pick(setpiece_item) -/datum/mission/dynamic/spawn_mission_setpiece(datum/overmap/dynamic/planet) +/datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) if(isnull(mission_index)) stack_trace("[src] does not have a mission index") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(mission_poi.use_count <= 0) - qdel(mission_poi) - if(!isnull(mission_poi.mission_index) && (mission_index != mission_poi.mission_index)) - continue - if(!istype(mission_poi, /obj/effect/landmark/mission_poi/main)) - continue + use_poi(mission_poi, planet) - if(istype(mission_poi, setpiece_poi)) - //Spawns the item or gets it via use_poi then sets it as bound so the mission fails if its deleted - spawn_main_piece(mission_poi, planet) - break + spawn_custom_details(planet) - spawn_custom_pois(planet) +/datum/mission/dynamic/proc/use_poi(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) + if(mission_poi.use_count <= 0) + qdel(mission_poi) + return + if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) + return - // Reiterate through the loop and attemp to spawn any mission that matches our index but dont pass any type so it will need its own - for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) - if(mission_poi.use_count <= 0) - qdel(mission_poi) - if(isnull(mission_poi.mission_index) || (mission_index != mission_poi.mission_index)) - continue - if(istype(mission_poi, /obj/effect/landmark/mission_poi/main) || !ispath(mission_poi.type_to_spawn)) - continue + var/main = FALSE + if(istype(mission_poi, /obj/effect/landmark/mission_poi/main)) + main = TRUE + if(required_item) + return - var/atom/poi_result = mission_poi.use_poi() + if(main) + if(istype(mission_poi, setpiece_poi)) + //Spawns the item or gets it via use_poi then sets it as bound so the mission fails if its deleted + spawn_main_piece(mission_poi, planet) + else + var/atom/poi_result = mission_poi.use_poi(FALSE, src) if(isatom(poi_result)) poi_result.AddComponent(/datum/component/mission_important, MISSION_IMPORTANCE_RELEVENT, src) /datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) - required_item = mission_poi.use_poi(setpiece_item) + required_item = mission_poi.use_poi(setpiece_item, src) if(isatom(required_item)) set_bound(required_item, null, TRUE, TRUE) else @@ -53,7 +52,7 @@ qdel(src) /// For handling logic outside of main piece thats too complex for the basic reiteration or you want to not require indexs to match. -/datum/mission/dynamic/proc/spawn_custom_pois(datum/overmap/dynamic/planet) +/datum/mission/dynamic/proc/spawn_custom_details(datum/overmap/dynamic/planet) return /datum/mission/dynamic/can_turn_in(atom/movable/item_to_check) diff --git a/code/modules/missions/dynamic/signaled.dm b/code/modules/missions/dynamic/signaled.dm index 62f1bdf56cb4..ef099a4c1ae9 100644 --- a/code/modules/missions/dynamic/signaled.dm +++ b/code/modules/missions/dynamic/signaled.dm @@ -5,8 +5,8 @@ var/mission_main_signal /datum/mission/dynamic/signaled/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) - registered_item = mission_poi.use_poi(registered_type) - if(isatom(required_item)) + registered_item = mission_poi.use_poi(registered_type, src) + if(isatom(registered_item)) registered_item = set_bound(registered_item, null, FALSE, TRUE) RegisterSignal(registered_item, mission_main_signal, PROC_REF(on_signaled)) else diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index 32300f52c494..846925721b9c 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -14,13 +14,18 @@ ///Prefered over the passed one, used for varediting primarly. var/type_to_spawn -/obj/effect/landmark/mission_poi/Initialize() +/obj/effect/landmark/mission_poi/Initialize(mapload) . = ..() + if(mapload && isnull(mission_index)) + CRASH("[src] didnt have a mission index") SSmissions.unallocated_pois += list(src) + if(already_spawned && type_to_spawn) + var/atom/item_of_interest = search_poi() + prespawned_weakref = WEAKREF(item_of_interest) /obj/effect/landmark/mission_poi/LateInitialize() . = ..() - if(already_spawned && type_to_spawn) + if(!prespawned_weakref && already_spawned && type_to_spawn) var/atom/item_of_interest = search_poi() prespawned_weakref = WEAKREF(item_of_interest) @@ -28,7 +33,7 @@ SSmissions.unallocated_pois -= src . = ..() -/obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn) +/obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn, datum/mission/mission) var/atom/item_of_interest use_count-- if(!ispath(type_to_spawn)) @@ -44,6 +49,7 @@ // We dont have an item to return if(!istype(item_of_interest)) CRASH("[src] did not return a item_of_interest") + item_of_interest.AddComponent(/datum/component/mission_important, MISSION_IMPORTANCE_RELEVENT, mission) return item_of_interest /obj/effect/landmark/mission_poi/proc/search_poi() diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index e94094e55931..f0bc7e039531 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -7,18 +7,18 @@ var/value = 1000 /// Optional var to give an item upon completion along with value var/mission_reward - /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit - var/duration /// The relative probability of this mission being selected. 0-weight missions are never selected. var/weight = 0 - /// Only needed if you have multipe missiosn that use the same poi's on the map. Set at new. + /// Only needed if you have multipe missions that use the same poi's on the map. Set at new. var/mission_index var/location_specific = TRUE /// The location the mission is relient on, often pulling varibles from it or will delete itself if the mission_location is deleted. Passed in New(). var/datum/overmap/mission_location + /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit + var/duration /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. @@ -114,9 +114,9 @@ qdel(src) return - spawn_mission_setpiece(planet) + spawn_mission_details(planet) -/datum/mission/proc/spawn_mission_setpiece(datum/overmap/dynamic/planet) +/datum/mission/proc/spawn_mission_details(datum/overmap/dynamic/planet) return /datum/mission/proc/can_turn_in(atom/movable/item_to_check) @@ -249,13 +249,11 @@ /// Shows examine hints on how it relates to a mission /datum/component/mission_important - dupe_mode = COMPONENT_DUPE_UNIQUE var/importance_level var/datum/weakref/mission_ref /datum/component/mission_important/Initialize(_importance_level = MISSION_IMPORTANCE_RELEVENT, _mission) - if(_importance_level) - importance_level = _importance_level + importance_level = _importance_level if(isdatum(_mission)) mission_ref = WEAKREF(_mission) if(isatom(parent)) @@ -265,13 +263,13 @@ SIGNAL_HANDLER if(!isdatum(mission_ref.resolve())) - examine_list += span_notice("[parent] was useful to a mission") + examine_list += span_notice("[parent] was useful to a mission.") return switch(importance_level) if(MISSION_IMPORTANCE_CRITICAL) - examine_list += span_notice("[parent] is critical to a mission") + examine_list += span_notice("[parent] is critical to a mission.") if(MISSION_IMPORTANCE_IMPORTANT) - examine_list += span_notice("[parent] is important to a mission") + examine_list += span_notice("[parent] is important to a mission.") if(MISSION_IMPORTANCE_RELEVENT) - examine_list += span_notice("[parent] is relevent to a mission") + examine_list += span_notice("[parent] is relevent to a mission.") diff --git a/code/modules/overmap/tgui.dm b/code/modules/overmap/overmap_inspect.dm similarity index 98% rename from code/modules/overmap/tgui.dm rename to code/modules/overmap/overmap_inspect.dm index e991b1e49753..e0c3ca1fe87e 100644 --- a/code/modules/overmap/tgui.dm +++ b/code/modules/overmap/overmap_inspect.dm @@ -64,7 +64,7 @@ /datum/overmap_inspect/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if (!ui) - ui = new(user, src, "OvermapExamine") + ui = new(user, src, "OvermapInspect") ui.open() /datum/overmap_inspect/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) diff --git a/shiptest.dme b/shiptest.dme index 72f7d5234c7d..f7dc5813628a 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2870,9 +2870,9 @@ #include "code\modules\overmap\_overmap_datum.dm" #include "code\modules\overmap\docking_ticket.dm" #include "code\modules\overmap\helm.dm" +#include "code\modules\overmap\overmap_inspect.dm" #include "code\modules\overmap\overmap_token.dm" #include "code\modules\overmap\overmap_turf.dm" -#include "code\modules\overmap\tgui.dm" #include "code\modules\overmap\objects\dynamic_datum.dm" #include "code\modules\overmap\objects\event_datum.dm" #include "code\modules\overmap\objects\star.dm" diff --git a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx b/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx similarity index 97% rename from tgui/packages/tgui/interfaces/OvermapExamine/index.tsx rename to tgui/packages/tgui/interfaces/OvermapInspect/index.tsx index 40dad58f4649..cc3bc7f3d474 100644 --- a/tgui/packages/tgui/interfaces/OvermapExamine/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx @@ -38,7 +38,7 @@ export const OvermapExamine = (props, context) => { const { name, ascii, desc, x, y, dockedTo, docked = [] } = data; return ( - +
Date: Fri, 25 Oct 2024 10:09:51 -0500 Subject: [PATCH 55/77] yea --- code/modules/overmap/objects/dynamic_datum.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 4c895f20e494..36f1db6f179c 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -150,7 +150,7 @@ preserve_level = planet.preserve_level //it came to me while I was looking at chickens // use the ruin type in template if it exists, or pick from ruin list if IT exists; otherwise null - selected_ruin = template || (ruin_type ? pickweightAllowZero(SSmapping.ruin_types_probabilities[ruin_type]) : null) + selected_ruin = template || (ruin_type ? pick_weight_allow_zero(SSmapping.ruin_types_probabilities[ruin_type]) : null) var/datum/map_template/ruin/used_ruin = ispath(selected_ruin) ? (new selected_ruin()) : selected_ruin if(istype(used_ruin)) for(var/mission_type in used_ruin.dynamic_mission_types) From e1ea919fcd12b6f50784f5150564e7d952319850 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 25 Oct 2024 14:01:44 -0500 Subject: [PATCH 56/77] moves the unticked missions --- code/modules/{bounties => missions/unticked}/missions.dm | 0 .../{bounties => missions/unticked}/missions/acquire_mission.dm | 0 .../{bounties => missions/unticked}/missions/drill_mission.dm | 1 + .../{bounties => missions/unticked}/missions/research_mission.dm | 0 4 files changed, 1 insertion(+) rename code/modules/{bounties => missions/unticked}/missions.dm (100%) rename code/modules/{bounties => missions/unticked}/missions/acquire_mission.dm (100%) rename code/modules/{bounties => missions/unticked}/missions/drill_mission.dm (99%) rename code/modules/{bounties => missions/unticked}/missions/research_mission.dm (100%) diff --git a/code/modules/bounties/missions.dm b/code/modules/missions/unticked/missions.dm similarity index 100% rename from code/modules/bounties/missions.dm rename to code/modules/missions/unticked/missions.dm diff --git a/code/modules/bounties/missions/acquire_mission.dm b/code/modules/missions/unticked/missions/acquire_mission.dm similarity index 100% rename from code/modules/bounties/missions/acquire_mission.dm rename to code/modules/missions/unticked/missions/acquire_mission.dm diff --git a/code/modules/bounties/missions/drill_mission.dm b/code/modules/missions/unticked/missions/drill_mission.dm similarity index 99% rename from code/modules/bounties/missions/drill_mission.dm rename to code/modules/missions/unticked/missions/drill_mission.dm index 2d351e47a7f2..1150233a6def 100644 --- a/code/modules/bounties/missions/drill_mission.dm +++ b/code/modules/missions/unticked/missions/drill_mission.dm @@ -22,6 +22,7 @@ sampler.mission_class = class_wanted sampler.num_wanted = num_wanted sampler.name += " (Class [class_wanted])" + //Gives players a little extra money for going past the mission goal /datum/mission/drill/turn_in() value += (sampler.num_current - num_wanted)*50 diff --git a/code/modules/bounties/missions/research_mission.dm b/code/modules/missions/unticked/missions/research_mission.dm similarity index 100% rename from code/modules/bounties/missions/research_mission.dm rename to code/modules/missions/unticked/missions/research_mission.dm From 31758941fbda4a177ce9c636a1ce5a4bed1ed8ab Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 25 Oct 2024 14:18:50 -0500 Subject: [PATCH 57/77] stuf --- .../configuration/entries/game_options.dm | 7 ++++++- code/modules/missions/simple/anomaly_mission.dm | 17 +++++++++++++++++ .../missions => simple}/drill_mission.dm | 0 .../unticked/missions/acquire_mission.dm | 16 ---------------- .../computers/item/tablet_presets.dm | 2 +- shiptest.dme | 2 ++ 6 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 code/modules/missions/simple/anomaly_mission.dm rename code/modules/missions/{unticked/missions => simple}/drill_mission.dm (100%) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 56633da87918..b8ff6e1664e3 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -432,8 +432,13 @@ config_entry_value = 127 min_val = 127 +/datum/config_entry/number/max_simple_missions + config_entry_value = 6 + min_val = 0 + /datum/config_entry/number/max_dynamic_missions config_entry_value = 6 + min_val = 0 /** * A config that skews with the random spawners weights @@ -442,5 +447,5 @@ */ /datum/config_entry/number/random_loot_weight_modifier integer = FALSE - default = 1 + config_entry_value = 1 min_val = 0.05 diff --git a/code/modules/missions/simple/anomaly_mission.dm b/code/modules/missions/simple/anomaly_mission.dm new file mode 100644 index 000000000000..7d6dda4e3533 --- /dev/null +++ b/code/modules/missions/simple/anomaly_mission.dm @@ -0,0 +1,17 @@ +/datum/mission/acquire/anomaly + name = "Anomaly core requested" + weight = 8 + value = 3000 + duration = 80 MINUTES + dur_mod_range = 0.2 + container_type = /obj/item/storage/box/anomaly + objective_type = /obj/item/assembly/signaler/anomaly + num_wanted = 1 + var/researcher_name + +/datum/mission/acquire/anomaly/New(...) + researcher_name = get_researcher_name() + desc = "[researcher_name] has requested that a ship [pick(list("procure", "grab", "acquire", "find", "locate"))] \ + an anomaly core for [pick(list("research", "analysis", "technical development", "closer inspection", "some reason"))]. \ + They've offered to pay well, so we're relaying this mission to you" + . = ..() diff --git a/code/modules/missions/unticked/missions/drill_mission.dm b/code/modules/missions/simple/drill_mission.dm similarity index 100% rename from code/modules/missions/unticked/missions/drill_mission.dm rename to code/modules/missions/simple/drill_mission.dm diff --git a/code/modules/missions/unticked/missions/acquire_mission.dm b/code/modules/missions/unticked/missions/acquire_mission.dm index 541b173afb3d..c744fdf6eb39 100644 --- a/code/modules/missions/unticked/missions/acquire_mission.dm +++ b/code/modules/missions/unticked/missions/acquire_mission.dm @@ -97,23 +97,7 @@ Acquire: Anomaly */ -/datum/mission/acquire/anomaly - name = "Anomaly core requested" - weight = 8 - value = 3000 - duration = 80 MINUTES - dur_mod_range = 0.2 - container_type = /obj/item/storage/box/anomaly - objective_type = /obj/item/assembly/signaler/anomaly - num_wanted = 1 - var/researcher_name -/datum/mission/acquire/anomaly/New(...) - researcher_name = get_researcher_name() - desc = "[researcher_name] has requested that a ship [pick(list("procure", "grab", "acquire", "find", "locate"))] \ - an anomaly core for [pick(list("research", "analysis", "technical development", "closer inspection", "some reason"))]. \ - They've offered to pay well, so we're relaying this mission to you" - . = ..() /* Acquire: The Creature diff --git a/code/modules/modular_computers/computers/item/tablet_presets.dm b/code/modules/modular_computers/computers/item/tablet_presets.dm index 58fc17f2d6a1..84d2fd434566 100644 --- a/code/modules/modular_computers/computers/item/tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/tablet_presets.dm @@ -29,7 +29,7 @@ install_component(new /obj/item/computer_hardware/network_card) install_component(new /obj/item/computer_hardware/printer/mini) hard_drive.store_file(new /datum/computer_file/program/shipping) - \hard_drive.store_file(new /datum/computer_file/program/bounty_board) + hard_drive.store_file(new /datum/computer_file/program/bounty_board) /// Given by the syndicate as part of the contract uplink bundle - loads in the Contractor Uplink. /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink/Initialize() diff --git a/shiptest.dme b/shiptest.dme index fa9ee8329b7c..283fca33d098 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2435,6 +2435,8 @@ #include "code\modules\missions\dynamic\kill.dm" #include "code\modules\missions\dynamic\missions.dm" #include "code\modules\missions\dynamic\signaled.dm" +#include "code\modules\missions\simple\anomaly_mission.dm" +#include "code\modules\missions\simple\drill_mission.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" From 8c448b0531da4642bc166d63ece9751d4020e26a Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 25 Oct 2024 15:45:04 -0500 Subject: [PATCH 58/77] file orgininzation --- code/controllers/subsystem/missions.dm | 13 + code/modules/missions/mission.dm | 27 --- .../missions/mission_important_comp.dm | 26 ++ code/modules/missions/spawner.dm | 226 ------------------ shiptest.dme | 2 +- 5 files changed, 40 insertions(+), 254 deletions(-) create mode 100644 code/modules/missions/mission_important_comp.dm delete mode 100644 code/modules/missions/spawner.dm diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index dd4b98a90d3e..d575fedb568d 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -22,3 +22,16 @@ SUBSYSTEM_DEF(missions) var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len - (i - 1)] mission_to_start.start_mission() break + + +// should probably come up with a better solution for this +// hierarchical weighting? would need to distinguish between "real" and "fake" missions +/datum/controller/subsystem/missions/proc/get_weighted_mission_type() + var/static/list/weighted_missions + if(!weighted_missions) + weighted_missions = list() + var/list/mission_types = subtypesof(/datum/mission) + for(var/datum/mission/mis_type as anything in mission_types) + if(initial(mis_type.weight) > 0) + weighted_missions[mis_type] = initial(mis_type.weight) + return pickweight_float(weighted_missions) diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index f0bc7e039531..4273ff9ddfc7 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -246,30 +246,3 @@ qdel(LAZYACCESSASSOC(bound_atoms, bound, 2)) // remove info from our list LAZYREMOVE(bound_atoms, bound) - -/// Shows examine hints on how it relates to a mission -/datum/component/mission_important - var/importance_level - var/datum/weakref/mission_ref - -/datum/component/mission_important/Initialize(_importance_level = MISSION_IMPORTANCE_RELEVENT, _mission) - importance_level = _importance_level - if(isdatum(_mission)) - mission_ref = WEAKREF(_mission) - if(isatom(parent)) - RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_atom_examine)) - -/datum/component/mission_important/proc/on_atom_examine(datum/source, mob/user, list/examine_list) - SIGNAL_HANDLER - - if(!isdatum(mission_ref.resolve())) - examine_list += span_notice("[parent] was useful to a mission.") - return - - switch(importance_level) - if(MISSION_IMPORTANCE_CRITICAL) - examine_list += span_notice("[parent] is critical to a mission.") - if(MISSION_IMPORTANCE_IMPORTANT) - examine_list += span_notice("[parent] is important to a mission.") - if(MISSION_IMPORTANCE_RELEVENT) - examine_list += span_notice("[parent] is relevent to a mission.") diff --git a/code/modules/missions/mission_important_comp.dm b/code/modules/missions/mission_important_comp.dm new file mode 100644 index 000000000000..af099a25d824 --- /dev/null +++ b/code/modules/missions/mission_important_comp.dm @@ -0,0 +1,26 @@ +/// Shows examine hints on how it relates to a mission +/datum/component/mission_important + var/importance_level + var/datum/weakref/mission_ref + +/datum/component/mission_important/Initialize(_importance_level = MISSION_IMPORTANCE_RELEVENT, _mission) + importance_level = _importance_level + if(isdatum(_mission)) + mission_ref = WEAKREF(_mission) + if(isatom(parent)) + RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_atom_examine)) + +/datum/component/mission_important/proc/on_atom_examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER + + if(!isdatum(mission_ref.resolve())) + examine_list += span_notice("[parent] was useful to a mission.") + return + + switch(importance_level) + if(MISSION_IMPORTANCE_CRITICAL) + examine_list += span_notice("[parent] is critical to a mission.") + if(MISSION_IMPORTANCE_IMPORTANT) + examine_list += span_notice("[parent] is important to a mission.") + if(MISSION_IMPORTANCE_RELEVENT) + examine_list += span_notice("[parent] is relevent to a mission.") diff --git a/code/modules/missions/spawner.dm b/code/modules/missions/spawner.dm deleted file mode 100644 index 72ecf78db790..000000000000 --- a/code/modules/missions/spawner.dm +++ /dev/null @@ -1,226 +0,0 @@ -#define SPAWNER_TOOL_TRIGGER "trigger" //Only spawns something when alt clicked or by a registered signal -#define SPAWNER_TOOL_TOGGLE "direct" //Uses /datum/component/spawner - -/obj/effect/spawner_tool - name = "spawner tool" - desc = "Spawns things, presumably." - icon = 'icons/effects/effects.dmi' - icon_state = "shield2" - invisibility = INVISIBILITY_OBSERVER - anchored = TRUE - density = FALSE - opacity = FALSE - alpha = 175 - var/spawn_type = /obj/item/toy/figure/ian - var/spawner_mode = SPAWNER_TOOL_TRIGGER - var/limited_use = FALSE - var/uses - - var/datum/component/spawner/spawner_comp - var/spawning_state = FALSE - - var/max_mobs = 5 - var/spawn_time = 300 //30 seconds default - //var/mob_types = list(/mob/living/simple_animal/hostile/carp) - var/spawn_text = "emerges from" - var/faction = list("hostile") - var/spawn_sound = list('sound/effects/break_stone.ogg') - var/spawner_type = /datum/component/spawner - var/spawn_distance_min = 1 - var/spawn_distance_max = 1 - -/obj/effect/spawner_tool/Destroy(force) - if(!force) - return QDEL_HINT_LETMELIVE - . = ..() - -/obj/effect/spawner_tool/singularity_act() - return - -/obj/effect/spawner_tool/singularity_pull() - return - -/obj/effect/spawner_tool/examine(mob/user) - . = ..() - if(!isobserver(user)) - return - . += "Spawn Type: [spawn_type ? spawn_type : "None chosen"]" - . += "Mode: [spawner_mode]" - if(limited_use) - . += "Uses left: [uses]" - if(user.client.holder) - . += "Ctrl-click it to quickly activate it!" - -//ATTACK GHOST IGNORING PARENT RETURN VALUE -/obj/effect/spawner_tool/attack_ghost(mob/user) - if(!check_rights_for(user.client, R_SPAWN)) - examine(user) - return - edit_tool(user) - -/obj/effect/spawner_tool/CtrlClick(mob/user) - if(check_rights_for(user.client, R_SPAWN)) - activate(user) - to_chat(user, "Spawner tool activated.", confidential = TRUE) - -/obj/effect/spawner_tool/proc/activate(mob/user) - if(spawner_mode == SPAWNER_TOOL_TRIGGER) - if(ispath(spawn_type)) - new spawn_type(loc) - if(limited_use) - uses-- - if(uses <= 0) - qdel(src, TRUE) - else - toggle_spawner() - -/obj/effect/spawner_tool/proc/toggle_spawner() - spawning_state = !spawning_state - if(!spawner_comp) - spawner_comp = AddComponent(spawner_type, list(spawn_type), spawn_time, faction, spawn_text, max_mobs, spawn_sound, spawn_distance_min, spawn_distance_max) - spawning_state = SEND_SIGNAL(src, COMSIG_SPAWNER_TOGGLE_SPAWNING, spawning_state) - -///Specificly for if you want to register it to things -/obj/effect/spawner_tool/proc/trigger_activate() - SIGNAL_HANDLER - - activate() - -/obj/effect/spawner_tool/proc/edit_tool(mob/user) - var/dat = "" - dat += "Label: [maptext ? maptext : "No label set!"]
" - dat += "
" - dat += "Spawn path: [spawn_type ? spawn_type : "No path chosen!"]
" - dat += "
" - dat += "Mode: [spawner_mode]
" - dat += "
" - if(spawner_mode == SPAWNER_TOOL_TRIGGER) - dat += "Spawn" - else - dat += "Toggle" - dat += "[spawning_state ? "On" : "Off"]" - var/datum/browser/popup = new(user, "spawner_tool", "", 500, 600) - popup.set_content(dat) - popup.open() - -/obj/effect/spawner_tool/Topic(href, href_list) - ..() - if(!ismob(usr) || !usr.client || !check_rights_for(usr.client, R_SPAWN)) - return - var/mob/user = usr - if(href_list["edit_label"]) - var/new_label = stripped_input(user, "Choose a new label.", "Spawner Tool") - if(!new_label) - return - maptext = new_label - to_chat(user, "Label set to [maptext].", confidential = TRUE) - if(href_list["edit_spawn_path"]) - var/new_path = input(user, "Choose a path.", "Spawner Tool") as null|text - new_path = pick_closest_path(new_path) - if(!new_path) - return - spawn_type = new_path - to_chat(user, "New path set to [spawn_type].", confidential = TRUE) - if(href_list["edit_mode"]) - var/new_mode - var/mode_list = list("Only spawns something when alt clicked or by a registered signal" = SPAWNER_TOOL_TRIGGER, "Uses /datum/component/spawner" = SPAWNER_TOOL_TOGGLE) - new_mode = input(user, "Choose a new mode.", "Spawner Tool") as null|anything in mode_list - if(!new_mode) - return - spawner_mode = mode_list[new_mode] - to_chat(user, "Mode set to [spawner_mode].", confidential = TRUE) - if(href_list["trigger"]) - activate(user) - edit_tool(user) //Refresh the UI to see our changes - -/* -/obj/effect/spawner_tool/proc/edit_emitter(mob/user) - var/dat = "" - dat += "Label: [maptext ? maptext : "No label set!"]
" - dat += "
" - dat += "Sound File: [sound_file ? sound_file : "No file chosen!"]
" - dat += "Volume: [sound_volume]%
" - dat += "
" - dat += "Mode: [spawner_mode]
" - if(spawner_mode != SOUND_EMITTER_LOCAL) - dat += "Range: [emitter_range][emitter_range == SOUND_EMITTER_RADIUS ? "[play_radius]-tile radius" : ""]
" - dat += "
" - dat += "Play Sound (interrupts other spawner tool sounds)" - var/datum/browser/popup = new(user, "emitter", "", 500, 600) - popup.set_content(dat) - popup.open() - -/obj/effect/spawner_tool/Topic(href, href_list) - ..() - if(!ismob(usr) || !usr.client || !check_rights_for(usr.client, R_SOUND)) - return - var/mob/user = usr - if(href_list["edit_label"]) - var/new_label = stripped_input(user, "Choose a new label.", "Spawner Tool") - if(!new_label) - return - maptext = new_label - to_chat(user, "Label set to [maptext].", confidential = TRUE) - if(href_list["edit_sound_file"]) - var/new_file = input(user, "Choose a sound file.", "Spawner Tool") as null|sound - if(!new_file) - return - sound_file = new_file - to_chat(user, "New sound file set to [sound_file].", confidential = TRUE) - if(href_list["edit_volume"]) - var/new_volume = input(user, "Choose a volume.", "Spawner Tool", sound_volume) as null|num - if(isnull(new_volume)) - return - new_volume = clamp(new_volume, 0, 100) - sound_volume = new_volume - to_chat(user, "Volume set to [sound_volume]%.", confidential = TRUE) - if(href_list["edit_mode"]) - var/new_mode - var/mode_list = list("Local (normal sound)" = SOUND_EMITTER_LOCAL, "Direct (not affected by environment/location)" = SOUND_EMITTER_DIRECT) - new_mode = input(user, "Choose a new mode.", "Spawner Tool") as null|anything in mode_list - if(!new_mode) - return - spawner_mode = mode_list[new_mode] - to_chat(user, "Mode set to [spawner_mode].", confidential = TRUE) - if(href_list["edit_range"]) - var/new_range - var/range_list = list("Radius (all mobs within a radius)" = SOUND_EMITTER_RADIUS, "Z-Level (all mobs on the same z)" = SOUND_EMITTER_ZLEVEL, "Global (all players)" = SOUND_EMITTER_GLOBAL) - new_range = input(user, "Choose a new range.", "Spawner Tool") as null|anything in range_list - if(!new_range) - return - emitter_range = range_list[new_range] - to_chat(user, "Range set to [emitter_range].", confidential = TRUE) - if(href_list["edit_radius"]) - var/new_radius = input(user, "Choose a radius.", "Spawner Tool", sound_volume) as null|num - if(isnull(new_radius)) - return - new_radius = clamp(new_radius, 0, 127) - play_radius = new_radius - to_chat(user, "Audible radius set to [play_radius].", confidential = TRUE) - if(href_list["play"]) - activate(user) - edit_emitter(user) //Refresh the UI to see our changes - -/obj/effect/spawner_tool/proc/activate(mob/user) - var/list/hearing_mobs = list() - if(spawner_mode == SOUND_EMITTER_LOCAL) - playsound(src, sound_file, sound_volume, FALSE) - return - switch(emitter_range) - if(SOUND_EMITTER_RADIUS) - for(var/mob/M in GLOB.player_list) - if(get_dist(src, M) <= play_radius) - hearing_mobs += M - if(SOUND_EMITTER_ZLEVEL) - for(var/mob/M in GLOB.player_list) - if(M.virtual_z() == virtual_z()) - hearing_mobs += M - if(SOUND_EMITTER_GLOBAL) - hearing_mobs = GLOB.player_list.Copy() - for(var/mob/M in hearing_mobs) - if(M.client.prefs.toggles & SOUND_MIDI) - M.playsound_local(M, sound_file, sound_volume, FALSE, channel = CHANNEL_ADMIN, pressure_affected = FALSE) - if(user) - log_admin("[ADMIN_LOOKUPFLW(user)] activated a spawner tool with file \"[sound_file]\" at [AREACOORD(src)]") - flick("shield1", src) -*/ diff --git a/shiptest.dme b/shiptest.dme index 72ebd6467b25..af0d81171c2a 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2431,7 +2431,7 @@ #include "code\modules\missions\landmark.dm" #include "code\modules\missions\mission.dm" #include "code\modules\missions\mission_board.dm" -#include "code\modules\missions\spawner.dm" +#include "code\modules\missions\mission_important_comp.dm" #include "code\modules\missions\dynamic\_dynamic.dm" #include "code\modules\missions\dynamic\kill.dm" #include "code\modules\missions\dynamic\missions.dm" From 0c2e7b1f349082f152d5d9808ab8abf9645e691f Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 25 Oct 2024 16:32:09 -0500 Subject: [PATCH 59/77] varius improvments --- code/controllers/subsystem/missions.dm | 12 ++++++ code/modules/missions/dynamic/_dynamic.dm | 1 + code/modules/missions/mission.dm | 7 +++- .../missions/simple/anomaly_mission.dm | 6 +-- code/modules/missions/unticked/missions.dm | 42 ------------------- shiptest.dme | 2 - .../tgui/interfaces/OvermapInspect/index.tsx | 24 +++++++++-- 7 files changed, 42 insertions(+), 52 deletions(-) diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index d575fedb568d..c90cfb65058b 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -35,3 +35,15 @@ SUBSYSTEM_DEF(missions) if(initial(mis_type.weight) > 0) weighted_missions[mis_type] = initial(mis_type.weight) return pickweight_float(weighted_missions) + +/datum/controller/subsystem/missions/proc/get_researcher_name() + var/group = pick(list( + "Cybersun Industries", + "CMM-GOLD", + "Nanotrasen Anomalous Studies Division", + "The Naturalienwissenschaftlicher Studentenverbindungs-Verband", + "The Central Solarian Anomaly Research Agency", + "DeForest Medical R&D", + "A strange sarathi on the outpost" + )) + return group diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 6dbe5034f1a3..c2d7ef53a2fb 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -1,5 +1,6 @@ /datum/mission/dynamic value = 2000 + duration = null /// Which landmark we will search for in spawned_mission_pois of the planet var/setpiece_poi = /obj/effect/landmark/mission_poi/main /// Item that will be spawned at the setpiece_poi diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 4273ff9ddfc7..9ba44b7ab3fc 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -18,7 +18,7 @@ var/datum/overmap/mission_location /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit - var/duration + var/duration = 30 MINUTES /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. @@ -32,6 +32,11 @@ var/failed = FALSE var/dur_timer + // If the mission has been accepted by a ship. + var/accepted = FALSE + /// The ship that accepted this mission. Passed in accept(). + var/datum/overmap/ship/controlled/servant + /// Assoc list of atoms "bound" to this mission; each atom is associated with a 2-element list. The first /// entry in that list is a bool that determines if the mission should fail when the atom qdeletes; the second /// is a callback to be invoked upon the atom's qdeletion. diff --git a/code/modules/missions/simple/anomaly_mission.dm b/code/modules/missions/simple/anomaly_mission.dm index 7d6dda4e3533..c936072d4f29 100644 --- a/code/modules/missions/simple/anomaly_mission.dm +++ b/code/modules/missions/simple/anomaly_mission.dm @@ -1,4 +1,4 @@ -/datum/mission/acquire/anomaly +/datum/mission/simple/anomaly name = "Anomaly core requested" weight = 8 value = 3000 @@ -9,8 +9,8 @@ num_wanted = 1 var/researcher_name -/datum/mission/acquire/anomaly/New(...) - researcher_name = get_researcher_name() +/datum/mission/simple/anomaly/New(...) + researcher_name = SSmissions.get_researcher_name() desc = "[researcher_name] has requested that a ship [pick(list("procure", "grab", "acquire", "find", "locate"))] \ an anomaly core for [pick(list("research", "analysis", "technical development", "closer inspection", "some reason"))]. \ They've offered to pay well, so we're relaying this mission to you" diff --git a/code/modules/missions/unticked/missions.dm b/code/modules/missions/unticked/missions.dm index b327eee2e57b..6b54bc5fafeb 100644 --- a/code/modules/missions/unticked/missions.dm +++ b/code/modules/missions/unticked/missions.dm @@ -1,17 +1,4 @@ /datum/mission - var/name = "Mission" - var/desc = "Do something for me." - var/value = 1000 /// The mission's payout. - var/duration = 30 MINUTES /// The amount of time in which to complete the mission. - var/weight = 0 /// The relative probability of this mission being selected. 0-weight missions are never selected. - - /// Should mission value scale proportionally to the deviation from the mission's base duration? - var/dur_value_scaling = TRUE - /// The maximum deviation of the mission's true value from the base value, as a proportion. - var/val_mod_range = 0.1 - /// The maximum deviation of the mission's true duration from the base value, as a proportion. - var/dur_mod_range = 0.1 - /// The outpost that issued this mission. Passed in New(). var/datum/overmap/outpost/source_outpost /// The ship that accepted this mission. Passed in accept(). @@ -21,11 +8,6 @@ var/failed = FALSE var/dur_timer - /// Assoc list of atoms "bound" to this mission; each atom is associated with a 2-element list. The first - /// entry in that list is a bool that determines if the mission should fail when the atom qdeletes; the second - /// is a callback to be invoked upon the atom's qdeletion. - var/list/atom/movable/bound_atoms - /datum/mission/New(_outpost) var/old_dur = duration var/val_mod = value * val_mod_range @@ -159,27 +141,3 @@ qdel(LAZYACCESSASSOC(bound_atoms, bound, 2)) // remove info from our list LAZYREMOVE(bound_atoms, bound) - -// should probably come up with a better solution for this -// hierarchical weighting? would need to distinguish between "real" and "fake" missions -/proc/get_weighted_mission_type() - var/static/list/weighted_missions - if(!weighted_missions) - weighted_missions = list() - var/list/mission_types = subtypesof(/datum/mission) - for(var/datum/mission/mis_type as anything in mission_types) - if(initial(mis_type.weight) > 0) - weighted_missions[mis_type] = initial(mis_type.weight) - return pickweight_float(weighted_missions) - -/datum/mission/proc/get_researcher_name() - var/group = pick(list( - "Cybersun Industries", - "CMM-GOLD", - "Nanotrasen Anomalous Studies Division", - "The Naturalienwissenschaftlicher Studentenverbindungs-Verband", - "The Central Solarian Anomaly Research Agency", - "DeForest Medical R&D", - "A strange sarathi on the outpost" - )) - return group diff --git a/shiptest.dme b/shiptest.dme index af0d81171c2a..d6ca20530783 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2436,8 +2436,6 @@ #include "code\modules\missions\dynamic\kill.dm" #include "code\modules\missions\dynamic\missions.dm" #include "code\modules\missions\dynamic\signaled.dm" -#include "code\modules\missions\simple\anomaly_mission.dm" -#include "code\modules\missions\simple\drill_mission.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" diff --git a/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx b/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx index cc3bc7f3d474..4bb12a2466c1 100644 --- a/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx +++ b/tgui/packages/tgui/interfaces/OvermapInspect/index.tsx @@ -33,12 +33,16 @@ type NameAndRef = { ref: string; }; -export const OvermapExamine = (props, context) => { +export const OvermapInspect = (props, context) => { const { act, data } = useBackend(context); const { name, ascii, desc, x, y, dockedTo, docked = [] } = data; return ( - +
{ )} {data.active_missions?.map((mission) => ( - {mission.name} + + {mission.name}{' '} + + ))} {data.inactive_missions?.map((mission) => ( - {mission.name} + + {mission.name}{' '} + + ))} From 1aa8a6ea0ab25de0dd0b38508b27a15d1b5b0944 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 25 Oct 2024 19:48:20 -0500 Subject: [PATCH 60/77] regexing descriptions and names of missions --- code/modules/missions/dynamic/_dynamic.dm | 5 +++++ code/modules/missions/dynamic/kill.dm | 17 +++++++++-------- code/modules/missions/dynamic/missions.dm | 11 +++-------- code/modules/missions/mission.dm | 17 ++++++++++++++++- code/modules/missions/simple/anomaly_mission.dm | 10 ++++------ code/modules/missions/simple/drill_mission.dm | 4 ++-- 6 files changed, 39 insertions(+), 25 deletions(-) diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index c2d7ef53a2fb..8add34d8e165 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -14,6 +14,11 @@ . = ..() setpiece_item = pick(setpiece_item) +/datum/mission/dynamic/mission_regexs(mission_string) + mission_string = ..() + mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[author]") + return mission_string + /datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) if(isnull(mission_index)) stack_trace("[src] does not have a mission index") diff --git a/code/modules/missions/dynamic/kill.dm b/code/modules/missions/dynamic/kill.dm index ca322b0de599..3840d26d3d39 100644 --- a/code/modules/missions/dynamic/kill.dm +++ b/code/modules/missions/dynamic/kill.dm @@ -5,8 +5,8 @@ /obj/effect/landmark/mission_poi/main/kill /datum/mission/dynamic/signaled/kill - name = null - desc = null + name = "%MISSION_TARGET termination" + desc = "Bounty for a high ranking %MISSION_TARGET residing on this planet. They should have identifying dogtags." setpiece_poi = /obj/effect/landmark/mission_poi/main/kill setpiece_item = /obj/item/dog_tags mission_main_signal = COMSIG_MOB_DEATH @@ -14,12 +14,13 @@ /datum/mission/dynamic/signaled/kill/generate_mission_details() . = ..() registered_type = pick(registered_type) - if(ispath(registered_type, /mob)) - var/mob/mission_mob = registered_type - if(!name) - name = "[mission_mob::name] termination" - if(!desc) - desc = "Bounty for a high ranking [mission_mob::name] residing on this planet. They should have identifying dogtags." + +/datum/mission/dynamic/signaled/kill/mission_regexs(mission_string) + mission_string = ..() + if(ispath(registered_type)) + var/atom/target = registered_type + mission_string = replacetext(mission_string, "%MISSION_TARGET", "[target::name]") + return mission_string /datum/mission/dynamic/signaled/kill/frontiersmen value = 2500 diff --git a/code/modules/missions/dynamic/missions.dm b/code/modules/missions/dynamic/missions.dm index ac949e9e3d69..52f2ea6ba3e1 100644 --- a/code/modules/missions/dynamic/missions.dm +++ b/code/modules/missions/dynamic/missions.dm @@ -1,16 +1,11 @@ /datum/mission/dynamic/data_reterival name = "data recovery" + desc = "We are looking for %MISSION_REQUIRED" setpiece_item = list( /obj/item/research_notes/loot, /obj/item/documents ) -/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]" - /obj/effect/landmark/mission_poi/main/blackbox icon_state = "main_blackbox" already_spawned = TRUE @@ -28,6 +23,7 @@ /datum/mission/dynamic/nt_files name = "NT asset recovery" + desc = "Look- long story short, I need this folder retrieved. You don't ask why, I make sure you get paid." value = 1250 mission_reward = list( /obj/item/gun/energy/e_gun/old, @@ -39,6 +35,5 @@ /datum/mission/dynamic/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.") + diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 9ba44b7ab3fc..25c46a49e870 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -18,7 +18,7 @@ var/datum/overmap/mission_location /// The amount of time in which to complete the mission. Setting it to 0 will result in no time limit - var/duration = 30 MINUTES + var/duration = 1.5 HOURS /// Should mission value scale proportionally to the deviation from the mission's base duration? var/dur_value_scaling = FALSE /// The maximum deviation of the mission's true value from the base value, as a proportion. @@ -54,6 +54,7 @@ RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) generate_mission_details() + regex_mission_text() return ..() /datum/mission/Destroy() @@ -90,6 +91,17 @@ mission_reward = pick(mission_reward) return +/datum/mission/proc/regex_mission_text() + name = mission_regexs(name) + desc = mission_regexs(desc) + +/datum/mission/proc/mission_regexs(mission_string) + mission_string = replacetext(mission_string, "%MISSION_AUTHOR", "[author]") + if(ispath(mission_reward)) + var/atom/reward = mission_reward + mission_string = replacetext(mission_string, "%MISSION_REWARD", "[reward::name]") + return mission_string + /datum/mission/proc/reward_flavortext() var/reward_string = "[value] cr upon completion" if(ispath(mission_reward)) @@ -124,6 +136,9 @@ /datum/mission/proc/spawn_mission_details(datum/overmap/dynamic/planet) return +/datum/mission/proc/accept(datum/overmap/ship/controlled/acceptor, turf/accept_loc) + return + /datum/mission/proc/can_turn_in(atom/movable/item_to_check) return diff --git a/code/modules/missions/simple/anomaly_mission.dm b/code/modules/missions/simple/anomaly_mission.dm index c936072d4f29..fb5831a28d38 100644 --- a/code/modules/missions/simple/anomaly_mission.dm +++ b/code/modules/missions/simple/anomaly_mission.dm @@ -1,5 +1,7 @@ /datum/mission/simple/anomaly name = "Anomaly core requested" + desc = "%MISSION_AUTHOR has requested that a ship locate an anomaly core for research. \ + They've offered to pay well, so we're relaying this mission to you." weight = 8 value = 3000 duration = 80 MINUTES @@ -7,11 +9,7 @@ container_type = /obj/item/storage/box/anomaly objective_type = /obj/item/assembly/signaler/anomaly num_wanted = 1 - var/researcher_name -/datum/mission/simple/anomaly/New(...) - researcher_name = SSmissions.get_researcher_name() - desc = "[researcher_name] has requested that a ship [pick(list("procure", "grab", "acquire", "find", "locate"))] \ - an anomaly core for [pick(list("research", "analysis", "technical development", "closer inspection", "some reason"))]. \ - They've offered to pay well, so we're relaying this mission to you" +/datum/mission/simple/anomaly/generate_mission_details() . = ..() + researcher_name = SSmissions.get_researcher_name() diff --git a/code/modules/missions/simple/drill_mission.dm b/code/modules/missions/simple/drill_mission.dm index 1150233a6def..b2198b5651b2 100644 --- a/code/modules/missions/simple/drill_mission.dm +++ b/code/modules/missions/simple/drill_mission.dm @@ -11,10 +11,10 @@ var/num_wanted = 4 var/class_wanted = 1 -/datum/mission/drill/New(...) +/datum/mission/drill/generate_mission_details() + . = ..() num_wanted = rand(num_wanted-2,num_wanted+2) value += num_wanted*100 - return ..() /datum/mission/drill/accept(datum/overmap/ship/controlled/acceptor, turf/accept_loc) . = ..() From c3df5c66551a7a38a8ac8e18a17f132f383888ce Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Mon, 6 Jan 2025 21:36:52 -0600 Subject: [PATCH 61/77] small fix --- code/datums/ruins/lavaland.dm | 3 ++- code/modules/hydroponics/fermenting_barrel.dm | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index aaac437efd7b..313d374ce350 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -47,7 +47,8 @@ setpiece_item = /obj/item/documents/nanotrasen /datum/mission/dynamic/brainchip - name = "one of our cargo techs died with some important tech in his head. get it back" + name = "brainchip recovery" + description = "one of our cargo techs died with some important tech in his head. get it back" setpiece_item = /mob/living/carbon/human /obj/effect/landmark/mission_poi/main/implanted diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index 24f0481f5ebd..39510c5a495b 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -96,8 +96,6 @@ /datum/reagent/consumable/ethanol/trickwine/ice_wine, /datum/reagent/consumable/ethanol/trickwine/shock_wine, /datum/reagent/consumable/ethanol/trickwine/hearth_wine, - /datum/reagent/consumable/ethanol/trickwine/force_wine, - /datum/reagent/consumable/ethanol/trickwine/prism_wine )) reagents.add_reagent(trickwine_type, 200) name = "barrel of [trickwine_type::name]" From a6a7cadc16f9e643a5d4d973b45091d9512867fa Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 15 Jan 2025 20:52:43 -0600 Subject: [PATCH 62/77] small fixes --- code/datums/ruins/lavaland.dm | 2 +- code/modules/missions/dynamic/_dynamic.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 313d374ce350..752634925b9d 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -48,7 +48,7 @@ /datum/mission/dynamic/brainchip name = "brainchip recovery" - description = "one of our cargo techs died with some important tech in his head. get it back" + desc = "one of our cargo techs died with some important tech in his head. get it back" setpiece_item = /mob/living/carbon/human /obj/effect/landmark/mission_poi/main/implanted diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 8add34d8e165..14eb7e0cf218 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -16,7 +16,7 @@ /datum/mission/dynamic/mission_regexs(mission_string) mission_string = ..() - mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[author]") + mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[setpiece_item::name]") return mission_string /datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) From 09c3e8bb1e880a48f7ca06aafb6c92574d60fe77 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 15 Jan 2025 21:07:39 -0600 Subject: [PATCH 63/77] small fix --- code/modules/missions/dynamic/_dynamic.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 14eb7e0cf218..f6d34459f8dd 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -16,7 +16,9 @@ /datum/mission/dynamic/mission_regexs(mission_string) mission_string = ..() - mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[setpiece_item::name]") + if(ispath(setpiece_item)) + var/atom/target = setpiece_item + mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[target::name]") return mission_string /datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) From b5c5bb00908b86438c5b9f15b091e7d086e59b3a Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 15 Jan 2025 21:25:17 -0600 Subject: [PATCH 64/77] small fix --- code/modules/missions/dynamic/_dynamic.dm | 4 +++- code/modules/overmap/overmap_inspect.dm | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index f6d34459f8dd..f24b005b0fe5 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -23,7 +23,9 @@ /datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) if(isnull(mission_index)) - stack_trace("[src] does not have a mission index") + WARNING("[src] does not have a mission index, setting it to 1 as a backup. change this in full pr") + mission_index = 1 + //stack_trace("[src] does not have a mission index") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) use_poi(mission_poi, planet) diff --git a/code/modules/overmap/overmap_inspect.dm b/code/modules/overmap/overmap_inspect.dm index e0c3ca1fe87e..b11b17f1e976 100644 --- a/code/modules/overmap/overmap_inspect.dm +++ b/code/modules/overmap/overmap_inspect.dm @@ -84,6 +84,8 @@ if("inspect_mission") var/datum/mission/dynamic/mission = locate(params["ref"]) if("load_mission") + if(!check_rights(R_DEBUG)) + return var/datum/mission/dynamic/mission = locate(params["ref"]) if(istype(mission, /datum/mission)) mission.start_mission() From c2d515d5c230edb26b6dbe8b0949bb1d2a3056e4 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 15 Jan 2025 21:35:30 -0600 Subject: [PATCH 65/77] small tweak --- code/modules/missions/landmark.dm | 2 +- code/modules/missions/mission.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index 846925721b9c..afc743e76801 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -17,7 +17,7 @@ /obj/effect/landmark/mission_poi/Initialize(mapload) . = ..() if(mapload && isnull(mission_index)) - CRASH("[src] didnt have a mission index") + NOTICE("[src] didnt have a mission index") SSmissions.unallocated_pois += list(src) if(already_spawned && type_to_spawn) var/atom/item_of_interest = search_poi() diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 25c46a49e870..6228c5cb1486 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -42,14 +42,14 @@ /// is a callback to be invoked upon the atom's qdeletion. var/list/atom/movable/bound_atoms -/datum/mission/New(location, mission_index) +/datum/mission/New(_location, _mission_index) //source_outpost = _outpost //RegisterSignal(source_outpost, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) - src.mission_index = mission_index + mission_index = _mission_index SSmissions.inactive_missions += list(src) if(location_specific) - src.mission_location = location + mission_location = _location RegisterSignal(mission_location, COMSIG_PARENT_QDELETING, PROC_REF(on_vital_delete)) RegisterSignal(mission_location, COMSIG_OVERMAP_LOADED, PROC_REF(on_planet_load)) From 14bbd0f7060553f98a13fa5735a096d1a8a84fa6 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 15 Jan 2025 21:40:32 -0600 Subject: [PATCH 66/77] temp comment out --- code/modules/overmap/overmap_inspect.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/overmap/overmap_inspect.dm b/code/modules/overmap/overmap_inspect.dm index b11b17f1e976..a467c60a8964 100644 --- a/code/modules/overmap/overmap_inspect.dm +++ b/code/modules/overmap/overmap_inspect.dm @@ -10,8 +10,8 @@ /datum/overmap/ui_interact(mob/user, datum/tgui/ui) . = ..() - if(!check_rights(R_DEBUG)) - return + //if(!check_rights(R_DEBUG)) + // return if(user.client) var/datum/overmap_inspect/overmap_inspect = new(src, user) overmap_inspect.ui_interact(user) From c20a99856ede3526ea88b98b7b88d646378c1aa4 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 16 Jan 2025 06:03:18 -0600 Subject: [PATCH 67/77] tweaks --- code/datums/ruins/icemoon.dm | 1 + code/modules/missions/dynamic/_dynamic.dm | 4 +--- code/modules/missions/dynamic/kill.dm | 11 ++++------- code/modules/missions/dynamic/signaled.dm | 2 +- .../file_system/programs/bounty_board.dm | 4 ++++ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index bca4db020da0..8ddf6ec0ea26 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -34,6 +34,7 @@ /datum/mission/dynamic/fallen_montagne name = "dark signal investigation" desc = "We've lost contact with one of our lodges but there signal has gone dark. We suspect they may have been assulted by a hostile faction. If they are KIA please retrive the Montagne's body." + value = 3000 mission_reward = /obj/structure/fermenting_barrel/trickwine faction = /datum/faction/srm setpiece_item = /mob/living/carbon/human diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index f24b005b0fe5..6c0cea81e5ea 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -23,9 +23,7 @@ /datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) if(isnull(mission_index)) - WARNING("[src] does not have a mission index, setting it to 1 as a backup. change this in full pr") - mission_index = 1 - //stack_trace("[src] does not have a mission index") + stack_trace("[src] does not have a mission index!") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) use_poi(mission_poi, planet) diff --git a/code/modules/missions/dynamic/kill.dm b/code/modules/missions/dynamic/kill.dm index 3840d26d3d39..e85d91e62434 100644 --- a/code/modules/missions/dynamic/kill.dm +++ b/code/modules/missions/dynamic/kill.dm @@ -1,14 +1,10 @@ -/obj/item/dog_tags - name = "dog tags" - icon_state = "skub" - /obj/effect/landmark/mission_poi/main/kill /datum/mission/dynamic/signaled/kill name = "%MISSION_TARGET termination" desc = "Bounty for a high ranking %MISSION_TARGET residing on this planet. They should have identifying dogtags." setpiece_poi = /obj/effect/landmark/mission_poi/main/kill - setpiece_item = /obj/item/dog_tags + setpiece_item = /obj/item/clothing/neck/dogtag mission_main_signal = COMSIG_MOB_DEATH /datum/mission/dynamic/signaled/kill/generate_mission_details() @@ -23,12 +19,13 @@ return mission_string /datum/mission/dynamic/signaled/kill/frontiersmen - value = 2500 + value = 3500 mission_reward = /obj/item/gun/ballistic/automatic/pistol/mauler registered_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer + setpiece_item = /obj/item/clothing/neck/dogtag/frontier /datum/mission/dynamic/signaled/kill/syndi_docs - value = 3000 + value = 4000 registered_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite setpiece_item = /obj/item/folder/documents/syndicate diff --git a/code/modules/missions/dynamic/signaled.dm b/code/modules/missions/dynamic/signaled.dm index ef099a4c1ae9..da15c0835ec9 100644 --- a/code/modules/missions/dynamic/signaled.dm +++ b/code/modules/missions/dynamic/signaled.dm @@ -26,7 +26,7 @@ /datum/mission/dynamic/signaled/drill name = "drill mission" desc = "get this drill back up and running and send us proof" - value = 3000 + value = 5000 faction = list( /datum/faction/nt, /datum/faction/nt/ns_logi, diff --git a/code/modules/modular_computers/file_system/programs/bounty_board.dm b/code/modules/modular_computers/file_system/programs/bounty_board.dm index fb575c6f0af6..7bf6918a0eb3 100644 --- a/code/modules/modular_computers/file_system/programs/bounty_board.dm +++ b/code/modules/modular_computers/file_system/programs/bounty_board.dm @@ -16,4 +16,8 @@ data["missions"] += list(M.get_tgui_info()) data["pad"] = FALSE data["id_inserted"] = FALSE + if(computer && card_slot) + var/obj/item/card/id/id_card = card_slot.stored_card + data["id_inserted"] = !!id_card + return data From 77582a97f7d6a9c52f76f58d7e811517c789cf8e Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 16 Jan 2025 06:18:26 -0600 Subject: [PATCH 68/77] rename, more tweaks --- code/controllers/subsystem/missions.dm | 6 +++--- code/datums/ruins/beachplanet.dm | 4 ++-- code/datums/ruins/icemoon.dm | 10 +++++----- code/datums/ruins/jungle.dm | 12 ++++++------ code/datums/ruins/lavaland.dm | 18 +++++++++--------- code/datums/ruins/rockplanet.dm | 2 +- code/datums/ruins/space.dm | 2 +- code/modules/missions/dynamic/_dynamic.dm | 16 ++++++++-------- code/modules/missions/dynamic/kill.dm | 18 +++++++++--------- code/modules/missions/dynamic/missions.dm | 8 ++++---- code/modules/missions/dynamic/signaled.dm | 8 ++++---- code/modules/missions/mission_board.dm | 10 +++++----- .../computers/machinery/console_presets.dm | 1 + .../modular_computers/file_system/program.dm | 3 ++- .../file_system/programs/bounty_board.dm | 6 +++++- code/modules/overmap/objects/dynamic_datum.dm | 4 ++-- code/modules/overmap/overmap_inspect.dm | 4 ++-- .../tgui/interfaces/MissionBoard/index.tsx | 3 +-- 18 files changed, 70 insertions(+), 65 deletions(-) diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index c90cfb65058b..ddf0f9e46f0f 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -3,8 +3,8 @@ SUBSYSTEM_DEF(missions) flags = SS_NO_INIT priority = FIRE_PRIORITY_MISSIONS var/list/obj/effect/landmark/mission_poi/unallocated_pois = list() - var/list/datum/mission/dynamic/inactive_missions = list() - var/list/datum/mission/dynamic/active_missions = list() + var/list/datum/mission/ruin/inactive_missions = list() + var/list/datum/mission/ruin/active_missions = list() /datum/controller/subsystem/missions/stat_entry(msg) var/unallocated = unallocated_pois.len @@ -19,7 +19,7 @@ SUBSYSTEM_DEF(missions) //Make sure we dont ONLY take the one of the top. if(prob(50)) //Has the pleasnt result of grabbing the most recent mission, idealy this means a freshly created planet - var/datum/mission/dynamic/mission_to_start = inactive_missions[inactive_missions.len - (i - 1)] + var/datum/mission/ruin/mission_to_start = inactive_missions[inactive_missions.len - (i - 1)] mission_to_start.start_mission() break diff --git a/code/datums/ruins/beachplanet.dm b/code/datums/ruins/beachplanet.dm index a06134d656f8..3223b3a3d056 100644 --- a/code/datums/ruins/beachplanet.dm +++ b/code/datums/ruins/beachplanet.dm @@ -24,7 +24,7 @@ description = "A small pirate outpost formed from the remains of a wrecked shuttle." suffix = "beach_pirate_crash.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/frontiersmen) + dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) /datum/map_template/ruin/beachplanet/treasurecove name = "Treasure Cove" @@ -32,4 +32,4 @@ 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/signaled/kill/frontiersmen) + dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index 8ddf6ec0ea26..fa36824bd60a 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -11,8 +11,8 @@ 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/data_reterival, - /datum/mission/dynamic/signaled/drill + /datum/mission/ruin/data_reterival, + /datum/mission/ruin/signaled/drill ) /datum/map_template/ruin/icemoon/crashed_holemaker @@ -21,7 +21,7 @@ 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/data_reterival) + dynamic_mission_types = list(/datum/mission/ruin/data_reterival) /datum/map_template/ruin/icemoon/ice_lodge name = "Ice Lodge" @@ -29,9 +29,9 @@ description = "Records show this settlement as belonging to the SRM, but no one has heard from them as of late. I wonder what happened?" suffix = "icemoon_ice_lodge.dmm" ruin_tags = list(RUIN_TAG_HARD_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) - dynamic_mission_types = list(/datum/mission/dynamic/fallen_montagne) + dynamic_mission_types = list(/datum/mission/ruin/fallen_montagne) -/datum/mission/dynamic/fallen_montagne +/datum/mission/ruin/fallen_montagne name = "dark signal investigation" desc = "We've lost contact with one of our lodges but there signal has gone dark. We suspect they may have been assulted by a hostile faction. If they are KIA please retrive the Montagne's body." value = 3000 diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index 7ba90c6c55e9..cec2d3f847b0 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -11,11 +11,11 @@ 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/nt_files, - /datum/mission/dynamic/signaled/kill/jerry + /datum/mission/ruin/nt_files, + /datum/mission/ruin/signaled/kill/jerry ) -/datum/mission/dynamic/signaled/kill/jerry +/datum/mission/ruin/signaled/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!" author = "I FUCKING WANT HIM HUNG." @@ -51,7 +51,7 @@ description = "A bombed out airbase from the ICW, taken back over by nature" suffix = "jungle_bombed_starport.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/dynamic/blackbox) + dynamic_mission_types = list(/datum/mission/ruin/blackbox) /datum/map_template/ruin/jungle/medtech name = "MedTech facility" @@ -67,6 +67,6 @@ suffix = "jungle_cavecrew.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE, RUIN_TAG_MAJOR_LOOT) dynamic_mission_types = list( - /datum/mission/dynamic/signaled/kill/frontiersmen, - /datum/mission/dynamic/data_reterival + /datum/mission/ruin/signaled/kill/frontiersmen, + /datum/mission/ruin/data_reterival ) diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index 752634925b9d..d9a59be71a10 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -17,7 +17,7 @@ id = "buried_shrine" description = "An ancient temple belonging to some long-gone inhabitants, wrecked and buried by the volcanic activity of it's home planet." suffix = "lavaland_surface_buried_shrine.dmm" - dynamic_mission_types = list(/datum/mission/dynamic/signaled/kill/elite) + dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/elite) /datum/map_template/ruin/lavaland/lava_canyon name = "Lava Canyon" @@ -31,22 +31,22 @@ description = "A Nanotrasen processing facility, assaulted by a pirate raid that has killed most of the staff. The offices however, remain unbreached for now." suffix = "lavaland_surface_wrecked_factory.dmm" dynamic_mission_types = list( - /datum/mission/dynamic/nanotrasen_docs, - /datum/mission/dynamic/captain_medal, - /datum/mission/dynamic/brainchip + /datum/mission/ruin/nanotrasen_docs, + /datum/mission/ruin/captain_medal, + /datum/mission/ruin/brainchip ) -/datum/mission/dynamic/nanotrasen_docs +/datum/mission/ruin/nanotrasen_docs name = "recover some nanotrasen files." value = 2500 setpiece_item = /obj/item/documents/nanotrasen -/datum/mission/dynamic/captain_medal +/datum/mission/ruin/captain_medal name = "recover my lost medal." value = 1250 setpiece_item = /obj/item/documents/nanotrasen -/datum/mission/dynamic/brainchip +/datum/mission/ruin/brainchip name = "brainchip recovery" desc = "one of our cargo techs died with some important tech in his head. get it back" setpiece_item = /mob/living/carbon/human @@ -66,11 +66,11 @@ id = "crashed_star" description = "A crashed pirate ship. It would seem that it's crew died a while ago." suffix = "lavaland_crashed_starwalker.dmm" - dynamic_mission_types = list(/datum/mission/dynamic/blackbox) + dynamic_mission_types = list(/datum/mission/ruin/blackbox) /datum/map_template/ruin/lavaland/abandonedlisteningpost name = "Abandoned Listening Post" id = "abandonedlistening" description = "An abandoned Cybersun listening post. Seems like the Ramzi Clique has an interest in the site." suffix = "lavaland_abandonedlisteningpost.dmm" - dynamic_mission_types = list(/datum/mission/dynamic/blackbox) + dynamic_mission_types = list(/datum/mission/ruin/blackbox) diff --git a/code/datums/ruins/rockplanet.dm b/code/datums/ruins/rockplanet.dm index 42817b9b0d78..b97309a05252 100644 --- a/code/datums/ruins/rockplanet.dm +++ b/code/datums/ruins/rockplanet.dm @@ -23,7 +23,7 @@ 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/signaled/kill/frontiersmen) + dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) /datum/map_template/ruin/rockplanet/mining_base name = "N+S Mining Installation" diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 40c33a3072e8..353676c98455 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -28,7 +28,7 @@ description = "an abandoned secure storage location. there is no power left in the batteries and the former ocupants locked it pretty tight before leaving.\ You will have to power areas to raise the bolts on the doors. look out for secrets." ruin_tags = list(RUIN_TAG_MINOR_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) - dynamic_mission_types = list(/datum/mission/dynamic/data_reterival) + dynamic_mission_types = list(/datum/mission/ruin/data_reterival) /datum/map_template/ruin/space/singularitylab id = "singularitylab" diff --git a/code/modules/missions/dynamic/_dynamic.dm b/code/modules/missions/dynamic/_dynamic.dm index 6c0cea81e5ea..d2a2eff5ab07 100644 --- a/code/modules/missions/dynamic/_dynamic.dm +++ b/code/modules/missions/dynamic/_dynamic.dm @@ -1,4 +1,4 @@ -/datum/mission/dynamic +/datum/mission/ruin value = 2000 duration = null /// Which landmark we will search for in spawned_mission_pois of the planet @@ -10,18 +10,18 @@ /// The item that you can turn in to complete the mission. If specific_item is false it uses the type of the item. var/atom/movable/required_item -/datum/mission/dynamic/generate_mission_details() +/datum/mission/ruin/generate_mission_details() . = ..() setpiece_item = pick(setpiece_item) -/datum/mission/dynamic/mission_regexs(mission_string) +/datum/mission/ruin/mission_regexs(mission_string) mission_string = ..() if(ispath(setpiece_item)) var/atom/target = setpiece_item mission_string = replacetext(mission_string, "%MISSION_REQUIRED", "[target::name]") return mission_string -/datum/mission/dynamic/spawn_mission_details(datum/overmap/dynamic/planet) +/datum/mission/ruin/spawn_mission_details(datum/overmap/dynamic/planet) if(isnull(mission_index)) stack_trace("[src] does not have a mission index!") for(var/obj/effect/landmark/mission_poi/mission_poi in planet.spawned_mission_pois) @@ -29,7 +29,7 @@ spawn_custom_details(planet) -/datum/mission/dynamic/proc/use_poi(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) +/datum/mission/ruin/proc/use_poi(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) if(mission_poi.use_count <= 0) qdel(mission_poi) return @@ -51,7 +51,7 @@ if(isatom(poi_result)) poi_result.AddComponent(/datum/component/mission_important, MISSION_IMPORTANCE_RELEVENT, src) -/datum/mission/dynamic/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) +/datum/mission/ruin/proc/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi, datum/overmap/dynamic/planet) required_item = mission_poi.use_poi(setpiece_item, src) if(isatom(required_item)) set_bound(required_item, null, TRUE, TRUE) @@ -60,10 +60,10 @@ qdel(src) /// For handling logic outside of main piece thats too complex for the basic reiteration or you want to not require indexs to match. -/datum/mission/dynamic/proc/spawn_custom_details(datum/overmap/dynamic/planet) +/datum/mission/ruin/proc/spawn_custom_details(datum/overmap/dynamic/planet) return -/datum/mission/dynamic/can_turn_in(atom/movable/item_to_check) +/datum/mission/ruin/can_turn_in(atom/movable/item_to_check) if(istype(required_item)) if(specific_item) if(item_to_check == required_item) diff --git a/code/modules/missions/dynamic/kill.dm b/code/modules/missions/dynamic/kill.dm index e85d91e62434..ced447b3fa0b 100644 --- a/code/modules/missions/dynamic/kill.dm +++ b/code/modules/missions/dynamic/kill.dm @@ -1,46 +1,46 @@ /obj/effect/landmark/mission_poi/main/kill -/datum/mission/dynamic/signaled/kill +/datum/mission/ruin/signaled/kill name = "%MISSION_TARGET termination" desc = "Bounty for a high ranking %MISSION_TARGET residing on this planet. They should have identifying dogtags." setpiece_poi = /obj/effect/landmark/mission_poi/main/kill setpiece_item = /obj/item/clothing/neck/dogtag mission_main_signal = COMSIG_MOB_DEATH -/datum/mission/dynamic/signaled/kill/generate_mission_details() +/datum/mission/ruin/signaled/kill/generate_mission_details() . = ..() registered_type = pick(registered_type) -/datum/mission/dynamic/signaled/kill/mission_regexs(mission_string) +/datum/mission/ruin/signaled/kill/mission_regexs(mission_string) mission_string = ..() if(ispath(registered_type)) var/atom/target = registered_type mission_string = replacetext(mission_string, "%MISSION_TARGET", "[target::name]") return mission_string -/datum/mission/dynamic/signaled/kill/frontiersmen +/datum/mission/ruin/signaled/kill/frontiersmen value = 3500 mission_reward = /obj/item/gun/ballistic/automatic/pistol/mauler registered_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer setpiece_item = /obj/item/clothing/neck/dogtag/frontier -/datum/mission/dynamic/signaled/kill/syndi_docs +/datum/mission/ruin/signaled/kill/syndi_docs value = 4000 registered_type = /mob/living/simple_animal/hostile/human/nanotrasen/elite setpiece_item = /obj/item/folder/documents/syndicate -/datum/mission/dynamic/signaled/kill/megafauna +/datum/mission/ruin/signaled/kill/megafauna -/datum/mission/dynamic/signaled/kill/megafauna/generate_mission_details() +/datum/mission/ruin/signaled/kill/megafauna/generate_mission_details() registered_type = pick( /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner, /mob/living/simple_animal/hostile/megafauna/claw, ) . = ..() -/datum/mission/dynamic/signaled/kill/elite +/datum/mission/ruin/signaled/kill/elite -/datum/mission/dynamic/signaled/kill/elite/generate_mission_details() +/datum/mission/ruin/signaled/kill/elite/generate_mission_details() registered_type = pick( /mob/living/simple_animal/hostile/asteroid/elite/broodmother, /mob/living/simple_animal/hostile/asteroid/elite/herald, diff --git a/code/modules/missions/dynamic/missions.dm b/code/modules/missions/dynamic/missions.dm index 52f2ea6ba3e1..f4303fff1950 100644 --- a/code/modules/missions/dynamic/missions.dm +++ b/code/modules/missions/dynamic/missions.dm @@ -1,4 +1,4 @@ -/datum/mission/dynamic/data_reterival +/datum/mission/ruin/data_reterival name = "data recovery" desc = "We are looking for %MISSION_REQUIRED" setpiece_item = list( @@ -16,12 +16,12 @@ if(istype(recorder.stored, /obj/item/blackbox)) return recorder.stored -/datum/mission/dynamic/blackbox +/datum/mission/ruin/blackbox name = "blackbox recovery" desc = "Recover some lost logs from this ruin's blackbox recorder." setpiece_item = /obj/machinery/blackbox_recorder -/datum/mission/dynamic/nt_files +/datum/mission/ruin/nt_files name = "NT asset recovery" desc = "Look- long story short, I need this folder retrieved. You don't ask why, I make sure you get paid." value = 1250 @@ -33,7 +33,7 @@ faction = /datum/faction/nt setpiece_item = /obj/item/documents/nanotrasen -/datum/mission/dynamic/nt_files/generate_mission_details() +/datum/mission/ruin/nt_files/generate_mission_details() . = ..() author = "Captain [random_species_name()]" diff --git a/code/modules/missions/dynamic/signaled.dm b/code/modules/missions/dynamic/signaled.dm index da15c0835ec9..2a7f07128468 100644 --- a/code/modules/missions/dynamic/signaled.dm +++ b/code/modules/missions/dynamic/signaled.dm @@ -1,10 +1,10 @@ -/datum/mission/dynamic/signaled +/datum/mission/ruin/signaled var/registered_type var/atom/movable/registered_item /// What signal will spawn the required item var/mission_main_signal -/datum/mission/dynamic/signaled/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) +/datum/mission/ruin/signaled/spawn_main_piece(obj/effect/landmark/mission_poi/mission_poi) registered_item = mission_poi.use_poi(registered_type, src) if(isatom(registered_item)) registered_item = set_bound(registered_item, null, FALSE, TRUE) @@ -13,7 +13,7 @@ stack_trace("[src] did not generate a required item.") qdel(src) -/datum/mission/dynamic/signaled/proc/on_signaled(atom/movable/registered_item) +/datum/mission/ruin/signaled/proc/on_signaled(atom/movable/registered_item) SIGNAL_HANDLER required_item = new setpiece_item(registered_item.loc) @@ -23,7 +23,7 @@ /obj/effect/landmark/mission_poi/main/drill -/datum/mission/dynamic/signaled/drill +/datum/mission/ruin/signaled/drill name = "drill mission" desc = "get this drill back up and running and send us proof" value = 5000 diff --git a/code/modules/missions/mission_board.dm b/code/modules/missions/mission_board.dm index d19c78334d99..2aa60947944b 100644 --- a/code/modules/missions/mission_board.dm +++ b/code/modules/missions/mission_board.dm @@ -73,8 +73,8 @@ if("recalc") recalc() if("send") - var/datum/mission/dynamic/mission = locate(params["mission"]) - if(!istype(mission, /datum/mission/dynamic)) + var/datum/mission/ruin/mission = locate(params["mission"]) + if(!istype(mission, /datum/mission/ruin)) return turn_in(mission) if("eject") @@ -82,7 +82,7 @@ inserted_scan_id = null . = TRUE -/obj/machinery/computer/mission/proc/turn_in(datum/mission/dynamic/mission) +/obj/machinery/computer/mission/proc/turn_in(datum/mission/ruin/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) @@ -113,7 +113,7 @@ var/list/data = list() data["missions"] = list() var/list/items_on_pad = recalc() - for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + for(var/datum/mission/ruin/M as anything in SSmissions.active_missions) data["missions"] += list(M.get_tgui_info(items_on_pad)) data["pad"] = pad_ref?.resolve() ? TRUE : FALSE data["id_inserted"] = inserted_scan_id ? TRUE : FALSE @@ -162,7 +162,7 @@ /obj/machinery/bounty_viewer/ui_data(mob/user) var/list/data = list() data["missions"] = list() - for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + for(var/datum/mission/ruin/M as anything in SSmissions.active_missions) data["missions"] += list(M.get_tgui_info()) data["pad"] = FALSE data["id_inserted"] = FALSE diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index 92afe88776b0..7e1caf86cdf7 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -64,6 +64,7 @@ var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD] hard_drive.store_file(new/datum/computer_file/program/chatclient()) hard_drive.store_file(new/datum/computer_file/program/card_mod()) + hard_drive.store_file(new/datum/computer_file/program/bounty_board()) // ===== IDENTIFICATION CONSOLE ===== diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index b784b1d848bc..885651d4f59b 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -113,8 +113,9 @@ if(ishuman(user)) var/obj/item/card/id/D var/obj/item/computer_hardware/card_slot/card_slot - if(computer && card_slot) + if(computer) card_slot = computer.all_components[MC_CARD] + if(card_slot) D = card_slot.GetID() var/mob/living/carbon/human/h = user var/obj/item/card/id/I = h.get_idcard(TRUE) diff --git a/code/modules/modular_computers/file_system/programs/bounty_board.dm b/code/modules/modular_computers/file_system/programs/bounty_board.dm index 7bf6918a0eb3..7a827b9ebe43 100644 --- a/code/modules/modular_computers/file_system/programs/bounty_board.dm +++ b/code/modules/modular_computers/file_system/programs/bounty_board.dm @@ -12,10 +12,14 @@ /datum/computer_file/program/bounty_board/ui_data(mob/user) var/list/data = get_header_data() data["missions"] = list() - for(var/datum/mission/dynamic/M as anything in SSmissions.active_missions) + for(var/datum/mission/ruin/M as anything in SSmissions.active_missions) data["missions"] += list(M.get_tgui_info()) data["pad"] = FALSE data["id_inserted"] = FALSE + + var/obj/item/computer_hardware/card_slot/card_slot + if(computer) + card_slot = computer.all_components[MC_CARD] if(computer && card_slot) var/obj/item/card/id/id_card = card_slot.stored_card data["id_inserted"] = !!id_card diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 36f1db6f179c..4df90e3a58ce 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -113,7 +113,7 @@ if(length(mapzone?.get_mind_mobs()) || SSlag_switch.measures[DISABLE_PLANETDEL]) return //Dont fuck over stranded people - for(var/datum/mission/dynamic/dynamic_mission in dynamic_missions) + for(var/datum/mission/ruin/dynamic_mission in dynamic_missions) if(dynamic_mission.active) return //Dont fuck over people trying to complete a mission. @@ -226,7 +226,7 @@ . = ..() .["active_missions"] = list() .["inactive_missions"] = list() - for(var/datum/mission/dynamic/mission as anything in dynamic_missions) + for(var/datum/mission/ruin/mission as anything in dynamic_missions) if(mission.active) .["active_missions"] += list(list( "ref" = REF(mission), diff --git a/code/modules/overmap/overmap_inspect.dm b/code/modules/overmap/overmap_inspect.dm index a467c60a8964..e7710e4720dd 100644 --- a/code/modules/overmap/overmap_inspect.dm +++ b/code/modules/overmap/overmap_inspect.dm @@ -82,11 +82,11 @@ if(istype(focus, /datum/overmap)) focus.admin_load() if("inspect_mission") - var/datum/mission/dynamic/mission = locate(params["ref"]) + var/datum/mission/ruin/mission = locate(params["ref"]) if("load_mission") if(!check_rights(R_DEBUG)) return - var/datum/mission/dynamic/mission = locate(params["ref"]) + var/datum/mission/ruin/mission = locate(params["ref"]) if(istype(mission, /datum/mission)) mission.start_mission() diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index d229785f395f..54f71fec1021 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -31,8 +31,7 @@ export const MissionsContent = (props, context) => { <> - - {validItems.map((validItem: string) => ( - {validItem} - ))} - - ) : null} - + {reward} + {pad ? ( + + + + {validItems.map((validItem: string) => ( + {validItem} + ))} + + ) : null} ); }); From e4e06ef2154727bf96dd1259100d8718720673b9 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 17:51:33 -0600 Subject: [PATCH 70/77] ruin plament test plus renames --- .../JungleRuins/jungle_cavecrew.dmm | 2 +- code/__HELPERS/unsorted.dm | 2 +- .../circuitboards/computer_circuitboards.dm | 7 +------ code/modules/missions/mission_board.dm | 18 +++++++++--------- code/modules/overmap/overmap_inspect.dm | 2 +- .../research/designs/autolathe_designs.dm | 2 +- .../research/designs/comp_board_designs.dm | 7 ------- code/modules/unit_tests/ruin_placement.dm | 4 ++++ 8 files changed, 18 insertions(+), 26 deletions(-) diff --git a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm index f99304cceca3..e613c1ac0df5 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm @@ -3229,7 +3229,7 @@ /obj/effect/turf_decal/industrial/hatch/yellow, /obj/effect/decal/cleanable/dirt, /obj/structure/closet/crate/secure/loot, -/obj/item/wallframe/bounty_viewer, +/obj/item/wallframe/mission_viewer, /turf/open/floor/plasteel/patterned/cargo_one, /area/ruin/jungle/cavecrew/cargo) "Nf" = ( diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 6ee9095d6e41..1e76dd756290 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -681,7 +681,7 @@ GLOBAL_LIST_INIT(WALLITEMS, typecacheof(list( /obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller, /obj/item/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth, /obj/structure/mirror, /obj/structure/cabinet, /obj/machinery/computer/security/telescreen/entertainment, - /obj/structure/sign/picture_frame, /obj/machinery/bounty_viewer + /obj/structure/sign/picture_frame, /obj/machinery/mission_viewer ))) GLOBAL_LIST_INIT(WALLITEMS_EXTERNAL, typecacheof(list( diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 15aeebdd819c..80ba422a04db 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -351,13 +351,8 @@ //Supply -/obj/item/circuitboard/computer/bounty - name = "\improper Outpost Bounty Console (Computer Board)" - icon_state = "supply" - build_path = /obj/machinery/computer/mission - /obj/item/circuitboard/computer/mission - name = "\improper Outpost Mission Console" + name = "\improper Outpost Mission Console (Computer Board)" icon_state = "supply" build_path = /obj/machinery/computer/mission diff --git a/code/modules/missions/mission_board.dm b/code/modules/missions/mission_board.dm index 2aa60947944b..0b4dac1b905d 100644 --- a/code/modules/missions/mission_board.dm +++ b/code/modules/missions/mission_board.dm @@ -124,21 +124,21 @@ icon = 'icons/obj/telescience.dmi' icon_state = "pad-idle" -/obj/machinery/bounty_viewer - name = "bounty viewer" +/obj/machinery/mission_viewer + name = "mission viewer" desc = "A multi-platform network for placing requests across the sector, this one is view only." icon = 'icons/obj/terminals.dmi' icon_state = "request_kiosk" light_color = LIGHT_COLOR_GREEN -/obj/machinery/bounty_viewer/Initialize(mapload, ndir, building) +/obj/machinery/mission_viewer/Initialize(mapload, ndir, building) . = ..() if(building) setDir(ndir) pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32) pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0 -/obj/machinery/bounty_viewer/wrench_act(mob/living/user, obj/item/I) +/obj/machinery/mission_viewer/wrench_act(mob/living/user, obj/item/I) . = ..() to_chat(user, span_notice("You start [anchored ? "un" : ""]securing [name]...")) I.play_tool_sound(src) @@ -150,16 +150,16 @@ new /obj/item/shard(loc) else to_chat(user, span_notice("You [anchored ? "un" : ""]secure [name].")) - new /obj/item/wallframe/bounty_viewer(loc) + new /obj/item/wallframe/mission_viewer(loc) qdel(src) -/obj/machinery/bounty_viewer/ui_interact(mob/user, datum/tgui/ui) +/obj/machinery/mission_viewer/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) ui = new(user, src, "MissionBoard", name) ui.open() -/obj/machinery/bounty_viewer/ui_data(mob/user) +/obj/machinery/mission_viewer/ui_data(mob/user) var/list/data = list() data["missions"] = list() for(var/datum/mission/ruin/M as anything in SSmissions.active_missions) @@ -168,10 +168,10 @@ data["id_inserted"] = FALSE return data -/obj/item/wallframe/bounty_viewer +/obj/item/wallframe/mission_viewer name = "disassembled bounty viewer" desc = "Used to build a new bounty viewer, just secure to the wall." icon_state = "request_kiosk" custom_materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) - result_path = /obj/machinery/bounty_viewer + result_path = /obj/machinery/mission_viewer inverse = FALSE diff --git a/code/modules/overmap/overmap_inspect.dm b/code/modules/overmap/overmap_inspect.dm index e7710e4720dd..715c795c3771 100644 --- a/code/modules/overmap/overmap_inspect.dm +++ b/code/modules/overmap/overmap_inspect.dm @@ -82,7 +82,7 @@ if(istype(focus, /datum/overmap)) focus.admin_load() if("inspect_mission") - var/datum/mission/ruin/mission = locate(params["ref"]) + //var/datum/mission/ruin/mission = locate(params["ref"]) if("load_mission") if(!check_rights(R_DEBUG)) return diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 77afd24c19c4..d51a9a9928d6 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -743,7 +743,7 @@ id = "bountyboard_frame" build_type = AUTOLATHE materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000) - build_path = /obj/item/wallframe/bounty_viewer + build_path = /obj/item/wallframe/mission_viewer category = list("initial", "Construction") /datum/design/syringe diff --git a/code/modules/research/designs/comp_board_designs.dm b/code/modules/research/designs/comp_board_designs.dm index 6cd4b69f4062..0c7f72d8081c 100644 --- a/code/modules/research/designs/comp_board_designs.dm +++ b/code/modules/research/designs/comp_board_designs.dm @@ -182,13 +182,6 @@ category = list("Computer Boards") departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO -/datum/design/board/bounty - name = "Computer Design (Bounty Console)" - desc = "Allows for the construction of circuit boards used to build a Bounty Console." - id = "bounty" - build_path = /obj/item/circuitboard/computer/bounty - category = list("Computer Boards") - departmental_flags = DEPARTMENTAL_FLAG_CARGO /datum/design/board/mining name = "Computer Design (Outpost Status Display)" diff --git a/code/modules/unit_tests/ruin_placement.dm b/code/modules/unit_tests/ruin_placement.dm index 1df3560ed710..698300619c80 100644 --- a/code/modules/unit_tests/ruin_placement.dm +++ b/code/modules/unit_tests/ruin_placement.dm @@ -12,6 +12,10 @@ ruin.height ) + var/dynamic_missions = list() + for(var/datum/mission/ruin/mission_type in ruin.dynamic_mission_types) + dynamic_missions += new mission_type(src, 1 + length(dynamic_missions)) + ruin.load(vlevel.get_unreserved_bottom_left_turf()) var/list/errors = atmosscan(TRUE, TRUE) From dd0b29f809444419e9b5e833811974c69c6f38af Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 17:54:33 -0600 Subject: [PATCH 71/77] starts mission --- code/modules/unit_tests/ruin_placement.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/unit_tests/ruin_placement.dm b/code/modules/unit_tests/ruin_placement.dm index 698300619c80..f519ed04d219 100644 --- a/code/modules/unit_tests/ruin_placement.dm +++ b/code/modules/unit_tests/ruin_placement.dm @@ -14,7 +14,9 @@ var/dynamic_missions = list() for(var/datum/mission/ruin/mission_type in ruin.dynamic_mission_types) - dynamic_missions += new mission_type(src, 1 + length(dynamic_missions)) + var/datum/mission/ruin/new_mission = new mission_type(src, 1 + length(dynamic_missions)) + dynamic_missions += new_mission + new_mission.start_mission() ruin.load(vlevel.get_unreserved_bottom_left_turf()) From 908c777c09ea71853a2e34d3d4918049c9ed8e52 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 18:00:30 -0600 Subject: [PATCH 72/77] test to make sure they are acctually being used. --- code/modules/missions/landmark.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index afc743e76801..cd2d58ba0e90 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -36,6 +36,7 @@ /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn, datum/mission/mission) var/atom/item_of_interest use_count-- + NOTICe("[src] was used!") if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(!ispath(type_to_spawn)) From 1061576656442ebefb44d05c1925810753519e3b Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 18:02:34 -0600 Subject: [PATCH 73/77] oops --- code/modules/missions/landmark.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index cd2d58ba0e90..5e4832fc4aeb 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -36,7 +36,7 @@ /obj/effect/landmark/mission_poi/proc/use_poi(_type_to_spawn, datum/mission/mission) var/atom/item_of_interest use_count-- - NOTICe("[src] was used!") + NOTICE("[src] was used!") if(!ispath(type_to_spawn)) type_to_spawn = _type_to_spawn if(!ispath(type_to_spawn)) From 86b7b7547a2b59a310d4fdeaa25296150fab31ec Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 18:08:14 -0600 Subject: [PATCH 74/77] hrm --- code/modules/missions/landmark.dm | 2 +- code/modules/unit_tests/ruin_placement.dm | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/code/modules/missions/landmark.dm b/code/modules/missions/landmark.dm index 5e4832fc4aeb..df64dc2c67bc 100644 --- a/code/modules/missions/landmark.dm +++ b/code/modules/missions/landmark.dm @@ -10,7 +10,7 @@ ///Grabbed as apart of late init to ensure that the item of intrest cant move var/datum/weakref/prespawned_weakref ///Only needed if you have multipe missiosn that would otherwise use the same poi's - var/mission_index = null + var/mission_index = 1 ///Prefered over the passed one, used for varediting primarly. var/type_to_spawn diff --git a/code/modules/unit_tests/ruin_placement.dm b/code/modules/unit_tests/ruin_placement.dm index f519ed04d219..1df3560ed710 100644 --- a/code/modules/unit_tests/ruin_placement.dm +++ b/code/modules/unit_tests/ruin_placement.dm @@ -12,12 +12,6 @@ ruin.height ) - var/dynamic_missions = list() - for(var/datum/mission/ruin/mission_type in ruin.dynamic_mission_types) - var/datum/mission/ruin/new_mission = new mission_type(src, 1 + length(dynamic_missions)) - dynamic_missions += new_mission - new_mission.start_mission() - ruin.load(vlevel.get_unreserved_bottom_left_turf()) var/list/errors = atmosscan(TRUE, TRUE) From c3d4dfd8fd4b1bf276b7b51e4d4768a08ddfb059 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 19 Jan 2025 23:12:39 -0600 Subject: [PATCH 75/77] yea --- _maps/outpost/indie_space.dmm | 32 ++++---------------------- code/controllers/subsystem/missions.dm | 1 + code/modules/missions/mission.dm | 4 ++-- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/_maps/outpost/indie_space.dmm b/_maps/outpost/indie_space.dmm index a6c3a4db8d18..df8ff808abea 100644 --- a/_maps/outpost/indie_space.dmm +++ b/_maps/outpost/indie_space.dmm @@ -770,11 +770,6 @@ /obj/effect/turf_decal/corner/opaque/white, /turf/open/floor/plasteel, /area/outpost/hallway/central) -"ej" = ( -/obj/effect/turf_decal/corner/opaque/brown/full, -/obj/machinery/computer/mission, -/turf/open/floor/plasteel/patterned, -/area/outpost/cargo) "em" = ( /turf/closed/indestructible/reinforced, /area/outpost/external) @@ -1014,7 +1009,6 @@ }, /obj/machinery/elevator_call_button{ dir = 4; - pixel_y = 0; pixel_x = -22 }, /obj/effect/turf_decal/siding/thinplating/dark{ @@ -2992,7 +2986,6 @@ }, /obj/structure/sign/directions/supply{ dir = 1; - pixel_y = 0; pixel_x = 28 }, /obj/structure/sign/directions/security{ @@ -3710,7 +3703,6 @@ dir = 4 }, /obj/structure/sign/poster/random{ - pixel_y = 0; pixel_x = -28 }, /turf/open/floor/wood, @@ -3813,7 +3805,6 @@ /obj/structure/noticeboard{ name = "refinery notice board"; dir = 8; - pixel_y = 0; pixel_x = 26 }, /obj/effect/turf_decal/corner/opaque/white{ @@ -4449,7 +4440,6 @@ /area/outpost/cargo) "wa" = ( /obj/structure/sign/painting/library{ - pixel_y = 0; pixel_x = -26 }, /obj/effect/decal/cleanable/wrapping, @@ -4529,7 +4519,6 @@ "ws" = ( /obj/structure/sink{ dir = 8; - pixel_y = 0; pixel_x = 14 }, /obj/structure/mirror{ @@ -4696,6 +4685,7 @@ /obj/effect/turf_decal/borderfloor{ dir = 5 }, +/obj/machinery/mission_pad, /turf/open/floor/plasteel/mono{ dir = 1 }, @@ -4944,7 +4934,6 @@ /area/outpost/crew/bar) "yH" = ( /obj/structure/railing/wood{ - dir = 2; color = "#792f27" }, /turf/open/floor/plasteel/stairs/wood{ @@ -5467,9 +5456,7 @@ /turf/open/floor/carpet/green, /area/outpost/crew/bar) "Bg" = ( -/obj/structure/closet/crate/bin{ - pixel_y = 0 - }, +/obj/structure/closet/crate/bin, /obj/machinery/light/small/directional/east, /obj/effect/decal/cleanable/insectguts, /obj/item/reagent_containers/syringe{ @@ -6324,7 +6311,6 @@ "FK" = ( /obj/structure/toilet{ dir = 4; - pixel_y = 0; pixel_x = -6 }, /obj/structure/mirror{ @@ -6369,7 +6355,6 @@ "FY" = ( /obj/effect/decal/cleanable/crayon{ icon_state = "electricdanger"; - pixel_y = 0; pixel_x = 30 }, /obj/effect/turf_decal/steeldecal/steel_decals10, @@ -6485,12 +6470,10 @@ /obj/effect/decal/cleanable/cobweb, /obj/effect/decal/cleanable/crayon{ icon_state = "f"; - pixel_y = 0; pixel_x = -19 }, /obj/effect/decal/cleanable/crayon{ icon_state = "f"; - pixel_y = 0; pixel_x = -19 }, /obj/effect/decal/cleanable/dirt, @@ -6761,7 +6744,6 @@ }, /obj/effect/decal/cleanable/crayon{ icon_state = "f"; - pixel_y = 0; pixel_x = -19 }, /obj/effect/decal/cleanable/crayon{ @@ -7383,6 +7365,7 @@ /obj/effect/turf_decal/borderfloor{ dir = 9 }, +/obj/machinery/computer/mission, /turf/open/floor/plasteel/mono{ dir = 1 }, @@ -7470,8 +7453,7 @@ }, /obj/structure/sign/directions/medical{ pixel_y = -12; - pixel_x = -28; - dir = 2 + pixel_x = -28 }, /obj/structure/cable/yellow{ icon_state = "1-2" @@ -7539,7 +7521,6 @@ dir = 4 }, /obj/effect/decal/cleanable/crayon{ - icon_state = "firedanger"; pixel_y = -28 }, /turf/open/floor/plating, @@ -7763,7 +7744,6 @@ /obj/structure/table, /obj/effect/decal/cleanable/dirt/dust, /obj/item/kitchen/fork{ - pixel_y = 0; pixel_x = -7 }, /obj/item/kitchen/fork{ @@ -9224,7 +9204,6 @@ /obj/structure/catwalk/over/plated_catwalk/dark, /obj/structure/sign/directions/medical{ pixel_x = 28; - dir = 2; pixel_y = -10 }, /obj/structure/cable/yellow{ @@ -10215,8 +10194,7 @@ pixel_y = 32 }, /obj/structure/sign/directions/medical{ - pixel_y = 38; - dir = 2 + pixel_y = 38 }, /obj/structure/sign/directions/service{ pixel_y = 20; diff --git a/code/controllers/subsystem/missions.dm b/code/controllers/subsystem/missions.dm index ddf0f9e46f0f..630e52efb2e6 100644 --- a/code/controllers/subsystem/missions.dm +++ b/code/controllers/subsystem/missions.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(missions) name = "Missions" flags = SS_NO_INIT priority = FIRE_PRIORITY_MISSIONS + wait = 10 SECONDS var/list/obj/effect/landmark/mission_poi/unallocated_pois = list() var/list/datum/mission/ruin/inactive_missions = list() var/list/datum/mission/ruin/active_missions = list() diff --git a/code/modules/missions/mission.dm b/code/modules/missions/mission.dm index 6228c5cb1486..024b74f6c72b 100644 --- a/code/modules/missions/mission.dm +++ b/code/modules/missions/mission.dm @@ -113,7 +113,7 @@ SSblackbox.record_feedback("tally", "mission_started", 1, src.type) SSmissions.inactive_missions -= src active = TRUE - time_issued = station_time_timestamp() + time_issued = station_time() if(duration) dur_timer = addtimer(VARSET_CALLBACK(src, failed, TRUE), duration, TIMER_STOPPABLE) SSmissions.active_missions += src @@ -183,7 +183,7 @@ "location" = "X[mission_location.x]/Y[mission_location.y]: [mission_location.name]", "x" = mission_location.x, "y" = mission_location.y, - "timeIssued" = time_issued, + "timeIssued" = time2text(station_time() - time_issued, "mm"), "duration" = src.duration, "remaining" = time_remaining, "timeStr" = time2text(time_remaining, "mm:ss"), From c71fe5701180bc60188b3f43d2943120a42f8f72 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 21 Jan 2025 02:22:53 -0600 Subject: [PATCH 76/77] tweaks, new mission to get that axe --- _maps/outpost/indie_space.dmm | 11 +++++++++- _maps/outpost/nanotrasen_ice.dmm | 22 +++++++++---------- code/datums/ruins/beachplanet.dm | 5 +++++ code/modules/missions/dynamic/kill.dm | 5 ++++- .../tgui/interfaces/MissionBoard/index.tsx | 2 +- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/_maps/outpost/indie_space.dmm b/_maps/outpost/indie_space.dmm index df8ff808abea..937ab8a827a2 100644 --- a/_maps/outpost/indie_space.dmm +++ b/_maps/outpost/indie_space.dmm @@ -7536,6 +7536,15 @@ /obj/structure/closet/crate/trashcart/laundry, /turf/open/floor/plasteel/patterned, /area/outpost/maintenance/central) +"Mj" = ( +/obj/effect/turf_decal/borderfloor{ + dir = 8 + }, +/obj/structure/noticeboard, +/turf/open/floor/plasteel/mono{ + dir = 1 + }, +/area/outpost/cargo) "Mm" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt/dust, @@ -18416,7 +18425,7 @@ TB Zb Lo dc -dc +Mj mF UT Nn diff --git a/_maps/outpost/nanotrasen_ice.dmm b/_maps/outpost/nanotrasen_ice.dmm index dde037f78104..d60cb6dde123 100644 --- a/_maps/outpost/nanotrasen_ice.dmm +++ b/_maps/outpost/nanotrasen_ice.dmm @@ -1159,9 +1159,7 @@ }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, /obj/machinery/power/apc/auto_name/directional/east, -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /turf/open/floor/plasteel/patterned, /area/outpost/cargo/smeltery) "is" = ( @@ -4820,7 +4818,6 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, /obj/machinery/door/airlock/mining{ - dir = 2; name = "Smeltery" }, /turf/open/floor/plasteel/tech, @@ -6762,9 +6759,7 @@ dir = 8 }, /obj/machinery/power/apc/auto_name/directional/south, -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /obj/machinery/airalarm/directional/east, /turf/open/floor/plasteel/tech, /area/outpost/security/checkpoint) @@ -7515,9 +7510,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2{ dir = 1 }, -/obj/structure/cable{ - icon_state = "0-1" - }, +/obj/structure/cable, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plating{ light_color = "#1B1D2E"; @@ -7798,6 +7791,13 @@ light_range = 2 }, /area/outpost/exterior) +"Yw" = ( +/obj/structure/noticeboard{ + dir = 4; + pixel_x = 5 + }, +/turf/closed/indestructible/reinforced, +/area/outpost/cargo/smeltery) "Yy" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/structure/table/reinforced, @@ -13446,7 +13446,7 @@ ML Ud Ak SD -SD +Yw Ak Ak vC diff --git a/code/datums/ruins/beachplanet.dm b/code/datums/ruins/beachplanet.dm index 3223b3a3d056..7733a5a2010e 100644 --- a/code/datums/ruins/beachplanet.dm +++ b/code/datums/ruins/beachplanet.dm @@ -11,6 +11,11 @@ suffix = "beach_crashed_engineer.dmm" ruin_tags = list(RUIN_TAG_MINOR_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_HAZARDOUS) +/datum/mission/ruin/lost_axe + name = "I lost my axe!" + desc = "I left my axe on a beachplanet but forgot to take it when i got recused!" + setpiece_item = /obj/item/melee/axe/fire + /datum/map_template/ruin/beachplanet/ancient name = "Ancient Danger" id = "beach_ancient" diff --git a/code/modules/missions/dynamic/kill.dm b/code/modules/missions/dynamic/kill.dm index ced447b3fa0b..0e233e16c7f8 100644 --- a/code/modules/missions/dynamic/kill.dm +++ b/code/modules/missions/dynamic/kill.dm @@ -20,7 +20,10 @@ /datum/mission/ruin/signaled/kill/frontiersmen value = 3500 - mission_reward = /obj/item/gun/ballistic/automatic/pistol/mauler + mission_reward = list( + /obj/item/gun/ballistic/automatic/pistol/mauler, + /obj/item/gun/ballistic/automatic/pistol/spitter + ) registered_type = /mob/living/simple_animal/hostile/human/frontier/ranged/officer setpiece_item = /obj/item/clothing/neck/dogtag/frontier diff --git a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx index 4b39145e7879..c7f82a697117 100644 --- a/tgui/packages/tgui/interfaces/MissionBoard/index.tsx +++ b/tgui/packages/tgui/interfaces/MissionBoard/index.tsx @@ -87,7 +87,7 @@ const MissionsList = (props, context) => { {faction} {desc} - Issued: {timeIssued} + Issued: {timeIssued} minutes ago. {duration && Duration Left: {missionTimer(mission)}} {reward} From b95d3fa83b2bc5dfbe8b279df397e3c070badbc7 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 21 Jan 2025 03:11:09 -0600 Subject: [PATCH 77/77] more missions --- .../BeachRuins/beach_ancient_ruin.dmm | 24 ++----- .../BeachRuins/beach_crashed_engineer.dmm | 10 +-- .../IceRuins/icemoon_tesla_lab.dmm | 70 ++++--------------- code/datums/ruins/_ruins.dm | 2 +- code/datums/ruins/beachplanet.dm | 5 +- code/datums/ruins/icemoon.dm | 7 +- code/datums/ruins/jungle.dm | 6 +- code/datums/ruins/lavaland.dm | 8 +-- code/datums/ruins/rockplanet.dm | 2 +- code/datums/ruins/space.dm | 2 +- code/modules/missions/dynamic/missions.dm | 1 - code/modules/overmap/objects/dynamic_datum.dm | 2 +- 12 files changed, 39 insertions(+), 100 deletions(-) diff --git a/_maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm b/_maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm index dad43ef34082..601a4d34f12f 100644 --- a/_maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm +++ b/_maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm @@ -446,9 +446,7 @@ }, /area/ruin/beach/complex) "hW" = ( -/obj/machinery/power/smes/shuttle/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/precharged, /obj/structure/window/reinforced{ dir = 8 }, @@ -699,9 +697,7 @@ }, /area/ruin/beach/complex/wall) "lU" = ( -/obj/machinery/power/shuttle/engine/electric{ - dir = 4 - }, +/obj/machinery/power/shuttle/engine/electric, /turf/open/floor/plating, /area/ruin/beach/complex/shuttle) "lW" = ( @@ -2314,9 +2310,7 @@ /turf/open/floor/concrete/slab_4, /area/ruin/beach/complex) "Ka" = ( -/obj/machinery/power/shuttle/engine/electric{ - dir = 4 - }, +/obj/machinery/power/shuttle/engine/electric, /obj/structure/railing{ dir = 1 }, @@ -2743,9 +2737,7 @@ }, /area/ruin/beach/complex) "Qr" = ( -/obj/machinery/power/smes/shuttle/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/precharged, /obj/structure/railing{ dir = 1 }, @@ -3100,9 +3092,7 @@ }, /area/ruin/beach/complex) "Yo" = ( -/obj/machinery/power/smes/shuttle/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/precharged, /obj/structure/railing, /obj/structure/window/reinforced{ dir = 1 @@ -3152,9 +3142,7 @@ /turf/open/floor/plasteel/mono, /area/ruin/beach/complex) "YM" = ( -/obj/machinery/power/shuttle/engine/electric{ - dir = 4 - }, +/obj/machinery/power/shuttle/engine/electric, /obj/structure/railing, /turf/open/floor/plating, /area/ruin/beach/complex/shuttle) diff --git a/_maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm b/_maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm index cb26bc6dec19..4d069e3e4a74 100644 --- a/_maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm +++ b/_maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm @@ -276,9 +276,7 @@ /turf/open/floor/plasteel/tech, /area/ruin/unpowered) "mH" = ( -/obj/machinery/power/smes/shuttle/precharged{ - dir = 4 - }, +/obj/machinery/power/smes/shuttle/precharged, /obj/effect/turf_decal/industrial/outline/yellow, /obj/structure/window/reinforced{ dir = 8 @@ -336,7 +334,6 @@ icon_state = "0-10" }, /obj/effect/decal/cleanable/crayon{ - icon_state = "firedanger"; pixel_y = 32 }, /obj/effect/decal/cleanable/oil, @@ -763,9 +760,7 @@ /turf/open/floor/plating/asteroid/sand/lit, /area/overmap_encounter/planetoid/beachplanet/explored) "IZ" = ( -/obj/machinery/power/shuttle/engine/electric{ - dir = 4 - }, +/obj/machinery/power/shuttle/engine/electric, /obj/structure/cable{ icon_state = "0-4" }, @@ -1158,6 +1153,7 @@ /obj/item/melee/axe/fire{ name = "rusty fire axe" }, +/obj/effect/landmark/mission_poi/main, /turf/open/floor/engine/airless, /area/ruin/unpowered) "Xx" = ( diff --git a/_maps/RandomRuins/IceRuins/icemoon_tesla_lab.dmm b/_maps/RandomRuins/IceRuins/icemoon_tesla_lab.dmm index 4f6e4849f99b..07b565d25b83 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_tesla_lab.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_tesla_lab.dmm @@ -553,8 +553,7 @@ "cl" = ( /obj/structure/table, /obj/item/reagent_containers/food/snacks/pizza/vegetable{ - pixel_x = -2; - pixel_y = 0 + pixel_x = -2 }, /turf/open/floor/plasteel/freezer, /area/ruin/icemoon/tesla_lab/lobby) @@ -613,7 +612,6 @@ "cG" = ( /obj/structure/catwalk/over, /obj/machinery/atmospherics/pipe/manifold/cyan/visible{ - pixel_y = 0; dir = 1 }, /turf/open/floor/plating, @@ -1327,7 +1325,6 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Engineering" }, /turf/open/floor/plasteel/tech, @@ -1645,7 +1642,6 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Server Room" }, /turf/open/floor/plasteel/dark, @@ -1836,8 +1832,7 @@ pixel_y = 12 }, /obj/item/reagent_containers/pill/happinesspsych{ - pixel_x = -11; - pixel_y = 0 + pixel_x = -11 }, /obj/item/reagent_containers/pill/happinesspsych{ pixel_x = 5; @@ -2047,7 +2042,6 @@ dir = 1 }, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Crawlspace" }, /obj/effect/mapping_helpers/airlock/sealed, @@ -2507,8 +2501,7 @@ color = "#75A2BB" }, /obj/effect/turf_decal/industrial/loading{ - icon_state = "loadingarea_stripes"; - dir = 2 + icon_state = "loadingarea_stripes" }, /obj/structure/closet/crate/medical, /obj/item/storage/firstaid/brute, @@ -2715,7 +2708,6 @@ /area/ruin/icemoon/tesla_lab/medbay) "lb" = ( /obj/machinery/atmospherics/components/trinary/filter/atmos/flipped/o2{ - pixel_y = 0; dir = 4 }, /obj/effect/turf_decal/industrial/warning/corner, @@ -3758,8 +3750,7 @@ dir = 1 }, /obj/machinery/door/airlock/grunge{ - name = "Bathroom"; - dir = 2 + name = "Bathroom" }, /turf/open/floor/plasteel/dark, /area/ruin/icemoon/tesla_lab/dorms) @@ -3996,8 +3987,7 @@ color = "#75A2BB" }, /obj/effect/turf_decal/industrial/loading{ - icon_state = "loadingarea_stripes"; - dir = 2 + icon_state = "loadingarea_stripes" }, /obj/machinery/portable_atmospherics/canister/carbon_monoxide, /turf/open/floor/pod/dark, @@ -4542,7 +4532,6 @@ pixel_x = -5 }, /obj/item/folder/blue{ - pixel_y = 0; pixel_x = 3 }, /obj/structure/catwalk/over/plated_catwalk/dark, @@ -4914,16 +4903,6 @@ }, /turf/open/floor/plasteel/dark, /area/ruin/icemoon/tesla_lab/dorms) -"ue" = ( -/obj/structure/window/plasma/fulltile, -/obj/structure/grille, -/obj/machinery/door/poddoor/shutters{ - id = "tl6"; - dir = 2; - pixel_y = 0 - }, -/turf/open/floor/plating, -/area/ruin/icemoon/tesla_lab/lobby) "ug" = ( /obj/effect/turf_decal/trimline/opaque/mauve/warning{ dir = 5 @@ -5189,7 +5168,6 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Lobby Office" }, /obj/structure/disposalpipe/segment, @@ -5236,7 +5214,6 @@ pixel_x = -4 }, /obj/item/reagent_containers/pill/paxpsych{ - pixel_y = 0; pixel_x = 2 }, /obj/item/reagent_containers/pill/psicodine{ @@ -5647,8 +5624,7 @@ /obj/effect/decal/cleanable/blood/drip, /obj/effect/mapping_helpers/turf/burnt, /obj/item/broken_bottle{ - pixel_x = -14; - pixel_y = 0 + pixel_x = -14 }, /obj/item/stack/ore/salvage/scrapmetal{ pixel_x = 4; @@ -5708,7 +5684,6 @@ /obj/structure/disposalpipe/segment, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4, /obj/machinery/door/airlock/grunge{ - dir = 2; req_access = list(19); name = "Recycling" }, @@ -5780,9 +5755,7 @@ /obj/structure/disposalpipe/segment{ dir = 9 }, -/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ dir = 9 }, @@ -6025,7 +5998,6 @@ "yp" = ( /obj/structure/catwalk/over/plated_catwalk/dark, /obj/machinery/modular_computer/console/preset/civilian{ - pixel_y = 0; dir = 4 }, /obj/item/radio/intercom/directional/north{ @@ -7175,7 +7147,6 @@ icon_state = "4-8" }, /obj/structure/noticeboard{ - dir = 2; pixel_y = 25 }, /turf/open/floor/plasteel/dark, @@ -7294,7 +7265,6 @@ pixel_x = 6 }, /obj/item/pen/fourcolor{ - pixel_y = 0; pixel_x = 3 }, /obj/item/stamp/clip{ @@ -7711,7 +7681,6 @@ /area/ruin/icemoon/tesla_lab/office) "Fb" = ( /obj/machinery/atmospherics/pipe/manifold/cyan/visible{ - pixel_y = 0; dir = 8 }, /obj/effect/turf_decal/industrial/warning, @@ -8014,7 +7983,6 @@ dir = 1 }, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Crawlspace" }, /obj/effect/mapping_helpers/airlock/welded, @@ -8693,7 +8661,6 @@ /obj/effect/turf_decal/siding/thinplating/dark, /obj/structure/cabinet/oneshot{ dir = 4; - pixel_y = 0; pixel_x = -24 }, /obj/effect/decal/cleanable/dirt/dust, @@ -9337,8 +9304,7 @@ }, /obj/effect/mapping_helpers/turf/burnt, /obj/item/broken_bottle{ - pixel_x = -14; - pixel_y = 0 + pixel_x = -14 }, /obj/item/radio/intercom/directional/west{ frequency = 1473 @@ -9767,7 +9733,6 @@ dir = 1 }, /obj/machinery/door/airlock/grunge{ - dir = 2; req_access = list(19); name = "Office" }, @@ -9969,6 +9934,7 @@ /obj/machinery/door/window/brigdoor/southleft{ req_access_txt = "3" }, +/obj/effect/landmark/mission_poi/main/blackbox, /turf/open/floor/plasteel/tech, /area/ruin/icemoon/tesla_lab/lab_a) "Ox" = ( @@ -10538,9 +10504,7 @@ /turf/closed/wall/mineral/plastitanium/nodiagonal, /area/ruin/icemoon/tesla_lab/engineering) "Qs" = ( -/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2{ - dir = 2 - }, +/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ dir = 4 }, @@ -10673,7 +10637,6 @@ dir = 1 }, /obj/machinery/door/airlock/grunge{ - dir = 2; name = "Crawlspace" }, /obj/effect/mapping_helpers/airlock/welded, @@ -11498,7 +11461,6 @@ "TJ" = ( /obj/structure/catwalk/over/plated_catwalk/dark, /obj/machinery/modular_computer/console/preset/civilian{ - pixel_y = 0; dir = 8 }, /turf/open/floor/plasteel/telecomms_floor, @@ -11696,14 +11658,12 @@ /area/ruin/icemoon/tesla_lab/dorms) "Uy" = ( /obj/machinery/button/door{ - dir = 2; pixel_y = -10; pixel_x = -10; name = "starboard shutter"; id = "h2" }, /obj/machinery/button/shieldwallgen{ - dir = 2; pixel_y = -11; id = "h2s" }, @@ -11830,7 +11790,6 @@ /obj/effect/mapping_helpers/airlock/abandoned, /obj/machinery/door/airlock/grunge{ req_access = list(3); - dir = 2; name = "Armory" }, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2, @@ -11910,7 +11869,6 @@ /area/ruin/icemoon/tesla_lab/cargo_hall) "VP" = ( /obj/machinery/atmospherics/pipe/manifold/cyan/visible{ - pixel_y = 0; dir = 8 }, /obj/item/weldingtool/largetank{ @@ -12127,8 +12085,7 @@ pixel_x = 3 }, /obj/item/desynchronizer/tvstatic{ - pixel_x = -5; - pixel_y = 0 + pixel_x = -5 }, /turf/open/floor/plasteel/telecomms_floor, /area/ruin/icemoon/tesla_lab/office_two) @@ -12465,11 +12422,9 @@ /obj/item/documents, /obj/machinery/light/directional/east, /obj/item/folder/blue{ - pixel_y = 0; pixel_x = 3 }, /obj/item/folder/blue{ - pixel_y = 0; pixel_x = 3 }, /turf/open/floor/plasteel/telecomms_floor, @@ -12591,7 +12546,6 @@ /area/ruin/icemoon/tesla_lab/central_hall) "YV" = ( /obj/machinery/porta_turret/ship/frontiersmen/light{ - dir = 2; reqpower = 0; faction = list("Frontiersmen") }, @@ -14753,7 +14707,7 @@ rM rM RA RA -ue +SD Fv PH PH diff --git a/code/datums/ruins/_ruins.dm b/code/datums/ruins/_ruins.dm index 3a4e85857a03..5f7110d0482f 100644 --- a/code/datums/ruins/_ruins.dm +++ b/code/datums/ruins/_ruins.dm @@ -18,7 +18,7 @@ var/ruin_type var/ruin_tags = list() - var/dynamic_mission_types + var/ruin_mission_types /datum/map_template/ruin/New() if(!name && id) diff --git a/code/datums/ruins/beachplanet.dm b/code/datums/ruins/beachplanet.dm index 7733a5a2010e..7be5d13f03f4 100644 --- a/code/datums/ruins/beachplanet.dm +++ b/code/datums/ruins/beachplanet.dm @@ -10,6 +10,7 @@ description = "An abandoned camp built by a crashed engineer" suffix = "beach_crashed_engineer.dmm" ruin_tags = list(RUIN_TAG_MINOR_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_HAZARDOUS) + ruin_mission_types = list(/datum/mission/ruin/lost_axe) /datum/mission/ruin/lost_axe name = "I lost my axe!" @@ -29,7 +30,7 @@ description = "A small pirate outpost formed from the remains of a wrecked shuttle." suffix = "beach_pirate_crash.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MEDIUM_LOOT, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) + ruin_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) /datum/map_template/ruin/beachplanet/treasurecove name = "Treasure Cove" @@ -37,4 +38,4 @@ 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/ruin/signaled/kill/frontiersmen) + ruin_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) diff --git a/code/datums/ruins/icemoon.dm b/code/datums/ruins/icemoon.dm index fa36824bd60a..49c5c7aa2123 100644 --- a/code/datums/ruins/icemoon.dm +++ b/code/datums/ruins/icemoon.dm @@ -10,7 +10,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( + ruin_mission_types = list( /datum/mission/ruin/data_reterival, /datum/mission/ruin/signaled/drill ) @@ -21,7 +21,7 @@ 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/ruin/data_reterival) + ruin_mission_types = list(/datum/mission/ruin/data_reterival) /datum/map_template/ruin/icemoon/ice_lodge name = "Ice Lodge" @@ -29,7 +29,7 @@ description = "Records show this settlement as belonging to the SRM, but no one has heard from them as of late. I wonder what happened?" suffix = "icemoon_ice_lodge.dmm" ruin_tags = list(RUIN_TAG_HARD_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) - dynamic_mission_types = list(/datum/mission/ruin/fallen_montagne) + ruin_mission_types = list(/datum/mission/ruin/fallen_montagne) /datum/mission/ruin/fallen_montagne name = "dark signal investigation" @@ -45,4 +45,5 @@ description = "Records show this settlement as belonging to the SRM, but no one has heard from them as of late. I wonder what happened?" suffix = "icemoon_tesla_lab.dmm" ruin_tags = list(RUIN_TAG_BOSS_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) + ruin_mission_types = list(/datum/mission/ruin/blackbox) diff --git a/code/datums/ruins/jungle.dm b/code/datums/ruins/jungle.dm index cec2d3f847b0..45e4a63f4af2 100644 --- a/code/datums/ruins/jungle.dm +++ b/code/datums/ruins/jungle.dm @@ -10,7 +10,7 @@ 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( + ruin_mission_types = list( /datum/mission/ruin/nt_files, /datum/mission/ruin/signaled/kill/jerry ) @@ -51,7 +51,7 @@ description = "A bombed out airbase from the ICW, taken back over by nature" suffix = "jungle_bombed_starport.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE) - dynamic_mission_types = list(/datum/mission/ruin/blackbox) + ruin_mission_types = list(/datum/mission/ruin/blackbox) /datum/map_template/ruin/jungle/medtech name = "MedTech facility" @@ -66,7 +66,7 @@ description = "A frontiersmen base, hidden within a cave. They don't seem friendly" suffix = "jungle_cavecrew.dmm" ruin_tags = list(RUIN_TAG_MEDIUM_COMBAT, RUIN_TAG_HAZARDOUS, RUIN_TAG_LIVEABLE, RUIN_TAG_MAJOR_LOOT) - dynamic_mission_types = list( + ruin_mission_types = list( /datum/mission/ruin/signaled/kill/frontiersmen, /datum/mission/ruin/data_reterival ) diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index d9a59be71a10..ad7f38e13ba6 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -17,7 +17,7 @@ id = "buried_shrine" description = "An ancient temple belonging to some long-gone inhabitants, wrecked and buried by the volcanic activity of it's home planet." suffix = "lavaland_surface_buried_shrine.dmm" - dynamic_mission_types = list(/datum/mission/ruin/signaled/kill/elite) + ruin_mission_types = list(/datum/mission/ruin/signaled/kill/elite) /datum/map_template/ruin/lavaland/lava_canyon name = "Lava Canyon" @@ -30,7 +30,7 @@ id = "wreck_factory" description = "A Nanotrasen processing facility, assaulted by a pirate raid that has killed most of the staff. The offices however, remain unbreached for now." suffix = "lavaland_surface_wrecked_factory.dmm" - dynamic_mission_types = list( + ruin_mission_types = list( /datum/mission/ruin/nanotrasen_docs, /datum/mission/ruin/captain_medal, /datum/mission/ruin/brainchip @@ -66,11 +66,11 @@ id = "crashed_star" description = "A crashed pirate ship. It would seem that it's crew died a while ago." suffix = "lavaland_crashed_starwalker.dmm" - dynamic_mission_types = list(/datum/mission/ruin/blackbox) + ruin_mission_types = list(/datum/mission/ruin/blackbox) /datum/map_template/ruin/lavaland/abandonedlisteningpost name = "Abandoned Listening Post" id = "abandonedlistening" description = "An abandoned Cybersun listening post. Seems like the Ramzi Clique has an interest in the site." suffix = "lavaland_abandonedlisteningpost.dmm" - dynamic_mission_types = list(/datum/mission/ruin/blackbox) + ruin_mission_types = list(/datum/mission/ruin/blackbox) diff --git a/code/datums/ruins/rockplanet.dm b/code/datums/ruins/rockplanet.dm index b97309a05252..4f4a839e6c2f 100644 --- a/code/datums/ruins/rockplanet.dm +++ b/code/datums/ruins/rockplanet.dm @@ -23,7 +23,7 @@ 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/ruin/signaled/kill/frontiersmen) + ruin_mission_types = list(/datum/mission/ruin/signaled/kill/frontiersmen) /datum/map_template/ruin/rockplanet/mining_base name = "N+S Mining Installation" diff --git a/code/datums/ruins/space.dm b/code/datums/ruins/space.dm index 353676c98455..6fc7b1f5fcb1 100644 --- a/code/datums/ruins/space.dm +++ b/code/datums/ruins/space.dm @@ -28,7 +28,7 @@ description = "an abandoned secure storage location. there is no power left in the batteries and the former ocupants locked it pretty tight before leaving.\ You will have to power areas to raise the bolts on the doors. look out for secrets." ruin_tags = list(RUIN_TAG_MINOR_COMBAT, RUIN_TAG_MAJOR_LOOT, RUIN_TAG_SHELTER, RUIN_TAG_HAZARDOUS) - dynamic_mission_types = list(/datum/mission/ruin/data_reterival) + ruin_mission_types = list(/datum/mission/ruin/data_reterival) /datum/map_template/ruin/space/singularitylab id = "singularitylab" diff --git a/code/modules/missions/dynamic/missions.dm b/code/modules/missions/dynamic/missions.dm index f4303fff1950..985dd0d25ad9 100644 --- a/code/modules/missions/dynamic/missions.dm +++ b/code/modules/missions/dynamic/missions.dm @@ -28,7 +28,6 @@ mission_reward = list( /obj/item/gun/energy/e_gun/old, /obj/item/gun/energy/laser/retro, - /obj/item/gun/energy/laser/captain ) faction = /datum/faction/nt setpiece_item = /obj/item/documents/nanotrasen diff --git a/code/modules/overmap/objects/dynamic_datum.dm b/code/modules/overmap/objects/dynamic_datum.dm index 4df90e3a58ce..6147e3357c4e 100644 --- a/code/modules/overmap/objects/dynamic_datum.dm +++ b/code/modules/overmap/objects/dynamic_datum.dm @@ -153,7 +153,7 @@ selected_ruin = template || (ruin_type ? pick_weight_allow_zero(SSmapping.ruin_types_probabilities[ruin_type]) : null) var/datum/map_template/ruin/used_ruin = ispath(selected_ruin) ? (new selected_ruin()) : selected_ruin if(istype(used_ruin)) - for(var/mission_type in used_ruin.dynamic_mission_types) + for(var/mission_type in used_ruin.ruin_mission_types) dynamic_missions += new mission_type(src, 1 + length(dynamic_missions)) if(vlevel_height >= 255 && vlevel_width >= 255) //little easter egg