|
1461 | 1461 | if(!istype(loc, /turf))
|
1462 | 1462 | return
|
1463 | 1463 | source = loc
|
1464 |
| - var/image/pickup_animation = image(icon = src, loc = source, layer = layer + 0.1) |
| 1464 | + var/image/pickup_animation = image(icon = src) |
1465 | 1465 | SET_PLANE(pickup_animation, GAME_PLANE, source)
|
1466 | 1466 | pickup_animation.transform.Scale(0.75)
|
1467 | 1467 | pickup_animation.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
|
1482 | 1482 | to_y += 10
|
1483 | 1483 | pickup_animation.pixel_x += 6 * (prob(50) ? 1 : -1) //6 to the right or left, helps break up the straight upward move
|
1484 | 1484 |
|
1485 |
| - flick_overlay_global(pickup_animation, GLOB.clients, 4) |
1486 |
| - var/matrix/animation_matrix = new(pickup_animation.transform) |
| 1485 | + var/atom/movable/flick_visual/pickup = source.flick_overlay_view(pickup_animation, 0.4 SECONDS) |
| 1486 | + var/matrix/animation_matrix = new(pickup.transform) |
1487 | 1487 | animation_matrix.Turn(pick(-30, 30))
|
1488 | 1488 | animation_matrix.Scale(0.65)
|
1489 | 1489 |
|
1490 |
| - animate(pickup_animation, alpha = 175, pixel_x = to_x, pixel_y = to_y, time = 3, transform = animation_matrix, easing = CUBIC_EASING) |
1491 |
| - animate(alpha = 0, transform = matrix().Scale(0.7), time = 1) |
| 1490 | + animate(pickup, alpha = 175, pixel_x = to_x, pixel_y = to_y, time = 0.3 SECONDS, transform = animation_matrix, easing = CUBIC_EASING) |
| 1491 | + animate(alpha = 0, transform = matrix().Scale(0.7), time = 0.1 SECONDS) |
1492 | 1492 |
|
1493 | 1493 | /obj/item/proc/do_drop_animation(atom/moving_from)
|
1494 | 1494 | if(!istype(loc, /turf))
|
|
1535 | 1535 | /atom/movable/proc/do_item_attack_animation(atom/attacked_atom, visual_effect_icon, obj/item/used_item)
|
1536 | 1536 | var/image/attack_image
|
1537 | 1537 | if(visual_effect_icon)
|
1538 |
| - attack_image = image('icons/effects/effects.dmi', attacked_atom, visual_effect_icon, attacked_atom.layer + 0.1) |
| 1538 | + attack_image = image(icon = 'icons/effects/effects.dmi', icon_state = visual_effect_icon) |
1539 | 1539 | else if(used_item)
|
1540 |
| - attack_image = image(icon = used_item, loc = attacked_atom, layer = attacked_atom.layer + 0.1) |
| 1540 | + attack_image = image(icon = used_item) |
1541 | 1541 | attack_image.plane = attacked_atom.plane + 1
|
1542 | 1542 |
|
1543 | 1543 | // Scale the icon.
|
|
1564 | 1564 | if(!attack_image)
|
1565 | 1565 | return
|
1566 | 1566 |
|
1567 |
| - flick_overlay_global(attack_image, GLOB.clients, 10) |
| 1567 | + var/atom/movable/flick_visual/attack = attacked_atom.flick_overlay_view(attack_image, 1 SECONDS) |
1568 | 1568 | var/matrix/copy_transform = new(transform)
|
1569 | 1569 | // And animate the attack!
|
1570 |
| - animate(attack_image, alpha = 175, transform = copy_transform.Scale(0.75), pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3) |
1571 |
| - animate(time = 1) |
1572 |
| - animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT) |
| 1570 | + animate(attack, alpha = 175, transform = copy_transform.Scale(0.75), pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 0.3 SECONDS) |
| 1571 | + animate(time = 0.1 SECONDS) |
| 1572 | + animate(alpha = 0, time = 0.3 SECONDS, easing = CIRCULAR_EASING|EASE_OUT) |
1573 | 1573 |
|
1574 | 1574 | /// Common proc used by painting tools like spraycans and palettes that can access the entire 24 bits color space.
|
1575 | 1575 | /obj/item/proc/pick_painting_tool_color(mob/user, default_color)
|
|
0 commit comments