Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Paperwork Prefabs #5265

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1ae9e9f
x
realforest2001 Dec 13, 2023
7cee84a
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 18, 2023
0851378
It works!
realforest2001 Dec 19, 2023
55870bd
pens and some MP forms
realforest2001 Dec 20, 2023
328dae8
WY liaison docs
realforest2001 Dec 20, 2023
6f6c5e9
state
realforest2001 Dec 20, 2023
7015f84
x
realforest2001 Dec 20, 2023
b4f9ac9
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 20, 2023
f0b98a5
cl mapping
realforest2001 Dec 20, 2023
2db8a2e
x
realforest2001 Dec 23, 2023
0aaccae
Merge branch 'master' into forest/paperwork
realforest2001 Apr 26, 2024
cf8ddc5
works with the CDN.
realforest2001 Apr 26, 2024
df10b99
Apply suggestions from code review
realforest2001 Apr 26, 2024
7eff867
reset almayer to master
realforest2001 Apr 26, 2024
391c619
cl and brig
realforest2001 Apr 26, 2024
96d6d46
chinook pens
realforest2001 Apr 26, 2024
8682416
icons
realforest2001 Apr 26, 2024
bca88a5
wrong cabinet!
realforest2001 Apr 26, 2024
7b4fc48
wy_bw
realforest2001 Apr 26, 2024
14ad4e5
crayon blanks
realforest2001 Apr 26, 2024
5538d00
I fixed fields!
realforest2001 Apr 27, 2024
e4ce751
reshuffle
realforest2001 Apr 28, 2024
831b821
Update code/modules/paperwork/prefab_papers/wey_yu/liaison/nda_long.dm
realforest2001 May 1, 2024
16db60d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Jul 30, 2024
991981d
floor fix
realforest2001 Jul 30, 2024
61f0ab2
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 10, 2024
3991b2f
scale
realforest2001 Sep 10, 2024
2dd3bc0
map reset
realforest2001 Sep 10, 2024
849386d
dead mao
realforest2001 Sep 10, 2024
b56e5e1
attempt 2
realforest2001 Sep 10, 2024
0bed0c7
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 13, 2024
37e6446
hc paper
realforest2001 Sep 14, 2024
9b4cf0c
colour scheme
realforest2001 Sep 14, 2024
0a29a5d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 14, 2024
45792f7
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions code/__DEFINES/paperwork.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define PAPER_CATEGORY_USCM "USCM"
#define PAPER_CATEGORY_USCM_HC "USCM HC"
#define PAPER_CATEGORY_PROVOST "Provost"
#define PAPER_CATEGORY_WEYYU "Weyland Yutani"
#define PAPER_CATEGORY_UPP "UPP"
#define PAPER_CATEGORY_CMB "CMB"
#define PAPER_CATEGORY_MP "Military Police"
#define PAPER_CATEGORY_LIAISON "WY Liaison"
2 changes: 1 addition & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper)
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.name = text("Scan: [], []",record.fields["name"],worldtime2text())
P.info += text("<center><img src = [asset.get_url_mappings()["wylogo.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
P.info += text("<center><img src = [asset.get_url_mappings()["logo_wy.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
for(var/datum/data/record/R as anything in GLOB.data_core.medical)
if (R.fields["name"] == record.fields["name"])
if(R.fields["last_scan_time"] && R.fields["last_scan_result"])
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
/obj/item/tool/pen = 10,
/obj/item/tool/pen/blue = 10,
/obj/item/tool/pen/red = 10,
/obj/item/tool/pen/fountain = 3,
/obj/item/tool/pen/multicolor/fountain = 3,
/obj/item/storage/fancy/cigarettes/trading_card = 20,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 50,
Expand Down Expand Up @@ -473,7 +473,7 @@
/obj/item/tool/pen = 2,
/obj/item/tool/pen/blue = 2,
/obj/item/tool/pen/red = 2,
/obj/item/tool/pen/fountain = 30,
/obj/item/tool/pen/multicolor/fountain = 30,
/obj/item/storage/fancy/cigarettes/trading_card = 30,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 5,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/spawners/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
/obj/item/storage/belt/champion,\
/obj/item/tool/soap/deluxe,\
/obj/item/tool/pickaxe/silver,\
/obj/item/tool/pen/invisible,\
/obj/item/tool/pen/white,\
/obj/item/explosive/grenade/smokebomb,\
/obj/item/corncob,\
/obj/item/poster,\
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/gift_wrappaper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/obj/item/storage/belt/champion,
/obj/item/tool/soap/deluxe,
/obj/item/tool/pickaxe/silver,
/obj/item/tool/pen/invisible,
/obj/item/tool/pen/white,
/obj/item/explosive/grenade/smokebomb,
/obj/item/corncob,
/obj/item/poster,
Expand Down
92 changes: 50 additions & 42 deletions code/game/objects/items/tools/misc_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
if(isturf(A))
to_chat(user, SPAN_WARNING("The label won't stick to that."))
return
if(istype(A, /obj/item/storage/pill_bottle))
if(istype(A, /obj/item/storage/pill_bottle))
var/obj/item/storage/pill_bottle/target_pill_bottle = A
target_pill_bottle.choose_color(user)

if(!label || !length(label))
remove_label(A, user)
return
Expand Down Expand Up @@ -186,6 +186,16 @@
if(on)
overlays += "+[pen_color]_tip"

/obj/item/tool/pen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
to_chat(user, SPAN_WARNING("You stab [M] with the pen."))
M.last_damage_data = create_cause_data(initial(name), user)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [key_name(user)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [key_name(M)]</font>")
msg_admin_attack("[key_name(user)] Used the [name] to stab [key_name(M)] in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z)
return

realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
/obj/item/tool/pen/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!isobj(target))
Expand Down Expand Up @@ -275,77 +285,78 @@
name = "WY green pen"
clicky = TRUE

/obj/item/tool/pen/invisible
desc = "It's an invisible pen marker."
/obj/item/tool/pen/white
desc = "It's a rare white ink pen."
pen_color = "white"

/obj/item/tool/pen/fountain
/obj/item/tool/pen/white/clicky
desc = "It's a WY brand extra clicky white ink pen."
name = "WY white pen"
clicky = TRUE

/obj/item/tool/pen/multicolor
name = "multicolor pen"
desc = "A color switching pen!"
var/list/colour_list = list("red", "blue", "black")
var/current_colour_index = 1

/obj/item/tool/pen/multicolor/attack_self(mob/living/carbon/human/user)
if(on)
current_colour_index = (current_colour_index % length(colour_list)) + 1
pen_color = colour_list[current_colour_index]
balloon_alert(user,"you twist the pen and change the ink color to [pen_color].")
if(clicky)
playsound(user.loc, 'sound/items/pen_click_on.ogg', 100, 1, 5)
update_pen_state()
else
..()

/obj/item/tool/pen/multicolor/fountain
desc = "A lavish testament to the ingenuity of ARMAT's craftsmanship, this fountain pen is a paragon of design and functionality. Detailed with golden accents and intricate mechanics, the pen allows for a swift change between a myriad of ink colors with a simple twist. A product of precision engineering, each mechanism inside the pen is designed to provide a seamless, effortless transition from one color to the next, creating an instrument of luxurious versatility."
desc_lore = "More than just a tool for writing, ARMAT's fountain pen is a symbol of distinction and authority within the ranks of the United States Colonial Marine Corps (USCM). It is a legacy item, exclusively handed out to the top-tier command personnel, each pen a tribute to the recipient's leadership and dedication.\n \nARMAT, renowned for their weapons technology, took a different approach in crafting this piece. The fountain pen, though seemingly a departure from their usual field, is deeply ingrained with the company's engineering philosophy, embodying precision, functionality, and robustness.\n \nThe golden accents are not mere embellishments; they're an identifier, setting apart these pens and their owners from the rest. The gold is meticulously alloyed with a durable metallic substance, granting it resilience to daily wear and tear. Such resilience is symbolic of the tenacity and perseverance required of USCM command personnel.\n \nEach pen is equipped with an intricate color changing mechanism, allowing the user to switch between various ink colors. This feature, inspired by the advanced targeting systems of ARMAT's weaponry, uses miniaturized actuators and precision-ground components to smoothly transition the ink flow. A simple twist of the pen's body activates the change, rotating the internal ink cartridges into place with mechanical grace, ready for the user's command.\n \nThe ink colors are not chosen arbitrarily. Each represents a different echelon within the USCM, allowing the pen's owner to write in the hue that corresponds with their rank or the rank of the recipient of their written orders. This acts as a silent testament to the authority of their words, as if each stroke of the pen echoes through the halls of USCM authority.\n \nDespite its ornate appearance, the pen is as robust as any ARMAT weapon, reflecting the company's commitment to reliability and durability. The metal components are corrosion-resistant, ensuring the pen's longevity, even under the challenging conditions often faced by USCM high command.\n \nThe fusion of luxury and utility, the blend of gold and metal, is an embodiment of the hard-won elegance of command, of the fusion between power and grace. It's more than a writing instrument - it's an emblem of leadership, an accolade to the dedication and strength of those who bear it. ARMAT's fountain pen stands as a monument to the precision, integrity, and courage embodied by the USCM's highest-ranking officers."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyphen for color-changing to indicate noun-modified-to-function-as-adjective
Each pen is equipped with an intricate color-changing mechanism

name = "fountain pen"
icon_state = "fountain_pen"
item_state = "fountain_pen"
matter = list("metal" = 20, "gold" = 10)
var/static/list/color_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required
var/current_color_index = 1
colour_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required
var/owner_name

/obj/item/tool/pen/fountain/pickup(mob/user, silent)
/obj/item/tool/pen/multicolor/fountain/pickup(mob/user, silent)
. = ..()
if(!owner_name)
RegisterSignal(user, COMSIG_POST_SPAWN_UPDATE, PROC_REF(set_owner), override = TRUE)

///Sets the owner of the pen to who it spawns with, requires var/source for signals
/obj/item/tool/pen/fountain/proc/set_owner(datum/source)
/obj/item/tool/pen/multicolor/fountain/proc/set_owner(datum/source)
SIGNAL_HANDLER
UnregisterSignal(source, COMSIG_POST_SPAWN_UPDATE)
var/mob/living/carbon/human/user = source
owner_name = user.name

/obj/item/tool/pen/fountain/get_examine_text(mob/user)
/obj/item/tool/pen/multicolor/fountain/get_examine_text(mob/user)
. = ..()
if(owner_name)
. += "There's a laser engraving of [owner_name] on it."

/obj/item/tool/pen/fountain/attack_self(mob/living/carbon/human/user)
if(on)
current_color_index = (current_color_index % length(color_list)) + 1
pen_color = color_list[current_color_index]
balloon_alert(user,"you twist the pen and change the ink color to [pen_color].")
if(clicky)
playsound(user.loc, 'sound/items/pen_click_on.ogg', 100, 1, 5)
update_pen_state()
else
..()

/obj/item/tool/pen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
to_chat(user, SPAN_WARNING("You stab [M] with the pen."))
// to_chat(M, SPAN_WARNING("You feel a tiny prick!")) //That's a whole lot of meta!
M.last_damage_data = create_cause_data(initial(name), user)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [key_name(user)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [key_name(M)]</font>")
msg_admin_attack("[key_name(user)] Used the [name] to stab [key_name(M)] in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z)
return

/obj/item/tool/pen/multicolor/provost
name = "provost pen"
desc = "A sleek black shell pen with the Provost Office sigil engraved into the side. It can change colors as needed for various functions within the Provost and Military Police."
icon_state = "provost_pen"
colour_list = list("blue", "green", "black", "orange", "red", "white")

/*
* Sleepy Pens
* Antag pens
*/
/obj/item/tool/pen/sleepypen
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags_atom = FPRINT|OPENCONTAINER
flags_equip_slot = SLOT_WAIST



/obj/item/tool/pen/sleepypen/Initialize()
. = ..()
create_reagents(30)
reagents.add_reagent("chloralhydrate", 22)


/obj/item/tool/pen/sleepypen/attack(mob/M as mob, mob/user as mob)
if(!(istype(M,/mob)))
return
Expand All @@ -354,16 +365,10 @@
if(M.reagents) reagents.trans_to(M, 50)
return


/*
* Parapens
*/
/obj/item/tool/pen/paralysis
flags_atom = FPRINT|OPENCONTAINER
flags_equip_slot = SLOT_WAIST



/obj/item/tool/pen/paralysis/attack(mob/living/M as mob, mob/user as mob)
if(!(istype(M)))
return
Expand All @@ -378,6 +383,9 @@
reagents.add_reagent("zombiepowder", 10)
reagents.add_reagent("cryptobiolin", 15)

/*
* Stamps
*/
/obj/item/tool/stamp
name = "rubber stamp"
desc = "A rubber stamp for stamping important documents."
Expand Down
2 changes: 1 addition & 1 deletion code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
temp += "<A href='?src=\ref[src];order=categories'>Back to all categories</A><HR><BR><BR>"
temp += SPAN_DANGER("ERR0R UNK7OWN C4T2G#!$0-<HR><HR><HR>")
if(black_market_lockout)
temp += "<DIV ALIGN='center'><BR><img src='cmblogo.png'><BR><BR><BR><BR><FONT SIZE=4><B>Unauthorized Access Removed.<BR>This console is currently under CMB investigation.<BR>Thank you for your cooperation.</FONT></div></B>"
temp += "<DIV ALIGN='center'><BR><img src='logo_cmb.png'><BR><BR><BR><BR><FONT SIZE=4><B>Unauthorized Access Removed.<BR>This console is currently under CMB investigation.<BR>Thank you for your cooperation.</FONT></div></B>"
return
temp += "KHZKNHZH#0-"
if(!GLOB.supply_controller.mendoza_status) // he's daed
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/fax_templates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
dat += "body {"
dat += "margin:0 auto;"
dat += "padding:0;"
dat += "background-image: url('[asset.get_url_mappings()["faxbackground.jpg"]]');"
dat += "background-image: url('[asset.get_url_mappings()["background_white.jpg"]]');"
dat += "font-family: monospace;"
dat += "}"

Expand Down Expand Up @@ -65,7 +65,7 @@

if(show_wy_logo)
dat += "<div id='fax-logo'>"
dat += "<img src='[asset.get_url_mappings()["faxwylogo.png"]]' alt='Something fucked!'/>"
dat += "<img src='[asset.get_url_mappings()["logo_wy.png"]]' alt='Something fucked!'/>"
dat += "</div>"

dat += "<div class='message-header-text'>"
Expand Down
18 changes: 11 additions & 7 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,17 @@
/datum/asset/simple/paper
keep_local_name = TRUE
assets = list(
"wylogo.png" = 'html/images/wylogo.png',
"uscmlogo.png" = 'html/images/uscmlogo.png',
"upplogo.png" = 'html/images/upplogo.png',
"cmblogo.png" = 'html/images/cmblogo.png',
"faxwylogo.png" = 'html/images/faxwylogo.png',
"faxbackground.jpg" = 'html/images/faxbackground.jpg',
"colonialspacegruntsEZ.png" = 'html/images/colonialspacegruntsEZ.png',
"logo_wy.png" = 'paper_reference_files/logo_wy.png',
"logo_wy_inv.png" = 'paper_reference_files/logo_wy_inv.png',
"logo_uscm.png" = 'paper_reference_files/logo_uscm.png',
"logo_provost.png" = 'paper_reference_files/logo_provost.png',
"logo_upp.png" = 'paper_reference_files/logo_upp.png',
"logo_cmb.png" = 'paper_reference_files/logo_cmb.png',
"background_white.jpg" = 'paper_reference_files/background_white.jpg',
"background_dark.jpg" = 'paper_reference_files/background_dark.jpg',
"background_dark2.jpg" = 'paper_reference_files/background_dark2.jpg',
"background_dark_fractal.png" = 'paper_reference_files/background_dark_fractal.png',
"colonialspacegruntsEZ.png" = 'paper_reference_files/colonialspacegruntsEZ.png',
)

/datum/asset/spritesheet/chat
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ GLOBAL_LIST_EMPTY(gear_datums_by_name)

/datum/gear/paperwork/pen_fountain
display_name = "Pen, fountain"
path = /obj/item/tool/pen/fountain
path = /obj/item/tool/pen/multicolor/fountain
cost = 3

/datum/gear/paperwork/paper
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/head.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
/obj/item/prop/helmetgarb/lucky_feather/blue = "lucky_feather_blue",
/obj/item/prop/helmetgarb/lucky_feather/purple = "lucky_feather_purple",
/obj/item/prop/helmetgarb/lucky_feather/yellow = "lucky_feather_yellow",
/obj/item/tool/pen/fountain = "fountainpen",
/obj/item/tool/pen/multicolor/fountain = "fountainpen",
)
var/storage_slots = 1
var/storage_slots_reserved_for_garb = 1
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
/obj/item/prop/helmetgarb/riot_shield = "helmet_riot_shield",
/obj/item/attachable/flashlight = HELMET_GARB_RELAY_ICON_STATE,
/obj/item/prop/helmetgarb/chaplain_patch = "chaplain_patch",
/obj/item/tool/pen/fountain = "fountainpen",
/obj/item/tool/pen/multicolor/fountain = "fountainpen",

// MEDICAL
/obj/item/stack/medical/bruise_pack ="brutepack (bandages)",
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/survivors/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Everything below isn't used or out of place.
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/survival/full(new_human), WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/notepad(new_human), WEAR_IN_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/pen/fountain(new_human), WEAR_IN_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/pen/multicolor/fountain(new_human), WEAR_IN_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(new_human), WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/med_small_stack(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/m1911(new_human), WEAR_WAIST)
Expand Down
59 changes: 52 additions & 7 deletions code/modules/paperwork/carbonpaper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name = "paper"
icon_state = "paper_stack"
item_state = "paper"
var/copied = 0
var/iscopy = 0

var/copied = FALSE
var/iscopy = FALSE

/obj/item/paper/carbon/update_icon()
if(iscopy)
Expand All @@ -23,8 +22,6 @@
return
icon_state = "paper_stack"



/obj/item/paper/carbon/verb/removecopy()
set name = "Remove carbon-copy"
set category = "Object"
Expand All @@ -42,9 +39,57 @@
copy.fields = c.fields
copy.updateinfolinks()
to_chat(usr, SPAN_NOTICE("You tear off the carbon-copy!"))
c.copied = 1
copy.iscopy = 1
c.copied = TRUE
copy.iscopy = TRUE
copy.update_icon()
c.update_icon()
else
to_chat(usr, "There are no more carbon copies attached to this paper!")

/obj/item/paper/prefab/carbon
name = "paper"
icon_state = "paper_stack"
item_state = "paper"
var/copied = FALSE
var/iscopy = FALSE

/obj/item/paper/prefab/carbon/update_icon()
if(iscopy)
if(info)
icon_state = "cpaper_words"
return
icon_state = "cpaper"
else if (copied)
if(info)
icon_state = "paper_words"
return
icon_state = "paper"
else
if(info)
icon_state = "paper_stack_words"
return
icon_state = "paper_stack"

/obj/item/paper/prefab/carbon/verb/removecopy()
set name = "Remove carbon-copy"
set category = "Object"
set src in usr

if (!copied && !iscopy)
var/obj/item/paper/prefab/carbon/this_doc = src
var/copycontents = html_decode(this_doc.info)
var/obj/item/paper/carbon/copy = new /obj/item/paper/carbon (usr.loc)
copycontents = replacetext(copycontents, "<font face=\"[this_doc.deffont]\" color=", "<font face=\"[this_doc.deffont]\" nocolor=") //state of the art techniques in action
copycontents = replacetext(copycontents, "<font face=\"[this_doc.crayonfont]\" color=", "<font face=\"[this_doc.crayonfont]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
copy.info += copycontents
copy.info += "</font>"
copy.name = "Copy - " + this_doc.name
copy.fields = this_doc.fields
copy.updateinfolinks()
to_chat(usr, SPAN_NOTICE("You tear off the carbon-copy!"))
this_doc.copied = TRUE
copy.iscopy = TRUE
copy.update_icon()
this_doc.update_icon()
else
to_chat(usr, "There are no more carbon copies attached to this paper!")
Loading
Loading