mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 05:51:56 +00:00
Pipes bugfix:
- trowing pipes correctly rotates them; - meters unwrenching; - pipe dispenser can be unwrenched and pulled, wrench back to use; - unused pipes can be returned to dispenser; - Probably fixed bug with non-working connectors; Windows now are always shown above grilles. Pipes now are always shown above lattice. Some other things. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@830 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -196,5 +196,5 @@ obj/machinery/atmospherics/binary/pump
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
@@ -134,6 +134,8 @@
|
||||
if (connected_device)
|
||||
user << "\red You cannot unwrench this [src], dettach [connected_device] first."
|
||||
return 1
|
||||
if (locate(/obj/machinery/portable_atmospherics, src.loc))
|
||||
return 1
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
@@ -151,5 +153,5 @@
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
@@ -274,5 +274,5 @@
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
@@ -213,5 +213,5 @@
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
@@ -131,7 +131,7 @@ obj/machinery/atmospherics/valve
|
||||
initialize()
|
||||
if(node1 && node2) return
|
||||
|
||||
var/connect_directions
|
||||
/* var/connect_directions
|
||||
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
@@ -162,7 +162,16 @@ obj/machinery/atmospherics/valve
|
||||
node2 = target
|
||||
break
|
||||
if(node1)
|
||||
break
|
||||
break*/
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,turn(dir,180)))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
build_network()
|
||||
if(!network_node1 && node1)
|
||||
@@ -283,5 +292,5 @@ obj/machinery/atmospherics/valve
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
del(src)
|
||||
|
||||
@@ -155,6 +155,9 @@ obj/machinery/atmospherics/pipe
|
||||
proc/burst()
|
||||
src.visible_message("\red \bold [src] bursts!");
|
||||
playsound(src.loc, 'bang.ogg', 25, 1)
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
smoke.start()
|
||||
del(src)
|
||||
|
||||
Del()
|
||||
@@ -187,36 +190,34 @@ obj/machinery/atmospherics/pipe
|
||||
//dir = node1_direction|node2_direction
|
||||
|
||||
else
|
||||
if(!node1&&!node2)
|
||||
del(src) //TODO: silent deleting looks weird
|
||||
var/have_node1 = node1?1:0
|
||||
var/have_node2 = node2?1:0
|
||||
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
||||
|
||||
if(!node1&&!node2)
|
||||
del(src)
|
||||
|
||||
initialize()
|
||||
var/connect_directions = initialize_directions
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node1)
|
||||
break
|
||||
if(direction&initialize_directions)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node2 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if(node2)
|
||||
break
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
@@ -268,16 +269,14 @@ obj/machinery/atmospherics/pipe
|
||||
del(src)
|
||||
|
||||
initialize()
|
||||
if(!node1)
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/target in get_step(src,initialize_directions))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
if(!node2)
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -291,26 +290,25 @@ obj/machinery/atmospherics/pipe
|
||||
thermal_conductivity = WINDOW_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
initialize()
|
||||
var/connect_directions = initialize_directions_he
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,direction))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node1 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node1)
|
||||
break
|
||||
if(direction&initialize_directions_he)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,direction))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node2)
|
||||
break
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -711,9 +709,9 @@ obj/machinery/atmospherics/pipe
|
||||
update_icon()
|
||||
|
||||
obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (istype(W, /obj/machinery/atmospherics/pipe/tank))
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
|
||||
return ..()
|
||||
if (istype(W, /obj/machinery/atmospherics/pipe/vent))
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/vent))
|
||||
return ..()
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
@@ -734,5 +732,9 @@ obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/u
|
||||
"[user] unfastens \the [src].", \
|
||||
"\blue You have unfastened \the [src].", \
|
||||
"You hear ratchet.")
|
||||
new /obj/item/weapon/pipe(loc, make_from=src)
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
del(meter)
|
||||
del(src)
|
||||
Reference in New Issue
Block a user