Allowing energy weapons and chainswords to slice apart regular walls (#645)

All energy weapons and chainswords can slice apart regular walls, as suggest in the forums, sometime ago.
This commit is contained in:
Alberyk
2016-08-02 15:46:35 -03:00
committed by skull132
parent c9f53b0923
commit 83ed43896e
5 changed files with 85 additions and 2 deletions

View File

@@ -35,10 +35,10 @@
/obj/item/weapon/melee/chainsword/attack_self(mob/user)
active= !active
if(active)
playsound(user, 'sound/weapons/circsawhit.ogg', 50, 1)
playsound(user, 'sound/weapons/chainsawhit.ogg', 50, 1)
user << "\blue \The [src] rumbles to life."
force = 35
hitsound = 'sound/weapons/circsawhit.ogg'
hitsound = 'sound/weapons/chainsawhit.ogg'
icon_state = "chainswordon"
slot_flags = null
else

View File

@@ -76,6 +76,37 @@
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/WT = W
if(WT.active)
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
if(!src) return
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
if(!src) return
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/melee/chainsword))
var/obj/item/weapon/melee/chainsword/WT = W
if(WT.active)
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,60))
if(!src) return
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "<span class='notice'>You drill through the girder!</span>"
dismantle()
@@ -252,3 +283,31 @@
user << "<span class='notice'>You drill through the girder!</span>"
new /obj/effect/decal/remains/human(get_turf(src))
dismantle()
else if(istype(W, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/WT = W
if(WT.active)
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return
else if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/melee/chainsword))
var/obj/item/weapon/melee/chainsword/WT = W
if(WT.active)
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,60))
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return

View File

@@ -174,10 +174,28 @@
dismantle_verb = "cutting"
dismantle_sound = 'sound/items/Welder.ogg'
cut_delay *= 0.7
else if(istype(W,/obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/WT = W
if(WT.active)
dismantle_sound = "sparks"
dismantle_verb = "slicing"
cut_delay *= 0.5
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return
else if(istype(W,/obj/item/weapon/melee/energy/blade))
dismantle_sound = "sparks"
dismantle_verb = "slicing"
cut_delay *= 0.5
else if(istype(W,/obj/item/weapon/melee/chainsword))
var/obj/item/weapon/melee/chainsword/WT = W
if(WT.active)
dismantle_sound = "sound/weapons/chainsawhit.ogg"
dismantle_verb = "slicing"
cut_delay *= 0.8
else
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
return
else if(istype(W,/obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
dismantle_verb = P.drill_verb

View File

@@ -0,0 +1,6 @@
author: Alberyk
delete-after: True
changes:
- rscadd: "Melee energy weapons, such as sword, glaives and axes, can now slice apart regular walls and their girders."

Binary file not shown.