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} + + ); +};