Exosuit RCD now displays Radial Menu (#14220)

This commit is contained in:
Benedict
2022-06-13 12:05:43 -04:00
committed by GitHub
parent 7c70792b9b
commit b233cd5519
4 changed files with 50 additions and 13 deletions
+7 -1
View File
@@ -12,4 +12,10 @@
#define WIRELESS_PIN_DISABLED 1
#define WIRELESS_PIN_AUTOMATIC 2
#define WIRELESS_PIN_STUN 3
#define WIRELESS_PIN_LETHAL 4
#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
-9
View File
@@ -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
@@ -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 <i>\"[current_mode]\"</i>."))
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()
+13
View File
@@ -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."