forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ports carbon paper from Bay. (tgstation#47691)
* 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
1 parent
2e1bbc3
commit ff42a15
Showing
12 changed files
with
106 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ..() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters