#define GIRDER_NORMAL 0 #define GIRDER_REINF_STRUTS 1 #define GIRDER_REINF 2 #define GIRDER_DISPLACED 3 #define GIRDER_DISASSEMBLED 4 /obj/structure/girder name = "girder" icon_state = "girder" anchored = 1 density = 1 layer = 2.9 var/state = GIRDER_NORMAL var/girderpasschance = 20 // percentage chance that a projectile passes through the girder. /obj/structure/girder/attackby(obj/item/W, mob/user, params) add_fingerprint(user) if(istype(W, /obj/item/weapon/screwdriver)) if(state == GIRDER_DISPLACED) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user.visible_message("[user] disassembles the girder.", \ "You start to disassemble the girder...", "You hear clanking and banging noises.") if(do_after(user, 40/W.toolspeed, target = src)) if(state != GIRDER_DISPLACED) return state = GIRDER_DISASSEMBLED user << "You disassemble the girder." var/obj/item/stack/sheet/metal/M = new (loc, 2) M.add_fingerprint(user) qdel(src) else if(state == GIRDER_REINF) playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) user << "You start unsecuring support struts..." if(do_after(user, 40/W.toolspeed, target = src)) if(state != GIRDER_REINF) return user << "You unsecure the support struts." state = GIRDER_REINF_STRUTS else if(istype(W, /obj/item/weapon/wrench)) if(state == GIRDER_DISPLACED) if(!istype(loc, /turf/simulated/floor)) user << "A floor must be present to secure the girder!" return playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You start securing the girder..." if(do_after(user, 40/W.toolspeed, target = src)) user << "You secure the girder." var/obj/structure/girder/G = new (loc) transfer_fingerprints_to(G) qdel(src) else if(state == GIRDER_NORMAL) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) user << "You start unsecuring the girder..." if(do_after(user, 40/W.toolspeed, target = src)) user << "You unsecure the girder." var/obj/structure/girder/displaced/D = new (loc) transfer_fingerprints_to(D) qdel(src) else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) user << "You start slicing apart the girder..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, 30, target = src)) user << "You slice apart the girder." var/obj/item/stack/sheet/metal/M = new (loc, 2) M.add_fingerprint(user) qdel(src) else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W user << "You smash through the girder!" new /obj/item/stack/sheet/metal(get_turf(src)) D.playDigSound() qdel(src) else if(istype(W, /obj/item/weapon/wirecutters) && state == GIRDER_REINF_STRUTS) playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) user << "You start removing support struts..." if(do_after(user, 40/W.toolspeed, target = src)) user << "You remove the support struts." new /obj/item/stack/sheet/plasteel(get_turf(src)) var/obj/structure/girder/G = new (loc) transfer_fingerprints_to(G) qdel(src) else if(istype(W, /obj/item/stack)) if (istype(src.loc, /turf/simulated/wall)) user << "There is already a wall present!" return if (!istype(src.loc, /turf/simulated/floor)) user << "A floor must be present to build a false wall!" return if (locate(/obj/structure/falsewall) in src.loc.contents) user << "There is already a false wall present!" return if(istype(W,/obj/item/stack/rods)) var/obj/item/stack/rods/S = W if(state == GIRDER_DISPLACED) if(S.amount < 2) user << "You need at least two rods to create a false wall!" return user << "You start building a reinforced false wall..." if(do_after(user, 20, target = src)) if(!src.loc || !S || S.amount < 2) return S.use(2) user << "You create a false wall. Push on it to open or close the passage." var/obj/structure/falsewall/iron/FW = new (loc) transfer_fingerprints_to(FW) qdel(src) else if(S.amount < 5) user << "You need at least five rods to add plating!" return user << "You start adding plating..." if (do_after(user, 40, target = src)) if(!src.loc || !S || S.amount < 5) return S.use(5) user << "You add the plating." var/turf/T = get_turf(src) T.ChangeTurf(/turf/simulated/wall/mineral/iron) transfer_fingerprints_to(T) qdel(src) return if(!istype(W,/obj/item/stack/sheet)) return var/obj/item/stack/sheet/S = W switch(S.type) if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg) if(state == GIRDER_DISPLACED) if(S.get_amount() < 2) user << "You need two sheets of metal to create a false wall!" return user << "You start building a false wall..." if(do_after(user, 20, target = src)) if(!src.loc || !S || S.get_amount() < 2) return S.use(2) user << "You create a false wall. Push on it to open or close the passage." var/obj/structure/falsewall/F = new (loc) transfer_fingerprints_to(F) qdel(src) else if(S.get_amount() < 2) user << "You need two sheets of metal to finish a wall!" return user << "You start adding plating..." if (do_after(user, 40, target = src)) if(loc == null || S.get_amount() < 2) return S.use(2) user << "You add the plating." var/turf/T = get_turf(src) T.ChangeTurf(/turf/simulated/wall) transfer_fingerprints_to(T) qdel(src) return if(/obj/item/stack/sheet/plasteel) if(state == GIRDER_DISPLACED) if(S.amount < 2) user << "You need at least two sheets to create a false wall!" return user << "You start building a reinforced false wall..." if(do_after(user, 20, target = src)) if(!src.loc || !S || S.amount < 2) return S.use(2) user << "You create a reinforced false wall. Push on it to open or close the passage." var/obj/structure/falsewall/reinforced/FW = new (loc) transfer_fingerprints_to(FW) qdel(src) else if(state == GIRDER_REINF) if(S.amount < 1) return user << "You start finalizing the reinforced wall..." if(do_after(user, 50, target = src)) if(!src.loc || !S || S.amount < 1) return S.use(1) user << "You fully reinforce the wall." var/turf/T = get_turf(src) T.ChangeTurf(/turf/simulated/wall/r_wall) transfer_fingerprints_to(T) qdel(src) return else if(S.amount < 1) return user << "You start reinforcing the girder..." if (do_after(user, 60, target = src)) if(!src.loc || !S || S.amount < 1) return S.use(1) user << "You reinforce the girder." var/obj/structure/girder/reinforced/R = new (loc) transfer_fingerprints_to(R) qdel(src) return if(S.sheettype) var/M = S.sheettype if(state == GIRDER_DISPLACED) if(S.amount < 2) user << "You need at least two sheets to create a false wall!" return S.use(2) user << "You create a false wall. Push on it to open or close the passage." var/F = text2path("/obj/structure/falsewall/[M]") var/obj/structure/FW = new F (loc) transfer_fingerprints_to(FW) qdel(src) else if(S.amount < 2) user << "You need at least two sheets to add plating!" return user << "You start adding plating..." if (do_after(user, 40, target = src)) if(!src.loc || !S || S.amount < 2) return S.use(2) user << "You add the plating." var/turf/T = get_turf(src) T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]")) transfer_fingerprints_to(T) qdel(src) return add_hiddenprint(user) else if(istype(W, /obj/item/pipe)) var/obj/item/pipe/P = W if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds. if(!user.drop_item()) return P.loc = src.loc user << "You fit the pipe into \the [src]." else ..() /obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 if(istype(mover) && mover.checkpass(PASSGRILLE)) return prob(girderpasschance) else if(istype(mover, /obj/item/projectile)) return prob(girderpasschance) else return 0 /obj/structure/girder/blob_act() if(prob(40)) qdel(src) /obj/structure/girder/ex_act(severity, target) switch(severity) if(1) qdel(src) if(2) if (prob(70)) var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) new remains(loc) qdel(src) if(3) if (prob(40)) var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) new remains(loc) qdel(src) /obj/structure/girder/displaced name = "displaced girder" icon_state = "displaced" anchored = 0 state = GIRDER_DISPLACED girderpasschance = 25 layer = 2.45 /obj/structure/girder/reinforced name = "reinforced girder" icon_state = "reinforced" state = GIRDER_REINF girderpasschance = 0 /obj/structure/girder/reinforced/ex_act(severity, target) switch(severity) if(1) qdel(src) if(2) if (prob(30)) var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) new remains(loc) qdel(src) if(3) if (prob(5)) var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) new remains(loc) qdel(src) //////////////////////////////////////////// cult girder ////////////////////////////////////////////// /obj/structure/cultgirder icon= 'icons/obj/cult.dmi' icon_state= "cultgirder" anchored = 1 density = 1 layer = 2 /obj/structure/cultgirder/attackby(obj/item/W, mob/user, params) add_fingerprint(user) if(istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W if(WT.remove_fuel(0,user)) playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) user << "You start slicing apart the girder..." if(do_after(user, 40/W.toolspeed, target = src)) if( !WT.isOn() ) return user << "You slice apart the girder." var/obj/effect/decal/remains/human/R = new (get_turf(src)) transfer_fingerprints_to(R) qdel(src) else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter)) user << "You start slicing apart the girder..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, 30, target = src)) user << "You slice apart the girder." var/obj/effect/decal/remains/human/R = new (get_turf(src)) transfer_fingerprints_to(R) qdel(src) else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W user << "Your jackhammer smashes through the girder!" var/obj/effect/decal/remains/human/R = new (get_turf(src)) transfer_fingerprints_to(R) D.playDigSound() qdel(src) /obj/structure/cultgirder/blob_act() if(prob(40)) qdel(src) /obj/structure/cultgirder/ex_act(severity, target) switch(severity) if(1) qdel(src) if(2) if(prob(30)) new /obj/effect/decal/remains/human(loc) qdel(src) if(3) if(prob(5)) new /obj/effect/decal/remains/human(loc) qdel(src)