This commit is contained in:
Greenjoe12345
2023-09-27 01:34:19 +01:00
parent 5cf0edb95a
commit 1e42b7c27c
8 changed files with 102 additions and 36 deletions
+34
View File
@@ -0,0 +1,34 @@
/obj/item/sticky_pad/poster
name = "adhesive poster pad"
desc = "A stack of A3 papers with adhesive strips for attaching to walls."
icon = 'icons/obj/stickyposter.dmi'
color = COLOR_WHITE
icon_state = "poster_full"
description_info = "Click to remove a sticky poster from the pile. Click-drag to yourself to pick up the stack. Sticky posters stuck to surfaces/objects will persist for 50 rounds."
paper_type = /obj/item/paper/sticky/poster
/obj/item/sticky_pad/poster/update_icon()
if(papers <= 15)
icon_state = "poster_empty"
else if(papers <= 50)
icon_state = "poster_used"
else
icon_state = "poster_full"
if(written_text)
icon_state = "[icon_state]_writing"
/obj/item/sticky_pad/poster/yellow
color = COLOR_YELLOW
/obj/item/sticky_pad/poster/blue
color = COLOR_BABY_BLUE
/obj/item/sticky_pad/poster/command
color = COLOR_COMMAND_BLUE
/obj/item/paper/sticky/poster
name = "adhesive poster"
desc = "An A3 sheet of paper with adhesive strips for attaching to walls."
icon = 'icons/obj/stickyposter.dmi'
color = COLOR_WHITE
stickytype = /datum/persistent/paper/sticky/poster
+4 -4
View File
@@ -50,11 +50,10 @@
/obj/item/sticky_pad/examine(var/mob/user)
. = ..()
if(.)
to_chat(user, SPAN_NOTICE("It has [papers] sticky note\s left."))
to_chat(user, SPAN_NOTICE("It has [papers] [name]\s left in the stack."))
/obj/item/sticky_pad/attack_hand(var/mob/user)
var/obj/item/paper/paper = new paper_type(get_turf(src))
paper.set_content(written_text, "sticky note")
paper.last_modified_ckey = written_by
paper.color = color
written_text = null
@@ -94,13 +93,14 @@
icon = 'icons/obj/stickynotes.dmi'
color = COLOR_YELLOW
slot_flags = 0
var/stickytype = /datum/persistent/paper/sticky
/obj/item/paper/sticky/Initialize()
. = ..()
GLOB.moved_event.register(src, src, /obj/item/paper/sticky/proc/reset_persistence_tracking)
/obj/item/paper/sticky/proc/reset_persistence_tracking()
SSpersistence.forget_value(src, /datum/persistent/paper/sticky)
SSpersistence.forget_value(src, stickytype)
pixel_x = 0
pixel_y = 0
@@ -135,7 +135,7 @@
return
if(user.unEquip(src, source_turf))
SSpersistence.track_value(src, /datum/persistent/paper/sticky)
SSpersistence.track_value(src, stickytype)
if(params)
var/list/mouse_control = params2list(params)
if(mouse_control["icon-x"])
@@ -0,0 +1,3 @@
/datum/persistent/paper/sticky/poster
name = "stickyposters"
paper_type = /obj/item/paper/sticky/poster