Added the socket wrench

Large wrench, lets you unwrench pipes of any pressure at the downside of mixing their contents with the environment.
This commit is contained in:
ComicIronic
2014-11-30 00:56:38 +00:00
parent 1da602af2f
commit 77a9f6cf0a
3 changed files with 23 additions and 4 deletions

View File

@@ -1174,17 +1174,30 @@
return 1 return 1
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air() var/datum/gas_mixture/env_air = loc.return_air()
add_fingerprint(user)
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE) if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure." if(istype(W, /obj/item/weapon/wrench/socket))
add_fingerprint(user) user << "<span class='warning'>You begin to open the pressure release valve on the pipe...</span>"
return 1 if(do_after(user, 50))
playsound(get_turf(src), 'sound/machines/hiss.ogg', 50, 1)
user.visible_message("[user] vents \the [src].",
"You have vented \the [src].",
"You hear a ratchet.")
var/datum/gas_mixture/transit = new
transit = int_air
transit.divide(parent.members.len) //we get the total pressure over the number of pipes to find gas per pipe
env_air.add(transit) //put it in the air
del(transit) //remove the carrier
else
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..." user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40)) if (do_after(user, 40))
user.visible_message( \ user.visible_message( \
"[user] unfastens \the [src].", \ "[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \ "\blue You have unfastened \the [src].", \
"You hear ratchet.") "You hear a ratchet.")
new /obj/item/pipe(loc, make_from=src) new /obj/item/pipe(loc, make_from=src)
for (var/obj/machinery/meter/meter in T) for (var/obj/machinery/meter/meter in T)
if (meter.target == src) if (meter.target == src)

View File

@@ -32,6 +32,12 @@
origin_tech = "materials=1;engineering=1" origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked") attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
//we inherit a lot from wrench, so we change very little
/obj/item/weapon/wrench/socket
name = "socket wrench"
desc = "A wrench intended to be wrenchier than other wrenches. It's the wrenchiest."
icon_state = "socket_wrench"
w_class = 4.0 //big shit, to balance its power
/* /*
* Screwdriver * Screwdriver

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 72 KiB