Merge pull request #7355 from Citadel-Station-13/upstream-merge-38934

[MIRROR] Fix constructed directional windows leaking atmos, wrap setting of the anchored var on objects
This commit is contained in:
deathride58
2018-07-10 01:56:32 -04:00
committed by GitHub
27 changed files with 62 additions and 51 deletions
+2 -2
View File
@@ -311,7 +311,7 @@ Class Procs:
/obj/machinery/proc/spawn_frame(disassembled)
var/obj/structure/frame/machine/M = new /obj/structure/frame/machine(loc)
. = M
M.anchored = anchored
M.setAnchored(anchored)
if(!disassembled)
M.obj_integrity = M.max_integrity * 0.5 //the frame is already half broken
transfer_fingerprints_to(M)
@@ -372,7 +372,7 @@ Class Procs:
//as long as we're the same anchored state and we're either on a floor or are anchored, toggle our anchored state
if(I.use_tool(src, user, time, extra_checks = CALLBACK(src, .proc/unfasten_wrench_check, prev_anchored, user)))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [src].</span>")
anchored = !anchored
setAnchored(!anchored)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
return SUCCESSFUL_UNFASTEN
return FAILED_UNFASTEN
@@ -42,7 +42,7 @@
if(istype(W, /obj/item/weldingtool))
if(weld(W, user))
to_chat(user, "<span class='notice'>You weld the assembly securely into place.</span>")
anchored = TRUE
setAnchored(TRUE)
state = 2
return
if(2)
@@ -62,7 +62,7 @@
if(weld(W, user))
to_chat(user, "<span class='notice'>You unweld the assembly from its place.</span>")
state = 1
anchored = TRUE
setAnchored(TRUE)
return
// Upgrades!
+1 -1
View File
@@ -111,7 +111,7 @@
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc)
A.dir = dir
A.circuit = circuit
A.anchored = TRUE
A.setAnchored(TRUE)
if(stat & BROKEN)
if(user)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
@@ -11,7 +11,7 @@
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
anchored = TRUE
setAnchored(TRUE)
state = 1
return
if(istype(P, /obj/item/weldingtool))
@@ -30,7 +30,7 @@
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
anchored = FALSE
setAnchored(FALSE)
state = 0
return
if(istype(P, /obj/item/circuitboard/computer) && !circuit)
+4 -4
View File
@@ -106,7 +106,7 @@
if(P.use_tool(src, user, 40, volume=75))
if(state == 1)
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(2)
@@ -114,7 +114,7 @@
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(istype(P, /obj/item/circuitboard/machine))
@@ -169,7 +169,7 @@
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
if(P.use_tool(src, user, 40, volume=75))
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
anchored = !anchored
setAnchored(!anchored)
return
if(istype(P, /obj/item/screwdriver))
@@ -181,7 +181,7 @@
if(component_check)
P.play_tool_sound(src)
var/obj/machinery/new_machine = new circuit.build_path(loc, 1)
new_machine.anchored = anchored
new_machine.setAnchored(anchored)
new_machine.on_construction()
for(var/obj/O in new_machine.component_parts)
qdel(O)
+2 -2
View File
@@ -66,10 +66,10 @@
if(istype(O, /obj/item/wrench))
if(!anchored && !isinspace())
to_chat(user,"<span class='notice'>You secure [src] to the floor.</span>")
anchored = TRUE
setAnchored(TRUE)
else if(anchored)
to_chat(user,"<span class='notice'>You unsecure and disconnect [src].</span>")
anchored = FALSE
setAnchored(FALSE)
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
return
return ..()
+1 -1
View File
@@ -1321,7 +1321,7 @@
A = new /obj/structure/door_assembly(loc)
//If you come across a null assemblytype, it will produce the default assembly instead of disintegrating.
A.heat_proof_finished = src.heat_proof //tracks whether there's rglass in
A.anchored = TRUE
A.setAnchored(TRUE)
A.glass = src.glass
A.state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
A.created_name = name
+1 -1
View File
@@ -246,7 +246,7 @@
if("rightsecure")
WA.facing = "r"
WA.secure = TRUE
WA.anchored = TRUE
WA.setAnchored(TRUE)
WA.state= "02"
WA.setDir(src.dir)
WA.ini_dir = src.dir
+2 -2
View File
@@ -167,13 +167,13 @@
if (!anchored && !isinspace())
to_chat(user, "<span class='notice'>[src] is now secured.</span>")
add_overlay("[base_state]-s")
anchored = TRUE
setAnchored(TRUE)
power_change()
proximity_monitor.SetRange(range)
else
to_chat(user, "<span class='notice'>[src] can now be moved.</span>")
cut_overlays()
anchored = FALSE
setAnchored(FALSE)
power_change()
proximity_monitor.SetRange(0)
+2 -2
View File
@@ -393,7 +393,7 @@ Possible to do for anyone motivated enough:
Hologram.copy_known_languages_from(user,replace = TRUE)
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
Hologram.anchored = TRUE//So space wind cannot drag it.
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
Hologram.name = "[user.name] (Hologram)"//If someone decides to right click.
Hologram.set_light(2) //hologram lighting
move_hologram()
@@ -551,7 +551,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
holder.selected_default_language = record.language
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
Hologram.anchored = TRUE//So space wind cannot drag it.
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
Hologram.set_light(2) //hologram lighting
visible_message("<span class='notice'>A holographic image of [record.caller_name] flickers to life before your eyes!</span>")
@@ -261,7 +261,7 @@
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored && !isinspace())
anchored = TRUE
setAnchored(TRUE)
invisibility = INVISIBILITY_MAXIMUM
update_icon()
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
@@ -269,7 +269,7 @@
cover = new /obj/machinery/porta_turret_cover(loc) //create a new turret. While this is handled in process(), this is to workaround a bug where the turret becomes invisible for a split second
cover.parent_turret = src //make the cover's parent src
else if(anchored)
anchored = FALSE
setAnchored(FALSE)
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
power_change()
invisibility = 0
@@ -26,7 +26,7 @@
if(istype(I, /obj/item/wrench) && !anchored)
I.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
anchored = TRUE
setAnchored(TRUE)
build_step = PTURRET_BOLTED
return
@@ -51,7 +51,7 @@
else if(istype(I, /obj/item/wrench))
I.play_tool_sound(src, 75)
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
anchored = FALSE
setAnchored(FALSE)
build_step = PTURRET_UNSECURED
return
@@ -192,4 +192,4 @@
if(installed_gun)
qdel(installed_gun)
installed_gun = null
. = ..()
. = ..()
@@ -45,12 +45,12 @@
return
if(!parent_turret.anchored)
parent_turret.anchored = TRUE
parent_turret.setAnchored(TRUE)
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
parent_turret.invisibility = 0
parent_turret.update_icon()
else
parent_turret.anchored = FALSE
parent_turret.setAnchored(FALSE)
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
parent_turret.invisibility = INVISIBILITY_MAXIMUM
parent_turret.update_icon()
+1 -1
View File
@@ -25,7 +25,7 @@
if(charging)
to_chat(user, "<span class='notice'>Remove the charging item first!</span>")
return
anchored = !anchored
setAnchored(!anchored)
power_change()
to_chat(user, "<span class='notice'>You [anchored ? "attached" : "detached"] [src].</span>")
G.play_tool_sound(src)
+2 -2
View File
@@ -178,14 +178,14 @@
if(!anchored && !isinspace())
W.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You secure \the [src] to the floor!</span>")
anchored = TRUE
setAnchored(TRUE)
else if(anchored)
W.play_tool_sound(src, 100)
to_chat(user, "<span class='notice'>You unsecure \the [src] from the floor!</span>")
if(active)
to_chat(user, "<span class='notice'>\The [src] shuts off!</span>")
shields_down()
anchored = FALSE
setAnchored(FALSE)
else if(W.GetID())
if(allowed(user) && !(obj_flags & EMAGGED))
+2 -2
View File
@@ -62,7 +62,7 @@
return
if(anchored)
anchored = FALSE
setAnchored(FALSE)
to_chat(user, "<span class='notice'>You unscrew the beacon from the floor.</span>")
disconnect_from_network()
return
@@ -70,7 +70,7 @@
if(!connect_to_network())
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
return
anchored = TRUE
setAnchored(TRUE)
to_chat(user, "<span class='notice'>You screw the beacon to the floor and attach the cable.</span>")
return
else
+2 -2
View File
@@ -119,14 +119,14 @@
else
to_chat(user, "<span class='notice'>You firmly wrench the bomb to the floor.</span>")
I.play_tool_sound(src)
anchored = TRUE
setAnchored(TRUE)
if(active)
to_chat(user, "<span class='notice'>The bolts lock in place.</span>")
else
if(!active)
to_chat(user, "<span class='notice'>You wrench the bomb from the floor.</span>")
I.play_tool_sound(src)
anchored = FALSE
setAnchored(FALSE)
else
to_chat(user, "<span class='warning'>The bolts are locked down!</span>")