Files
Aurora.3/code/modules/paperwork/carbonpaper.dm
Wowzewow (Wezzy) 0549da254f Business card buffs (#12810)
* bizniz cards

* Buffs business cards.

* Update wezzy_businesscardbuffs.yml

* oops

* Update code/game/objects/items/weapons/storage/business_card.dm

Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/business_card.dm

Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/business_card.dm

Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>

* Update code/game/objects/items/weapons/storage/business_card.dm

Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>

* fix

* Update wezzy_businesscardbuffs.yml

* makes business cards unfoildable and glass immune to fire

* KOLORS

* spy fortress 2

* dent

* A

* undoes purse change

Co-authored-by: Casper3667 <8396443+Casper3667@users.noreply.github.com>
Co-authored-by: TGW <mc-casper@hotmail.dk>
Co-authored-by: Werner <1331699+Arrow768@users.noreply.github.com>
2021-12-19 22:22:28 +01:00

54 lines
1.8 KiB
Plaintext

/obj/item/paper/carbon
name = "paper"
icon_state = "paper_stack"
item_state = "paper"
var/copied = FALSE
var/iscopy = FALSE
can_fold = FALSE
/obj/item/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/paper/carbon/verb/removecopy()
set name = "Remove carbon-copy"
set category = "Object"
set src in usr
if (copied == 0)
var/obj/item/paper/carbon/c = src
var/copycontents = html_decode(c.info)
var/obj/item/paper/carbon/copy = new /obj/item/paper/carbon (usr.loc) // TODO: a better way of making copies that maintains icon state without bloating paper.dm and also doesn't give copies the remove copy verb
// <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 = TRUE
copy.iscopy = TRUE
copy.copied = TRUE // no more infinite copy chains
copy.verbs -= /obj/item/paper/carbon/verb/removecopy // TODO: anything but this, see above
copy.update_icon()
c.update_icon()
else
to_chat(usr, "There are no more carbon copies attached to this paper!")