/* In this file: * * Plating * Airless * Airless plating * Engine floor * Foam plating */ /turf/open/floor/plating name = "plating" icon_state = "plating" intact = FALSE var/attachment_holes = TRUE /turf/open/floor/plating/examine(mob/user) ..() if(broken || burnt) to_chat(user, "It looks like the dents could be welded smooth.") return if(attachment_holes) to_chat(user, "There are a few attachment holes for a new tile or reinforcement rods.") else to_chat(user, "You might be able to build ontop of it with some tiles...") /turf/open/floor/plating/Initialize() if (!broken_states) broken_states = list("platingdmg1", "platingdmg2", "platingdmg3") if (!burnt_states) burnt_states = list("panelscorched") . = ..() if(!attachment_holes || (!broken && !burnt)) icon_plating = icon_state else icon_plating = initial(icon_state) /turf/open/floor/plating/update_icon() if(!..()) return if(!broken && !burnt) icon_state = icon_plating //Because asteroids are 'platings' too. /turf/open/floor/plating/attackby(obj/item/C, mob/user, params) if(..()) return if(istype(C, /obj/item/stack/rods) && attachment_holes) if(broken || burnt) to_chat(user, "Repair the plating first!") return var/obj/item/stack/rods/R = C if (R.get_amount() < 2) to_chat(user, "You need two rods to make a reinforced floor!") return else to_chat(user, "You begin reinforcing the floor...") if(do_after(user, 30, target = src)) if (R.get_amount() >= 2 && !istype(src, /turf/open/floor/engine)) ChangeTurf(/turf/open/floor/engine) playsound(src, 'sound/items/deconstruct.ogg', 80, 1) R.use(2) to_chat(user, "You reinforce the floor.") return else if(istype(C, /obj/item/stack/tile)) if(!broken && !burnt) for(var/obj/O in src) if(O.level == 1) //ex. pipes laid underneath a tile for(var/M in O.buckled_mobs) to_chat(user, "Someone is buckled to \the [O]! Unbuckle [M] to move \him out of the way.") return var/obj/item/stack/tile/W = C if(!W.use(1)) return var/turf/open/floor/T = ChangeTurf(W.turf_type) if(istype(W, /obj/item/stack/tile/light)) //TODO: get rid of this ugly check somehow var/obj/item/stack/tile/light/L = W var/turf/open/floor/light/F = T F.state = L.state playsound(src, 'sound/weapons/genhit.ogg', 50, 1) else to_chat(user, "This section is too damaged to support a tile! Use a welder to fix the damage.") else if(istype(C, /obj/item/weldingtool)) var/obj/item/weldingtool/welder = C if( welder.isOn() && (broken || burnt) ) if(welder.remove_fuel(0,user)) to_chat(user, "You fix some dents on the broken plating.") playsound(src, welder.usesound, 80, 1) icon_state = icon_plating burnt = 0 broken = 0 /turf/open/floor/plating/foam name = "metal foam plating" desc = "Thin, fragile flooring created with metal foam." icon_state = "foam_plating" /turf/open/floor/plating/foam/burn_tile() return //jetfuel can't melt steel foam /turf/open/floor/plating/foam/break_tile() return //jetfuel can't break steel foam... /turf/open/floor/plating/foam/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/tile/plasteel)) var/obj/item/stack/tile/plasteel/P = I if(P.use(1)) var/obj/L = locate(/obj/structure/lattice) in src if(L) qdel(L) to_chat(user, "You reinforce the foamed plating with tiling.") playsound(src, 'sound/weapons/Genhit.ogg', 50, TRUE) ChangeTurf(/turf/open/floor/plating) else playsound(src, 'sound/weapons/tap.ogg', 100, TRUE) //The attack sound is muffled by the foam itself user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) if(prob(I.force * 20 - 25)) user.visible_message("[user] smashes through [src]!", \ "You smash through [src] with [I]!") ScrapeAway() else to_chat(user, "You hit [src], to no effect!") /turf/open/floor/plating/foam/ex_act() ..() ScrapeAway()