Construction Update

This commit is contained in:
SinTwo
2016-03-25 16:02:36 -04:00
parent fbbfb78dec
commit b356f5cf21
154 changed files with 2223 additions and 926 deletions
@@ -297,6 +297,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/colt/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
new /obj/item/device/flashlight/maglight(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
+15
View File
@@ -35,6 +35,21 @@
icon_state = "open"
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You start to cut the shower curtains.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10))
user << "<span class='notice'>You cut the shower curtains.</span>"
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 3
qdel(src)
return
else
src.attack_hand(user)
return
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"
+22 -3
View File
@@ -8,9 +8,19 @@
var/obj/item/weapon/extinguisher/has_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New()
/obj/structure/extinguisher_cabinet/New(var/loc, var/dir, var/building = 0)
..()
has_extinguisher = new/obj/item/weapon/extinguisher(src)
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
else
has_extinguisher = new/obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user))
@@ -23,12 +33,21 @@
user << "<span class='notice'>You place [O] in [src].</span>"
else
opened = !opened
if(istype(O, /obj/item/weapon/wrench))
if(!has_extinguisher)
user << "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the extinguisher cabinet.</span>"
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
return
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))
+3 -3
View File
@@ -107,7 +107,7 @@
if(!isliving(usr))
return
var/mob/living/user = usr
if(href_list["take"])
switch(href_list["take"])
if("garbage")
@@ -213,10 +213,10 @@
..()
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
if(user.get_type_in_hands(/obj/item/key))
step(src, direction)
update_mob()
else
+56 -6
View File
@@ -8,9 +8,18 @@
anchored = 1
var/shattered = 0
var/list/ui_users = list()
var/glass = 1
/obj/structure/mirror/New(var/loc, var/dir, var/building = 0, mob/user as mob)
if(building)
glass = 0
icon_state = "mirror_frame"
pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
return
/obj/structure/mirror/attack_hand(mob/user as mob)
if(!glass) return
if(shattered) return
if(ishuman(user))
@@ -22,6 +31,7 @@
AC.ui_interact(user)
/obj/structure/mirror/proc/shatter()
if(!glass) return
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
@@ -34,18 +44,57 @@
if(prob(Proj.get_structure_damage() * 2))
if(!shattered)
shatter()
else
else if(glass)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(shattered)
if(istype(I, /obj/item/weapon/wrench))
if(!glass)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='notice'>You unfasten the frame.</span>"
new /obj/item/frame/mirror( src.loc )
qdel(src)
return
if(istype(I, /obj/item/weapon/crowbar))
if(shattered && glass)
user << "<span class='notice'>The broken glass falls out.</span>"
icon_state = "mirror_frame"
glass = !glass
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the glass.</span>"
glass = !glass
icon_state = "mirror_frame"
new /obj/item/stack/material/glass( src.loc, 2 )
return
if(istype(I, /obj/item/stack/material/glass))
if(!glass)
var/obj/item/stack/material/glass/G = I
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add the glass to the frame.</span>"
if(do_after(user, 20))
if (G.use(2))
shattered = 0
glass = 1
icon_state = "mirror"
user << "<span class='notice'>You add the glass to the frame.</span>"
return
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
shatter()
if(glass)
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
@@ -53,13 +102,14 @@
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
if(shattered)
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
if(glass)
shatter()
else
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
return 1
+27 -8
View File
@@ -7,6 +7,18 @@
anchored = 1
var/notices = 0
/obj/structure/noticeboard/New(var/loc, var/dir, var/building = 0)
..()
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
/obj/structure/noticeboard/initialize()
for(var/obj/item/I in loc)
if(notices > 4) break
@@ -28,6 +40,14 @@
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
else
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
if(istype(O, /obj/item/weapon/wrench))
user << "<span class='notice'>You start to unwrench the noticeboard.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the noticeboard.</span>"
new /obj/item/frame/noticeboard( src.loc )
qdel(src)
return
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)
@@ -64,15 +84,14 @@
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
add_fingerprint(usr)
P.attackby(usr.r_hand, usr) //then do ittttt
else
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
add_fingerprint(usr)
P.attackby(usr.l_hand, usr)
var/mob/living/M = usr
if(istype(M))
var/obj/item/weapon/pen/E = M.get_type_in_hands(/obj/item/weapon/pen)
if(E)
add_fingerprint(M)
P.attackby(E, usr)
else
usr << "<span class='notice'>You'll need something to write with!</span>"
M << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))
+1 -1
View File
@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
if(user.get_type_in_hands(/obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])
+1 -1
View File
@@ -358,7 +358,7 @@
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"