Merge branch 'master' of https://github.com/tgstation/-tg-station into SubSystems

This commit is contained in:
carnie
2015-01-05 19:52:03 +00:00
16 changed files with 164 additions and 92 deletions
+74 -11
View File
@@ -7,25 +7,81 @@
icon = 'icons/obj/statue.dmi'
icon_state = ""
density = 1
anchored = 1
anchored = 0
var/hardness = 1
var/oreAmount = 7
var/mineralType = "metal"
var/last_event = 0
var/active = null
var/spam_flag = 0
/obj/structure/statue/Destroy()
density = 0
..()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/user)
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user as mob)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is loosening the [name]'s bolts...</span>", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user,40))
if(!src) return
if(!anchored) return
user.visible_message("<span class='notice'>[user] loosened the [name]'s bolts!</span>", \
"<span class='notice'>You loosened the [name]'s bolts!</span>")
anchored = 0
else if(!anchored)
if (!istype(src.loc, /turf/simulated/floor))
user.visible_message("<span class='danger'>A floor must be present to secure the [name]!</span>")
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is securing the [name]'s bolts...</span>", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40))
if(!src) return
if(anchored) return
user.visible_message("<span class='notice'>[user] has secured the [name]'s bolts!</span>", \
"<span class='notice'>You have secured the [name]'s bolts!</span>")
anchored = 1
/obj/structure/statue/attack_hand(mob/user)
visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>")
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user,30))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user.visible_message("<span class='notice'>[user] begins to drill apart the [name]!</span>", \
"<span class='notice'>You begin to drill apart the [name]!</span>")
if(do_after(user,5))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] destroys the [name]!</span>", \
"<span class='notice'>You destroy the [name]!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/weldingtool))
if(!anchored)
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else
hardness -= W.force/100
..()
CheckHardness()
/obj/structure/statue/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
user.visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>", \
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
/obj/structure/statue/CanAtmosPass()
return !density
@@ -83,6 +139,8 @@
hardness = 3
luminosity = 2
mineralType = "uranium"
var/last_event = 0
var/active = null
/obj/structure/statue/uranium/nuke
name = "Statue of a Nuclear Fission Explosive"
@@ -100,6 +158,7 @@
/obj/structure/statue/uranium/Bumped(atom/user)
radiate()
..()
/obj/structure/statue/uranium/attack_hand(mob/user)
radiate()
@@ -107,6 +166,7 @@
/obj/structure/statue/uranium/attack_paw(mob/user)
radiate()
..()
/obj/structure/statue/uranium/proc/radiate()
if(!active)
@@ -238,6 +298,7 @@
hardness = 3
mineralType = "bananium"
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
var/spam_flag = 0
/obj/structure/statue/bananium/clown
name = "Statue of a clown"
@@ -245,6 +306,7 @@
/obj/structure/statue/bananium/Bumped(atom/user)
honk()
..()
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user)
honk()
@@ -256,9 +318,10 @@
/obj/structure/statue/bananium/attack_paw(mob/user)
honk()
..()
/obj/structure/statue/bananium/proc/honk()
if(spam_flag == 0)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
@@ -55,6 +55,8 @@
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
qdel(src)
return
manual_unbuckle(M)
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
@@ -112,8 +114,8 @@
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) || M.anchored)
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
if (istype(M, /mob/living/carbon/slime) || istype(M, /mob/living/simple_animal/slime))
user << "\The [M] is too squishy to buckle in."
return
unbuckle()