mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
TG: (Paperwork overhaul, not actually added until we decide what to do with it.)
Large bureaucracy overhaul. This affects clipboards, hand labelers, paper, paper bins, pens, photocopiers, and stamps. Everything (that I've changed significantly) should be BETTER. NO paths have been changed. All of the above have been added to the paperwork module (pending rename to bureaucracy, which is COOLER). SPRITES for most of the above (except photocopiers) are now in bureaucracy.dmi. Clipboards in particular are MASSIVELY IMPROVED. Hand labelers can now be turned ON AND OFF, to make it simpler to avoid labelling tables. This includes work in progress FOLDERS, which currently do NOTHING. Revision: r3253 Author: petethegoat
This commit is contained in:
@@ -124,6 +124,7 @@
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/mob/organ"
|
||||
#define FILE_DIR "code/modules/mob/simple_animal"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
#define FILE_DIR "code/modules/power/antimatter"
|
||||
#define FILE_DIR "code/modules/power/singularity"
|
||||
|
||||
230
code/game/objects/items/weapons/wrappingpaper.dm
Normal file
230
code/game/objects/items/weapons/wrappingpaper.dm
Normal file
@@ -0,0 +1,230 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
WRAPPING PAPER
|
||||
GIFTS
|
||||
BEDSHEET BIN
|
||||
PHOTOGRAPHS
|
||||
|
||||
*/
|
||||
// WRAPPING PAPER
|
||||
|
||||
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (!( locate(/obj/structure/table, src.loc) ))
|
||||
user << "\blue You MUST put the paper on a table!"
|
||||
if (W.w_class < 4)
|
||||
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
|
||||
var/a_used = 2 ** (src.w_class - 1)
|
||||
if (src.amount < a_used)
|
||||
user << "\blue You need more paper!"
|
||||
return
|
||||
else
|
||||
src.amount -= a_used
|
||||
user.drop_item()
|
||||
var/obj/item/weapon/gift/G = new /obj/item/weapon/gift( src.loc )
|
||||
G.size = W.w_class
|
||||
G.w_class = G.size + 1
|
||||
G.icon_state = text("gift[]", G.size)
|
||||
G.gift = W
|
||||
W.loc = G
|
||||
G.add_fingerprint(user)
|
||||
W.add_fingerprint(user)
|
||||
src.add_fingerprint(user)
|
||||
if (src.amount <= 0)
|
||||
new /obj/item/weapon/c_tube( src.loc )
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "\blue You need scissors!"
|
||||
else
|
||||
user << "\blue The object is FAR too large!"
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/wrapping_paper/examine()
|
||||
set src in oview(1)
|
||||
|
||||
..()
|
||||
usr << text("There is about [] square units of paper left!", src.amount)
|
||||
return
|
||||
|
||||
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
|
||||
if (!istype(target, /mob/living/carbon/human)) return
|
||||
if (istype(target:wear_suit, /obj/item/clothing/suit/straight_jacket) || target:stat)
|
||||
if (src.amount > 2)
|
||||
var/obj/effect/spresent/present = new /obj/effect/spresent (target:loc)
|
||||
src.amount -= 2
|
||||
|
||||
if (target:client)
|
||||
target:client:perspective = EYE_PERSPECTIVE
|
||||
target:client:eye = present
|
||||
|
||||
target:loc = present
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to wrap [target.name] ([target.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) used the [src.name] to wrap [target.name] ([target.ckey])</font>")
|
||||
|
||||
else
|
||||
user << "/blue You need more paper."
|
||||
else
|
||||
user << "Theyre moving around too much. a Straitjacket would help."
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// GIFTS
|
||||
|
||||
/obj/item/weapon/gift/attack_self(mob/user as mob)
|
||||
if(!src.gift)
|
||||
user << "\blue The gift was empty!"
|
||||
del(src)
|
||||
src.gift.loc = user
|
||||
if (user.hand)
|
||||
user.l_hand = src.gift
|
||||
else
|
||||
user.r_hand = src.gift
|
||||
src.gift.layer = 20
|
||||
src.gift.add_fingerprint(user)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/a_gift/ex_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/spresent/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
user << "\blue You cant move."
|
||||
|
||||
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wirecutters))
|
||||
user << "/blue I need wirecutters for that."
|
||||
return
|
||||
|
||||
user << "\blue You cut open the present."
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/weapon/a_gift/attack_self(mob/M as mob)
|
||||
switch(pick("flash", "t_gun", "l_gun", "shield", "sword", "axe"))
|
||||
if("flash")
|
||||
var/obj/item/device/flash/W = new /obj/item/device/flash( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
else
|
||||
M.r_hand = W
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("l_gun")
|
||||
var/obj/item/weapon/gun/energy/laser/W = new /obj/item/weapon/gun/energy/laser( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
else
|
||||
M.r_hand = W
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("t_gun")
|
||||
var/obj/item/weapon/gun/energy/taser/W = new /obj/item/weapon/gun/energy/taser( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
else
|
||||
M.r_hand = W
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("sword")
|
||||
var/obj/item/weapon/melee/energy/sword/W = new /obj/item/weapon/melee/energy/sword( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
else
|
||||
M.r_hand = W
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if("axe")
|
||||
var/obj/item/weapon/melee/energy/axe/W = new /obj/item/weapon/melee/energy/axe( M )
|
||||
if (M.hand)
|
||||
M.l_hand = W
|
||||
else
|
||||
M.r_hand = W
|
||||
W.layer = 20
|
||||
W.add_fingerprint(M)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
// BEDSHEET BIN
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/bedsheet))
|
||||
//W = null
|
||||
del(W)
|
||||
src.amount++
|
||||
return
|
||||
|
||||
/obj/structure/bedsheetbin/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
|
||||
if (src.amount >= 1)
|
||||
src.amount--
|
||||
new /obj/item/weapon/bedsheet( src.loc )
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bedsheetbin/examine()
|
||||
set src in oview(1)
|
||||
|
||||
src.amount = round(src.amount)
|
||||
if (src.amount <= 0)
|
||||
src.amount = 0
|
||||
usr << "There are no bed sheets in the bin."
|
||||
else
|
||||
if (src.amount == 1)
|
||||
usr << "There is one bed sheet in the bin."
|
||||
else
|
||||
usr << text("There are [] bed sheets in the bin.", src.amount)
|
||||
return
|
||||
|
||||
// PHOTOGRAPH
|
||||
|
||||
/obj/item/weapon/paper/photograph/New()
|
||||
|
||||
..()
|
||||
src.pixel_y = 0
|
||||
src.pixel_x = 0
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
|
||||
|
||||
var/n_name = input(user, "What would you like to label the photo?", "Paper Labelling", null) as text
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if ((src.loc == user && user.stat == 0))
|
||||
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
144
code/modules/paperwork/clipboard.dm
Normal file
144
code/modules/paperwork/clipboard.dm
Normal file
@@ -0,0 +1,144 @@
|
||||
/obj/item/weapon/clipboard
|
||||
name = "clipboard"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "clipboard"
|
||||
item_state = "clipboard"
|
||||
throwforce = 0
|
||||
w_class = 2.0
|
||||
throw_speed = 3
|
||||
throw_range = 10
|
||||
var/obj/item/weapon/pen/haspen //The stored pen.
|
||||
var/obj/item/weapon/paper/toppaper //The topmost piece of paper.
|
||||
flags = FPRINT | TABLEPASS | ONBELT
|
||||
|
||||
/obj/item/weapon/clipboard/New()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/clipboard/MouseDrop(obj/over_object as obj) //Quick clipboard fix. -Agouri
|
||||
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if (!(istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if((!(M.restrained()) && !(M.stat)))
|
||||
if(over_object.name == "r_hand")
|
||||
if(!(M.r_hand))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if(over_object.name == "l_hand")
|
||||
if(!(M.l_hand))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/clipboard/update_icon()
|
||||
overlays = null
|
||||
if(toppaper)
|
||||
overlays += toppaper.icon_state
|
||||
overlays += toppaper.overlays
|
||||
if(haspen)
|
||||
overlays += "clipboard_pen"
|
||||
overlays += "clipboard_over"
|
||||
return
|
||||
|
||||
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/paper))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
toppaper = W
|
||||
user << "\blue You clip the paper onto the clipboard."
|
||||
update_icon()
|
||||
else if(toppaper)
|
||||
toppaper.attackby(usr.get_active_hand(), usr)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/clipboard/attack_self(mob/user as mob)
|
||||
var/dat = "<title>Clipboard</title>"
|
||||
if (haspen)
|
||||
dat += "<A href='?src=\ref[src];pen=1'>Remove Pen</A><BR><HR>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];addpen=1'>Add Pen</A><BR><HR>"
|
||||
|
||||
//The topmost paper. I don't think there's any way to organise contents in byond, so this is what we're stuck with. -Pete
|
||||
if(toppaper)
|
||||
var/obj/item/weapon/paper/P = toppaper
|
||||
dat += "<A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A> - <A href='?src=\ref[src];read=\ref[P]'>[P.name]</A><BR><HR>"
|
||||
|
||||
for(P in src)
|
||||
if(P == toppaper)
|
||||
continue
|
||||
dat += "<A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A> <A href='?src=\ref[src];top=\ref[P]'>Move to top</A> - <A href='?src=\ref[src];read=\ref[P]'>[P.name]</A><BR>"
|
||||
user << browse(dat, "window=clipboard")
|
||||
onclose(user, "clipboard")
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/clipboard/Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
|
||||
if (usr.contents.Find(src))
|
||||
|
||||
if(href_list["pen"])
|
||||
if(haspen)
|
||||
haspen.loc = usr.loc
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hand(haspen)
|
||||
haspen = null
|
||||
|
||||
if(href_list["addpen"])
|
||||
if(!haspen)
|
||||
if(istype(usr.get_active_hand(), /obj/item/weapon/pen))
|
||||
var/obj/item/weapon/pen/W = usr.get_active_hand()
|
||||
usr.drop_item()
|
||||
W.loc = src
|
||||
haspen = W
|
||||
usr << "\blue You slot the pen into the clipboard."
|
||||
|
||||
if(href_list["write"])
|
||||
var/obj/item/P = locate(href_list["write"])
|
||||
if(P)
|
||||
if(usr.get_active_hand())
|
||||
P.attackby(usr.get_active_hand(), usr)
|
||||
|
||||
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(P == toppaper)
|
||||
var/obj/item/weapon/paper/newtop = locate(/obj/item/weapon/paper in src)
|
||||
if(newtop && (newtop != toppaper))
|
||||
toppaper = newtop
|
||||
else
|
||||
toppaper = null
|
||||
|
||||
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]")
|
||||
|
||||
if(href_list["top"])
|
||||
var/obj/item/P = locate(href_list["top"])
|
||||
if(P)
|
||||
toppaper = P
|
||||
usr << "You move [P.name] to the top."
|
||||
|
||||
//Update everything
|
||||
attack_self(usr)
|
||||
update_icon()
|
||||
return
|
||||
37
code/modules/paperwork/filingcabinet.dm
Normal file
37
code/modules/paperwork/filingcabinet.dm
Normal file
@@ -0,0 +1,37 @@
|
||||
/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
|
||||
spawn()
|
||||
icon_state = "filing_cabinet1"
|
||||
sleep(5)
|
||||
icon_state = "filing_cabinet0"
|
||||
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
|
||||
86
code/modules/paperwork/folders.dm
Normal file
86
code/modules/paperwork/folders.dm
Normal file
@@ -0,0 +1,86 @@
|
||||
//THIS IS OBVIOUSLY WIP, SORRY -PETE
|
||||
/obj/item/weapon/folder
|
||||
name = "folder"
|
||||
desc = "A folder."
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "folder"
|
||||
w_class = 2
|
||||
|
||||
/obj/item/weapon/folder/blue
|
||||
desc = "A blue folder."
|
||||
icon_state = "folder_blue"
|
||||
|
||||
/obj/item/weapon/folder/red
|
||||
desc = "A red folder."
|
||||
icon_state = "folder_red"
|
||||
|
||||
/obj/item/weapon/folder/yellow
|
||||
desc = "A yellow folder."
|
||||
icon_state = "folder_yellow"
|
||||
|
||||
/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) || istype(W, /obj/item/weapon/photo))
|
||||
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>"
|
||||
for(var/obj/item/weapon/photo/Ph in src)
|
||||
dat += "<A href='?src=\ref[src];remove=\ref[Ph]'>Remove</A> - [Ph.name]<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
|
||||
53
code/modules/paperwork/handlabeler.dm
Normal file
53
code/modules/paperwork/handlabeler.dm
Normal file
@@ -0,0 +1,53 @@
|
||||
/obj/item/weapon/hand_labeler
|
||||
name = "Hand labeler"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "labeler0"
|
||||
item_state = "flight"
|
||||
var/label = null
|
||||
var/labels_left = 30
|
||||
var/mode = 0 //off or on.
|
||||
|
||||
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
|
||||
if(!mode) //if it's off, give up.
|
||||
return
|
||||
if(A==loc) // if placing the labeller into something (e.g. backpack)
|
||||
return // don't set a label
|
||||
|
||||
if(!labels_left)
|
||||
user << "\blue No labels left."
|
||||
return
|
||||
if(!label || !length(label))
|
||||
user << "\blue No text set."
|
||||
return
|
||||
if(length(A.name) + length(label) > 64)
|
||||
user << "\blue Label too big."
|
||||
return
|
||||
if(ishuman(A))
|
||||
user << "\blue You can't label humans."
|
||||
return
|
||||
if(issilicon(A))
|
||||
user << "\blue You can't label cyborgs."
|
||||
return
|
||||
|
||||
for(var/mob/M in viewers())
|
||||
if ((M.client && !( M.blinded )))
|
||||
M << "\blue [user] labels [A] as [label]."
|
||||
A.name = "[A.name] ([label])"
|
||||
|
||||
/obj/item/weapon/hand_labeler/attack_self()
|
||||
mode = !mode
|
||||
icon_state = "labeler[mode]"
|
||||
if(mode)
|
||||
usr << "\blue You turn on the hand labeler."
|
||||
//Now let them chose the text.
|
||||
var/str = input(usr,"Label text?","Set label","")
|
||||
if(!str || !length(str))
|
||||
usr << "\red Invalid text."
|
||||
return
|
||||
if(length(str) > 64)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
label = str
|
||||
usr << "\blue You set the text to '[str]'."
|
||||
else
|
||||
usr << "\blue You turn off the hand labeler."
|
||||
287
code/modules/paperwork/paper.dm
Normal file
287
code/modules/paperwork/paper.dm
Normal file
@@ -0,0 +1,287 @@
|
||||
/obj/item/weapon/paper
|
||||
name = "paper"
|
||||
gender = PLURAL
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "paper"
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 15
|
||||
layer = 4
|
||||
|
||||
var
|
||||
info //What's actually written on the paper.
|
||||
info_links //A different version of the paper which includes html links at fields and EOF
|
||||
stamps //The (text for the) stamps on the paper.
|
||||
fields //Amount of user created fields
|
||||
list/stamped
|
||||
see_face = 1
|
||||
body_parts_covered = HEAD
|
||||
protective_temperature = 0
|
||||
rigged = 0
|
||||
spam_flag = 0
|
||||
|
||||
const
|
||||
deffont = "Verdana"
|
||||
signfont = "Times New Roman"
|
||||
crayonfont = "Comic Sans MS"
|
||||
|
||||
New()
|
||||
..()
|
||||
src.pixel_y = rand(-8, 8)
|
||||
src.pixel_x = rand(-9, 9)
|
||||
spawn(2)
|
||||
if(src.info)
|
||||
src.overlays += "paper_words"
|
||||
updateinfolinks()
|
||||
return
|
||||
|
||||
update_icon()
|
||||
if(src.info)
|
||||
src.overlays += "paper_words"
|
||||
return
|
||||
|
||||
examine()
|
||||
set src in oview(1)
|
||||
|
||||
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
|
||||
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
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
return
|
||||
|
||||
verb/rename()
|
||||
set name = "Rename paper"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if ((usr.mutations & CLUMSY) && prob(50))
|
||||
usr << "\red You cut yourself on the paper."
|
||||
return
|
||||
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if ((loc == usr && usr.stat == 0))
|
||||
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
examine()
|
||||
if(rigged && (Holiday == "April Fool's Day"))
|
||||
if(spam_flag == 0)
|
||||
spam_flag = 1
|
||||
playsound(src.loc, 'bikehorn.ogg', 50, 1)
|
||||
spawn(20)
|
||||
spam_flag = 0
|
||||
return
|
||||
|
||||
attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
var/dist
|
||||
if (istype(user) && user.current) //is AI
|
||||
dist = get_dist(src, user.current)
|
||||
else //cyborg or AI not seeing through a camera
|
||||
dist = get_dist(src, user)
|
||||
if (dist < 2)
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
|
||||
onclose(usr, "[name]")
|
||||
return
|
||||
|
||||
proc
|
||||
addtofield(var/id, var/text, var/links = 0)
|
||||
var/locid = 0
|
||||
var/laststart = 1
|
||||
var/textindex = 1
|
||||
while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck
|
||||
var/istart = 0
|
||||
if(links)
|
||||
istart = findtext(info_links, "<span class=\"paper_field\">", laststart)
|
||||
else
|
||||
istart = findtext(info, "<span class=\"paper_field\">", laststart)
|
||||
|
||||
if(istart==0)
|
||||
return // No field found with matching id
|
||||
|
||||
laststart = istart+1
|
||||
locid++
|
||||
if(locid == id)
|
||||
var/iend = 1
|
||||
if(links)
|
||||
iend = findtext(info_links, "</span>", istart)
|
||||
else
|
||||
iend = findtext(info, "</span>", istart)
|
||||
|
||||
//textindex = istart+26
|
||||
textindex = iend
|
||||
break
|
||||
|
||||
if(links)
|
||||
var/before = copytext(info_links, 1, textindex)
|
||||
var/after = copytext(info_links, textindex)
|
||||
info_links = before + text + after
|
||||
else
|
||||
var/before = copytext(info, 1, textindex)
|
||||
var/after = copytext(info, textindex)
|
||||
info = before + text + after
|
||||
updateinfolinks()
|
||||
|
||||
updateinfolinks()
|
||||
info_links = info
|
||||
var/i = 0
|
||||
for(i=1,i<=fields,i++)
|
||||
addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
|
||||
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
|
||||
|
||||
parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0)
|
||||
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
|
||||
|
||||
t = dd_replacetext(t, "\[center\]", "<center>")
|
||||
t = dd_replacetext(t, "\[/center\]", "</center>")
|
||||
t = dd_replacetext(t, "\[br\]", "<BR>")
|
||||
t = dd_replacetext(t, "\[b\]", "<B>")
|
||||
t = dd_replacetext(t, "\[/b\]", "</B>")
|
||||
t = dd_replacetext(t, "\[i\]", "<I>")
|
||||
t = dd_replacetext(t, "\[/i\]", "</I>")
|
||||
t = dd_replacetext(t, "\[u\]", "<U>")
|
||||
t = dd_replacetext(t, "\[/u\]", "</U>")
|
||||
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">")
|
||||
t = dd_replacetext(t, "\[/large\]", "</font>")
|
||||
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
|
||||
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
|
||||
|
||||
if(!iscrayon)
|
||||
t = dd_replacetext(t, "\[*\]", "<li>")
|
||||
t = dd_replacetext(t, "\[hr\]", "<HR>")
|
||||
t = dd_replacetext(t, "\[small\]", "<font size = \"1\">")
|
||||
t = dd_replacetext(t, "\[/small\]", "</font>")
|
||||
t = dd_replacetext(t, "\[list\]", "<ul>")
|
||||
t = dd_replacetext(t, "\[/list\]", "</ul>")
|
||||
|
||||
t = "<font face=\"[deffont]\" color=[P.colour]>[t]</font>"
|
||||
else // If it is a crayon, and he still tries to use these, make them empty!
|
||||
t = dd_replacetext(t, "\[*\]", "")
|
||||
t = dd_replacetext(t, "\[hr\]", "")
|
||||
t = dd_replacetext(t, "\[small\]", "")
|
||||
t = dd_replacetext(t, "\[/small\]", "")
|
||||
t = dd_replacetext(t, "\[list\]", "")
|
||||
t = dd_replacetext(t, "\[/list\]", "")
|
||||
|
||||
t = "<font face=\"[crayonfont]\" color=[P.colour]><b>[t]</b></font>"
|
||||
|
||||
//Count the fields
|
||||
var/laststart = 1
|
||||
while(1)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
|
||||
if(i==0)
|
||||
break
|
||||
laststart = i+1
|
||||
fields++
|
||||
|
||||
return t
|
||||
|
||||
openhelp(mob/user as mob)
|
||||
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
|
||||
<BODY>
|
||||
<b><center>Crayon&Pen commands</center></b><br>
|
||||
<br>
|
||||
\[br\] : Creates a linebreak.<br>
|
||||
\[center\] - \[/center\] : Centers the text.<br>
|
||||
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br>
|
||||
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br>
|
||||
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br>
|
||||
\[large\] - \[/large\] : Increases the <font size = \"4\">size</font> of the text.<br>
|
||||
\[sign\] : Inserts a signature of your name in a foolproof way.<br>
|
||||
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
|
||||
<br>
|
||||
<b><center>Pen exclusive commands</center></b><br>
|
||||
\[small\] - \[/small\] : Decreases the <font size = \"1\">size</font> of the text.<br>
|
||||
\[list\] - \[/list\] : A list.<br>
|
||||
\[*\] : A dot used for lists.<br>
|
||||
\[hr\] : Adds a horizontal rule.
|
||||
</BODY></HTML>"}, "window=paper_help")
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()))
|
||||
return
|
||||
|
||||
if(href_list["write"])
|
||||
var/id = href_list["write"]
|
||||
var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text
|
||||
|
||||
var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
|
||||
var/iscrayon = 0
|
||||
if(!istype(i, /obj/item/weapon/pen))
|
||||
if(!istype(i, /obj/item/toy/crayon))
|
||||
return
|
||||
iscrayon = 1
|
||||
|
||||
|
||||
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write
|
||||
return
|
||||
|
||||
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
|
||||
|
||||
if(id!="end")
|
||||
addtofield(text2num(id), t) // He wants to edit a field, let him.
|
||||
else
|
||||
info += t // Oh, he wants to edit to the end of the file, let him.
|
||||
updateinfolinks()
|
||||
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window
|
||||
|
||||
if(!overlays.Find("paper_words"))
|
||||
overlays += "paper_words"
|
||||
|
||||
attackby(obj/item/weapon/P as obj, mob/user as mob)
|
||||
..()
|
||||
var/clown = 0
|
||||
if(user.mind && (user.mind.assigned_role == "Clown"))
|
||||
clown = 1
|
||||
|
||||
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
|
||||
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
|
||||
//openhelp(user)
|
||||
return
|
||||
else if(istype(P, /obj/item/weapon/stamp))
|
||||
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
|
||||
return
|
||||
|
||||
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
|
||||
|
||||
switch(P.type)
|
||||
if(/obj/item/weapon/stamp/captain)
|
||||
overlays += "paper_stamped_cap"
|
||||
if(/obj/item/weapon/stamp/hop)
|
||||
overlays += "paper_stamped_hop"
|
||||
if(/obj/item/weapon/stamp/hos)
|
||||
overlays += "paper_stamped_hos"
|
||||
if(/obj/item/weapon/stamp/ce)
|
||||
overlays += "paper_stamped_ce"
|
||||
if(/obj/item/weapon/stamp/rd)
|
||||
overlays += "paper_stamped_rd"
|
||||
if(/obj/item/weapon/stamp/cmo)
|
||||
overlays += "paper_stamped_cmo"
|
||||
if(/obj/item/weapon/stamp/denied)
|
||||
overlays += "paper_stamped_denied"
|
||||
if(/obj/item/weapon/stamp/clown)
|
||||
if (!clown)
|
||||
usr << "\red You are totally unable to use the stamp. HONK!"
|
||||
return
|
||||
else
|
||||
overlays += "paper_stamped_clown"
|
||||
else
|
||||
overlays += "paper_stamped"
|
||||
if(!stamped)
|
||||
stamped = new
|
||||
stamped += P.type
|
||||
|
||||
user << "\blue You stamp the paper with your rubber stamp."
|
||||
add_fingerprint(user)
|
||||
return
|
||||
88
code/modules/paperwork/paperbin.dm
Normal file
88
code/modules/paperwork/paperbin.dm
Normal file
@@ -0,0 +1,88 @@
|
||||
/obj/item/weapon/paper_bin
|
||||
name = "paper bin"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "paper_bin1"
|
||||
item_state = "sheet-metal"
|
||||
throwforce = 1
|
||||
w_class = 3
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var
|
||||
amount = 30 //How much paper is in the bin.
|
||||
list/papers = new/list() //List of papers put in the bin for reference.
|
||||
sealed = 1 //If it's brandnew and unopened, it's sealed.
|
||||
|
||||
MouseDrop(mob/user as mob)
|
||||
if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if (usr.hand)
|
||||
if (!( usr.l_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 1, 1)
|
||||
return
|
||||
else
|
||||
if (!( usr.r_hand ))
|
||||
spawn( 0 )
|
||||
src.attack_hand(usr, 0, 1)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if (amount >= 1)
|
||||
amount--
|
||||
if(amount==0)
|
||||
update_icon()
|
||||
|
||||
var/obj/item/weapon/paper/P
|
||||
if (papers.len > 0) // If there's any custom paper on the stack, use that instead of creating a new paper.
|
||||
P = papers[papers.len]
|
||||
papers.Remove(P)
|
||||
else
|
||||
P = new /obj/item/weapon/paper
|
||||
if(Holiday == "April Fool's Day")
|
||||
if(prob(30))
|
||||
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
|
||||
P.rigged = 1
|
||||
P.updateinfolinks()
|
||||
|
||||
P.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hand(P)
|
||||
user << "You take a paper out of the bin."
|
||||
else
|
||||
P.loc = get_turf_loc(src)
|
||||
user << "You take a paper out of the bin."
|
||||
else
|
||||
user << "The paper bin is empty!"
|
||||
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
|
||||
if(!istype(i))
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
i.loc = src
|
||||
usr << "You put the paper on the top of the paper bin."
|
||||
papers.Add(i)
|
||||
amount++
|
||||
|
||||
examine()
|
||||
set src in oview(1)
|
||||
|
||||
if(amount)
|
||||
usr << "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin."
|
||||
else
|
||||
usr << "There are no papers in the bin."
|
||||
return
|
||||
|
||||
update_icon()
|
||||
if(amount < 1)
|
||||
icon_state = "paper_bin0"
|
||||
else
|
||||
icon_state = "paper_bin1"
|
||||
22
code/modules/paperwork/pen.dm
Normal file
22
code/modules/paperwork/pen.dm
Normal file
@@ -0,0 +1,22 @@
|
||||
/obj/item/weapon/pen
|
||||
desc = "It's a normal black ink pen."
|
||||
name = "pen"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
flags = FPRINT | ONBELT | TABLEPASS
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
m_amt = 10
|
||||
var/colour = "black" //what colour the ink is!
|
||||
|
||||
/obj/item/weapon/pen/blue
|
||||
desc = "It's a normal blue ink pen."
|
||||
icon_state = "pen_blue"
|
||||
colour = "blue"
|
||||
|
||||
/obj/item/weapon/pen/red
|
||||
desc = "It's a normal red ink pen."
|
||||
icon_state = "pen_red"
|
||||
colour = "red"
|
||||
135
code/modules/paperwork/photocopier.dm
Normal file
135
code/modules/paperwork/photocopier.dm
Normal file
@@ -0,0 +1,135 @@
|
||||
/obj/machinery/photocopier
|
||||
name = "Photocopier"
|
||||
icon = 'library.dmi'
|
||||
icon_state = "bigscanner"
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 200
|
||||
power_channel = EQUIP
|
||||
var
|
||||
obj/item/weapon/paper/copy = null //what's in the copier!
|
||||
copies = 1 //how many copies to print!
|
||||
toner = 30 //how much toner is left! woooooo~
|
||||
maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
user.machine = src
|
||||
|
||||
var/dat = "Photocopier<BR><BR>"
|
||||
if(copy)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><BR>"
|
||||
if(toner)
|
||||
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
|
||||
dat += "Printing: [copies] copies."
|
||||
dat += "<a href='byond://?src=\ref[src];min=1'>-</a> "
|
||||
dat += "<a href='byond://?src=\ref[src];add=1'>+</a><BR><BR>"
|
||||
else if(toner)
|
||||
dat += "Please insert paper to copy.<BR><BR>"
|
||||
dat += "Current toner level: [toner]"
|
||||
if(!toner)
|
||||
dat +="<BR>Please insert a new toner cartridge!"
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
if(href_list["copy"])
|
||||
if(copy)
|
||||
for(var/i = 0, i < copies, i++)
|
||||
if(toner > 0)
|
||||
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (src.loc)
|
||||
if(toner > 10) //lots of toner, make it dark
|
||||
c.info = "<font color = #101010>"
|
||||
else //no toner? shitty copies for you!
|
||||
c.info = "<font color = #808080>"
|
||||
var/copied = html_decode(copy.info)
|
||||
copied = dd_replacetext(copied, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
|
||||
copied = dd_replacetext(copied, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.crayonfont]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
|
||||
c.info += copied
|
||||
c.info += "</font>"
|
||||
c.name = copy.name // -- Doohl
|
||||
c.fields = copy.fields
|
||||
c.updateinfolinks()
|
||||
toner--
|
||||
sleep(15)
|
||||
else
|
||||
break
|
||||
updateUsrDialog()
|
||||
else if(href_list["remove"])
|
||||
if(copy)
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand())
|
||||
copy.loc = usr.loc
|
||||
usr.put_in_hand(copy)
|
||||
usr << "You take the paper out of the photocopier."
|
||||
copy = null
|
||||
updateUsrDialog()
|
||||
else if(href_list["min"])
|
||||
if(copies > 1)
|
||||
copies--
|
||||
updateUsrDialog()
|
||||
else if(href_list["add"])
|
||||
if(copies < maxcopies)
|
||||
copies++
|
||||
updateUsrDialog()
|
||||
|
||||
attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(!copy)
|
||||
user.drop_item()
|
||||
copy = O
|
||||
O.loc = src
|
||||
user << "You insert the paper into the photocopier."
|
||||
flick("bigscanner1", src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "There is already paper in the photocopier."
|
||||
else if(istype(O, /obj/item/device/toner))
|
||||
if(toner == 0)
|
||||
user.drop_item()
|
||||
del(O)
|
||||
toner = 30
|
||||
user << "You insert the toner cartridge into the photocopier."
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "This cartridge is not yet ready for replacement! Use up the rest of the toner."
|
||||
return
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
del(src)
|
||||
else
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/oil(get_turf(src))
|
||||
toner = 0
|
||||
else
|
||||
if(prob(50))
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/oil(get_turf(src))
|
||||
toner = 0
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if(prob(50))
|
||||
del(src)
|
||||
else
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/oil(get_turf(src))
|
||||
toner = 0
|
||||
return
|
||||
|
||||
/obj/item/device/toner
|
||||
name = "toner cartridge"
|
||||
icon_state = "tonercartridge"
|
||||
53
code/modules/paperwork/stamps.dm
Normal file
53
code/modules/paperwork/stamps.dm
Normal file
@@ -0,0 +1,53 @@
|
||||
/obj/item/weapon/stamp
|
||||
desc = "A rubber stamp for stamping important documents."
|
||||
name = "rubber stamp"
|
||||
icon = 'bureaucracy.dmi'
|
||||
icon_state = "stamp-qm"
|
||||
item_state = "stamp"
|
||||
flags = FPRINT | TABLEPASS
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
m_amt = 60
|
||||
var/color = "cargo"
|
||||
|
||||
/obj/item/weapon/stamp/captain
|
||||
name = "captain's rubber stamp"
|
||||
icon_state = "stamp-cap"
|
||||
color = "captain"
|
||||
|
||||
/obj/item/weapon/stamp/hop
|
||||
name = "head of personnel's rubber stamp"
|
||||
icon_state = "stamp-hop"
|
||||
color = "hop"
|
||||
|
||||
/obj/item/weapon/stamp/hos
|
||||
name = "head of security's rubber stamp"
|
||||
icon_state = "stamp-hos"
|
||||
color = "hosred"
|
||||
|
||||
/obj/item/weapon/stamp/ce
|
||||
name = "chief engineer's rubber stamp"
|
||||
icon_state = "stamp-ce"
|
||||
color = "chief"
|
||||
|
||||
/obj/item/weapon/stamp/rd
|
||||
name = "research director's rubber stamp"
|
||||
icon_state = "stamp-rd"
|
||||
color = "director"
|
||||
|
||||
/obj/item/weapon/stamp/cmo
|
||||
name = "chief medical officer's rubber stamp"
|
||||
icon_state = "stamp-cmo"
|
||||
color = "medical"
|
||||
|
||||
/obj/item/weapon/stamp/denied
|
||||
name = "\improper DENIED rubber stamp"
|
||||
icon_state = "stamp-qm"
|
||||
color = "redcoat"
|
||||
|
||||
/obj/item/weapon/stamp/clown
|
||||
name = "clown's rubber stamp"
|
||||
icon_state = "stamp-clown"
|
||||
color = "clown"
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "\improper Energy gun"
|
||||
desc = "A basic energy-based gun with two settings: Stun and kill."
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
fire_sound = 'Taser.ogg'
|
||||
|
||||
var
|
||||
@@ -9,6 +9,7 @@
|
||||
charge_cost = 100 //How much energy is needed to fire.
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
projectile_type = "/obj/item/projectile/energy"
|
||||
modifystate
|
||||
|
||||
emp_act(severity)
|
||||
power_supply.use(round(power_supply.maxcharge / severity))
|
||||
@@ -42,7 +43,10 @@
|
||||
update_icon()
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
ratio = round(ratio, 0.25) * 100
|
||||
icon_state = text("[][]", initial(icon_state), ratio)
|
||||
if(modifystate)
|
||||
icon_state = text("[][]", modifystate, ratio)
|
||||
else
|
||||
icon_state = text("[][]", initial(icon_state), ratio)
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 8.4 KiB |
Reference in New Issue
Block a user