Merge branch 'tool_behavior-replacing' of https://github.com/SandPoot/Citadel-Station-13 into tool_behavior-replacing
This commit is contained in:
@@ -166,7 +166,7 @@
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) && (obj_flags & EMAGGED))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a diode installed.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(diode)
|
||||
to_chat(user, "<span class='notice'>You remove the [diode.name] from \the [src].</span>")
|
||||
diode.forceMove(drop_location())
|
||||
|
||||
@@ -26,10 +26,9 @@
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
custom_materials = list(/datum/material/iron=50, /datum/material/glass=20)
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
buffer = null // simple machine buffer for device linkage
|
||||
toolspeed = 1
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/multitool/chaplain
|
||||
@@ -72,7 +71,7 @@
|
||||
if(selected_io)
|
||||
icon_state += "_red"
|
||||
|
||||
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
/obj/item/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
if(!io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
|
||||
return
|
||||
@@ -101,7 +100,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
/obj/item/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
if(!io1.linked.len || !io2.linked.len)
|
||||
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
|
||||
return
|
||||
@@ -256,6 +255,7 @@
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
show_wires = TRUE
|
||||
|
||||
/obj/item/multitool/advanced
|
||||
name = "advanced multitool"
|
||||
@@ -263,6 +263,7 @@
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.2
|
||||
show_wires = TRUE
|
||||
|
||||
/obj/item/multitool/advanced/brass
|
||||
name = "clockwork multitool"
|
||||
|
||||
@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
|
||||
@@ -278,7 +278,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
to_chat(user,"<span class='notice'>You upgrade [src].</span>")
|
||||
bowmanize()
|
||||
qdel(W)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot || keyslot2)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
freerange = TRUE
|
||||
|
||||
/obj/item/radio/intercom/ratvar/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
to_chat(user, "<span class='danger'>[src] is fastened to the wall with [is_servant_of_ratvar(user) ? "replicant alloy" : "some material you've never seen"], and can't be removed.</span>")
|
||||
return //no unfastening!
|
||||
. = ..()
|
||||
@@ -57,7 +57,7 @@
|
||||
. += "<span class='notice'>It's <i>unscrewed</i> from the wall, and can be <b>detached</b>.</span>"
|
||||
|
||||
/obj/item/radio/intercom/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(unfastened)
|
||||
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
@@ -69,7 +69,7 @@
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
unfastened = TRUE
|
||||
return
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
else if(I.tool_behaviour == TOOL_WRENCH)
|
||||
if(!unfastened)
|
||||
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
|
||||
return
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
/obj/item/radio/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
unscrewed = !unscrewed
|
||||
if(unscrewed)
|
||||
to_chat(user, "<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
@@ -384,7 +384,7 @@
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(keyslot)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
@@ -893,7 +893,7 @@ GENETICS SCANNER
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=200)
|
||||
var/list/discovered = list() //hit a dna console to update the scanners database
|
||||
var/list/buffer
|
||||
buffer = list()
|
||||
var/ready = TRUE
|
||||
var/cooldown = 200
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
|
||||
/obj/item/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
|
||||
if(ruined && I.tool_behaviour == TOOL_SCREWDRIVER || istype(I, /obj/item/pen))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(I.use_tool(src, user, 120))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
|
||||
Reference in New Issue
Block a user