Skip to content

Commit

Permalink
The detomatix cart now sends forged messages that make PDAs explode i…
Browse files Browse the repository at this point in the history
…f one tries to reply to them instead of detonating them right off the bat. (#62494)
  • Loading branch information
Ghommie committed Nov 14, 2021
1 parent dab060d commit 0268574
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 156 deletions.
16 changes: 8 additions & 8 deletions code/__DEFINES/_click.dm
Expand Up @@ -2,33 +2,33 @@
//this is mostly for ease of use and for finding all the things that use say RIGHT_CLICK rather then just searching "right"


//Mouse buttons pressed/held/released
//Mouse buttons pressed/held/released
#define RIGHT_CLICK "right"
#define MIDDLE_CLICK "middle"
#define LEFT_CLICK "left"

//Keys held down during the mouse action
//Keys held down during the mouse action
#define CTRL_CLICK "ctrl"
#define ALT_CLICK "alt"
#define SHIFT_CLICK "shift"

//Cells involved if using a Grid control
//Cells involved if using a Grid control
#define DRAG_CELL "drag-cell"
#define DROP_CELL "drop-cell"

//The button used for dragging (only sent for unrelated mouse up/down messages during a drag)
//The button used for dragging (only sent for unrelated mouse up/down messages during a drag)
#define DRAG "drag"

//If the mouse is over a link in maptext, or this event is related to clicking such a link
//If the mouse is over a link in maptext, or this event is related to clicking such a link
#define LINK "link"

//Pixel coordinates relative to the icon's position on screen
//Pixel coordinates relative to the icon's position on screen
#define VIS_X "vis-x"
#define VIS_Y "vis-y"

//Pixel coordinates within the icon, in the icon's coordinate space
//Pixel coordinates within the icon, in the icon's coordinate space
#define ICON_X "icon-x"
#define ICON_Y "icon-y"

//Pixel coordinates in screen_loc format ("[tile_x]:[pixel_x],[tile_y]:[pixel_y]")
//Pixel coordinates in screen_loc format ("[tile_x]:[pixel_x],[tile_y]:[pixel_y]")
#define SCREEN_LOC "screen-loc"
33 changes: 33 additions & 0 deletions code/__DEFINES/devices.dm
Expand Up @@ -16,9 +16,42 @@
#define CART_DRONEPHONE (1<<14)
#define CART_DRONEACCESS (1<<15)

/// PDA ui menu defines
#define PDA_UI_HUB 0
#define PDA_UI_NOTEKEEPER 1
#define PDA_UI_MESSENGER 2
#define PDA_UI_READ_MESSAGES 21
#define PDA_UI_ATMOS_SCAN 3
#define PDA_UI_SKILL_TRACKER 4
/// mode is divided by on return
#define PDA_UI_RETURN_DIVIDER 10
/// if the new mode from return is between these, go straight to the hub.
#define PDA_UI_REDIRECT_HUB_MIN 4
#define PDA_UI_REDIRECT_HUB_MAX 9
#define PDA_UI_CREW_MANIFEST 41
#define PDA_UI_STATUS_DISPLAY 42
#define PDA_UI_POWER_MONITOR 43
#define PDA_UI_POWER_MONITOR_SELECTED 433
#define PDA_UI_MED_RECORDS 44
#define PDA_UI_MED_RECORD_SELECTED 441
#define PDA_UI_SEC_RECORDS 45
#define PDA_UI_SEC_RECORD_SELECTED 451
#define PDA_UI_SUPPLY_RECORDS 46
#define PDA_UI_SILO_LOGS 47
#define PDA_UI_BOTS_ACCESS 48
#define PDA_UI_JANNIE_LOCATOR 49
#define PDA_UI_EMOJI_GUIDE 50
#define PDA_UI_SIGNALER 51
#define PDA_UI_NEWSCASTER 52
#define PDA_UI_NEWSCASTER_ERROR 53


// Used by PDA and cartridge code to reduce repetitiveness of spritesheets
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}

// Used to stringify message targets before sending the signal datum.
#define STRINGIFY_PDA_TARGET(name, job) "[name] ([job])"

//N-spect scanner defines
#define INSPECTOR_PRINT_SOUND_MODE_NORMAL 1
#define INSPECTOR_PRINT_SOUND_MODE_CLASSIC 2
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/traits.dm
Expand Up @@ -541,6 +541,11 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Hearing trait that is from the hearing component
#define CIRCUIT_HEAR_TRAIT "circuit_hear"

/// PDA Traits. This one makes PDAs explode if the user opens the messages menu
#define TRAIT_PDA_MESSAGE_MENU_RIGGED "pda_message_menu_rigged"
/// This one denotes a PDA has received a rigged message and will explode when the user tries to reply to a rigged PDA message
#define TRAIT_PDA_CAN_EXPLODE "pda_can_explode"

/// If present on a [/mob/living/carbon], will make them appear to have a medium level disease on health HUDs.
#define TRAIT_DISEASELIKE_SEVERITY_MEDIUM "diseaselike_severity_medium"

Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/uplink.dm
Expand Up @@ -304,7 +304,7 @@
interact(null, user)
to_chat(user, span_hear("The PDA softly beeps."))
user << browse(null, "window=pda")
master.mode = 0
master.ui_mode = PDA_UI_HUB
return COMPONENT_STOP_RINGTONE_CHANGE

/datum/component/uplink/proc/check_detonate()
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/computer/security.dm
Expand Up @@ -871,8 +871,8 @@ What a mess.*/
"name" = "Security Citation",
"job" = "Citation Server",
"message" = message,
"targets" = list("[P.owner] ([P.ownjob])"),
"automated" = 1
"targets" = list(STRINGIFY_PDA_TARGET(P.owner, P.ownjob)),
"automated" = TRUE
))
signal.send_to_receivers()
usr.log_message("(PDA: Citation Server) sent \"[message]\" to [signal.format_target()]", LOG_PDA)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/telecomms/computers/message.dm
Expand Up @@ -420,7 +420,7 @@
"name" = "[customsender]",
"job" = "[customjob]",
"message" = custommessage,
"targets" = list("[customrecepient.owner] ([customrecepient.ownjob])")
"targets" = list(STRINGIFY_PDA_TARGET(customrecepient.owner, customrecepient.ownjob))
))
// this will log the signal and transmit it to the target
linkedServer.receive_information(signal, null)
Expand Down

0 comments on commit 0268574

Please sign in to comment.