Merge branch 'master' into nanoui-is-dead

This commit is contained in:
AffectedArc07
2020-11-26 09:34:14 +00:00
committed by GitHub
70 changed files with 719 additions and 1906 deletions
+20
View File
@@ -12,6 +12,7 @@
desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "newspaper"
item_state = "newspaper"
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("bapped")
/// The current screen to display.
@@ -28,6 +29,8 @@
var/scribble = ""
/// The page of said scribble.
var/scribble_page = null
/// Whether the newspaper is rolled or not, making it a deadly weapon.
var/rolled = FALSE
/obj/item/newspaper/Initialize(mapload)
. = ..()
@@ -35,6 +38,9 @@
news_content = list()
/obj/item/newspaper/attack_self(mob/user)
if(rolled)
to_chat(user, "<span class='warning'>Unroll it first!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/human_user = user
var/dat
@@ -146,6 +152,9 @@
/obj/item/newspaper/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(rolled)
to_chat(user, "<span class='warning'>Unroll it first!</span>")
return
if(scribble_page == curr_page)
to_chat(user, "<span class='notice'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</span>")
else
@@ -161,6 +170,17 @@
return
return ..()
/obj/item/newspaper/AltClick(mob/user)
if(ishuman(user) && Adjacent(user) && !user.incapacitated())
rolled = !rolled
icon_state = "newspaper[rolled ? "_rolled" : ""]"
update_icon()
var/verbtext = "[rolled ? "" : "un"]roll"
user.visible_message("<span class='notice'>[user] [verbtext]s [src].</span>",\
"<span class='notice'>You [verbtext] [src].</span>")
name = "[rolled ? "rolled" : ""] [initial(name)]"
return ..()
#undef SCREEN_COVER
#undef SCREEN_PAGE_INNER
#undef SCREEN_PAGE_LAST