Files
DrathekandGitHub 7c8bb85de3 Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings

* Whitespace changes

* Comment out merger hooks in gitattributes

Corrupt maps would have to be resolved in repo before hooks could be updated

* Revert "Whitespace changes"

This reverts commit afbdd1d8442973f5d570c30920d9d865b5acd479.

* Whitespace again minus example

* Gitignore example changelog

* Restore changelog merge setting

* Keep older dmi hook attribute until hooks can be updated

* update vscode settings too

* Renormalize remaining

* Revert "Gitignore example changelog"

This reverts commit de22ad375d3ee4d5930c550da2fd23a29a86e616.

* Attempt to normalize example.yml (and another file I guess)

* Try again
2024-02-20 11:28:51 +01:00

52 lines
1.5 KiB
Plaintext

/obj/item/weapon/paper/carbon
name = "paper"
icon_state = "paper_stack"
item_state = "paper"
var/copied = 0
var/iscopy = 0
/obj/item/weapon/paper/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/weapon/paper/carbon/verb/removecopy()
set name = "Remove carbon-copy"
set category = "Object"
set src in usr
if (copied == 0)
var/obj/item/weapon/paper/carbon/c = src
var/copycontents = html_decode(c.info)
var/obj/item/weapon/paper/carbon/copy = new /obj/item/weapon/paper/carbon (usr.loc)
// <font>
copycontents = replacetext(copycontents, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
copycontents = replacetext(copycontents, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.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 - " + c.name
copy.fields = c.fields
copy.updateinfolinks()
to_chat(usr, "<span class='notice'>You tear off the carbon-copy!</span>")
c.copied = 1
copy.iscopy = 1
copy.update_icon()
c.update_icon()
else
to_chat(usr, "There are no more carbon copies attached to this paper!")