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

[MIRROR] Posters return to your hand when cut down/not hung up, abductor posters more resilient to wirecutters #2440

Merged
merged 1 commit into from
Mar 17, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions code/game/objects/effects/posters/poster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
qdel(src)
else
to_chat(user, span_notice("You carefully remove the poster from the wall."))
roll_and_drop(Adjacent(user) ? get_turf(user) : loc)
roll_and_drop(Adjacent(user) ? get_turf(user) : loc, user)

/obj/structure/sign/poster/attack_hand(mob/user, list/modifiers)
. = ..()
Expand All @@ -207,11 +207,12 @@
return FALSE
return !user.gloves || !(user.gloves.body_parts_covered & HANDS) || HAS_TRAIT(user, TRAIT_FINGERPRINT_PASSTHROUGH) || HAS_TRAIT(user.gloves, TRAIT_FINGERPRINT_PASSTHROUGH)

/obj/structure/sign/poster/proc/roll_and_drop(atom/location)
/obj/structure/sign/poster/proc/roll_and_drop(atom/location, mob/user)
pixel_x = 0
pixel_y = 0
var/obj/item/poster/rolled_poster = new poster_item_type(location, src) // /obj/structure/sign/poster/wanted/roll_and_drop() has some snowflake handling due to icon memes, if you make a major change to this, don't forget to update it too. <3
forceMove(rolled_poster)
if(!user?.put_in_hands(rolled_poster))
forceMove(rolled_poster)
return rolled_poster

//separated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
Expand Down Expand Up @@ -246,7 +247,7 @@

var/turf/user_drop_location = get_turf(user) //cache this so it just falls to the ground if they move. also no tk memes allowed.
if(!do_after(user, PLACE_SPEED, placed_poster, extra_checks = CALLBACK(placed_poster, TYPE_PROC_REF(/obj/structure/sign/poster, snowflake_closed_turf_check), src)))
placed_poster.roll_and_drop(user_drop_location)
placed_poster.roll_and_drop(user_drop_location, user)
return

placed_poster.on_placed_poster(user)
Expand Down
5 changes: 3 additions & 2 deletions code/game/objects/effects/wanted_poster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@
poster_icon.Blend(letter_icon, ICON_OVERLAY)
startX = startX + 4

/obj/structure/sign/poster/wanted/roll_and_drop(atom/location)
/obj/structure/sign/poster/wanted/roll_and_drop(atom/location, mob/user)
pixel_x = 0
pixel_y = 0
var/obj/item/poster/rolled_poster = new poster_item_type(location, original_icon, wanted_name, desc, posterHeaderText, posterHeaderColor)
forceMove(rolled_poster)
if(!user?.put_in_hands(rolled_poster))
forceMove(rolled_poster)
return rolled_poster
2 changes: 1 addition & 1 deletion code/game/turfs/closed/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
for(var/obj/O in src.contents) //Eject contents!
if(istype(O, /obj/structure/sign/poster))
var/obj/structure/sign/poster/P = O
P.roll_and_drop(src)
INVOKE_ASYNC(P, TYPE_PROC_REF(/obj/structure/sign/poster, roll_and_drop), src)
if(decon_type)
ChangeTurf(decon_type, flags = CHANGETURF_INHERIT_AIR)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
return
return ..()

/obj/structure/sign/poster/abductor/attackby(obj/item/tool, mob/user, params)
if(tool.toolspeed >= 0.2)
balloon_alert(user, "tool too weak!")
return FALSE
return ..()

/obj/structure/sign/poster/abductor/random
name = "random abductor poster"
icon_state = "random_abductor"
Expand Down
Loading