Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glow Stickers #5904

Merged
merged 3 commits into from Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/datums/jobs.dm
Expand Up @@ -751,7 +751,8 @@ ABSTRACT_TYPE(/datum/job/engineering)
slot_head = list(/obj/item/clothing/head/helmet/space/engineer/diving/engineering)
items_in_backpack = list(/obj/item/crowbar,
/obj/item/paper/book/from_file/pocketguide/mining,
/obj/item/clothing/shoes/flippers)
/obj/item/clothing/shoes/flippers,
/obj/item/item_box/glow_sticker)
#else
slot_suit = list(/obj/item/clothing/suit/space/engineer)
slot_head = list(/obj/item/clothing/head/helmet/space/engineer)
Expand Down
23 changes: 21 additions & 2 deletions code/obj/item/generic_box.dm
Expand Up @@ -84,6 +84,16 @@
name = "box of bee stickers"
contained_item = /obj/item/sticker/bee

glow_sticker
name = "glow stickers"
desc = "A box of stickers that glow when stuck to things."
contained_item = null
item_amount = 20

New()
. = ..()
contained_item = pick(concrete_typesof(/obj/item/sticker/glow))

googly_eyes
name = "box of googly eyes"
desc = "If you give it googly eyes, it immediately becomes better!"
Expand Down Expand Up @@ -151,7 +161,7 @@
desc = "Oh my god.. ALL THE STICKERS! ALL IN ONE PLACE? WHAT CAN THIS MEAN!!!"

set_contained_items()
contained_items = childrentypesof( /obj/item/sticker/ ) - /obj/item/sticker/spy - childrentypesof( /obj/item/sticker/barcode )
contained_items = concrete_typesof( /obj/item/sticker/ ) - /obj/item/sticker/spy - typesof( /obj/item/sticker/barcode, /obj/item/sticker/glow )

robot//this type sticks things by clicking on them with a cooldown
name = "box shaped sticker dispenser"
Expand Down Expand Up @@ -182,7 +192,16 @@
max_item_amount = 10

set_contained_items()
contained_items = childrentypesof( /obj/item/sticker/ ) - childrentypesof( /obj/item/sticker/barcode ) - /obj/item/sticker/spy - /obj/item/sticker/ribbon/first_place - /obj/item/sticker/ribbon/second_place - /obj/item/sticker/ribbon/third_place
contained_items = concrete_typesof( /obj/item/sticker/ ) - typesof( /obj/item/sticker/barcode, /obj/item/sticker/glow ) - /obj/item/sticker/spy - /obj/item/sticker/ribbon/first_place - /obj/item/sticker/ribbon/second_place - /obj/item/sticker/ribbon/third_place

glow_sticker
name = "glow stickers"
desc = "A box of stickers that glow various colors when stuck to things."
contained_item = null
item_amount = 20

set_contained_items()
contained_items = concrete_typesof(/obj/item/sticker/glow)

ornaments
name = "box of assorted ornaments"
Expand Down
101 changes: 101 additions & 0 deletions code/obj/item/stickers.dm
Expand Up @@ -580,3 +580,104 @@
locked_frequency = 1
frequency = R_FREQ_DETECTIVE
chat_class = RADIOCL_DETECTIVE

ABSTRACT_TYPE(/obj/item/sticker/glow)
/obj/item/sticker/glow
name = "glow sticker"
desc = "A sticker that has been egineered to self-illuminate when stuck to things."
dont_make_an_overlay = TRUE
icon_state = "glow"
var/datum/component/holdertargeting/simple_light/light_c
var/col_r = 0
var/col_g = 0
var/col_b = 0
var/brightness = 0.6

New()
. = ..()
color = rgb(col_r*255, col_g*255, col_b*255)
light_c = src.AddComponent(/datum/component/holdertargeting/simple_light, col_r*255, col_g*255, col_b*255, brightness*255)
light_c.update(0)

attack_hand(mob/user as mob)
user.lastattacked = user
if (src.attached)
if (user.a_intent == INTENT_HELP)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like grab would make more sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these mimic sticky notes which use help

boutput(user, "You peel \the [src] off of \the [src.attached].")
src.remove_from_attached()
src.add_fingerprint(user)
user.put_in_hand_or_drop(src)
else
src.attached.Attackhand(user)
user.lastattacked = user
else
return ..()

stick_to(var/atom/A, var/pox, var/poy)
..()
if (istype(src.attached, /mob) || istype(src.attached, /obj))
var/atom/movable/F = src.attached
src.layer = F.layer + 0.1
src.plane = F.plane
F.vis_contents += src
else if (istype(src.attached, /turf))
var/turf/F = src.attached
src.layer = F.layer + 0.1
src.plane = F.plane
F.vis_contents += src
light_c.update(1)

proc/remove_from_attached()
if (!src.attached)
return
if (istype(src.attached, /atom/movable))
var/atom/movable/F = src.attached
F.vis_contents -= src
else if (istype(src.attached, /turf))
var/turf/F = src.attached
F.vis_contents -= src

src.set_loc(src.attached.loc)
src.layer = initial(src.layer)
src.plane = initial(src.plane)
src.pixel_x = initial(src.pixel_x)
src.pixel_y = initial(src.pixel_y)
src.attached = null
light_c.update(0)

green
col_r = 0.0
col_g = 0.9
col_b = 0.1
white
col_r = 0.9
col_g = 0.9
col_b = 0.9
yellow
col_r = 0.9
col_g = 0.8
col_b = 0.1
blue
col_r = 0.1
col_g = 0.1
col_b = 0.9
purple
col_r = 0.6
col_g = 0.1
col_b = 0.9
pink
col_r = 0.9
col_g = 0.5
col_b = 0.9
cyan
col_r = 0.1
col_g = 0.9
col_b = 0.9
oranange
col_r = 0.9
col_g = 0.6
col_b = 0.1
red
col_r = 0.9
col_g = 0.1
col_b = 0.0
Binary file modified icons/misc/stickers.dmi
Binary file not shown.