upload files
This commit is contained in:
@@ -146,7 +146,7 @@
|
||||
//No other icons for it atm
|
||||
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
if(!anchored)
|
||||
W.play_tool_sound(src, 75)
|
||||
user.visible_message("[user.name] secures the [src.name] to the floor.", \
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
custom_materials = list(/datum/material/iron=100)
|
||||
|
||||
/obj/item/am_shielding_container/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/multitool) && istype(src.loc, /turf))
|
||||
if(I.tool_behaviour == TOOL_MULTITOOL && istype(src.loc, /turf))
|
||||
new/obj/machinery/am_shielding(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -155,7 +155,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
return
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if (shock(user, 50))
|
||||
return
|
||||
user.visible_message("[user] cuts the cable.", "<span class='notice'>You cut the cable.</span>")
|
||||
@@ -177,7 +177,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
R.loaded.cable_join(src, user)
|
||||
R.is_empty(user)
|
||||
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(powernet && (powernet.avail > 0)) // is it powered?
|
||||
to_chat(user, "<span class='danger'>[DisplayPower(powernet.avail)] in power network.</span>")
|
||||
else
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/state = FLOODLIGHT_NEEDS_WRENCHING
|
||||
|
||||
/obj/structure/floodlight_frame/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/wrench) && (state == FLOODLIGHT_NEEDS_WRENCHING))
|
||||
if(O.tool_behaviour == TOOL_WRENCH && (state == FLOODLIGHT_NEEDS_WRENCHING))
|
||||
to_chat(user, "<span class='notice'>You secure [src].</span>")
|
||||
anchored = TRUE
|
||||
state = FLOODLIGHT_NEEDS_WIRES
|
||||
@@ -26,7 +26,7 @@
|
||||
to_chat(user, "<span class='notice'>You put lights in [src].</span>")
|
||||
new /obj/machinery/power/floodlight(src.loc)
|
||||
qdel(src)
|
||||
else if(istype(O, /obj/item/screwdriver) && (state == FLOODLIGHT_NEEDS_SECURING))
|
||||
else if(O.tool_behaviour == TOOL_SCREWDRIVER && (state == FLOODLIGHT_NEEDS_SECURING))
|
||||
to_chat(user, "<span class='notice'>You fasten the wiring and electronics in [src].</span>")
|
||||
name = "secured [name]"
|
||||
desc = "A bare metal frame that looks like a floodlight. Requires light tubes."
|
||||
@@ -82,7 +82,7 @@
|
||||
to_chat(user, "You set [src] to [setting_text].")
|
||||
|
||||
/obj/machinery/power/floodlight/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/wrench))
|
||||
if(O.tool_behaviour == TOOL_WRENCH)
|
||||
default_unfasten_wrench(user, O, time = 20)
|
||||
change_setting(1)
|
||||
if(anchored)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
return
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(usr, "<span class='notice'>You begin deconstructing [src]...</span>")
|
||||
if (W.use_tool(src, user, 30, volume=50))
|
||||
new /obj/item/stack/sheet/metal(drop_location(), sheets_refunded)
|
||||
@@ -127,11 +127,11 @@
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to wire [src]!</span>")
|
||||
return
|
||||
if(2)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(usr, "<span class='warning'>You have to remove the wires first!</span>")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
stage = 1
|
||||
icon_state = "[fixture_type]-construct-stage1"
|
||||
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
|
||||
@@ -140,7 +140,7 @@
|
||||
W.play_tool_sound(src, 100)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
user.visible_message("[user.name] closes [src]'s casing.", \
|
||||
"<span class='notice'>You close [src]'s casing.</span>", "<span class='italics'>You hear screwing.</span>")
|
||||
W.play_tool_sound(src, 75)
|
||||
@@ -462,7 +462,7 @@
|
||||
|
||||
// attempt to stick weapon into light socket
|
||||
else if(status == LIGHT_EMPTY)
|
||||
if(istype(W, /obj/item/screwdriver)) //If it's a screwdriver open it.
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER) //If it acts like a screwdriver, open it.
|
||||
W.play_tool_sound(src, 75)
|
||||
user.visible_message("[user.name] opens [src]'s casing.", \
|
||||
"<span class='notice'>You open [src]'s casing.</span>", "<span class='italics'>You hear a noise.</span>")
|
||||
@@ -621,7 +621,7 @@
|
||||
else
|
||||
to_chat(H, "<span class='warning'>You can't receive charge from the [fitting]!</span>")
|
||||
return
|
||||
|
||||
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(G.max_heat_protection_temperature)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/creation_type = /obj/singularity
|
||||
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED)
|
||||
if(istype(W, /obj/item/wrench) && !isinspace())
|
||||
if(W.tool_behaviour == TOOL_WRENCH && !isinspace())
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = TRUE
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
@@ -71,7 +71,7 @@
|
||||
construction_state = PA_CONSTRUCTION_UNWIRED
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_UNWIRED)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(W.tool_behaviour == TOOL_WRENCH)
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = FALSE
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
@@ -85,18 +85,18 @@
|
||||
construction_state = PA_CONSTRUCTION_PANEL_OPEN
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_PANEL_OPEN)
|
||||
if(istype(W, /obj/item/wirecutters))//TODO:Shock user if its on?
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)//TODO:Shock user if its on?
|
||||
user.visible_message("[user.name] removes some wires from the [name].", \
|
||||
"You remove some wires.")
|
||||
construction_state = PA_CONSTRUCTION_UNWIRED
|
||||
did_something = TRUE
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
user.visible_message("[user.name] closes the [name]'s access panel.", \
|
||||
"You close the access panel.")
|
||||
construction_state = PA_CONSTRUCTION_COMPLETE
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_COMPLETE)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
user.visible_message("[user.name] opens the [name]'s access panel.", \
|
||||
"You open the access panel.")
|
||||
construction_state = PA_CONSTRUCTION_PANEL_OPEN
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
|
||||
if(istype(C) && terminal)
|
||||
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/C)
|
||||
if(C.tool_behaviour == TOOL_CROWBAR && terminal)
|
||||
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
|
||||
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && isturf(loc))
|
||||
if(W.tool_behaviour == TOOL_WRENCH && isturf(loc))
|
||||
if(isinspace())
|
||||
to_chat(user, "<span class='warning'>You can't secure [src] here.</span>")
|
||||
return
|
||||
@@ -269,7 +269,7 @@
|
||||
user.visible_message("[user] inserts the electronics into the solar assembly.", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
|
||||
return 1
|
||||
else
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(W.tool_behaviour == TOOL_CROWBAR)
|
||||
new /obj/item/electronics/tracker(src.loc)
|
||||
tracker = 0
|
||||
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
|
||||
|
||||
@@ -131,8 +131,10 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/tesla_coil/research/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
|
||||
/obj/machinery/power/tesla_coil/research/default_unfasten_wrench(mob/user, obj/item/W, time = 20)
|
||||
. = ..()
|
||||
if(!W.tool_behaviour == TOOL_WRENCH)
|
||||
return
|
||||
if(. == SUCCESSFUL_UNFASTEN)
|
||||
if(panel_open)
|
||||
icon_state = "rpcoil_open[anchored]"
|
||||
|
||||
Reference in New Issue
Block a user