More updates. The evidence bags are kinda borked.

This commit is contained in:
SkyMarshal
2011-12-26 00:03:05 -07:00
parent 8ee8875e80
commit de67b05dce
8 changed files with 128 additions and 5 deletions

View File

@@ -0,0 +1,96 @@
/obj/machinery/coatrack/attack_hand(mob/user as mob)
switch(alert("What do you want from the coatrack?",,"Coat","Hat"))
if("Coat")
if(coat)
if(!user.get_active_hand())
user.put_in_hand(coat)
else
coat.loc = get_turf(user)
coat = null
if(!hat)
icon_state = "coatrack0"
else
icon_state = "coatrack1"
return
else
user << "\blue There is no coat to take!"
return
if("Hat")
if(hat)
if(!user.get_active_hand())
user.put_in_hand(hat)
else
hat.loc = get_turf(user)
hat = null
if(!coat)
icon_state = "coatrack0"
else
icon_state = "coatrack2"
return
else
user << "\blue There is no hat to take!"
return
user << "Something went wrong."
return
/obj/machinery/coatrack/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/obj/item/I = user.equipped()
if ( istype(I,/obj/item/clothing/head/det_hat) && !hat)
user.drop_item()
I.loc = src
hat = I
if(!coat)
icon_state = "coatrack1"
else
icon_state = "coatrack3"
for(var/mob/M in viewers(src, null))
if(M.client)
M.show_message(text("\blue [user] puts his hat onto the rack."), 2)
return
if ( istype(I,/obj/item/clothing/suit/storage/det_suit) && !coat)
user.drop_item()
I.loc = src
coat = I
if(!hat)
icon_state = "coatrack2"
else
icon_state = "coatrack3"
for(var/mob/M in viewers(src, null))
if(M.client)
M.show_message(text("\blue [user] puts his coat onto the rack."), 2)
return
if ( istype(I,/obj/item/clothing/head/det_hat) && hat)
user << "There's already a hat on the rack!"
return ..()
if ( istype(I,/obj/item/clothing/suit/storage/det_suit) && coat)
user << "There's already a coat on the rack!"
return ..()
user << "The coatrack wants none of what you offer."
return ..()
/obj/machinery/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if ( istype(mover,/obj/item/clothing/head/det_hat) && !hat)
mover.loc = src
hat = mover
if(!coat)
icon_state = "coatrack1"
else
icon_state = "coatrack3"
for(var/mob/M in viewers(src, null))
if(M.client)
M.show_message(text("\blue The hat lands perfectly atop its hanger!"), 2)
return 0
if ( istype(mover,/obj/item/clothing/suit/storage/det_suit) && !coat)
mover.loc = src
coat = mover
if(!hat)
icon_state = "coatrack2"
else
icon_state = "coatrack3"
for(var/mob/M in viewers(src, null))
if(M.client)
M.show_message(text("\blue The coat lands perfectly atop its hanger!"), 2)
return 0
else
return 0

View File

@@ -135,7 +135,7 @@ obj/machinery/computer/forensic_scanning
if(istype(I, /obj/item/weapon/evidencebag))
scanning = I.contents[1]
scanning.loc = src
I.underlays -= scanning
I.underlays = null
I.icon_state = "evidenceobj"
else
scanning = I

View File

@@ -451,3 +451,13 @@
h_r = 245.0
h_g = 245.0
h_b = 245.0
/obj/machinery/coatrack
name = "coatrack"
desc = "A fancy stand for the Detective's coat and hat."
icon_state = "coatrack0"
icon = 'coatrack.dmi'
density = 1
anchored = 1.0
var/obj/item/clothing/suit/storage/det_suit/coat
var/obj/item/clothing/head/det_hat/hat

View File

@@ -232,7 +232,7 @@ What a mess.*/
Perp = new/list()
t1 = lowertext(t1)
for(var/datum/data/record/R in data_core.general)
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + R.fields["b_dna"]
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"]
if(findtext(temptext,t1))
var/prelist = new/list(2)
prelist[1] = R

View File

@@ -8,6 +8,7 @@
desc = "An empty evidence bag."
icon = 'storage.dmi'
icon_state = "evidenceobj"
w_class = 1
/* buggy and stuff
/obj/item/weapon/evidencebag/attackby(obj/item/weapon/O, mob/user as mob)
@@ -29,11 +30,24 @@
if(src.contents.len > 0)
user << "The [src] already has something inside it."
return ..()
if(istype(O.loc, /obj/item/weapon/storage))
user << "This is broke as hell."
return
/* var/obj/item/weapon/storage/U = O.loc
w_class = O.w_class
for(var/i, i < U.contents.len, i++)
if(O in U.contents[i])
U.contents[i] = null
O.loc = src
continue*/
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]"
else
O.loc = src
return
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
if (src.contents.len > 0)
@@ -41,10 +55,13 @@
user << "You take the [I] out of the [src]."
I.loc = user.loc
src.underlays -= I
w_class = 1
src.icon_state = "evidenceobj"
desc = "An empty evidence bag."
else
user << "The [src] is empty."
user << "[src] is empty."
src.icon_state = "evidenceobj"
return
/obj/item/weapon/storage/box/evidence
name = "evidence bag box"

View File

@@ -58,7 +58,7 @@
icon_state = "lamp1"
base_state = "lamp"
fitting = "bulb"
brightness = 5
brightness = 7
desc = "A desk lamp"
light_type = /obj/item/weapon/light/bulb
var/switchon = 0 // independent switching for lamps - not controlled by area lightswitch