From 2d54cad664f51ebecb1ab425fbcb8d1f8757f093 Mon Sep 17 00:00:00 2001 From: Lohikar Date: Sat, 28 Jan 2017 17:12:56 -0600 Subject: [PATCH] Paper airplanes (#1651) changes: rscadd: "You can now fold pieces of paper into paper airplanes, which can be thrown farther than unfolded sheets of paper." Also slightly adjusted paper-crumple messages. --- code/modules/paperwork/paper.dm | 28 +++++++++++++++++++++++- html/changelogs/lohikar-paper-planes.yml | 4 ++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/lohikar-paper-planes.yml diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 75bab36d70a..9ea20407159 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -30,6 +30,7 @@ var/list/offset_y[0] //usage by the photocopier var/rigged = 0 var/spam_flag = 0 + var/old_name // The name of the paper before it was folded into a plane. var/const/deffont = "Verdana" var/const/signfont = "Times New Roman" @@ -84,6 +85,9 @@ /obj/item/weapon/paper/examine(mob/user) ..() + if (old_name && icon_state == "paper_plane") + user << span("notice", "You're going to have to unfold it before you can read it.") + return if(name != "sheet of paper") user << "It's titled '[name]'." if(in_range(user, src) || isobserver(user)) @@ -122,9 +126,31 @@ return //crumple dat paper info = stars(info,85) - user.visible_message("\The [user] crumples \the [src] into a ball!") + user.visible_message("\The [user] crumples \the [src] into a ball!", "You crumple \the [src] into a ball.", "You hear crinkling.") icon_state = "scrap" return + + if (user.a_intent == I_GRAB && icon_state != "scrap" && !istype(src, /obj/item/weapon/paper/carbon)) + if (icon_state == "paper_plane") + user.show_message(span("alert", "The paper is already folded into a plane.")) + return + user.visible_message(span("notice", "\The [user] carefully folds \the [src] into a plane."), + span("notice", "You carefully fold \the [src] into a plane."), "You hear paper rustling.") + icon_state = "paper_plane" + throw_range = 8 + old_name = name + name = "paper plane" + return + + if (user.a_intent == I_HELP && old_name && icon_state == "paper_plane") + user.visible_message(span("notice", "the [src] unfolds \the [src]."), span("notice", "You unfold \the [src]."), "You hear paper rustling.") + icon_state = initial(icon_state) + throw_range = initial(throw_range) + name = old_name + old_name = null + update_icon() + return + user.examinate(src) if(rigged && (Holiday == "April Fool's Day")) if(spam_flag == 0) diff --git a/html/changelogs/lohikar-paper-planes.yml b/html/changelogs/lohikar-paper-planes.yml new file mode 100644 index 00000000000..a22cb8440c1 --- /dev/null +++ b/html/changelogs/lohikar-paper-planes.yml @@ -0,0 +1,4 @@ +author: Lohikar +delete-after: True +changes: + - rscadd: "You can now fold pieces of paper into paper airplanes, which can be thrown farther than unfolded sheets of paper."