paintings now drop canvas and frame when knocked off the wall (#85894)

## About The Pull Request
Also, this PR polishes the clown frame. The honkin' red nose looked
pretty malformed.

## Why It's Good For The Game
Fixing a few issues with paintings. 

## Changelog

🆑
fix: paintings now drop canvas and frame when knocked off the wall.
/🆑
This commit is contained in:
Ghom
2024-08-18 22:02:59 +02:00
committed by GitHub
parent 8a1d5d95ba
commit f61ba8b818
2 changed files with 13 additions and 0 deletions
+13
View File
@@ -559,6 +559,8 @@
/obj/item/canvas/twentythree_twentythree,
/obj/item/canvas/twentyfour_twentyfour,
)
/// the type of wallframe it 'disassembles' into
var/wallframe_type = /obj/item/wallframe/painting
WALL_MOUNT_DIRECTIONAL_HELPERS(/obj/structure/sign/painting)
@@ -579,6 +581,16 @@ WALL_MOUNT_DIRECTIONAL_HELPERS(/obj/structure/sign/painting)
else
return ..()
/obj/structure/sign/painting/knock_down(mob/living/user)
var/turf/drop_turf
if(user)
drop_turf = get_turf(user)
else
drop_turf = drop_location()
current_canvas?.forceMove(drop_turf)
var/obj/item/wallframe/frame = new wallframe_type(drop_turf)
frame.update_integrity(get_integrity()) //Transfer how damaged it is.
/obj/structure/sign/painting/examine(mob/user)
. = ..()
if(persistence_id)
@@ -784,6 +796,7 @@ WALL_MOUNT_DIRECTIONAL_HELPERS(/obj/structure/sign/painting)
/obj/item/canvas/thirtysix_twentyfour,
/obj/item/canvas/fortyfive_twentyseven,
)
wallframe_type = /obj/item/wallframe/painting/large
/obj/structure/sign/painting/large/Initialize(mapload)
. = ..()