mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Cleanup redundant machine stuff (#18494)
This commit is contained in:
@@ -359,7 +359,7 @@
|
||||
|
||||
/obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
|
||||
if(keyslot1 && keyslot2)
|
||||
to_chat(user, "The headset can't hold another key!")
|
||||
return
|
||||
@@ -372,15 +372,17 @@
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
keyslot2 = W
|
||||
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
for(var/ch_name in channels)
|
||||
|
||||
@@ -563,13 +563,14 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
b_stat = !b_stat
|
||||
if(!istype(src, /obj/item/radio/beacon))
|
||||
if(b_stat)
|
||||
user.show_message("<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>The radio can no longer be modified or attached!</span>")
|
||||
|
||||
updateDialog()
|
||||
|
||||
/obj/item/radio/wirecutter_act(mob/user, obj/item/I)
|
||||
@@ -663,7 +664,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
|
||||
if(keyslot)
|
||||
to_chat(user, "The radio can't hold another key!")
|
||||
return
|
||||
@@ -674,14 +675,15 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
keyslot = W
|
||||
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/borg/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
if(keyslot)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
||||
|
||||
@@ -173,7 +173,6 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/rpd/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
user.set_machine(src)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "RPD", name, 450, 650, master_ui, state)
|
||||
|
||||
Reference in New Issue
Block a user