merge from master

This commit is contained in:
silicons
2020-07-20 10:18:44 -07:00
1206 changed files with 35732 additions and 41410 deletions
+8
View File
@@ -50,6 +50,14 @@
name = "folder - '[inputvalue]'"
/obj/item/folder/Destroy()
for(var/obj/important_thing in contents)
if(!(important_thing.resistance_flags & INDESTRUCTIBLE))
continue
important_thing.forceMove(drop_location()) //don't destroy round critical content such as objective documents.
return ..()
/obj/item/folder/attack_self(mob/user)
var/dat = "<title>[name]</title>"
+339 -246
View File
@@ -4,7 +4,57 @@
*
* lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
*/
#define MAX_PAPER_LENGTH 5000
#define MAX_PAPER_STAMPS 30 // Too low?
#define MAX_PAPER_STAMPS_OVERLAYS 4
#define MODE_READING 0
#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
** so we do loose a bit of functionality but we gain in easy of use of
** paper and getting rid of that crashing bug
**/
/obj/item/paper
name = "paper"
gender = NEUTER
@@ -21,19 +71,76 @@
resistance_flags = FLAMMABLE
max_integrity = 50
dog_fashion = /datum/dog_fashion/head
color = "white"
/// What's actually written on the paper.
var/info = ""
var/show_written_words = TRUE
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields = 0 //Amount of user created fields
var/list/stamped
/// The (text for the) stamps on the paper.
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
var/datum/oracle_ui/ui = null
var/force_stars = FALSE // If we should force the text to get obfuscated with asterisks
// ui stuff
var/ui_x = 600
var/ui_y = 800
// 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
. = ..()
/**
** This proc copies this sheet of paper to a new
** sheet, Makes it nice and easy for carbon and
** the copyer machine
**/
/obj/item/paper/proc/copy()
var/obj/item/paper/N = new(arglist(args))
N.info = info
N.color = color
N.update_icon_state()
N.stamps = stamps
N.stamped = stamped.Copy()
N.form_fields = form_fields.Copy()
N.field_counter = field_counter
copy_overlays(N, TRUE)
return N
/**
** This proc sets the text of the paper and updates the
** icons. You can modify the pen_color after if need
** be.
**/
/obj/item/paper/proc/setText(text)
info = text
form_fields = null
field_counter = 0
update_icon_state()
/obj/item/paper/pickup(user)
if(contact_poison && ishuman(user))
@@ -42,59 +149,25 @@
if(!istype(G) || G.transfer_prints)
H.reagents.add_reagent(contact_poison,contact_poison_volume)
contact_poison = null
ui.check_view_all()
..()
/obj/item/paper/dropped(mob/user)
ui.check_view(user)
return ..()
. = ..()
/obj/item/paper/Initialize()
. = ..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
ui = new /datum/oracle_ui(src, 420, 600, get_asset_datum(/datum/asset/spritesheet/simple/paper))
ui.can_resize = FALSE
update_icon()
updateinfolinks()
/obj/item/paper/oui_getcontent(mob/target)
if(!target.is_literate() || force_stars)
force_stars = FALSE
return "<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)]<HR>[stamps]</BODY></HTML>"
else if(istype(target.get_active_held_item(), /obj/item/pen) | istype(target.get_active_held_item(), /obj/item/toy/crayon))
return "<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY><div align='right'style='position:fixed;bottom:0;font-style:bold;'><A href='?src=[REF(src)];help=1'>\[?\]</A></div></HTML>"
else
return "<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><TITLE>[name]</TITLE></HEAD><BODY>[info]<HR>[stamps]</BODY></HTML>"
/obj/item/paper/oui_canview(mob/target)
if(check_rights_for(target.client, R_FUN)) //Allows admins to view faxes
return TRUE
if(isAI(target))
force_stars = TRUE
return TRUE
if(iscyborg(target))
return get_dist(src, target) < 2
return ..()
/obj/item/paper/update_icon_state()
if(resistance_flags & ON_FIRE)
icon_state = "paper_onfire"
return
if(info)
icon_state = "paper_words"
return
icon_state = "paper"
if(info && show_written_words)
icon_state = "[initial(icon_state)]_words"
/obj/item/paper/ui_base_html(html)
/// This might change in a future PR
var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/paper)
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
/obj/item/paper/examine(mob/user)
. = ..()
. += "<span class='notice'>Alt-click to fold it.</span>"
if(oui_canview(user))
ui.render(user)
else
. += "<span class='warning'>You're too far away to read it!</span>"
/obj/item/paper/examine_more(mob/user)
ui_interact(user)
@@ -120,243 +193,256 @@
if((loc == usr && usr.stat == CONSCIOUS))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
ui.render_all()
/obj/item/paper/suicide_act(mob/user)
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)
show_content(user)
if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
if(!spam_flag)
spam_flag = TRUE
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE)
addtimer(CALLBACK(src, .proc/reset_spamflag), 20)
/obj/item/paper/attack_ai(mob/living/silicon/ai/user)
show_content(user)
/obj/item/paper/proc/addtofield(id, text, links = 0)
var/locid = 0
var/laststart = 1
var/textindex = 1
while(locid < 15) //hey whoever decided a while(1) was a good idea here, i hate you
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
if(links)
laststart = istart + length(info_links[istart])
else
laststart = istart + length(info[istart])
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()
/obj/item/paper/proc/updateinfolinks()
info_links = info
for(var/i in 1 to min(fields, 15))
addtofield(i, "<font face=\"[PEN_FONT]\"><A href='?src=[REF(src)];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[PEN_FONT]\"><A href='?src=[REF(src)];write=end'>write</A></font>"
ui.render_all()
. = ..()
/obj/item/paper/proc/clearpaper()
info = null
info = ""
stamps = null
LAZYCLEARLIST(stamped)
cut_overlays()
updateinfolinks()
update_icon()
update_icon_state()
/obj/item/paper/proc/parsepencode(t, obj/item/pen/P, mob/user, iscrayon = 0)
if(length(t) < 1) //No input means nothing needs to be parsed
/obj/item/paper/examine(mob/user)
ui_interact(user)
/obj/item/paper/can_interact(mob/user)
if(!..())
return FALSE
if(resistance_flags & ON_FIRE) // Are we on fire? Hard ot read if so
return FALSE
if(user.is_blind()) // Even harder to read if your blind...braile? humm
return FALSE
return user.can_read(src) // checks if the user can read.
/**
** This creates the ui, since we are using a custom state but not much else
** just makes it easyer to make it. Also we make a custom ui_key as I am
** not sure how tgui handles many producers?
**/
/obj/item/paper/proc/create_ui(mob/user, datum/ui_state/default/paper_state/state)
ui_interact(user, "main", null, FALSE, null, 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)
if(!ignition_message)
return
. = TRUE
if(!bypass_clumsy && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10) && Adjacent(user))
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>")
if(user.is_holding(I)) //checking if they're holding it in case TK is involved
user.dropItemToGround(I)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
t = parsemarkdown(t, user, iscrayon)
if(user.is_holding(src)) //no TK shit here.
user.dropItemToGround(src)
user.visible_message(ignition_message)
add_fingerprint(user)
fire_act(I.get_temperature())
if(!iscrayon)
t = "<font face=\"[P.font]\" color=[P.colour]>[t]</font>"
else
var/obj/item/toy/crayon/C = P
t = "<font face=\"[CRAYON_FONT]\" color=[C.paint_color]><b>[t]</b></font>"
// Count the fields
var/laststart = 1
while(fields < 15)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
if(i == 0)
break
laststart = i+1
fields++
return t
/obj/item/paper/proc/reload_fields() // Useful if you made the paper programicly and want to include fields. Also runs updateinfolinks() for you.
fields = 0
var/laststart = 1
while(fields < 15)
var/i = findtext(info, "<span class=\"paper_field\">", laststart)
if(i == 0)
break
laststart = i+1
fields++
updateinfolinks()
/obj/item/paper/proc/openhelp(mob/user)
user << browse({"<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><TITLE>Paper Help</TITLE></HEAD>
<BODY>
You can use backslash (\\) to escape special characters.<br>
<br>
<b><center>Crayon&Pen commands</center></b><br>
<br>
# text : Defines a header.<br>
|text| : Centers the text.<br>
**text** : Makes the text <b>bold</b>.<br>
*text* : Makes the text <i>italic</i>.<br>
^text^ : Increases the <font size = \"4\">size</font> of the text.<br>
%s : Inserts a signature of your name in a foolproof way.<br>
%f : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
<br>
<b><center>Pen exclusive commands</center></b><br>
((text)) : Decreases the <font size = \"1\">size</font> of the text.<br>
* item : An unordered list item.<br>
&nbsp;&nbsp;* item: An unordered list child item.<br>
--- : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
/obj/item/paper/Topic(href, href_list)
..()
var/literate = usr.is_literate()
if(!usr.canUseTopic(src, BE_CLOSE, literate))
return
if(href_list["help"])
openhelp(usr)
return
if(href_list["write"])
var/id = href_list["write"]
var/t = stripped_multiline_input("Enter what you want to write:", "Write", no_trim=TRUE)
if(!t || !usr.canUseTopic(src, BE_CLOSE, literate))
return
var/obj/item/i = usr.get_active_held_item() //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/pen))
if(!istype(i, /obj/item/toy/crayon))
return
iscrayon = 1
if(!in_range(src, usr) && loc != usr && !istype(loc, /obj/item/clipboard) && loc.loc != usr && usr.get_active_held_item() != 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(t != null) //No input from the user means nothing needs to be added
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()
show_content(usr)
update_icon()
/obj/item/paper/attackby(obj/item/P, mob/living/carbon/human/user, params)
..()
if(resistance_flags & ON_FIRE)
return
if(is_blind(user))
/obj/item/paper/attackby(obj/item/P, mob/living/user, params)
if(burn_paper_product_attackby_check(P, user))
close_all_ui()
return
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
if(user.is_literate())
show_content(user)
return
else
to_chat(user, "<span class='notice'>You don't know how to read or write.</span>")
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)
return
else if(istype(P, /obj/item/stamp))
if(!in_range(src, user))
return
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
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
if (isnull(stamps))
stamps = sheet.css_tag()
stamps += sheet.icon_tag(P.icon_state)
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[P.icon_state]")
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
state.stamp_class = sheet.icon_class_name(P.icon_state)
LAZYADD(stamped, P.icon_state)
add_overlay(stampoverlay)
to_chat(user, "<span class='notice'>You ready your stamp over the paper! </span>")
to_chat(user, "<span class='notice'>You stamp the paper with your rubber stamp.</span>")
ui.render_all()
create_ui(user, state)
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
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 the paper and accidentally light yourself on fire!</span>")
user.dropItemToGround(P)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
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)
/obj/item/paper/fire_act(exposed_temperature, exposed_volume)
..()
if(!(resistance_flags & FIRE_PROOF))
icon_state = "paper_onfire"
. = ..()
if(.)
info = "[stars(info)]"
/obj/item/paper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/default/paper_state/state = new)
ui_key = "main-[REF(user)]"
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/paper)
assets.send(user)
// The x size is because we double the width for the editor
ui = new(user, src, ui_key, "PaperSheet", name, ui_x, ui_y, master_ui, state)
ui.set_autoupdate(FALSE)
viewing_ui[user] = ui
ui.open()
else
var/datum/ui_state/default/paper_state/last_state = ui.state
if(last_state)
last_state.copy_from(state)
else
ui.state = state
/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.update()
// 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
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)
if(..())
return
switch(action)
if("stamp")
var/stamp_x = text2num(params["x"])
var/stamp_y = text2num(params["y"])
var/stamp_r = text2num(params["r"]) // rotation in degrees
if (isnull(stamps))
stamps = new/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
/// This does the overlay stuff
if (isnull(stamped))
stamped = new/list()
if(stamped.len < MAX_PAPER_STAMPS_OVERLAYS)
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[state.stamp_icon_state]")
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
add_overlay(stampoverlay)
LAZYADD(stamped, state.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>")
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)
// Side note, the only way we should get here is if
// the javascript was modified, somehow, outside of
// byond. but right now we are logging it as
// the generated html might get beyond this limit
log_paper("[key_name(ui.user)] writing to paper [name], and overwrote it by [paper_len-MAX_PAPER_LENGTH]")
if(paper_len == 0)
to_chat(ui.user, pick("Writing block strikes again!", "You forgot to write anthing!"))
else
log_paper("[key_name(ui.user)] writing to paper [name]")
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_all_ui()
update_icon()
. = TRUE
/obj/item/paper/extinguish()
..()
update_icon()
/*
* Construction paper
@@ -380,13 +466,20 @@
name = "paper scrap"
icon_state = "scrap"
slot_flags = null
show_written_words = FALSE
/obj/item/paper/crumpled/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/paper/crumpled/update_icon_state()
return
/obj/item/paper/crumpled/bloody
icon_state = "scrap_bloodied"
/obj/item/paper/crumpled/muddy
icon_state = "scrap_mud"
#undef MAX_PAPER_LENGTH
#undef MAX_PAPER_STAMPS
#undef MAX_PAPER_STAMPS_OVERLAYS
#undef MODE_READING
#undef MODE_WRITING
#undef MODE_STAMPING
+1 -1
View File
@@ -66,7 +66,7 @@
return
..()
/obj/item/papercutter/attack_hand(mob/user)
/obj/item/papercutter/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
. = ..()
if(.)
return
+44 -2
View File
@@ -4,7 +4,49 @@
/obj/item/paper/fluff/sop
name = "paper- 'Standard Operating Procedure'"
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!"
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!
"};
/obj/item/paper/fluff/shuttles/daniel
info = "i love daniel<br>daniel is my best friend<br><br>you are tearing me apart elise"
@@ -150,7 +192,7 @@
/obj/item/paper/fluff/cogstation/mime
name = "Au futur Mime"
info = "Toutes mes excuses pour toute mauvaise grammaire, je ne suis pas un haut-parleur naturel Français et a dû utiliser NanoTranslate. Bien que vous puissiez être mécontent de lemplacement de votre bureau, sil vous plaît comprendre que c’était le seul endroit où nous pourrions le mettre sans problèmes de sécurité et/ou CentClown se plaindre à ce sujet. Nous nous excusons également pour labsence dune zone de performance dédiée, mais nous espérons que vous accorder un accès à lentretien compensera. <BR>\n<BR>\n<I>-C. Donnelly<I> <BR>\n<BR>\nAnalyste Architectural"
info = "Toutes mes excuses pour toute mauvaise grammaire, je ne suis pas un haut-parleur naturel Franais et a d utiliser NanoTranslate. Bien que vous puissiez tre mcontent de lemplacement de votre bureau, sil vous plat comprendre que ctait le seul endroit o nous pourrions le mettre sans problmes de scurit et/ou CentClown se plaindre ce sujet. Nous nous excusons galement pour labsence dune zone de performance ddie, mais nous esprons que vous accorder un accs lentretien compensera. <BR>\n<BR>\n<I>-C. Donnelly<I> <BR>\n<BR>\nAnalyste Architectural"
/obj/item/paper/fluff/cogstation/bsrb
name = "Message from the NTBSRB"
+3 -4
View File
@@ -63,7 +63,7 @@
return attack_hand(user)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/paper_bin/attack_hand(mob/user)
/obj/item/paper_bin/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
if(user.lying)
return
if(bin_pen)
@@ -86,9 +86,8 @@
P = new papertype(src)
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.info = "*HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK*\n*APRIL FOOLS*\n"
P.rigged = 1
P.updateinfolinks()
P.add_fingerprint(user)
P.forceMove(user.loc)
@@ -150,7 +149,7 @@
papertype = /obj/item/paper/natural
resistance_flags = FLAMMABLE
/obj/item/paper_bin/bundlenatural/attack_hand(mob/user)
/obj/item/paper_bin/bundlenatural/attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
..()
if(total_paper < 1)
qdel(src)
+1
View File
@@ -123,6 +123,7 @@
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>"
+28 -34
View File
@@ -31,7 +31,7 @@
/obj/machinery/photocopier/ui_interact(mob/user)
. = ..()
var/dat = "Photocopier<BR><BR>"
var/list/dat = list("Photocopier<BR><BR>")
if(copy || photocopy || doccopy || (ass && (ass.loc == src.loc)))
dat += "<a href='byond://?src=[REF(src)];remove=1'>Remove Paper</a><BR>"
if(toner)
@@ -48,7 +48,7 @@
dat += "Current toner level: [toner]"
if(!toner)
dat +="<BR>Please insert a new toner cartridge!"
user << browse(dat, "window=copier")
user << browse(dat.Join(""), "window=copier")
onclose(user, "copier")
/obj/machinery/photocopier/Topic(href, href_list)
@@ -77,17 +77,14 @@
c.info += copied
c.info += "</font>"
c.name = copy.name
c.fields = copy.fields
c.update_icon()
c.updateinfolinks()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = TRUE
sleep(15)
busy = FALSE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
else
break
updateUsrDialog()
@@ -96,8 +93,7 @@
if(toner >= 5 && !busy && photocopy) //Was set to = 0, but if there was say 3 toner left and this ran, you would get -2 which would be weird for ink
new /obj/item/photo (loc, photocopy.picture.Copy(greytoggle == "Greyscale"? TRUE : FALSE))
busy = TRUE
sleep(15)
busy = FALSE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
else
break
else if(doccopy)
@@ -106,40 +102,35 @@
new /obj/item/documents/photocopy(loc, doccopy)
toner-= 6 // the sprite shows 6 papers, yes I checked
busy = TRUE
sleep(15)
busy = FALSE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
else
break
updateUsrDialog()
else if(ass) //ASS COPY. By Miauw
for(var/i = 0, i < copies, i++)
var/icon/temp_img
if(ishuman(ass) && (ass.get_item_by_slot(SLOT_W_UNIFORM) || ass.get_item_by_slot(SLOT_WEAR_SUIT)))
if(ishuman(ass) && (ass.get_item_by_slot(ITEM_SLOT_ICLOTHING) || ass.get_item_by_slot(ITEM_SLOT_OCLOTHING)))
to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_their()]"] clothes on.</span>" )
break
else if(toner >= 5 && !busy && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
if(isalienadult(ass) || istype(ass, /mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/ass/assalien.png')
else if(ishuman(ass)) //Suit checks are in check_ass
var/mob/living/carbon/human/H = ass
if(H.dna.features["body_model"] == FEMALE)
temp_img = icon('icons/ass/assfemale.png')
else
temp_img = icon('icons/ass/assmale.png')
temp_img = icon(ass.gender == FEMALE ? 'icons/ass/assfemale.png' : 'icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')
else
break
var/obj/item/photo/p = new /obj/item/photo (loc)
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.picture = new(null, "You see [ass]'s ass on the photo.", temp_img)
p.picture.psize_x = 128
p.picture.psize_y = 128
p.update_icon()
toner -= 5
busy = TRUE
sleep(15)
var/obj/item/photo/p = new /obj/item/photo (loc)
var/datum/picture/toEmbed = new(name = "[ass]'s Ass", desc = "You see [ass]'s ass on the photo.", image = temp_img)
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toEmbed.psize_x = 128
toEmbed.psize_y = 128
p.set_picture(toEmbed, TRUE, TRUE)
toner -= 5
busy = FALSE
else
break
@@ -179,8 +170,7 @@
photo.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = TRUE
sleep(15)
busy = FALSE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
@@ -189,9 +179,13 @@
greytoggle = "Greyscale"
updateUsrDialog()
/obj/machinery/photocopier/proc/reset_busy()
busy = FALSE
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
O.forceMove(src)
to_chat(user, "<span class ='notice'>You insert [O] into [src].</span>")
to_chat(user, "<span class='notice'>You insert [O] into [src].</span>")
flick("photocopier1", src)
updateUsrDialog()
@@ -256,10 +250,10 @@
return ..()
/obj/machinery/photocopier/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
if(toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
. = ..()
if(. && toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
@@ -267,7 +261,7 @@
return
src.add_fingerprint(user)
if(target == user)
user.visible_message("[user] starts climbing onto the photocopier!", "<span class='notice'>You start climbing onto the photocopier...</span>")
user.visible_message("<span class='notice'>[user] starts climbing onto the photocopier!</span>", "<span class='notice'>You start climbing onto the photocopier...</span>")
else
user.visible_message("<span class='warning'>[user] starts putting [target] onto the photocopier!</span>", "<span class='notice'>You start putting [target] onto the photocopier...</span>")
@@ -276,7 +270,7 @@
return
if(target == user)
user.visible_message("[user] climbs onto the photocopier!", "<span class='notice'>You climb onto the photocopier.</span>")
user.visible_message("<span class='notice'>[user] climbs onto the photocopier!</span>", "<span class='notice'>You climb onto the photocopier.</span>")
else
user.visible_message("<span class='warning'>[user] puts [target] onto the photocopier!</span>", "<span class='notice'>You put [target] onto the photocopier.</span>")
@@ -302,7 +296,7 @@
updateUsrDialog()
return 0
else if(ishuman(ass))
if(!ass.get_item_by_slot(SLOT_W_UNIFORM) && !ass.get_item_by_slot(SLOT_WEAR_SUIT))
if(!ass.get_item_by_slot(ITEM_SLOT_ICLOTHING) && !ass.get_item_by_slot(ITEM_SLOT_OCLOTHING))
return 1
else
return 0