Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions code/modules/overmap/_overmap_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

/// The total lists of interactions vessels can do with this object. If nothing, then vessels are unable to interact with this object.
var/list/interaction_options
var/list/interaction_hail

/// The time, in deciseconds, needed for this object to call
var/dock_time
Expand Down Expand Up @@ -342,6 +343,20 @@
var/choice = tgui_input_list(usr, "What would you like to do at [interact_target]?", "Interact", possible_interactions, timeout = 10 SECONDS)
return do_interaction_with(user, interact_target, choice)


/datum/overmap/proc/show_hail_menu(mob/living/user, datum/overmap/interact_target)
if(!user)
return
if(!istype(interact_target))
CRASH("Overmap datum [src] tried to interact with an invalid overmap datum. What?")

var/list/possible_interactions = interact_target.get_hail(user, src)

if(!possible_interactions)
return "There is nothing of interest at [interact_target]."

return do_hail(user, interact_target)

/**
* This handles the selection of an interaction
*
Expand Down Expand Up @@ -369,8 +384,6 @@
if(docked_to || docking)
return "ERROR: Unable to do this currently! Undock first!"
return Dock(interact_target)
if(INTERACTION_OVERMAP_HAIL)
return do_hail(user, interact_target)
if(INTERACTION_OVERMAP_INTERDICTION)
if(docked_to || docking)
return "ERROR: Unable to do this currently! Reduce speed or undock!"
Expand Down Expand Up @@ -447,6 +460,8 @@
/datum/overmap/proc/get_interactions(mob/living/user, datum/overmap/requesting_interactor)
return interaction_options

/datum/overmap/proc/get_hail(mob/living/user, datum/overmap/requesting_interactor)
return interaction_hail
/**
* Gets all the available interaction options.
*
Expand Down
6 changes: 6 additions & 0 deletions code/modules/overmap/helm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@
return
current_ship.SendSos(name = "[current_ship.name]", x = "[current_ship.x || current_ship.docked_to.x]", y = "[current_ship.y || current_ship.docked_to.y]")
return
if("hail")
var/datum/overmap/to_hail = locate(params["ship_to_act"]) in current_ship.get_nearby_overmap_objects(include_docked = TRUE, empty_if_src_docked = FALSE)
var/feedback_text = current_ship.show_hail_menu(usr, to_hail)
if(feedback_text)
say(feedback_text)
return
// [/Celadon-ADD]
if("act_overmap")
if(SSshuttle.jump_mode > BS_JUMP_CALLED)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/overmap/ships/controlled_ship_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
/datum/overmap/ship/controlled
token_type = /obj/overmap/rendered
dock_time = 10 SECONDS
interaction_options = list(INTERACTION_OVERMAP_DOCK, INTERACTION_OVERMAP_QUICKDOCK, INTERACTION_OVERMAP_HAIL, INTERACTION_OVERMAP_INTERDICTION)
interaction_options = list(INTERACTION_OVERMAP_DOCK, INTERACTION_OVERMAP_QUICKDOCK, INTERACTION_OVERMAP_INTERDICTION)
interaction_hail = list(INTERACTION_OVERMAP_HAIL)

// [CELADON-ADD] - OVERMAP SENSORS
var/default_sensor_range = 4
Expand Down
Loading