Several fixes/additions. Will list in pull request.

This commit is contained in:
SkyMarshal
2011-12-18 20:56:39 -07:00
parent 9afbbfb2d3
commit 1c67be2707
32 changed files with 9722 additions and 66 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
new /obj/item/clothing/under/sl_suit(src)
new /obj/item/clothing/under/rank/bartender(src)
new /obj/item/clothing/under/rank/bartender(src)
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/suit/storage/wcoat(src)
new /obj/item/clothing/suit/storage/wcoat(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
+2 -2
View File
@@ -63,7 +63,7 @@
new /obj/item/clothing/under/rank/nursesuit (src)
new /obj/item/clothing/head/nursehat (src)
new /obj/item/clothing/under/rank/medical(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/device/radio/headset/headset_med(src)
new /obj/item/weapon/storage/belt/medical(src)
@@ -82,7 +82,7 @@
new /obj/item/clothing/suit/bio_suit/cmo(src)
new /obj/item/clothing/head/bio_hood/general(src)
new /obj/item/clothing/under/rank/chief_medical_officer(src)
new /obj/item/clothing/suit/labcoat/cmo(src)
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/shoes/brown (src)
new /obj/item/device/radio/headset/heads/cmo(src)
@@ -7,7 +7,7 @@
..()
sleep(2)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/device/radio/headset/headset_sci(src)
new /obj/item/weapon/tank/air(src)
@@ -27,7 +27,7 @@
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
new /obj/item/clothing/under/rank/research_director(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/device/radio/headset/heads/rd(src)
+5 -2
View File
@@ -6,7 +6,7 @@
New()
..()
sleep(2)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/storage/captunic(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest(src)
@@ -76,6 +76,7 @@
sleep(2)
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/gearharness(src)
new /obj/item/clothing/head/helmet/warden(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/flashbang_kit(src)
@@ -96,6 +97,7 @@
..()
sleep(2)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/storage/gearharness(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
@@ -125,7 +127,7 @@
sleep(2)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/suit/det_suit/armor(src)
new /obj/item/clothing/suit/det_suit(src)
new /obj/item/clothing/suit/storage/det_suit(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/shoes/brown(src)
@@ -135,6 +137,7 @@
new /obj/item/weapon/clipboard(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/weapon/pepperspray/small(src)
new /obj/item/weapon/storage/box/evidence(src)
return
+7 -7
View File
@@ -48,7 +48,7 @@
new /obj/item/clothing/under/rank/chaplain(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/suit/nun(src)
new /obj/item/clothing/suit/chaplain_hoodie(src)
new /obj/item/clothing/suit/storage/chaplain_hoodie(src)
new /obj/item/clothing/head/chaplain_hood(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/clothing/suit/hastur (src)
@@ -116,9 +116,9 @@
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
@@ -133,9 +133,9 @@
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/weapon/storage/stma_kit(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
return
/obj/structure/closet/wardrobe/grey/New()
+2 -2
View File
@@ -618,7 +618,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/mustard_gas/Move()
..()
for(var/mob/living/carbon/human/R in get_turf(src))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
else
R.burn_skin(0.75)
if (R.coughedtime != 1)
@@ -632,7 +632,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/mustard_gas/HasEntered(mob/living/carbon/human/R as mob )
..()
if (istype(R, /mob/living/carbon/human))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor)))
return
R.burn_skin(0.75)
if (R.coughedtime != 1)
+1 -1
View File
@@ -302,7 +302,7 @@ THERMAL GLASSES
else
usr << "Sorry! The suit you're wearing doesn't have buttons!"
/obj/item/clothing/suit/labcoat/verb/toggle()
/obj/item/clothing/suit/storage/labcoat/verb/toggle()
set name = "Toggle Labcoat Buttons"
set category = "Object"
if(src.icon_state == "labcoat_open")
@@ -0,0 +1,54 @@
//CONTAINS:
//Evidence bags and stuff
///////////
//Shamelessly ripped from Mini's old code.
/obj/item/weapon/evidencebag
name = "evidence bag"
desc = "An empty evidence bag."
icon = 'storage.dmi'
icon_state = "evidenceobj"
/* buggy and stuff
/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob)
return src.afterattack(O, user)
*/
/obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob)
//Now you can put it into a briefcase, if it is in your hand. Otherwise, if it is evidence on the ground, it picks it up.
if(istype(O, /obj/item/weapon/storage) && O in user)
user << "You put the evidence bag into the [O]."
return ..()
if(!(O && istype(O)) || O.anchored == 1)
user << "You can't put that inside the [src]!"
return ..()
if(src.contents.len > 0)
user << "The [src] already has something inside it."
return ..()
user << "You put the [O] inside the [src]."
O.loc = src
icon_state = "evidence"
src.underlays += O
desc = "An evidence bag containing \a [O]. [O.desc]"
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
var/obj/item/I = src.contents[1]
user << "You take the [I] out of the [src]."
I.loc = user.loc
src.underlays -= I
icon_state = "evidenceobj"
/obj/item/weapon/storage/box/evidence
name = "evidence bag box"
desc = "A box claiming to contain evidence bags."
New()
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
new /obj/item/weapon/evidencebag(src)
..()
return
+215
View File
@@ -0,0 +1,215 @@
/obj/item/clothing/suit/storage/
var/obj/screen/storage/boxes
var/obj/screen/close/closer
var/obj/slot1
var/obj/slot2
/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 9,7"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
src.closer.screen_loc = "9,7"
/obj/item/clothing/suit/storage/proc/view_inv(mob/user as mob)
if(!user)
return
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
var/xs = 7
var/ys = 7
for(var/obj/O in src.contents)
O.screen_loc = "[xs],[ys]"
O.layer = 20
xs++
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
if(!user)
return
user.s_active = src
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
/obj/item/clothing/suit/storage/MouseDrop(atom/A)
if(istype(A,/mob/living/carbon))
src.view_inv(A)
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.w_class > 2 || src.loc == W )
return
if(src.contents.len >= 2)
user << "You have nowhere to place that"
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
else if(user.s_active == src)
close(user)
view_inv(user)
W.dropped(user)
/*/obj/item/clothing/suit/storage/New()
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
spawn( 5 )
src.orient_objs(7, 8, 10, 7)
return
return
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(can_hold.len)
var/ok = 0
for(var/A in can_hold)
if(istype(W, text2path(A) )) ok = 1
if(!ok)
user << "\red This container cannot hold [W]."
return
if (src.contents.len >= 7)
return
if ((W.w_class >= 3 || istype(W, /obj/item/weapon/storage) || src.loc == W))
return
user.u_equip(W)
W.loc = src
if ((user.client && user.s_active != src))
user.client.screen -= W
src.orient2hud(user)
W.dropped(user)
add_fingerprint(user)
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
for(var/mob/O in viewers(user, null))
O.show_message(text("\blue [] has added [] to []!", user, W, src), 1)
//Foreach goto(139)
return
/obj/item/clothing/suit/storage/dropped(mob/user as mob)
src.orient_objs(7, 8, 10, 7)
return
/obj/item/clothing/suit/storage/MouseDrop(over_object, src_location, over_location)
..()
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
return src.attack_hand(user)
return
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
if (src.loc == user)
if (user.s_active)
user.s_active.close(user)
src.show_to(user)
else
..()
for(var/mob/M in range(1))
if (M.s_active == src)
src.close(M)
//Foreach goto(76)
src.orient2hud(user)
src.add_fingerprint(user)
return
/obj/item/clothing/suit/storage/proc/return_inv()
var/list/L = list( )
L += src.contents
for(var/obj/item/weapon/storage/S in src)
L += S.return_inv()
for(var/obj/item/weapon/gift/G in src)
L += G.gift
if (istype(G.gift, /obj/item/weapon/storage))
L += G.gift:return_inv()
return L
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
for(var/obj/item/weapon/mousetrap/MT in src)
if(MT.armed)
for(var/mob/O in viewers(user, null))
if(O == user)
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
else
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
MT.loc = user.loc
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
MT.layer = OBJ_LAYER
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
user.client.screen += src.boxes
user.client.screen += src.closer
user.client.screen += src.contents
user.s_active = src
return
/obj/item/clothing/suit/storage/proc/hide_from(mob/user as mob)
if(!user.client)
return
user.client.screen -= src.boxes
user.client.screen -= src.closer
user.client.screen -= src.contents
return
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
src.hide_from(user)
user.s_active = null
return
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
var/cx = tx
var/cy = ty
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, mx, my)
for(var/obj/O in src.contents)
O.screen_loc = text("[],[]", cx, cy)
O.layer = 20
cx++
if (cx > mx)
cx = tx
cy--
//Foreach goto(56)
src.closer.screen_loc = text("[],[]", mx, my)
return
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
if (src == user.l_hand)
src.orient_objs(3, 11, 3, 4)
else
if (src == user.r_hand)
src.orient_objs(1, 11, 1, 4)
else
if (src == user.back)
src.orient_objs(4, 10, 4, 3)
else
src.orient_objs(4, 10, 4, 3)
return*/