diff --git a/code/__DEFINES/interaction_flags.dm b/code/__DEFINES/interaction_flags.dm index 30381f5ebb6d..0b4e95887294 100644 --- a/code/__DEFINES/interaction_flags.dm +++ b/code/__DEFINES/interaction_flags.dm @@ -18,6 +18,8 @@ #define INTERACT_ATOM_NO_FINGERPRINT_INTERACT (1<<8) /// allows this atom to skip the adjacency check #define INTERACT_ATOM_ALLOW_USER_LOCATION (1<<9) +/// ignores mobility check +#define INTERACT_ATOM_IGNORE_MOBILITY (1<<10) /// attempt pickup on attack_hand for items #define INTERACT_ITEM_ATTACK_HAND_PICKUP (1<<0) diff --git a/code/__DEFINES/~monkestation/dcs/signals/signals_global.dm b/code/__DEFINES/~monkestation/dcs/signals/signals_global.dm new file mode 100644 index 000000000000..3de98a9ecc4f --- /dev/null +++ b/code/__DEFINES/~monkestation/dcs/signals/signals_global.dm @@ -0,0 +1,9 @@ +/// Sent when a crew record added to manifest (datum/record/crew) +#define COMSIG_GLOB_CREW_RECORD_ADDED "!crew_record_added" +/// Sent when a crew record is removed from manifest (datum/record/crew) +#define COMSIG_GLOB_CREW_RECORD_REMOVED "!crew_record_removed" + +/// Sent when a locked record added to manifest (datum/record/locked) +#define COMSIG_GLOB_LOCKED_RECORD_ADDED "!locked_record_added" +/// Sent when a locked record is removed from manifest (datum/record/locked) +#define COMSIG_GLOB_LOCKED_RECORD_REMOVED "!locked_record_removed" diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index c59f199af410..154a84fb6546 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -157,6 +157,7 @@ DEFINE_BITFIELD(interaction_flags_atom, list( "INTERACT_ATOM_REQUIRES_DEXTERITY" = INTERACT_ATOM_REQUIRES_DEXTERITY, "INTERACT_ATOM_UI_INTERACT" = INTERACT_ATOM_UI_INTERACT, "INTERACT_ATOM_ALLOW_USER_LOCATION" = INTERACT_ATOM_ALLOW_USER_LOCATION, + "INTERACT_ATOM_IGNORE_MOBILITY" = INTERACT_ATOM_IGNORE_MOBILITY, )) DEFINE_BITFIELD(interaction_flags_machine, list( diff --git a/code/datums/records/record.dm b/code/datums/records/record.dm index 72581360cb3d..39ecc43c0a99 100644 --- a/code/datums/records/record.dm +++ b/code/datums/records/record.dm @@ -114,9 +114,11 @@ src.quirk_notes = quirk_notes GLOB.manifest.general += src + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CREW_RECORD_ADDED, src) // monkestation edit: add crew record update signals /datum/record/crew/Destroy() GLOB.manifest.general -= src + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CREW_RECORD_REMOVED, src) // monkestation edit: add crew record update signals return ..() /** @@ -152,9 +154,11 @@ species_type = dna_ref.species.type GLOB.manifest.locked += src + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LOCKED_RECORD_ADDED, src) // monkestation edit: add crew record update signals /datum/record/locked/Destroy() GLOB.manifest.locked -= src + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LOCKED_RECORD_REMOVED, src) // monkestation edit: add crew record update signals return ..() /// A helper proc to get the front photo of a character from the record. diff --git a/code/modules/modular_computers/computers/item/pda.dm b/code/modules/modular_computers/computers/item/pda.dm index 44ecdc5eeeb5..aa6ae28c22eb 100644 --- a/code/modules/modular_computers/computers/item/pda.dm +++ b/code/modules/modular_computers/computers/item/pda.dm @@ -13,7 +13,7 @@ steel_sheet_cost = 2 custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass=SMALL_MATERIAL_AMOUNT, /datum/material/plastic=SMALL_MATERIAL_AMOUNT) - interaction_flags_atom = INTERACT_ATOM_ALLOW_USER_LOCATION + interaction_flags_atom = INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY icon_state_menu = "menu" max_capacity = 64 @@ -34,6 +34,7 @@ ///Static list of default PDA apps to install on Initialize. var/static/list/datum/computer_file/pda_programs = list( /datum/computer_file/program/messenger, + /datum/computer_file/program/chatclient, // monke edit: install IRC client by default /datum/computer_file/program/nt_pay, /datum/computer_file/program/notepad, /datum/computer_file/program/crew_manifest // monke edit: install crew manifest by default diff --git a/code/modules/modular_computers/file_system/programs/nt_pay.dm b/code/modules/modular_computers/file_system/programs/nt_pay.dm index bec8cebc05e1..7b9adc987a97 100644 --- a/code/modules/modular_computers/file_system/programs/nt_pay.dm +++ b/code/modules/modular_computers/file_system/programs/nt_pay.dm @@ -47,11 +47,16 @@ if("GetPayToken") wanted_token = null + // monkestation start: better name matching - case insentive and disregard non-alphanumeric characters + var/static/regex/cleanup_regex = new(@"\[^a-z0-9]+", "ig") + var/cleaned_wanted_name = cleanup_regex.Replace(trim(params["wanted_name"]), "") for(var/account in SSeconomy.bank_accounts_by_id) var/datum/bank_account/acc = SSeconomy.bank_accounts_by_id[account] - if(acc.account_holder == params["wanted_name"]) + var/cleaned_account_holder = cleanup_regex.Replace(trim(acc.account_holder), "") + if(cmptext(cleaned_account_holder, cleaned_wanted_name)) wanted_token = "Token: [acc.pay_token]" break + // monkestation end if(!wanted_token) return wanted_token = "Account \"[params["wanted_name"]]\" not found." diff --git a/code/modules/modular_computers/file_system/programs/ntmessenger.dm b/code/modules/modular_computers/file_system/programs/ntmessenger.dm index bb6bcaad592a..b1286428a43c 100644 --- a/code/modules/modular_computers/file_system/programs/ntmessenger.dm +++ b/code/modules/modular_computers/file_system/programs/ntmessenger.dm @@ -243,7 +243,7 @@ if (!input_message || !sending_and_receiving) return - if(!user.can_perform_action(computer)) + if(!user.can_perform_action(computer, ALLOW_RESTING)) return return sanitize(input_message) @@ -415,7 +415,7 @@ if(computer.active_program != src) if(!computer.open_program(usr, src, open_ui = FALSE)) return - if(!href_list["close"] && usr.can_perform_action(computer, FORBID_TELEKINESIS_REACH)) + if(!href_list["close"] && usr.can_perform_action(computer, ALLOW_RESTING)) switch(href_list["choice"]) if("Message") send_message(usr, list(locate(href_list["target"]))) diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index e43deb373a09..16fa83445c50 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -73,7 +73,8 @@ /mob/living/shared_ui_interaction(src_object) . = ..() - if(!(mobility_flags & MOBILITY_UI) && . == UI_INTERACTIVE) + var/obj/item/object = src_object + if(!(mobility_flags & MOBILITY_UI) && !(object.interaction_flags_atom & INTERACT_ATOM_IGNORE_MOBILITY) && . == UI_INTERACTIVE) return UI_UPDATE /mob/living/silicon/ai/shared_ui_interaction(src_object) diff --git a/monkestation/code/modules/modular_computers/NTNet/NTNRC/conversation.dm b/monkestation/code/modules/modular_computers/NTNet/NTNRC/conversation.dm new file mode 100644 index 000000000000..c3ea37d9c3ed --- /dev/null +++ b/monkestation/code/modules/modular_computers/NTNet/NTNRC/conversation.dm @@ -0,0 +1,5 @@ +/datum/ntnet_conversation/add_message(message, username) + . = ..() + for(var/datum/computer_file/program/chatclient/hunter2 in active_clients) + if(!cmptext(hunter2.username, username)) + hunter2.computer.alert_call(hunter2, "[username] in [title]: [message]", 'sound/machines/ping.ogg') diff --git a/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm index 0bc47f5530b6..d803fa4b6b8a 100644 --- a/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm +++ b/monkestation/code/modules/modular_computers/file_system/programs/crewmanifest.dm @@ -1,9 +1,11 @@ /datum/computer_file/program/crew_manifest + filedesc = "Plexagon Crew Manifest" transfer_access = list() detomatix_resistance = NONE /datum/computer_file/program/crew_manifest/New() . = ..() + RegisterSignals(SSdcs, list(COMSIG_GLOB_CREW_RECORD_ADDED, COMSIG_GLOB_CREW_RECORD_REMOVED)) RegisterSignal(SSdcs, COMSIG_GLOB_CREWMEMBER_JOINED, PROC_REF(_update_ui_data)) /datum/computer_file/program/crew_manifest/Destroy() diff --git a/tgstation.dme b/tgstation.dme index 4751e6a9e66d..0c743d23af6c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -432,6 +432,7 @@ #include "code\__DEFINES\~monkestation\virology.dm" #include "code\__DEFINES\~monkestation\dcs\signals\signals_atom.dm" #include "code\__DEFINES\~monkestation\dcs\signals\signals_carbon.dm" +#include "code\__DEFINES\~monkestation\dcs\signals\signals_global.dm" #include "code\__DEFINES\~monkestation\dcs\signals\signals_guns.dm" #include "code\__DEFINES\~monkestation\dcs\signals\signals_item.dm" #include "code\__DEFINES\~monkestation\dcs\signals\signals_mob.dm" @@ -6612,6 +6613,7 @@ #include "monkestation\code\modules\modular_bartending\item_modifications\reagent_modification.dm" #include "monkestation\code\modules\modular_bartending\reactions\food_reactions.dm" #include "monkestation\code\modules\modular_computers\file_system\programs\crewmanifest.dm" +#include "monkestation\code\modules\modular_computers\NTNet\NTNRC\conversation.dm" #include "monkestation\code\modules\modular_guns\__base_attachment.dm" #include "monkestation\code\modules\modular_guns\__base_modular_gun.dm" #include "monkestation\code\modules\modular_guns\attachment_datums\__base_attachment_datum.dm"