Skip to content

Commit

Permalink
Ports carbon paper from Bay. (tgstation#47691)
Browse files Browse the repository at this point in the history
* Ports carbon paper.

* Can't fold stacked carbon paper into paperplane.

* Changes some update_icon()'s into update_icon_state()'s

* Does as Action asked.

* Return is returned to the box from whence it came.
  • Loading branch information
Firecage authored and actioninja committed Nov 14, 2019
1 parent 2e1bbc3 commit ff42a15
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 39 deletions.
20 changes: 12 additions & 8 deletions _maps/map_files/BoxStation/BoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -7908,12 +7908,16 @@
/area/construction/mining/aux_base)
"atc" = (
/obj/structure/table/wood,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
/obj/item/clothing/glasses/sunglasses,
/obj/item/reagent_containers/food/drinks/bottle/whiskey{
pixel_x = 3
},
/obj/item/lighter,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/carpet,
/area/security/detectives_office)
"atd" = (
Expand Down Expand Up @@ -8276,11 +8280,11 @@
/area/lawoffice)
"aui" = (
/obj/structure/table/wood,
/obj/item/camera/detective,
/obj/structure/disposalpipe/segment{
dir = 9
},
/obj/machinery/light/small,
/obj/item/camera/detective,
/turf/open/floor/carpet,
/area/security/detectives_office)
"auj" = (
Expand Down Expand Up @@ -27614,7 +27618,7 @@
/area/crew_quarters/heads/hop)
"btD" = (
/obj/structure/table,
/obj/item/paper_bin{
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
Expand Down Expand Up @@ -29263,18 +29267,18 @@
/area/crew_quarters/heads/hor)
"byc" = (
/obj/structure/table,
/obj/item/paper_bin{
pixel_x = -3;
pixel_y = 7
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
/obj/item/stamp/qm,
/obj/effect/turf_decal/tile/brown,
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
/obj/item/stamp/qm,
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"byd" = (
Expand Down
7 changes: 4 additions & 3 deletions _maps/map_files/Deltastation/DeltaStation2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -25243,11 +25243,11 @@
"aZc" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/table,
/obj/item/paper_bin,
/obj/effect/turf_decal/tile/brown,
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/item/paper_bin/carbon,
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"aZd" = (
Expand Down Expand Up @@ -50593,9 +50593,10 @@
/area/security/detectives_office)
"bRj" = (
/obj/structure/table/wood,
/obj/item/paper_bin,
/obj/item/pen,
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/item/paper_bin/carbon,
/obj/item/pen,
/turf/open/floor/carpet,
/area/security/detectives_office)
"bRk" = (
Expand Down Expand Up @@ -54183,7 +54184,7 @@
/area/crew_quarters/heads/hop)
"bWR" = (
/obj/structure/table/wood,
/obj/item/paper_bin,
/obj/item/paper_bin/carbon,
/obj/item/stamp/hop,
/turf/open/floor/wood,
/area/crew_quarters/heads/hop)
Expand Down
10 changes: 7 additions & 3 deletions _maps/map_files/Donutstation/Donutstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -25310,6 +25310,10 @@
/area/crew_quarters/fitness/recreation)
"bqb" = (
/obj/structure/table/wood,
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
/obj/item/reagent_containers/food/drinks/bottle/whiskey{
pixel_x = 3
},
Expand Down Expand Up @@ -29963,7 +29967,7 @@
/area/crew_quarters/heads/hor)
"bBh" = (
/obj/structure/table,
/obj/item/paper_bin{
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
Expand Down Expand Up @@ -30422,12 +30426,12 @@
/area/maintenance/port/aft)
"bCk" = (
/obj/structure/table,
/obj/item/paper_bin{
/obj/structure/cable,
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
/obj/item/stamp/hop,
/obj/structure/cable,
/turf/open/floor/carpet,
/area/crew_quarters/heads/hop)
"bCl" = (
Expand Down
18 changes: 9 additions & 9 deletions _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
/area/solar/port/fore)
"aam" = (
/obj/structure/table/wood,
/obj/item/paper_bin{
/obj/machinery/button/ticket_machine{
pixel_x = 32
},
/obj/item/paper_bin/carbon{
pixel_x = -2;
pixel_y = 4
},
/obj/item/stamp/hop{
pixel_x = -4;
pixel_y = 4
},
/obj/machinery/button/ticket_machine{
pixel_x = 32
},
/turf/open/floor/wood,
/area/crew_quarters/heads/hop)
"aan" = (
Expand Down Expand Up @@ -13343,7 +13343,7 @@
/area/security/detectives_office)
"aCv" = (
/obj/structure/table/wood,
/obj/item/paper_bin{
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
Expand Down Expand Up @@ -19902,14 +19902,14 @@
/area/quartermaster/qm)
"aRN" = (
/obj/structure/table,
/obj/item/paper_bin{
pixel_x = -3;
pixel_y = 7
},
/obj/effect/turf_decal/tile/brown,
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/item/paper_bin/carbon{
pixel_x = -3;
pixel_y = 7
},
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"aRO" = (
Expand Down
14 changes: 7 additions & 7 deletions _maps/map_files/PubbyStation/PubbyStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
/obj/item/radio/intercom{
pixel_x = 27
},
/obj/item/paper_bin{
layer = 2.9
},
/obj/machinery/button/ticket_machine{
pixel_x = 28;
pixel_y = -12
},
/obj/item/paper_bin/carbon{
layer = 2.9
},
/turf/open/floor/carpet,
/area/crew_quarters/heads/hop)
"aah" = (
Expand Down Expand Up @@ -11824,7 +11824,7 @@
"aEn" = (
/obj/structure/table/wood,
/obj/item/pen,
/obj/item/paper_bin{
/obj/item/paper_bin/carbon{
layer = 2.9
},
/turf/open/floor/carpet,
Expand Down Expand Up @@ -22590,9 +22590,6 @@
departmentType = 2;
pixel_x = -30
},
/obj/item/paper_bin{
layer = 2.9
},
/obj/item/pen,
/obj/effect/turf_decal/tile/brown{
dir = 1
Expand All @@ -22601,6 +22598,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/item/paper_bin/carbon{
layer = 2.9
},
/turf/open/floor/plasteel,
/area/quartermaster/qm)
"bfC" = (
Expand Down
5 changes: 3 additions & 2 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2414,14 +2414,15 @@

/datum/supply_pack/misc/paper
name = "Bureaucracy Crate"
desc = "High stacks of papers on your desk Are a big problem - make it Pea-sized with these bureaucratic supplies! Contains six pens, some camera film, hand labeler supplies, a paper bin, three folders, a laser pointer, two clipboards and two stamps."//that was too forced
cost = 1500
desc = "High stacks of papers on your desk Are a big problem - make it Pea-sized with these bureaucratic supplies! Contains six pens, some camera film, hand labeler supplies, a paper bin, a carbon paper bin, three folders, a laser pointer, two clipboards and two stamps."//that was too forced
cost = 1600
contains = list(/obj/structure/filingcabinet/chestdrawer/wheeled,
/obj/item/camera_film,
/obj/item/hand_labeler,
/obj/item/hand_labeler_refill,
/obj/item/hand_labeler_refill,
/obj/item/paper_bin,
/obj/item/paper_bin/carbon,
/obj/item/pen/fourcolor,
/obj/item/pen/fourcolor,
/obj/item/pen,
Expand Down
45 changes: 45 additions & 0 deletions code/modules/paperwork/carbonpaper.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/obj/item/paper/carbon
name = "sheet of carbon"
icon_state = "paper_stack"
item_state = "paper"
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]"
Copy.fields = C.fields
Copy.updateinfolinks()
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/attack_hand(mob/living/user)
if(loc == user && user.is_holding(src))
removecopy(user)
return
return ..()
14 changes: 7 additions & 7 deletions code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
. = ..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
update_icon()
update_icon_state()
updateinfolinks()


/obj/item/paper/update_icon()
/obj/item/paper/update_icon_state()

if(resistance_flags & ON_FIRE)
icon_state = "paper_onfire"
Expand Down Expand Up @@ -185,7 +185,7 @@
LAZYCLEARLIST(stamped)
cut_overlays()
updateinfolinks()
update_icon()
update_icon_state()


/obj/item/paper/proc/parsepencode(t, obj/item/pen/P, mob/user, iscrayon = 0)
Expand Down Expand Up @@ -280,7 +280,7 @@
info += t // Oh, he wants to edit to the end of the file, let him.
updateinfolinks()
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links]<HR>[stamps]</BODY><div align='right'style='position:fixed;bottom:0;font-style:bold;'><A href='?src=[REF(src)];help=1'>\[?\]</A></div></HTML>", "window=[name]") // Update the window
update_icon()
update_icon_state()


/obj/item/paper/attackby(obj/item/P, mob/living/carbon/human/user, params)
Expand Down Expand Up @@ -340,13 +340,13 @@
/obj/item/paper/fire_act(exposed_temperature, exposed_volume)
..()
if(!(resistance_flags & FIRE_PROOF))
icon_state = "paper_onfire"
add_overlay("paper_onfire_overlay")
info = "[stars(info)]"


/obj/item/paper/extinguish()
..()
update_icon()
cut_overlay("paper_onfire_overlay")

/*
* Construction paper
Expand All @@ -371,7 +371,7 @@
icon_state = "scrap"
slot_flags = null

/obj/item/paper/crumpled/update_icon()
/obj/item/paper/crumpled/update_icon_state()
return

/obj/item/paper/crumpled/bloody
Expand Down
6 changes: 6 additions & 0 deletions code/modules/paperwork/paperbin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,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
5 changes: 5 additions & 0 deletions code/modules/paperwork/paperplane.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@
/obj/item/paper/AltClick(mob/living/carbon/user, obj/item/I)
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
Expand Down
Binary file modified icons/obj/bureaucracy.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2364,6 +2364,7 @@
#include "code\modules\NTNet\network.dm"
#include "code\modules\NTNet\relays.dm"
#include "code\modules\NTNet\services\_service.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\contract.dm"
#include "code\modules\paperwork\filingcabinet.dm"
Expand Down

0 comments on commit ff42a15

Please sign in to comment.