Files
Yogstation/code/game/turfs/simulated/wall/reinf_walls.dm
phil235 1ea0e47aa4 Visible_message() when being attacked by melee or projectile is replaced by a simple message only to the target instead of all viewers.
The message when firing a gun is removed.
To keep things balanced melee attacks (punches, alien attacks, animal attacks, etc...) now show a visual effect (similar to what we current have with item attacks.
Fixes muzzle flash effect not appearing for mech guns.
Fixes muzzle flash effect not appearing for certain ranged animal.
Fixes the item attack effect not being visible to camera viewers and mech occupants.
Fixes toy guns foam dart not dropping on the ground when shooting a mob on the same tile as us.
Fixes toy smg magazine sprite being invisible sometimes.
Fixes foam dart not facing the correct direction when fired.
Changes the bullet projectile sprite to have a slight tracer effect so as to be more visible.
2016-10-13 19:21:30 +02:00

226 lines
7.8 KiB
Plaintext

/turf/closed/wall/r_wall
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to separate rooms."
icon = 'icons/turf/walls/reinforced_wall.dmi'
icon_state = "r_wall"
opacity = 1
density = 1
var/d_state = 0
hardness = 10
sheet_type = /obj/item/stack/sheet/plasteel
explosion_block = 2
/turf/closed/wall/r_wall/break_wall()
builtin_sheet.loc = src
return (new /obj/structure/girder/reinforced(src))
/turf/closed/wall/r_wall/devastate_wall()
builtin_sheet.loc = src
new /obj/item/stack/sheet/metal(src, 2)
/turf/closed/wall/r_wall/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
if(M.environment_smash == 3)
dismantle_wall(1)
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
else
//phil235 bang sound here
M << "<span class='warning'>This wall is far too strong for you to destroy.</span>"
/turf/closed/wall/r_wall/try_destroy(obj/item/weapon/W, mob/user, turf/T)
if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
user << "<span class='notice'>You begin to smash though the [name]...</span>"
if(do_after(user, 50, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( user.loc == T && user.get_active_held_item() == W )
D.playDigSound()
visible_message("<span class='warning'>[user] smashes through the [name] with the [D.name]!</span>", "<span class='italics'>You hear the grinding of metal.</span>")
dismantle_wall()
return 1
else if(istype(W, /obj/item/stack/sheet/metal) && d_state)
var/obj/item/stack/sheet/metal/MS = W
if (MS.get_amount() < 1)
user << "<span class='warning'>You need one sheet of metal to repair the wall!</span>"
return 1
user << "<span class='notice'>You begin patching-up the wall with \a [MS]...</span>"
if (do_after(user, max(20*d_state,100), target = src))//time taken to repair is proportional to the damage! (max 10 seconds)
if(loc == null || MS.get_amount() < 1)
return 1
MS.use(1)
src.d_state = 0
src.icon_state = "r_wall"
queue_smooth_neighbors(src)
user << "<span class='notice'>You repair the last of the damage.</span>"
return 1
return 0
/turf/closed/wall/r_wall/try_decon(obj/item/weapon/W, mob/user, turf/T)
//DECONSTRUCTION
switch(d_state)
if(0)
if (istype(W, /obj/item/weapon/wirecutters))
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
src.d_state = 1
update_icon()
user << "<span class='notice'>You cut the outer grille.</span>"
return 1
if(1)
if (istype(W, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin removing the support lines...</span>"
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
if(do_after(user, 40, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( d_state == 1 && user.loc == T && user.get_active_held_item() == W )
src.d_state = 2
update_icon()
user << "<span class='notice'>You remove the support lines.</span>"
return 1
//REPAIRING (replacing the outer grille for cosmetic damage)
else if(istype(W, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/O = W
if (O.use(1))
src.d_state = 0
update_icon()
src.icon_state = "r_wall"
user << "<span class='notice'>You replace the outer grille.</span>"
else
user << "<span class='warning'>Report this to a coder: metal stack had less than one sheet in it when trying to repair wall</span>"
return 1
return 1
if(2)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin slicing through the metal cover...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 60, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
return 0
if( d_state == 2 && user.loc == T && user.get_active_held_item() == WT )
src.d_state = 3
update_icon()
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return 1
if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
user << "<span class='notice'>You begin slicing through the metal cover...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 60, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( d_state == 2 && user.loc == T && user.get_active_held_item() == W )
src.d_state = 3
update_icon()
user << "<span class='notice'>You press firmly on the cover, dislodging it.</span>"
return 1
if(3)
if (istype(W, /obj/item/weapon/crowbar))
user << "<span class='notice'>You struggle to pry off the cover...</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 100, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( d_state == 3 && user.loc == T && user.get_active_held_item() == W )
src.d_state = 4
update_icon()
user << "<span class='notice'>You pry off the cover.</span>"
return 1
if(4)
if (istype(W, /obj/item/weapon/wrench))
user << "<span class='notice'>You start loosening the anchoring bolts which secure the support rods to their frame...</span>"
playsound(src, 'sound/items/Ratchet.ogg', 100, 1)
if(do_after(user, 40, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( d_state == 4 && user.loc == T && user.get_active_held_item() == W )
src.d_state = 5
update_icon()
user << "<span class='notice'>You remove the bolts anchoring the support rods.</span>"
return 1
if(5)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin slicing through the support rods...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 100, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !WT || !WT.isOn() || !T )
return 1
if( d_state == 5 && user.loc == T && user.get_active_held_item() == WT )
src.d_state = 6
update_icon()
user << "<span class='notice'>You slice through the support rods.</span>"
return 1
if( istype(W, /obj/item/weapon/gun/energy/plasmacutter) )
user << "<span class='notice'>You begin slicing through the support rods...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 70, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( d_state == 5 && user.loc == T && user.get_active_held_item() == W )
src.d_state = 6
update_icon()
user << "<span class='notice'>You slice through the support rods.</span>"
return 1
if(6)
if( istype(W, /obj/item/weapon/crowbar) )
user << "<span class='notice'>You struggle to pry off the outer sheath...</span>"
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 100, target = src))
if( !istype(src, /turf/closed/wall/r_wall) || !user || !W || !T )
return 1
if( user.loc == T && user.get_active_held_item() == W )
user << "<span class='notice'>You pry off the outer sheath.</span>"
dismantle_wall()
return 1
return 0
/turf/closed/wall/r_wall/proc/update_icon()
if(d_state)
icon_state = "r_wall-[d_state]"
smooth = SMOOTH_FALSE
clear_smooth_overlays()
else
smooth = SMOOTH_TRUE
icon_state = ""
/turf/closed/wall/r_wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()