Vgstation13: Display cases can no longer be constructed nor glass removed.

Created on 3 Mar 2018  路  4Comments  路  Source: vgstation-coders/vgstation13

Description of issue

Display case construction breaks at the adding a circuit step
Can no longer crowbar the glass out to deconstruct the intermediary form.

Difference between expected and actual behavior

Used to be able to add the airlock circuit
Used to be able to crowbar the glass out then wrench the frame to put it where you wanted it if you changed your mind

Steps to reproduce

Take 5 metal and make a machine frame
Add glass to it to make a display case frame
Try to add the airlock circuit from aux tool storage and it does nothing
Try to crowbar it and it does nothing

Specific information for locating

vgstation13/code/game/objects/structures/displaycase.dm

/obj/structure/displaycase_frame
name = "display case frame"
icon = 'icons/obj/stock_parts.dmi'
icon_state="box_glass"
var/obj/item/weapon/circuitboard/airlock/circuit=null
var/state=0

        /obj/structure/displaycase_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/pstate=state
var/turf/T=get_turf(src)
switch(state)
    if(0)
        if(istype(W, /obj/item/weapon/circuitboard/airlock) && W:icon_state != "door_electronics_smoked")
            if(user.drop_item(W, src))
                circuit=W
                circuit.installed = 1
                state++
                playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
        if(iscrowbar(W))
            var/obj/machinery/constructable_frame/machine_frame/MF = new /obj/machinery/constructable_frame/machine_frame(T)
            MF.state = 1
            MF.set_build_state(1)
            new /obj/item/stack/sheet/glass/glass(T)
            qdel(src)
            playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
            return

    if(1)
        if(isscrewdriver(W))
            var/obj/structure/displaycase/C=new(T)
            if(circuit.one_access)
                C.req_access = null
                C.req_one_access = circuit.conf_access
            else
                C.req_access = circuit.conf_access
                C.req_one_access = null
            playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
            qdel(src)
            return
        if(iscrowbar(W))
            circuit.forceMove(T)
            circuit.installed = 0
            circuit=null
            state--
            playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
if(pstate!=state)
    pstate=state
    update_icon()

Length of time in which bug has been known to occur


Unknown? I did it a couple times for gimmicks in 2017 then found out it doesn't work anymore when I went to do them again a couple days ago.

Server revision


8dcfbd52e5ece16620a5e941a6b4b1085cf700f1

Issue bingo

Please check whatever applies. More checkboxes checked increase your chances of not being yelled at by every contributor.

  • [x] Issue could be reproduced at least once
  • [ ] Issue could be reproduced by different players
  • [x] Issue could be reproduced in multiple rounds
  • [x] Issue happened in a recent (less than 7 days ago) round
  • [x] [Couldn't find an existing issue about this](https://github.com/d3athrow/vgstation13/issues)
Bug / Fix

Most helpful comment

Squashing in progress

All 4 comments

Squashing in progress

Reproduced successfully.

Fix should be done, compiling and testing.

Didn't count of git being... git. Fix will be pushed done tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

D3athrow-Issues picture D3athrow-Issues  路  3Comments

D3athrow-Issues picture D3athrow-Issues  路  3Comments

N3X15 picture N3X15  路  3Comments

Probe1 picture Probe1  路  3Comments

gbasood picture gbasood  路  3Comments