diff --git a/aurorastation.dme b/aurorastation.dme index c19dacace72..979c90f5cad 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -21,7 +21,6 @@ #include "code\__defines\_macros.dm" #include "code\__defines\admin.dm" #include "code\__defines\antagonist.dm" -#include "code\__defines\appearance.dm" #include "code\__defines\atmos.dm" #include "code\__defines\battle_monsters.dm" #include "code\__defines\callback.dm" diff --git a/code/__defines/_macros.dm b/code/__defines/_macros.dm index 53b61a96d91..b578242fbed 100644 --- a/code/__defines/_macros.dm +++ b/code/__defines/_macros.dm @@ -23,7 +23,6 @@ #define FONT_GIANT(X) "[X]" #define isAI(A) istype(A, /mob/living/silicon/ai) - #define isDrone(A) istype(A, /mob/living/silicon/robot/drone) #define isalien(A) istype(A, /mob/living/carbon/alien) diff --git a/code/__defines/appearance.dm b/code/__defines/appearance.dm deleted file mode 100644 index faa97e8f066..00000000000 --- a/code/__defines/appearance.dm +++ /dev/null @@ -1,3 +0,0 @@ -// Consider these images/atoms as part of the UI/HUD -#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA -#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d7fe1a1482f..8df12dab60b 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -332,40 +332,40 @@ /atom/movable/proc/get_bullet_impact_effect_type() return BULLET_IMPACT_NONE -/atom/movable/proc/do_pickup_animation(atom/target, atom/old_loc) +/atom/movable/proc/do_pickup_animation(atom/target) set waitfor = FALSE - if(QDELETED(src)) - return - if(QDELETED(target)) - return - if(QDELETED(old_loc)) + if(!isturf(loc)) return + var/image/I = image(icon, loc, icon_state, layer + 0.1, dir, pixel_x, pixel_y) + I.transform *= 0.75 + I.appearance_flags = (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE) + var/turf/T = get_turf(src) + var/direction + var/to_x = 0 + var/to_y = 0 - var/turf/old_turf = get_turf(old_loc) - var/image/I = image(icon = src, loc = old_turf, layer = ABOVE_MOB_LAYER) - I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA - if(ismob(target)) - I.dir = target.dir - - if(istype(old_loc, /obj/item/storage)) - I.pixel_x += old_loc.pixel_x - I.pixel_y += old_loc.pixel_y - - flick_overlay(I, clients, 7) - + if(!QDELETED(T) && !QDELETED(target)) + direction = get_dir(T, target) + if(direction & NORTH) + to_y = 32 + else if(direction & SOUTH) + to_y = -32 + if(direction & EAST) + to_x = 32 + else if(direction & WEST) + to_x = -32 + if(!direction) + to_y = 16 + var/list/viewing = list() + for(var/mob/M in viewers(target)) + if(M.client) + viewing |= M.client + flick_overlay(I, viewing, 7) var/matrix/M = new - M.Turn(pick(30, -30)) - - animate(I, transform = M, time = 1) + M.Turn(pick(-30, 30)) + animate(I, alpha = 175, pixel_x = to_x, pixel_y = to_y, time = 3, transform = M, easing = CUBIC_EASING) sleep(1) - animate(I, transform = matrix(), time = 1) - sleep(1) - - var/to_x = (target.x - old_turf.x) * 32 - var/to_y = (target.y - old_turf.y) * 32 - - animate(I, pixel_x = to_x, pixel_y = to_y, time = 3, transform = matrix() * 0, easing = CUBIC_EASING) - sleep(3) + animate(I, alpha = 0, transform = matrix(), time = 1) /atom/movable/proc/do_putdown_animation(atom/target, mob/user) spawn() @@ -416,9 +416,13 @@ invisibility = 100 var/turf/old_turf = get_turf(src) var/image/I = image(icon = src, loc = src.loc, layer = layer + 0.1) - I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA + I.appearance_flags = (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE) - flick_overlay(I, clients, 4) + var/list/viewing = list() + for(var/mob/M in viewers(target)) + if(M.client) + viewing |= M.client + flick_overlay(I, viewing, 4) var/to_x = (target.x - old_turf.x) * 32 + pixel_x var/to_y = (target.y - old_turf.y) * 32 + pixel_y diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e6666ad2b92..e4f7f4c584e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -324,11 +324,9 @@ // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) - throwing = 0 - var/atom/old_loc = loc - if(user.put_in_active_hand(src) && old_loc) - if((user != old_loc) && (user != old_loc.get_holding_mob())) - do_pickup_animation(user, old_loc) + pixel_x = 0 + pixel_y = 0 + do_pickup_animation(user) // called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. /obj/item/proc/on_exit_storage(obj/item/storage/S as obj) diff --git a/code/modules/mob/living/silicon/robot/items/gripper.dm b/code/modules/mob/living/silicon/robot/items/gripper.dm index 6d73dd833d3..2d69ac0c71b 100644 --- a/code/modules/mob/living/silicon/robot/items/gripper.dm +++ b/code/modules/mob/living/silicon/robot/items/gripper.dm @@ -58,7 +58,7 @@ if(feedback) to_chat(user, SPAN_NOTICE("You collect \the [I].")) if(isturf(I.loc) && I.Adjacent(user)) - I.do_pickup_animation(user, loc) + I.do_pickup_animation(user) I.forceMove(src) wrapped = I wrapped.pixel_x = 0 diff --git a/html/changelogs/wezzy_pickupfix.yml b/html/changelogs/wezzy_pickupfix.yml deleted file mode 100644 index a005b561cd5..00000000000 --- a/html/changelogs/wezzy_pickupfix.yml +++ /dev/null @@ -1,41 +0,0 @@ -################################ -# Example Changelog File -# -# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. -# -# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) -# When it is, any changes listed below will disappear. -# -# Valid Prefixes: -# bugfix -# wip (For works in progress) -# tweak -# soundadd -# sounddel -# rscadd (general adding of nice things) -# rscdel (general deleting of nice things) -# imageadd -# imagedel -# maptweak -# spellcheck (typo fixes) -# experiment -# balance -# admin -# backend -# security -# refactor -################################# - -# Your name. -author: Wowzewow (Wezzy) - -# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. -delete-after: True - -# Any changes you've made. See valid prefix list above. -# INDENT WITH TWO SPACES. NOT TABS. SPACES. -# SCREW THIS UP AND IT WON'T WORK. -# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. -# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. -changes: - - bugfix: "Fixes pickup animations not playing the shake effect." \ No newline at end of file