mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Added folders and filing cabinets. Filing cabinet code jacked from BS12!
Clipboard and paper fixes. Committed Nodrak's monkey vent crawl fix and removed that dumb disposal from the Sec entrance. Additionally fixed monkeys crawling when stunned. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3274 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -3,48 +3,50 @@
|
||||
set desc = "Enter an air vent and crawl through the pipe system."
|
||||
set category = "Monkey"
|
||||
|
||||
if(contents.len)
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
|
||||
if(!stat)
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "\red That vent is welded."
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf_loc(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
if(stat == CONSCIOUS)
|
||||
if(!lying)
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
|
||||
if(!v.welded)
|
||||
vent_found = v
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
src << "\red That vent is welded."
|
||||
if(vent_found)
|
||||
if(vent_found.network&&vent_found.network.normal_members.len)
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
|
||||
if(temp_vent.loc == loc)
|
||||
continue
|
||||
vents.Add(temp_vent)
|
||||
var/list/choices = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
|
||||
if(vent.loc.z != loc.z)
|
||||
continue
|
||||
var/atom/a = get_turf_loc(vent)
|
||||
choices.Add(a.loc)
|
||||
var/turf/startloc = loc
|
||||
var/obj/selection = input("Select a destination.", "Duct System") in choices
|
||||
var/selection_position = choices.Find(selection)
|
||||
if(loc==startloc)
|
||||
if(contents.len)
|
||||
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
|
||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
|
||||
src << "\red You can't be carrying items or have items equipped when vent crawling!"
|
||||
return
|
||||
var/obj/target_vent = vents[selection_position]
|
||||
if(target_vent)
|
||||
for(var/mob/O in oviewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
|
||||
loc = target_vent.loc
|
||||
else
|
||||
src << "You need to remain still while entering a vent."
|
||||
else
|
||||
src << "This vent is not connected to anything."
|
||||
else
|
||||
src << "This vent is not connected to anything."
|
||||
src << "You must be standing on or beside an air vent to enter it."
|
||||
else
|
||||
src << "You must be standing on or beside an air vent to enter it."
|
||||
src << "You can't vent crawl while you're stunned!"
|
||||
else
|
||||
src << "You must be conscious to do this!"
|
||||
return
|
||||
@@ -122,9 +122,14 @@
|
||||
toppaper = null
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/P = locate(href_list["read"])
|
||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||
if(P)
|
||||
P.examine(usr)
|
||||
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[stars(P.info)][P.stamps]</BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
|
||||
if(href_list["top"])
|
||||
var/obj/item/P = locate(href_list["top"])
|
||||
|
||||
33
code/modules/paperwork/filingcabinet.dm
Normal file
33
code/modules/paperwork/filingcabinet.dm
Normal file
@@ -0,0 +1,33 @@
|
||||
/obj/structure/filingcabinet
|
||||
name = "filing cabinet"
|
||||
desc = "A large cabinet with drawers."
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "filing_cabinet0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder))
|
||||
user << "You put the [P] in the [src]."
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
else if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "You [anchored ? "wrench" : "unwrench"] the [src]."
|
||||
else
|
||||
user << "You can't put a [P] in the [src]!"
|
||||
|
||||
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
|
||||
if(src.contents.len <= 0)
|
||||
user << "The [src] is empty."
|
||||
return
|
||||
icon_state = "filing_cabinet1" //make it look open for kicks
|
||||
var/obj/item/P = input(user,"Choose a file or folder to take out.","[src]", "Cancel") as null|obj in contents
|
||||
if(!isnull(P) && in_range(src,user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hand(P)
|
||||
else
|
||||
P.loc = get_turf_loc(src)
|
||||
icon_state = "filing_cabinet0"
|
||||
return
|
||||
@@ -18,5 +18,67 @@
|
||||
desc = "A yellow folder."
|
||||
icon_state = "folder_yellow"
|
||||
|
||||
/obj/item/weapon/folder/attack_self()
|
||||
usr << "lol!"
|
||||
/obj/item/weapon/folder/white
|
||||
desc = "A white folder."
|
||||
icon_state = "folder_white"
|
||||
|
||||
/obj/item/weapon/folder/update_icon()
|
||||
overlays = null
|
||||
if(contents.len)
|
||||
overlays += "folder_paper"
|
||||
return
|
||||
|
||||
/obj/item/weapon/folder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/paper))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You put the [W] into the folder."
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/n_name = input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if ((loc == usr && usr.stat == 0))
|
||||
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/folder/attack_self(mob/user as mob)
|
||||
var/dat = "<title>[name]</title>"
|
||||
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += "<A href='?src=\ref[src];remove=\ref[P]'>Remove</A> - <A href='?src=\ref[src];read=\ref[P]'>[P.name]</A><BR>"
|
||||
user << browse(dat, "window=folder")
|
||||
onclose(user, "folder")
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/folder/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
|
||||
if (usr.contents.Find(src))
|
||||
|
||||
if(href_list["remove"])
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if(P)
|
||||
P.loc = usr.loc
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(P)
|
||||
else
|
||||
P.loc = get_turf(usr)
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||
if(P)
|
||||
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[stars(P.info)][P.stamps]</BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
|
||||
//Update everything
|
||||
attack_self(usr)
|
||||
update_icon()
|
||||
return
|
||||
@@ -29,19 +29,16 @@
|
||||
src.overlays += "paper_words"
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/examine(mob/user as mob)
|
||||
/obj/item/weapon/paper/examine()
|
||||
set src in oview(1)
|
||||
|
||||
//I think this is the best way to handle this! Shout at me if it isn't! -Pete
|
||||
if(!user)
|
||||
user = usr
|
||||
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
|
||||
if (!( istype(user, /mob/living/carbon/human) || istype(user, /mob/dead/observer) || istype(user, /mob/living/silicon) ))
|
||||
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(user, "[name]")
|
||||
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
else
|
||||
user << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(user, "[name]")
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/verb/rename()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.4 KiB |
14347
maps/tgstation.2.0.8.dmm
14347
maps/tgstation.2.0.8.dmm
File diff suppressed because it is too large
Load Diff
@@ -941,6 +941,8 @@
|
||||
#include "code\modules\mob\simple_animal\shade.dm"
|
||||
#include "code\modules\mob\simple_animal\worm.dm"
|
||||
#include "code\modules\paperwork\clipboard.dm"
|
||||
#include "code\modules\paperwork\filingcabinet.dm"
|
||||
#include "code\modules\paperwork\folders.dm"
|
||||
#include "code\modules\paperwork\handlabeler.dm"
|
||||
#include "code\modules\paperwork\paper.dm"
|
||||
#include "code\modules\paperwork\paperbin.dm"
|
||||
|
||||
Reference in New Issue
Block a user