Ports table item autoalign from Bay (#6946)

Made it so items get their pixel x/y reset on pickup.
    Thrown items now also get their pixel placement slightly randomized.
    Tweaked the center of mass on a boatload of items to be more accurate to their sprite art.
    Replaced a bunch of randomized pixel placement code into a unifying proc; randpixel_xy() that uses an item's randpixel var.
This commit is contained in:
fernerr
2019-09-08 22:51:49 +03:00
committed by Erki
parent de748e0607
commit 2a2cc7d52e
57 changed files with 286 additions and 159 deletions
@@ -3,6 +3,7 @@
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
item_state = "lamp"
center_of_mass = list("x" = 13,"y" = 11)
brightness_on = 5
w_class = 5
flags = CONDUCT
@@ -17,6 +18,7 @@
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
center_of_mass = list("x" = 15,"y" = 11)
brightness_on = 5
light_color = "#FFC58F"
+3 -3
View File
@@ -62,14 +62,14 @@
destroyed_event.unregister(buffer_object, src)
buffer_object = null
/obj/item/device/multitool/resolve_attackby(atom/A, mob/user)
/obj/item/device/multitool/resolve_attackby(atom/A, mob/user, var/click_parameters)
if(!isobj(A))
return ..(A, user)
return ..(A, user, click_parameters)
var/obj/O = A
var/datum/expansion/multitool/MT = LAZYACCESS(O.expansions, /datum/expansion/multitool)
if(!MT)
return ..(A, user)
return ..(A, user, click_parameters)
user.AddTopicPrint(src)
MT.interact(src, user)