diff --git a/code/__defines/guns.dm b/code/__defines/guns.dm index 3976fbe2ef3..3ff3efe5b02 100644 --- a/code/__defines/guns.dm +++ b/code/__defines/guns.dm @@ -12,4 +12,10 @@ #define WIRELESS_PIN_DISABLED 1 #define WIRELESS_PIN_AUTOMATIC 2 #define WIRELESS_PIN_STUN 3 -#define WIRELESS_PIN_LETHAL 4 \ No newline at end of file +#define WIRELESS_PIN_LETHAL 4 + +//RCD Modes (TODO: Have the other RCD types have defines and set them here.) +#define RFD_FLOORS_AND_WALL 1 +#define RFD_WINDOWS_AND_GRILLE 2 +#define RFD_AIRLOCK 3 +#define RFD_DECONSTRUCT 4 \ No newline at end of file diff --git a/code/game/objects/items/weapons/RFD.dm b/code/game/objects/items/weapons/RFD.dm index f6d64881b65..ff0478d6914 100644 --- a/code/game/objects/items/weapons/RFD.dm +++ b/code/game/objects/items/weapons/RFD.dm @@ -1,8 +1,3 @@ -#define RFD_FLOORS_AND_WALL 1 -#define RFD_WINDOWS_AND_GRILLE 2 -#define RFD_AIRLOCK 3 -#define RFD_DECONSTRUCT 4 - //Contains the rapid construction device. /obj/item/rfd name = "\improper Rapid-Fabrication-Device" @@ -709,7 +704,3 @@ RFD Piping-Class #undef SUPPLY_PIPE #undef SCRUBBER_PIPE #undef DEVICES - -#undef RFD_FLOORS_AND_WALL -#undef RFD_AIRLOCK -#undef RFD_DECONSTRUCT diff --git a/code/modules/heavy_vehicle/equipment/engineering.dm b/code/modules/heavy_vehicle/equipment/engineering.dm index 44f29631e5c..60623d32d5e 100644 --- a/code/modules/heavy_vehicle/equipment/engineering.dm +++ b/code/modules/heavy_vehicle/equipment/engineering.dm @@ -1,11 +1,38 @@ /obj/item/mecha_equipment/mounted_system/rfd name = "mounted rfd" icon_state = "mecha_rfd" - holding_type = /obj/item/rfd/construction/mounted + holding_type = /obj/item/rfd/construction/mounted/exosuit restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND) restricted_software = list(MECH_SOFTWARE_ENGINEERING) -/obj/item/rfd/construction/mounted/get_hardpoint_maptext() +/obj/item/mecha_equipment/mounted_system/rfd/CtrlClick(mob/user) + if(owner && istype(holding, /obj/item/rfd/construction/mounted/exosuit)) + var/obj/item/rfd/construction/mounted/exosuit/R = holding + var/current_mode = show_radial_menu(user, owner, R.radial_modes, radius = 42, require_near = FALSE , tooltips = TRUE) + switch(current_mode) + if("Floors and Walls") + R.mode = RFD_FLOORS_AND_WALL + if("Windows and Grille") + R.mode = RFD_WINDOWS_AND_GRILLE + if("Airlock") + R.mode = RFD_AIRLOCK + if("Deconstruct") + R.mode = RFD_DECONSTRUCT + else + R.mode = RFD_FLOORS_AND_WALL + if(current_mode) + to_chat(user, SPAN_NOTICE("You set the device to \"[current_mode]\".")) + if(R.mode == 3) + playsound(get_turf(src), 'sound/weapons/laser_safetyoff.ogg', 50, FALSE) + else + playsound(get_turf(src), 'sound/weapons/laser_safetyon.ogg', 50, FALSE) + else + return + +/obj/item/rfd/construction/mounted/exosuit/attack_self(mob/user) //we don't want this attack_self, as it would target the pilot not the exosuit. + return + +/obj/item/rfd/construction/mounted/exosuit/get_hardpoint_maptext() var/obj/item/mecha_equipment/mounted_system/MS = loc if(istype(MS) && MS.owner) var/obj/item/cell/C = MS.owner.get_cell() @@ -13,7 +40,7 @@ return "[round(C.charge)]/[round(C.maxcharge)]" return null -/obj/item/rfd/construction/mounted/get_hardpoint_status_value() +/obj/item/rfd/construction/mounted/exosuit/get_hardpoint_status_value() var/obj/item/mecha_equipment/mounted_system/MS = loc if(istype(MS) && MS.owner) var/obj/item/cell/C = MS.owner.get_cell() diff --git a/html/changelogs/Ben10083 - ExoRFD.yml b/html/changelogs/Ben10083 - ExoRFD.yml new file mode 100644 index 00000000000..7dc7bc2e4d7 --- /dev/null +++ b/html/changelogs/Ben10083 - ExoRFD.yml @@ -0,0 +1,13 @@ +# Your name. +author: Ben10083 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Exosuit RFD now properly displays radial menu."