Kills off /obj/item/device (#6561)
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER || I.tool_behaviour == TOOL_MULTITOOL)
|
||||
return TRUE
|
||||
if(istype(I, /obj/item/device/assembly))
|
||||
var/obj/item/device/assembly/A = I
|
||||
if(istype(I, /obj/item/assembly))
|
||||
var/obj/item/assembly/A = I
|
||||
if(A.attachable)
|
||||
return TRUE
|
||||
|
||||
@@ -149,13 +149,13 @@
|
||||
/datum/wires/proc/pulse_color(color, mob/living/user)
|
||||
pulse(get_wire(color), user)
|
||||
|
||||
/datum/wires/proc/pulse_assembly(obj/item/device/assembly/S)
|
||||
/datum/wires/proc/pulse_assembly(obj/item/assembly/S)
|
||||
for(var/color in assemblies)
|
||||
if(S == assemblies[color])
|
||||
pulse_color(color)
|
||||
return TRUE
|
||||
|
||||
/datum/wires/proc/attach_assembly(color, obj/item/device/assembly/S)
|
||||
/datum/wires/proc/attach_assembly(color, obj/item/assembly/S)
|
||||
if(S && istype(S) && S.attachable && !is_attached(color))
|
||||
assemblies[color] = S
|
||||
S.forceMove(holder)
|
||||
@@ -163,7 +163,7 @@
|
||||
return S
|
||||
|
||||
/datum/wires/proc/detach_assembly(color)
|
||||
var/obj/item/device/assembly/S = get_attached(color)
|
||||
var/obj/item/assembly/S = get_attached(color)
|
||||
if(S && istype(S))
|
||||
assemblies -= color
|
||||
S.connected = null
|
||||
@@ -229,7 +229,7 @@
|
||||
reveal_wires = TRUE
|
||||
|
||||
// Same for anyone with an abductor multitool.
|
||||
else if(user.is_holding_item_of_type(/obj/item/device/multitool/abductor))
|
||||
else if(user.is_holding_item_of_type(/obj/item/multitool/abductor))
|
||||
reveal_wires = TRUE
|
||||
|
||||
// Station blueprints do that too, but only if the wires are not randomized.
|
||||
@@ -280,8 +280,8 @@
|
||||
. = TRUE
|
||||
else
|
||||
I = L.get_active_held_item()
|
||||
if(istype(I, /obj/item/device/assembly))
|
||||
var/obj/item/device/assembly/A = I
|
||||
if(istype(I, /obj/item/assembly))
|
||||
var/obj/item/assembly/A = I
|
||||
if(A.attachable)
|
||||
if(!L.temporarilyRemoveItemFromInventory(A))
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/wires/radio
|
||||
holder_type = /obj/item/device/radio
|
||||
holder_type = /obj/item/radio
|
||||
proper_name = "Radio"
|
||||
|
||||
/datum/wires/radio/New(atom/holder)
|
||||
@@ -10,11 +10,11 @@
|
||||
..()
|
||||
|
||||
/datum/wires/radio/interactable(mob/user)
|
||||
var/obj/item/device/radio/R = holder
|
||||
var/obj/item/radio/R = holder
|
||||
return R.unscrewed
|
||||
|
||||
/datum/wires/radio/on_pulse(index)
|
||||
var/obj/item/device/radio/R = holder
|
||||
var/obj/item/radio/R = holder
|
||||
switch(index)
|
||||
if(WIRE_SIGNAL)
|
||||
R.listening = !R.listening
|
||||
|
||||
Reference in New Issue
Block a user