the unexpected paperwork update. paperwork rp? And also includes ntnet upgrade because fuck it.

This commit is contained in:
Letter N
2020-08-20 19:40:47 +08:00
parent 2dd3d71b19
commit 8d70e21239
80 changed files with 1080 additions and 727 deletions
+45
View File
@@ -0,0 +1,45 @@
/obj/item/paper/carbon
name = "sheet of carbon"
icon_state = "paper_stack"
item_state = "paper"
// inhand_icon_state = "paper"
show_written_words = FALSE
var/copied = FALSE
var/iscopy = FALSE
/obj/item/paper/carbon/update_icon_state()
if(iscopy)
icon_state = "cpaper"
else if(copied)
icon_state = "paper"
else
icon_state = "paper_stack"
if(info)
icon_state = "[icon_state]_words"
/obj/item/paper/carbon/proc/removecopy(mob/living/user)
if(!copied)
var/obj/item/paper/carbon/C = src
var/copycontents = C.info
var/obj/item/paper/carbon/Copy = new /obj/item/paper/carbon(user.loc)
if(info)
copycontents = replacetext(copycontents, "<font face=\"[PEN_FONT]\" color=", "<font face=\"[PEN_FONT]\" nocolor=")
copycontents = replacetext(copycontents, "<font face=\"[CRAYON_FONT]\" color=", "<font face=\"[CRAYON_FONT]\" nocolor=")
Copy.info += copycontents
Copy.info += "</font>"
Copy.name = "Copy - [C.name]"
to_chat(user, "<span class='notice'>You tear off the carbon-copy!</span>")
C.copied = TRUE
Copy.iscopy = TRUE
Copy.update_icon_state()
C.update_icon_state()
user.put_in_hands(Copy)
else
to_chat(user, "<span class='notice'>There are no more carbon copies attached to this paper!</span>")
/obj/item/paper/carbon/on_attack_hand(mob/living/user)
if(loc == user && user.is_holding(src))
removecopy(user)
return
return ..()
+10 -9
View File
@@ -3,6 +3,8 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "clipboard"
item_state = "clipboard"
// inhand_icon_state = "clipboard"
// worn_icon_state = "clipboard"
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
@@ -34,7 +36,6 @@
. += "clipboard_pen"
. += "clipboard_over"
/obj/item/clipboard/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/paper))
if(!user.transferItemToLoc(W, src))
@@ -92,14 +93,14 @@
to_chat(usr, "<span class='notice'>You slot [W] into [src].</span>")
if(href_list["write"])
var/obj/item/P = locate(href_list["write"])
if(istype(P) && P.loc == src)
var/obj/item/P = locate(href_list["write"]) in src
if(istype(P))
if(usr.get_active_held_item())
P.attackby(usr.get_active_held_item(), usr)
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if(istype(P) && P.loc == src)
var/obj/item/P = locate(href_list["remove"]) in src
if(istype(P))
P.forceMove(usr.loc)
usr.put_in_hands(P)
if(P == toppaper)
@@ -111,13 +112,13 @@
toppaper = null
if(href_list["read"])
var/obj/item/paper/P = locate(href_list["read"])
if(istype(P) && P.loc == src)
var/obj/item/paper/P = locate(href_list["read"]) in src
if(istype(P))
usr.examinate(P)
if(href_list["top"])
var/obj/item/P = locate(href_list["top"])
if(istype(P) && P.loc == src)
var/obj/item/P = locate(href_list["top"]) in src
if(istype(P))
toppaper = P
to_chat(usr, "<span class='notice'>You move [P.name] to the top.</span>")
+13 -14
View File
@@ -35,7 +35,7 @@
. = ..()
if(mapload)
for(var/obj/item/I in loc)
if(istype(I, /obj/item/paper) || istype(I, /obj/item/folder) || istype(I, /obj/item/photo))
if(I.w_class < WEIGHT_CLASS_NORMAL) //there probably shouldn't be anything placed ontop of filing cabinets in a map that isn't meant to go in them
I.forceMove(src)
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
@@ -46,7 +46,12 @@
qdel(src)
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/paper) || istype(P, /obj/item/folder) || istype(P, /obj/item/photo) || istype(P, /obj/item/documents))
if(P.tool_behaviour == TOOL_WRENCH && user.a_intent != INTENT_HELP)
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(P.w_class < WEIGHT_CLASS_NORMAL)
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
@@ -54,11 +59,6 @@
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/wrench))
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='warning'>You can't put [P] in [src]!</span>")
else
@@ -67,9 +67,6 @@
/obj/structure/filingcabinet/ui_interact(mob/user)
. = ..()
if(isobserver(user))
return
if(contents.len <= 0)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
@@ -100,16 +97,17 @@
to_chat(user, "<span class='notice'>You find nothing in [src].</span>")
/obj/structure/filingcabinet/Topic(href, href_list)
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
return
if(href_list["retrieve"])
usr << browse("", "window=filingcabinet") // Close the menu
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
if(istype(P) && P.loc == src && in_range(src, usr))
var/obj/item/P = locate(href_list["retrieve"]) in src //contents[retrieveindex]
if(istype(P) && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
addtimer(VARSET_CALLBACK(src, icon_state, initial(icon_state)), 5)
/*
@@ -170,6 +168,7 @@
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/structure/filingcabinet/medical/on_attack_hand()
populate()
. = ..()
+11 -5
View File
@@ -33,7 +33,10 @@
if(contents.len)
. += "folder_paper"
/obj/item/folder/attackby(obj/item/W, mob/user, params)
if(burn_paper_product_attackby_check(W, user))
return
if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo) || istype(W, /obj/item/documents))
if(!user.transferItemToLoc(W, src))
return
@@ -43,11 +46,14 @@
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the cover of [src]!</span>")
return
var/inputvalue = stripped_input(user, "What would you like to label the folder?", "Folder Labelling", "", MAX_NAME_LEN)
if(!inputvalue)
return
if(user.canUseTopic(src, BE_CLOSE))
name = "folder - '[inputvalue]'"
name = "folder[(inputvalue ? " - '[inputvalue]'" : null)]"
/obj/item/folder/Destroy()
@@ -76,14 +82,14 @@
if(usr.contents.Find(src))
if(href_list["remove"])
var/obj/item/I = locate(href_list["remove"])
if(istype(I) && I.loc == src)
var/obj/item/I = locate(href_list["remove"]) in src
if(istype(I))
I.forceMove(usr.loc)
usr.put_in_hands(I)
if(href_list["read"])
var/obj/item/I = locate(href_list["read"])
if(istype(I) && I.loc == src)
var/obj/item/I = locate(href_list["read"]) in src
if(istype(I))
usr.examinate(I)
//Update everything
+10 -5
View File
@@ -1,9 +1,10 @@
/obj/item/hand_labeler
name = "hand labeler"
desc = "A combined label printer and applicator in a portable device, designed to be easy to operate and use."
desc = "A combined label printer, applicator, and remover, all in a single portable device. Designed to be easy to operate and use."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler0"
item_state = "flight"
// inhand_icon_state = "flight"
var/label = null
var/labels_left = 30
var/mode = 0
@@ -55,9 +56,10 @@
to_chat(user, "<span class='warning'>You can't label creatures!</span>") // use a collar
return
user.visible_message("[user] labels [A] as [label].", \
"<span class='notice'>You label [A] as [label].</span>")
A.name = "[A.name] ([label])"
user.visible_message("<span class='notice'>[user] labels [A] with \"[label]\".</span>", \
"<span class='notice'>You label [A] with \"[label]\".</span>")
A.AddComponent(/datum/component/label, label)
// playsound(A, 'sound/items/handling/component_pickup.ogg', 20, TRUE)
labels_left--
@@ -90,7 +92,9 @@
name = "cyborg-hand labeler"
/obj/item/hand_labeler/borg/afterattack(atom/A, mob/user, proximity)
. = ..(A, user, proximity)
. = ..()
if(!proximity)
return
if(!iscyborg(user))
return
@@ -114,6 +118,7 @@
desc = "A roll of paper. Use it on a hand labeler to refill it."
icon_state = "labeler_refill"
item_state = "electropack"
// inhand_icon_state = "electropack"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
+92 -176
View File
@@ -11,41 +11,6 @@
#define MODE_WRITING 1
#define MODE_STAMPING 2
/**
* This is a custom ui state. All it really does is keep track of pen
* being used and if they are editing it or not. This way we can keep
* the data with the ui rather than on the paper
*/
/datum/ui_state/default/paper_state
/// What edit mode we are in and who is
/// writing on it right now
var/edit_mode = MODE_READING
/// Setup for writing to a sheet
var/pen_color = "black"
var/pen_font = ""
var/is_crayon = FALSE
/// Setup for stamping a sheet
// Why not the stamp obj? I have no idea
// what happens to states out of scope so
// don't want to put instances in this
var/stamp_icon_state = ""
var/stamp_name = ""
var/stamp_class = ""
/datum/ui_state/default/paper_state/proc/copy_from(datum/ui_state/default/paper_state/from)
switch(from.edit_mode)
if(MODE_READING)
edit_mode = MODE_READING
if(MODE_WRITING)
edit_mode = MODE_WRITING
pen_color = from.pen_color
pen_font = from.pen_font
is_crayon = from.is_crayon
if(MODE_STAMPING)
edit_mode = MODE_STAMPING
stamp_icon_state = from.stamp_icon_state
stamp_class = from.stamp_class
stamp_name = from.stamp_name
/**
* Paper is now using markdown (like in github pull notes) for ALL rendering
@@ -58,6 +23,9 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper"
item_state = "paper"
// inhand_icon_state = "paper"
// worn_icon_state = "paper"
// custom_fire_overlay = "paper_onfire_overlay"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_range = 1
@@ -80,34 +48,19 @@
var/list/stamps /// Positioning for the stamp in tgui
var/list/stamped /// Overlay info
/// This REALLY should be a componenet. Basicly used during, april fools
/// to honk at you
var/rigged = 0
var/spam_flag = 0
var/contact_poison // Reagent ID to transfer on contact
var/contact_poison_volume = 0
// Ok, so WHY are we caching the ui's?
// Since we are not using autoupdate we
// need some way to update the ui's of
// other people looking at it and if
// its been updated. Yes yes, lame
// but canot be helped. However by
// doing it this way, we can see
// live updates and have multipule
// people look at it
var/list/viewing_ui = list()
/// When the sheet can be "filled out"
/// This is an associated list
var/list/form_fields = list()
var/field_counter = 1
/obj/item/paper/Destroy()
close_all_ui()
stamps = null
stamped = null
form_fields = null
stamped = null
. = ..()
/**
@@ -162,7 +115,7 @@
set category = "Object"
set src in usr
if(usr.incapacitated() || !usr.is_literate())
if(!usr.can_read(src) || usr.incapacitated(TRUE, TRUE) || (isobserver(usr) && !IsAdminGhost(usr)))
return
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
@@ -180,18 +133,6 @@
user.visible_message("<span class='suicide'>[user] scratches a grid on [user.p_their()] wrist with the paper! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
return (BRUTELOSS)
/// ONLY USED FOR APRIL FOOLS
/obj/item/paper/proc/reset_spamflag()
spam_flag = FALSE
/obj/item/paper/attack_self(mob/user)
if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
if(!spam_flag)
spam_flag = TRUE
playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE)
addtimer(CALLBACK(src, .proc/reset_spamflag), 20)
. = ..()
/obj/item/paper/proc/clearpaper()
info = ""
stamps = null
@@ -199,28 +140,39 @@
cut_overlays()
update_icon_state()
/obj/item/paper/examine_more(mob/user)
ui_interact(user)
return list("<span class='notice'><i>You try to read [src]...</i></span>")
/obj/item/paper/examine(mob/user)
. = ..()
if(!in_range(user, src) && !isobserver(user))
. += "<span class='warning'>You're too far away to read it!</span>"
return
if(user.can_read(src))
ui_interact(user)
return
. += "<span class='warning'>You cannot read it!</span>"
/obj/item/paper/ui_status(mob/user,/datum/ui_state/state)
// Are we on fire? Hard ot read if so
if(resistance_flags & ON_FIRE)
return UI_CLOSE
if(!in_range(user,src))
return UI_CLOSE
if(user.incapacitated(TRUE, TRUE) || (isobserver(user) && !IsAdminGhost(user)))
return UI_UPDATE
// Even harder to read if your blind...braile? humm
// .. or if you cannot read
if(!user.can_read(src))
return UI_CLOSE
if(in_contents_of(/obj/machinery/door/airlock))
return UI_INTERACTIVE
return ..()
/obj/item/paper/can_interact(mob/user)
if(!..())
return FALSE
// Are we on fire? Hard ot read if so
if(resistance_flags & ON_FIRE)
return FALSE
// Even harder to read if your blind...braile? humm
if(user.is_blind())
return FALSE
// checks if the user can read.
return user.can_read(src)
if(in_contents_of(/obj/machinery/door/airlock))
return TRUE
return ..()
/**
* This creates the ui, since we are using a custom state but not much else
* just makes it easyer to make it.
*/
/obj/item/paper/proc/create_ui(mob/user, datum/ui_state/default/paper_state/state)
ui_interact(user, state = state)
/obj/item/proc/burn_paper_product_attackby_check(obj/item/I, mob/living/user, bypass_clumsy)
var/ignition_message = I.ignition_effect(src, user)
@@ -244,49 +196,22 @@
/obj/item/paper/attackby(obj/item/P, mob/living/user, params)
if(burn_paper_product_attackby_check(P, user))
close_all_ui()
SStgui.close_uis(src)
return
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
if(length(info) >= MAX_PAPER_LENGTH) // Sheet must have less than 1000 charaters
to_chat(user, "<span class='warning'>This sheet of paper is full!</span>")
return
var/datum/ui_state/default/paper_state/state = new
state.edit_mode = MODE_WRITING
// should a crayon be in the same subtype as a pen? How about a brush or charcoal?
// TODO: Convert all writing stuff to one type, /obj/item/art_tool maybe?
state.is_crayon = istype(P, /obj/item/toy/crayon);
if(state.is_crayon)
var/obj/item/toy/crayon/PEN = P
state.pen_font = CRAYON_FONT
state.pen_color = PEN.paint_color
else
var/obj/item/pen/PEN = P
state.pen_font = PEN.font
state.pen_color = PEN.colour
create_ui(user, state)
ui_interact(user)
return
else if(istype(P, /obj/item/stamp))
var/datum/ui_state/default/paper_state/state = new
state.edit_mode = MODE_STAMPING // we are read only becausse the sheet is full
state.stamp_icon_state = P.icon_state
state.stamp_name = P.name
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
state.stamp_class = sheet.icon_class_name(P.icon_state)
to_chat(user, "<span class='notice'>You ready your stamp over the paper! </span>")
create_ui(user, state)
ui_interact(user)
return /// Normaly you just stamp, you don't need to read the thing
else
// cut paper? the sky is the limit!
var/datum/ui_state/default/paper_state/state = new
state.edit_mode = MODE_READING
create_ui(user, state) // The other ui will be created with just read mode outside of this
ui_interact(user) // The other ui will be created with just read mode outside of this
return ..()
@@ -301,68 +226,64 @@
get_asset_datum(/datum/asset/spritesheet/simple/paper),
)
/obj/item/paper/ui_interact(mob/user, datum/tgui/ui,
datum/ui_state/default/paper_state/state)
// Update the state
ui = ui || SStgui.get_open_ui(user, src)
if(ui && state)
var/datum/ui_state/default/paper_state/current_state = ui.state
current_state.copy_from(state)
/obj/item/paper/ui_interact(mob/user, datum/tgui/ui)
// Update the UI
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PaperSheet", name)
state = new
ui.set_state(state)
ui.set_autoupdate(FALSE)
viewing_ui[user] = ui
ui.open()
/obj/item/paper/ui_close(mob/user)
/// close the editing window and change the mode
viewing_ui[user] = null
. = ..()
// Again, we have to do this as autoupdate is off
/obj/item/paper/proc/update_all_ui()
for(var/datum/tgui/ui in viewing_ui)
ui.process(force = TRUE)
/obj/item/paper/ui_static_data(mob/user)
. = list()
.["text"] = info
.["max_length"] = MAX_PAPER_LENGTH
.["paper_color"] = !color || color == "white" ? "#FFFFFF" : color // color might not be set
.["paper_state"] = icon_state /// TODO: show the sheet will bloodied or crinkling?
.["stamps"] = stamps
// Again, we have to do this as autoupdate is off
/obj/item/paper/proc/close_all_ui()
for(var/datum/tgui/ui in viewing_ui)
ui.close()
viewing_ui = list()
/obj/item/paper/ui_data(mob/user)
var/list/data = list()
var/datum/tgui/ui = viewing_ui[user]
var/datum/ui_state/default/paper_state/state = ui.state
// Should all this go in static data and just do a forced update?
data["text"] = info
data["max_length"] = MAX_PAPER_LENGTH
data["paper_state"] = icon_state /// TODO: show the sheet will bloodied or crinkling?
data["paper_color"] = !color || color == "white" ? "#FFFFFF" : color // color might not be set
data["stamps"] = stamps
data["edit_mode"] = state.edit_mode
data["edit_usr"] = "[ui.user]";
// pen info for editing
data["is_crayon"] = state.is_crayon
data["pen_font"] = state.pen_font
data["pen_color"] = state.pen_color
// stamping info for..stamping
data["stamp_class"] = state.stamp_class
var/obj/O = user.get_active_held_item()
if(istype(O, /obj/item/toy/crayon))
var/obj/item/toy/crayon/PEN = O
data["pen_font"] = CRAYON_FONT
data["pen_color"] = PEN.paint_color
data["edit_mode"] = MODE_WRITING
data["is_crayon"] = TRUE
data["stamp_class"] = "FAKE"
data["stamp_icon_state"] = "FAKE"
else if(istype(O, /obj/item/pen))
var/obj/item/pen/PEN = O
data["pen_font"] = PEN.font
data["pen_color"] = PEN.colour
data["edit_mode"] = MODE_WRITING
data["is_crayon"] = FALSE
data["stamp_class"] = "FAKE"
data["stamp_icon_state"] = "FAKE"
else if(istype(O, /obj/item/stamp))
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
data["stamp_icon_state"] = O.icon_state
data["stamp_class"] = sheet.icon_class_name(O.icon_state)
data["edit_mode"] = MODE_STAMPING
data["pen_font"] = "FAKE"
data["pen_color"] = "FAKE"
data["is_crayon"] = FALSE
else
data["edit_mode"] = MODE_READING
data["pen_font"] = "FAKE"
data["pen_color"] = "FAKE"
data["is_crayon"] = FALSE
data["stamp_icon_state"] = "FAKE"
data["stamp_class"] = "FAKE"
data["field_counter"] = field_counter
data["form_fields"] = form_fields
return data
/obj/item/paper/ui_act(action, params, datum/tgui/ui, datum/ui_state/default/paper_state/state)
/obj/item/paper/ui_act(action, params,datum/tgui/ui)
if(..())
return
switch(action)
@@ -370,34 +291,33 @@
var/stamp_x = text2num(params["x"])
var/stamp_y = text2num(params["y"])
var/stamp_r = text2num(params["r"]) // rotation in degrees
var/stamp_icon_state = params["stamp_icon_state"]
var/stamp_class = params["stamp_class"]
if (isnull(stamps))
stamps = new/list()
stamps = list()
if(stamps.len < MAX_PAPER_STAMPS)
// I hate byond when dealing with freaking lists
stamps += list(list(state.stamp_class, stamp_x, stamp_y,stamp_r)) /// WHHHHY
stamps[++stamps.len] = list(stamp_class, stamp_x, stamp_y, stamp_r) /// WHHHHY
/// This does the overlay stuff
if (isnull(stamped))
stamped = new/list()
stamped = list()
if(stamped.len < MAX_PAPER_STAMPS_OVERLAYS)
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[state.stamp_icon_state]")
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[stamp_icon_state]")
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
add_overlay(stampoverlay)
LAZYADD(stamped, state.stamp_icon_state)
LAZYADD(stamped, stamp_icon_state)
ui.user.visible_message("<span class='notice'>[ui.user] stamps [src] with [state.stamp_name]!</span>", "<span class='notice'>You stamp [src] with [state.stamp_name]!</span>")
update_static_data(usr,ui)
ui.user.visible_message("<span class='notice'>[ui.user] stamps [src] with [stamp_class]!</span>", "<span class='notice'>You stamp [src] with [stamp_class]!</span>")
else
to_chat(usr, pick("You try to stamp but you miss!", "There is no where else you can stamp!"))
update_all_ui()
. = TRUE
if("save")
var/in_paper = params["text"]
var/paper_len = length(in_paper)
var/list/fields = params["form_fields"]
field_counter = params["field_counter"] ? text2num(params["field_counter"]) : field_counter
if(paper_len > MAX_PAPER_LENGTH)
@@ -413,14 +333,10 @@
if(info != in_paper)
to_chat(ui.user, "You have added to your paper masterpiece!");
info = in_paper
for(var/key in fields)
form_fields[key] = fields[key];
update_static_data(usr,ui)
update_all_ui()
update_icon()
. = TRUE
/**
+16 -11
View File
@@ -26,11 +26,11 @@
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
if(BP)
BP.drop_limb()
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
playsound(loc, pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg'),50, TRUE, -1)
return (BRUTELOSS)
else
user.visible_message("<span class='suicide'>[user] repeatedly bashes [src.name] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
playsound(loc, 'sound/items/gavel.ogg', 50, TRUE, -1)
return (BRUTELOSS)
@@ -42,11 +42,12 @@
if(storedpaper)
. += "paper"
/obj/item/papercutter/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/paper) && !storedpaper)
if(!user.transferItemToLoc(P, src))
return
playsound(loc, "pageturn", 60, 1)
playsound(loc, "pageturn", 60, TRUE)
to_chat(user, "<span class='notice'>You place [P] in [src].</span>")
storedpaper = P
update_icon()
@@ -59,17 +60,17 @@
storedcutter = P
update_icon()
return
if(istype(P, /obj/item/screwdriver) && storedcutter)
if(P.tool_behaviour == TOOL_SCREWDRIVER && storedcutter)
P.play_tool_sound(src)
to_chat(user, "<span class='notice'>[storedcutter] has been [cuttersecured ? "unsecured" : "secured"].</span>")
cuttersecured = !cuttersecured
return
..()
/obj/item/papercutter/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
/obj/item/papercutter/on_attack_hand(mob/user)
add_fingerprint(user)
if(!storedcutter)
to_chat(user, "<span class='notice'>The cutting blade is gone! You can't use [src] now.</span>")
to_chat(user, "<span class='warning'>The cutting blade is gone! You can't use [src] now.</span>")
return
if(!cuttersecured)
@@ -79,7 +80,7 @@
update_icon()
if(storedpaper)
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1)
playsound(src.loc, 'sound/weapons/slash.ogg', 50, TRUE)
to_chat(user, "<span class='notice'>You neatly cut [storedpaper].</span>")
storedpaper = null
qdel(storedpaper)
@@ -88,6 +89,7 @@
update_icon()
/obj/item/papercutter/MouseDrop(atom/over_object)
. = ..()
var/mob/M = usr
if(M.incapacitated() || !Adjacent(M))
return
@@ -98,10 +100,6 @@
else if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
else
. = ..()
add_fingerprint(M)
/obj/item/paperslip
@@ -112,6 +110,12 @@
resistance_flags = FLAMMABLE
max_integrity = 50
/obj/item/paperslip/attackby(obj/item/I, mob/living/user, params)
if(burn_paper_product_attackby_check(I, user))
return
return ..()
/obj/item/paperslip/Initialize()
. = ..()
pixel_x = rand(-5, 5)
@@ -124,5 +128,6 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "cutterblade"
item_state = "knife"
// inhand_icon_state = "knife"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
+45 -43
View File
@@ -4,53 +4,22 @@
/obj/item/paper/fluff/sop
name = "paper- 'Standard Operating Procedure'"
info = {"
Alert Levels:
* Blue - Emergency
* Caused by fire
* Caused by manual interaction
* Action: Close all fire doors. These can only be opened by resetting the alarm
* Red- Ejection/Self Destruct
* Caused by module operating computer.
* Action: After the specified time the module will eject completely.
Engine Maintenance Instructions:
1. Shut off ignition systems:
2. Activate internal power
3. Activate orbital balance matrix
4. Remove volatile liquids from area
5. Wear a fire suit
6. After Decontaminate Visit medical examiner
Toxin Laboratory Procedure:
1. Wear a gas mask regardless
2. Get an oxygen tank.
3. Activate internal atmosphere
4. After Decontaminate Visit medical examiner
Disaster Procedure:
Fire:
1. Activate sector fire alarm.
2. Move to a safe area.
3. Get a fire suit
* After:
1. Assess Damage
2. Repair damages
3. If needed, Evacuate
Meteor Shower:
1. Activate fire alarm
2. Move to the back of ship
* After
1. Repair damage
2. If needed, Evacuate
Accidental Reentry:
1. Activate fire alarms in front of ship.
2. Move volatile matter to a fire proof area!
3. Get a fire suit.
4. Stay secure until an emergency ship arrives.
5. If ship does not arrive-Evacuate to a nearby safe area!
"};
info = "Alert Levels:<BR>\nBlue- Emergency<BR>\n\t1. Caused by fire<BR>\n\t2. Caused by manual interaction<BR>\n\tAction:<BR>\n\t\tClose all fire doors. These can only be opened by resetting the alarm<BR>\nRed- Ejection/Self-Destruct<BR>\n\t1. Caused by module operating computer.<BR>\n\tAction:<BR>\n\t\tAfter the specified time the module will eject completely.<BR>\n<BR>\nEngine Maintenance Instructions:<BR>\n\tShut off ignition systems:<BR>\n\tActivate internal power<BR>\n\tActivate orbital balance matrix<BR>\n\tRemove volatile liquids from area<BR>\n\tWear a fire suit<BR>\n<BR>\n\tAfter<BR>\n\t\tDecontaminate<BR>\n\t\tVisit medical examiner<BR>\n<BR>\nToxin Laboratory Procedure:<BR>\n\tWear a gas mask regardless<BR>\n\tGet an oxygen tank.<BR>\n\tActivate internal atmosphere<BR>\n<BR>\n\tAfter<BR>\n\t\tDecontaminate<BR>\n\t\tVisit medical examiner<BR>\n<BR>\nDisaster Procedure:<BR>\n\tFire:<BR>\n\t\tActivate sector fire alarm.<BR>\n\t\tMove to a safe area.<BR>\n\t\tGet a fire suit<BR>\n\t\tAfter:<BR>\n\t\t\tAssess Damage<BR>\n\t\t\tRepair damages<BR>\n\t\t\tIf needed, Evacuate<BR>\n\tMeteor Shower:<BR>\n\t\tActivate fire alarm<BR>\n\t\tMove to the back of ship<BR>\n\t\tAfter<BR>\n\t\t\tRepair damage<BR>\n\t\t\tIf needed, Evacuate<BR>\n\tAccidental Reentry:<BR>\n\t\tActivate fire alarms in front of ship.<BR>\n\t\tMove volatile matter to a fire proof area!<BR>\n\t\tGet a fire suit.<BR>\n\t\tStay secure until an emergency ship arrives.<BR>\n<BR>\n\t\tIf ship does not arrive-<BR>\n\t\t\tEvacuate to a nearby safe area!"
/obj/item/paper/fluff/shuttles/daniel
info = "i love daniel<br>daniel is my best friend<br><br>you are tearing me apart elise"
/obj/item/paper/fluff/jobs/prisoner/letter
name = "letter from home"
info = {"Dearest sweetheart,
<br>It is truly saddening you must spend your time locked up in an awful prison on that dangerous station. I have spoken to your lawyer who will attempt to appeal to the judge so your sentence may hopefully be reduced.
<br>Regardless, I just want you to understand that all of us out here still love you, and want to see you released safely some day! I know that prison can be a very vicious place, so please promise us you'll avoid getting into any fights or trouble, okay?
<br>We all care for your safety deeply, and could not live with ourselves if you ended up getting hurt. We've scheduled a visit to see you, and with any luck, hopefully our request will be granted soon.
<br>Anyways, please do your best to make it by in that place, and never forget we'll be always here for you, no matter if we're separated.
<br>
<br>Please stay safe,
<br>-Love, <i>Your Dearest</i>"}
//////////// Job guides n' fluff
@@ -90,9 +59,42 @@ Accidental Reentry:
name = "paper- 'Chemical Information'"
info = "Known Onboard Toxins:<BR>\n\tGrade A Semi-Liquid Plasma:<BR>\n\t\tHighly poisonous. You cannot sustain concentrations above 15 units.<BR>\n\t\tA gas mask fails to filter plasma after 50 units.<BR>\n\t\tWill attempt to diffuse like a gas.<BR>\n\t\tFiltered by scrubbers.<BR>\n\t\tThere is a bottled version which is very different<BR>\n\t\t\tfrom the version found in canisters!<BR>\n<BR>\n\t\tWARNING: Highly Flammable. Keep away from heat sources<BR>\n\t\texcept in an enclosed fire area!<BR>\n\t\tWARNING: It is a crime to use this without authorization.<BR>\nKnown Onboard Anti-Toxin:<BR>\n\tAnti-Toxin Type 01P: Works against Grade A Plasma.<BR>\n\t\tBest if injected directly into bloodstream.<BR>\n\t\tA full injection is in every regular Med-Kit.<BR>\n\t\tSpecial toxin Kits hold around 7.<BR>\n<BR>\nKnown Onboard Chemicals (other):<BR>\n\tRejuvenation T#001:<BR>\n\t\tEven 1 unit injected directly into the bloodstream<BR>\n\t\t\twill cure unconscious and sleep toxins.<BR>\n\t\tIf administered to a dying patient it will prevent<BR>\n\t\t\tfurther damage for about units*3 seconds.<BR>\n\t\t\tit will not cure them or allow them to be cured.<BR>\n\t\tIt can be administered to a non-dying patient<BR>\n\t\t\tbut the chemicals disappear just as fast.<BR>\n\tMorphine T#054:<BR>\n\t\t5 units will induce precisely 1 minute of sleep.<BR>\n\t\t\tThe effect are cumulative.<BR>\n\t\tWARNING: It is a crime to use this without authorization"
/obj/item/paper/fluff/jobs/medical/hippocratic
name = "paper- 'Hippocratic Oath'"
info = {"<i>I swear to fulfill, to the best of my ability and judgment, this covenant:
<br>
I will respect the hard-won scientific gains of those physicians in whose steps I walk,
and gladly share such knowledge as is mine with those who are to follow.
<br>
I will apply, for the benefit of the sick, all measures that are required,
avoiding those twin traps of overtreatment and therapeutic nihilism.
<br>
I will remember that there is art to medicine as well as science,
and that warmth, sympathy, and understanding may outweigh the surgeon's knife or the chemist's drug.
<br>
I will not be ashamed to say "I know not,"
nor will I fail to call in my colleagues when the skills of another are needed for a patient's recovery.
<br>
I will respect the privacy of my patients, for their problems are not disclosed to me that the world may know. Most especially must I tread with care in matters of life and death.
If it is given me to save a life, all thanks. But it may also be within my power to take a life;
this awesome responsibility must be faced with great humbleness and awareness of my own frailty. Above all, I must not play at God.
<br>
I will remember that I do not treat a fever chart, a cancerous growth, but a sick human being, whose illness may affect the person's family and economic stability.
My responsibility includes these related problems, if I am to care adequately for the sick.
<br>
I will prevent disease whenever I can, for prevention is preferable to cure.
<br>
I will remember that I remain a member of society, with special obligations to all my fellow human beings,
those sound of mind and body as well as the infirm.
<br>
If I do not violate this oath, may I enjoy life and art, respected while I live and remembered with affection thereafter.
May I always act so as to preserve the finest traditions of my calling and may I long experience the joy of healing those who seek my help.
</i>"}
/*
* Stations
*/
////////// cogstation.
/obj/item/paper/guides/cogstation/job_changes
name = "MEMO: Job Changes"
+18 -10
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
item_state = "sheet-metal"
// inhand_icon_state = "sheet-metal"
lefthand_file = 'icons/mob/inhands/misc/sheets_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/sheets_righthand.dmi'
throwforce = 0
@@ -43,6 +44,7 @@
..()
/obj/item/paper_bin/MouseDrop(atom/over_object)
. = ..()
var/mob/living/M = usr
if(!istype(M) || M.incapacitated() || !Adjacent(M))
return
@@ -54,17 +56,18 @@
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
else
. = ..()
add_fingerprint(M)
/obj/item/paper_bin/attack_paw(mob/user)
return attack_hand(user)
/obj/item/paper_bin/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.lying)
return
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/paper_bin/on_attack_hand(mob/user)
if(isliving(user))
var/mob/living/L = user
if(!(L.mobility_flags & MOBILITY_PICKUP))
return
// user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
P.add_fingerprint(user)
@@ -85,8 +88,8 @@
P = new papertype(src)
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "*HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK*\n*APRIL FOOLS*\n"
P.rigged = 1
P.info = "<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.AddComponent(/datum/component/honkspam)
P.add_fingerprint(user)
P.forceMove(user.loc)
@@ -148,8 +151,7 @@
papertype = /obj/item/paper/natural
resistance_flags = FLAMMABLE
/obj/item/paper_bin/bundlenatural/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
..()
/obj/item/paper_bin/bundlenatural/on_attack_hand(mob/user)
if(total_paper < 1)
qdel(src)
@@ -173,3 +175,9 @@
qdel(src)
else
..()
/obj/item/paper_bin/carbon
name = "carbon paper bin"
desc = "Contains all the paper you'll ever need, in duplicate!"
icon_state = "paper_bin_carbon"
papertype = /obj/item/paper/carbon
+26 -30
View File
@@ -1,9 +1,9 @@
/obj/item/paperplane
name = "paper plane"
desc = "Paper, folded in the shape of a plane."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paperplane"
// custom_fire_overlay = "paperplane_onfire"
throw_range = 7
throw_speed = 1
throwforce = 0
@@ -11,7 +11,7 @@
resistance_flags = FLAMMABLE
max_integrity = 50
var/hit_probability = 2//%
var/hit_probability = 2 //%
var/obj/item/paper/internalPaper
/obj/item/paperplane/origami
@@ -41,6 +41,13 @@
qdel(src)
return ..()
/obj/item/paperplane/Exited(atom/movable/AM, atom/newLoc)
. = ..()
if (AM == internalPaper)
internalPaper = null
if(!QDELETED(src))
qdel(src)
/obj/item/paperplane/Destroy()
QDEL_NULL(internalPaper)
return ..()
@@ -71,35 +78,23 @@
user.put_in_hands(internal_paper_tmp)
/obj/item/paperplane/attackby(obj/item/P, mob/living/carbon/human/user, params)
..()
if(burn_paper_product_attackby_check(P, user))
return
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
to_chat(user, "<span class='notice'>You should unfold [src] before changing it.</span>")
to_chat(user, "<span class='warning'>You should unfold [src] before changing it!</span>")
return
else if(istype(P, /obj/item/stamp)) //we don't randomize stamps on a paperplane
internalPaper.attackby(P, user) //spoofed attack to update internal paper.
update_icon()
add_fingerprint(user)
return
else if(P.get_temperature())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_them()]self!</span>", \
"<span class='userdanger'>You miss [src] and accidentally light yourself on fire!</span>")
user.dropItemToGround(P)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
if(!(in_range(user, src))) //to prevent issues as a result of telepathically lighting a paper
return
user.dropItemToGround(src)
user.visible_message("<span class='danger'>[user] lights [src] ablaze with [P]!</span>", "<span class='danger'>You light [src] on fire!</span>")
fire_act()
add_fingerprint(user)
return ..()
/obj/item/paperplane/throw_at(atom/target, range, speed, mob/thrower, spin=FALSE, diagonals_first = FALSE, datum/callback/callback)
. = ..(target, range, speed, thrower, FALSE, diagonals_first, callback)
/obj/item/paperplane/throw_at(atom/target, range, speed, mob/thrower, spin=FALSE, diagonals_first = FALSE, datum/callback/callback, quickstart = TRUE)
. = ..(target, range, speed, thrower, FALSE, diagonals_first, callback, quickstart = quickstart)
/obj/item/paperplane/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscarbon(hit_atom))
@@ -112,26 +107,28 @@
if(..() || !ishuman(hit_atom))//if the plane is caught or it hits a nonhuman
return
var/mob/living/carbon/human/H = hit_atom
var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES)
if(prob(hit_probability))
if(H.is_eyes_covered())
return
var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES)
visible_message("<span class='danger'>\The [src] hits [H] in the eye!</span>")
visible_message("<span class='danger'>\The [src] hits [H] in the eye[eyes ? "" : " socket"]!</span>")
H.adjust_blurriness(6)
if(eyes)
eyes.applyOrganDamage(rand(6,8))
eyes?.applyOrganDamage(rand(6,8))
H.DefaultCombatKnockdown(40)
H.emote("scream")
/obj/item/paper/examine(mob/user)
. = ..()
. += "<span class='notice'>Alt-click [src] to fold it into a paper plane.</span>"
/obj/item/paper/AltClick(mob/living/carbon/user, obj/item/I)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user), NO_TK))
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(istype(src, /obj/item/paper/carbon))
var/obj/item/paper/carbon/Carbon = src
if(!Carbon.iscopy && !Carbon.copied)
to_chat(user, "<span class='notice'>Take off the carbon copy first.</span>")
return
to_chat(user, "<span class='notice'>You fold [src] into the shape of a plane!</span>")
user.temporarilyRemoveItemFromInventory(src)
var/obj/item/paperplane/plane_type = /obj/item/paperplane
@@ -142,4 +139,3 @@
I = new plane_type(user, src)
user.put_in_hands(I)
return TRUE
+42 -13
View File
@@ -16,6 +16,8 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
// inhand_icon_state = "pen"
// worn_icon_state = "pen"
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_EARS
throwforce = 0
w_class = WEIGHT_CLASS_TINY
@@ -76,6 +78,22 @@
icon_state = "pen-fountain"
font = FOUNTAIN_PEN_FONT
/obj/item/pen/charcoal
name = "charcoal stylus"
desc = "It's just a wooden stick with some compressed ash on the end. At least it can write."
icon_state = "pen-charcoal"
colour = "dimgray"
font = CHARCOAL_FONT
custom_materials = null
grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10)
/datum/crafting_recipe/charcoal_stylus
name = "Charcoal Stylus"
result = /obj/item/pen/charcoal
reqs = list(/obj/item/stack/sheet/mineral/wood = 1, /datum/reagent/ash = 30)
time = 30
category = CAT_PRIMAL
/obj/item/pen/fountain/captain
name = "captain's fountain pen"
desc = "It's an expensive Oak fountain pen. The nib is quite sharp."
@@ -93,6 +111,7 @@
"Black and Silver" = "pen-fountain-b",
"Command Blue" = "pen-fountain-cb"
)
embedding = list("embed_chance" = 75)
/obj/item/pen/fountain/captain/Initialize()
. = ..()
@@ -139,20 +158,18 @@
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
if(oldname == input)
to_chat(user, "You changed \the [O.name] to... well... \the [O.name].")
to_chat(user, "<span class='notice'>You changed \the [O.name] to... well... \the [O.name].</span>")
else
O.name = input
to_chat(user, "\The [oldname] has been successfully been renamed to \the [input].")
to_chat(user, "<span class='notice'>\The [oldname] has been successfully been renamed to \the [input].</span>")
O.renamedByPlayer = TRUE
log_game("[user] [key_name(user)] has renamed [O] to [input]")
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 2048)
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
O.desc = input
to_chat(user, "You have successfully changed \the [O.name]'s description.")
log_game("[user] [key_name(user)] has changed [O]'s description to to [input]")
to_chat(user, "<span class='notice'>You have successfully changed \the [O.name]'s description.</span>")
/*
* Sleepypens
@@ -181,9 +198,10 @@
*/
/obj/item/pen/edagger
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") //these wont show up if the pen is off
// attack_verb_continuous = list("slashes", "stabs", "slices", "tears", "lacerates", "rips", "dices", "cuts") //these won't show up if the pen is off
// attack_verb_simple = list("slash", "stab", "slice", "tear", "lacerate", "rip", "dice", "cut")
sharpness = SHARP_EDGED
var/on = FALSE
embedding = list(embed_chance = EMBED_CHANCE)
/obj/item/pen/edagger/ComponentInitialize()
. = ..()
@@ -193,29 +211,38 @@
/obj/item/pen/edagger/get_sharpness()
return on * sharpness
/obj/item/pen/edagger/suicide_act(mob/user)
. = BRUTELOSS
if(on)
user.visible_message("<span class='suicide'>[user] forcefully rams the pen into their mouth!</span>")
else
user.visible_message("<span class='suicide'>[user] is holding a pen up to their mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
attack_self(user)
/obj/item/pen/edagger/attack_self(mob/living/user)
if(on)
on = FALSE
force = initial(force)
throw_speed = initial(throw_speed)
w_class = initial(w_class)
name = initial(name)
hitsound = initial(hitsound)
embedding = null
embedding = list(embed_chance = EMBED_CHANCE)
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, 1)
playsound(user, 'sound/weapons/saberoff.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
updateEmbedding()
else
on = TRUE
force = 18
throw_speed = 4
w_class = WEIGHT_CLASS_NORMAL
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embedding = list(embed_chance = 100, fall_chance = 0) //rule of cool
embedding = list(embed_chance = 100) //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
updateEmbedding()
updateEmbedding()
update_icon()
/obj/item/pen/edagger/update_icon_state()
@@ -235,6 +262,8 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "digging_pen"
item_state = "pen"
// inhand_icon_state = "pen"
// worn_icon_state = "pen"
force = 3
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/iron=10, /datum/material/diamond=100, /datum/material/titanium = 10)
+23
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "stamp-ok"
item_state = "stamp"
// inhand_icon_state = "stamp"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
@@ -11,6 +12,8 @@
custom_materials = list(/datum/material/iron=60)
pressure_resistance = 2
attack_verb = list("stamped")
// attack_verb_continuous = list("stamps")
// attack_verb_simple = list("stamp")
/obj/item/stamp/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] stamps 'VOID' on [user.p_their()] forehead, then promptly falls over, dead.</span>")
@@ -66,5 +69,25 @@
icon_state = "stamp-clown"
dye_color = DYE_CLOWN
/obj/item/stamp/mime
name = "mime's rubber stamp"
icon_state = "stamp-mime"
dye_color = DYE_MIME
/obj/item/stamp/chap
name = "chaplain's rubber stamp"
icon_state = "stamp-chap"
dye_color = DYE_CHAP
/obj/item/stamp/centcom
name = "CentCom rubber stamp"
icon_state = "stamp-centcom"
dye_color = DYE_CENTCOM
/obj/item/stamp/syndicate
name = "Syndicate rubber stamp"
icon_state = "stamp-syndicate"
dye_color = DYE_SYNDICATE
/obj/item/stamp/attack_paw(mob/user)
return attack_hand(user)
+231
View File
@@ -0,0 +1,231 @@
//Bureaucracy machine!
//Simply set this up in the hopline and you can serve people based on ticket numbers
/obj/machinery/ticket_machine
name = "ticket machine"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "ticketmachine"
desc = "A marvel of bureaucratic engineering encased in an efficient plastic shell. It can be refilled with a hand labeler refill roll and linked to buttons with a multitool."
density = FALSE
maptext_height = 26
maptext_width = 32
maptext_x = 7
maptext_y = 10
layer = HIGH_OBJ_LAYER
var/ticket_number = 0 //Increment the ticket number whenever the HOP presses his button
var/current_number = 0 //What ticket number are we currently serving?
var/max_number = 100 //At this point, you need to refill it.
var/cooldown = 50
var/ready = TRUE
var/id = "ticket_machine_default" //For buttons
var/list/ticket_holders = list()
var/list/obj/item/ticket_machine_ticket/tickets = list()
/obj/machinery/ticket_machine/multitool_act(mob/living/user, obj/item/I)
if(!multitool_check_buffer(user, I)) //make sure it has a data buffer
return
var/obj/item/multitool/M = I
M.buffer = src
to_chat(user, "<span class='notice'>You store linkage information in [I]'s buffer.</span>")
return TRUE
/obj/machinery/ticket_machine/emag_act(mob/user) //Emag the ticket machine to dispense burning tickets, as well as randomize its number to destroy the HoP's mind.
if(obj_flags & EMAGGED)
return
to_chat(user, "<span class='warning'>You overload [src]'s bureaucratic logic circuitry to its MAXIMUM setting.</span>")
ticket_number = rand(0,max_number)
current_number = ticket_number
obj_flags |= EMAGGED
if(tickets.len)
for(var/obj/item/ticket_machine_ticket/ticket in tickets)
ticket.audible_message("<span class='notice'>\the [ticket] disperses!</span>")
qdel(ticket)
tickets.Cut()
update_icon()
/obj/machinery/ticket_machine/Initialize()
. = ..()
update_icon()
/obj/machinery/ticket_machine/proc/increment()
if(current_number > ticket_number)
return
if(current_number && !(obj_flags & EMAGGED) && tickets[current_number])
tickets[current_number].audible_message("<span class='notice'>\the [tickets[current_number]] disperses!</span>")
qdel(tickets[current_number])
if(current_number < ticket_number)
current_number ++ //Increment the one we're serving.
playsound(src, 'sound/misc/announce_dig.ogg', 50, FALSE)
say("Now serving ticket #[current_number]!")
if(!(obj_flags & EMAGGED) && tickets[current_number])
tickets[current_number].audible_message("<span class='notice'>\the [tickets[current_number]] vibrates!</span>")
update_icon() //Update our icon here rather than when they take a ticket to show the current ticket number being served
/obj/machinery/button/ticket_machine
name = "increment ticket counter"
desc = "Use this button after you've served someone to tell the next person to come forward."
device_type = /obj/item/assembly/control/ticket_machine
req_access = list()
id = "ticket_machine_default"
/obj/machinery/button/ticket_machine/Initialize()
. = ..()
if(device)
var/obj/item/assembly/control/ticket_machine/ours = device
ours.id = id
/obj/machinery/button/ticket_machine/multitool_act(mob/living/user, obj/item/I)
. = ..()
if(I.tool_behaviour == TOOL_MULTITOOL)
var/obj/item/multitool/M = I
if(M.buffer && !istype(M.buffer, /obj/machinery/ticket_machine))
return
var/obj/item/assembly/control/ticket_machine/controller = device
controller.linked = M.buffer
id = null
controller.id = null
to_chat(user, "<span class='warning'>You've linked [src] to [controller.linked].</span>")
/obj/item/assembly/control/ticket_machine
name = "ticket machine controller"
desc = "A remote controller for the HoP's ticket machine."
var/obj/machinery/ticket_machine/linked //To whom are we linked?
/obj/item/assembly/control/ticket_machine/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
/obj/item/assembly/control/ticket_machine/LateInitialize()
find_machine()
/obj/item/assembly/control/ticket_machine/proc/find_machine() //Locate the one to which we're linked
for(var/obj/machinery/ticket_machine/ticketsplease in GLOB.machines)
if(ticketsplease.id == id)
linked = ticketsplease
if(linked)
return TRUE
else
return FALSE
/obj/item/assembly/control/ticket_machine/activate()
if(cooldown)
return
if(!linked)
return
cooldown = TRUE
linked.increment()
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 10)
/obj/machinery/ticket_machine/update_icon()
switch(ticket_number) //Gives you an idea of how many tickets are left
if(0 to 49)
icon_state = "ticketmachine_100"
if(50 to 99)
icon_state = "ticketmachine_50"
if(100)
icon_state = "ticketmachine_0"
handle_maptext()
/obj/machinery/ticket_machine/proc/handle_maptext()
switch(ticket_number) //This is here to handle maptext offsets so that the numbers align.
if(0 to 9)
maptext_x = 13
if(10 to 99)
maptext_x = 10
if(100)
maptext_x = 8
maptext = "[current_number]" //Finally, apply the maptext
/obj/machinery/ticket_machine/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/hand_labeler_refill))
if(!(ticket_number >= max_number))
to_chat(user, "<span class='notice'>[src] refuses [I]! There [max_number-ticket_number==1 ? "is" : "are"] still [max_number-ticket_number] ticket\s left!</span>")
return
to_chat(user, "<span class='notice'>You start to refill [src]'s ticket holder (doing this will reset its ticket count!).</span>")
if(do_after(user, 30, target = src))
to_chat(user, "<span class='notice'>You insert [I] into [src] as it whirs nondescriptly.</span>")
qdel(I)
ticket_number = 0
current_number = 0
if(tickets.len)
for(var/obj/item/ticket_machine_ticket/ticket in tickets)
ticket.audible_message("<span class='notice'>\the [ticket] disperses!</span>")
qdel(ticket)
tickets.Cut()
max_number = initial(max_number)
update_icon()
return
/obj/machinery/ticket_machine/proc/reset_cooldown()
ready = TRUE
/obj/machinery/ticket_machine/attack_hand(mob/living/carbon/user)
. = ..()
if(!ready)
to_chat(user,"<span class='warning'>You press the button, but nothing happens...</span>")
return
if(ticket_number >= max_number)
to_chat(user,"<span class='warning'>Ticket supply depleted, please refill this unit with a hand labeller refill cartridge!</span>")
return
if((user in ticket_holders) && !(obj_flags & EMAGGED))
to_chat(user, "<span class='warning'>You already have a ticket!</span>")
return
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 100, FALSE)
ticket_number ++
to_chat(user, "<span class='notice'>You take a ticket from [src], looks like you're ticket number #[ticket_number]...</span>")
var/obj/item/ticket_machine_ticket/theirticket = new /obj/item/ticket_machine_ticket(get_turf(src))
theirticket.name = "Ticket #[ticket_number]"
theirticket.maptext = "<font color='#000000'>[ticket_number]</font>"
theirticket.saved_maptext = "<font color='#000000'>[ticket_number]</font>"
theirticket.ticket_number = ticket_number
theirticket.source = src
theirticket.owner = user
user.put_in_hands(theirticket)
ticket_holders += user
tickets += theirticket
if(obj_flags & EMAGGED) //Emag the machine to destroy the HOP's life.
ready = FALSE
addtimer(CALLBACK(src, .proc/reset_cooldown), cooldown)//Small cooldown to prevent piles of flaming tickets
theirticket.fire_act()
user.dropItemToGround(theirticket)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
/obj/item/ticket_machine_ticket
name = "Ticket"
desc = "A ticket which shows your place in the Head of Personnel's line. Made from Nanotrasen patented NanoPaper®. Though solid, its form seems to shimmer slightly. Feels (and burns) just like the real thing."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "ticket"
maptext_x = 7
maptext_y = 10
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
max_integrity = 50
var/saved_maptext = null
var/mob/living/carbon/owner
var/obj/machinery/ticket_machine/source
var/ticket_number
/obj/item/ticket_machine_ticket/attack_hand(mob/user)
. = ..()
maptext = saved_maptext //For some reason, storage code removes all maptext off objs, this stops its number from being wiped off when taken out of storage.
/obj/item/ticket_machine_ticket/attackby(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode
if(burn_paper_product_attackby_check(P, user))
return
return ..()
/obj/item/paper/extinguish()
..()
update_icon()
/obj/item/ticket_machine_ticket/Destroy()
if(owner && source)
source.ticket_holders -= owner
source.tickets[ticket_number] = null
owner = null
source = null
return ..()