The big fix for pixel_x and pixel_y use cases. (#90124)

## About The Pull Request

516 requires float layered overlays to be using pixel_w and pixel_z
instead of pixel_x and pixel_y respectively, unless we want
visual/layering errors. This makes sense, as w,z are for visual effects
only. Sadly seems we were not entirely consistent in this, and many
things seem to have been using x,y incorrectly.

This hopefully fixes that, and thus also fixes layering issues. Complete
1:1 compatibility not guaranteed.

I did the lazy way suggested to me by SmArtKar to speed it up (Runtiming
inside apply_overlays), and this is still included in the PR to flash
out possible issues in a TM (Plus I will need someone to grep the
runtimes for me after the TM period to make sure nothing was missed).
After this is done I'll remove all these extra checks.

Lints will probably be failing for a bit, got to wait for [this
update](4b77cd487d)
to them to make it into release. Or just unlint the lines, though that's
probably gonna produce code debt

## Why It's Good For The Game

Fixes this massive 516 mess, hopefully.

closes #90281

## Changelog
🆑
refactor: Changed many of our use cases for pixel_x and pixel_y
correctly into pixel_w and pixel_z, fixing layering issues in the
process.
/🆑

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: SmArtKar <master.of.bagets@gmail.com>
This commit is contained in:
Waterpig
2025-03-28 15:18:45 +01:00
committed by GitHub
parent 2d25cc8dc9
commit d3d3a12540
105 changed files with 365 additions and 329 deletions

View File

@@ -6,26 +6,49 @@
//Helpers
///Moves the icon of the device based on the piping layer and on the direction
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;\
if(T.layer > -1) { \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;\
} \
} else { \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_w = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_z = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;\
} \
}
///Moves the icon of the device based on the piping layer and on the direction, the shift amount is dictated by more_shift
#define PIPING_FORWARD_SHIFT(T, PipingLayer, more_shift) \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_y += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_x += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
if(T.layer > -1) { \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_y += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_x += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
} \
} else { \
if(T.dir & (NORTH|SOUTH)) { \
T.pixel_z += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
} \
if(T.dir & (EAST|WEST)) { \
T.pixel_w += more_shift * (PipingLayer - PIPING_LAYER_DEFAULT);\
} \
}
///Moves the icon of the device based on the piping layer on both x and y
#define PIPING_LAYER_DOUBLE_SHIFT(T, PipingLayer) \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;
if(T.layer > -1) { \
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y; \
} else { \
T.pixel_w = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_z = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y; \
}
///Calculate the thermal energy of the selected gas (J)
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())

View File

@@ -545,10 +545,10 @@ world
continue
// Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, layer_image.pixel_x + 1)
addX2 = max(flatX2, layer_image.pixel_x + add.Width())
addY1 = min(flatY1, layer_image.pixel_y + 1)
addY2 = max(flatY2, layer_image.pixel_y + add.Height())
addX1 = min(flatX1, layer_image.pixel_x + layer_image.pixel_w + 1)
addX2 = max(flatX2, layer_image.pixel_x + layer_image.pixel_w + add.Width())
addY1 = min(flatY1, layer_image.pixel_y + layer_image.pixel_z + 1)
addY2 = max(flatY2, layer_image.pixel_y + layer_image.pixel_z + add.Height())
if (
addX1 != flatX1 \
@@ -570,7 +570,7 @@ world
flatY2 = addY2
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), layer_image.pixel_x + 2 - flatX1, layer_image.pixel_y + 2 - flatY1)
flat.Blend(add, blendMode2iconMode(curblend), layer_image.pixel_x + layer_image.pixel_w + 2 - flatX1, layer_image.pixel_y + layer_image.pixel_z + 2 - flatY1)
if(appearance.alpha < 255)
@@ -1130,7 +1130,7 @@ GLOBAL_LIST_EMPTY(transformation_animation_objects)
filters -= filters[filter_index]
/**
* Center's an image.
* Center's an image. Only run this on float overlays and not physical
* Requires:
* The Image
* The x dimension of the icon file used in the image
@@ -1160,8 +1160,8 @@ GLOBAL_LIST_EMPTY(transformation_animation_objects)
if(y_dimension < ICON_SIZE_Y)
y_offset *= -1
image_to_center.pixel_x = x_offset
image_to_center.pixel_y = y_offset
image_to_center.pixel_w = x_offset
image_to_center.pixel_z = y_offset
return image_to_center
@@ -1275,9 +1275,9 @@ GLOBAL_LIST_EMPTY(transformation_animation_objects)
var/height = icon_dimensions["height"]
if(width > ICON_SIZE_X)
alert_overlay.pixel_x = -(ICON_SIZE_X / 2) * ((width - ICON_SIZE_X) / ICON_SIZE_X)
alert_overlay.pixel_w = -(ICON_SIZE_X / 2) * ((width - ICON_SIZE_X) / ICON_SIZE_X)
if(height > ICON_SIZE_Y)
alert_overlay.pixel_y = -(ICON_SIZE_Y / 2) * ((height - ICON_SIZE_Y) / ICON_SIZE_Y)
alert_overlay.pixel_z = -(ICON_SIZE_Y / 2) * ((height - ICON_SIZE_Y) / ICON_SIZE_Y)
if(width > ICON_SIZE_X || height > ICON_SIZE_Y)
if(width >= height)
scale = ICON_SIZE_X / width

View File

@@ -328,7 +328,10 @@ GLOBAL_LIST_EMPTY(radial_menus)
return
current_user = M.client
//Blank
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER, pixel_x = offset_x, pixel_y = offset_y)
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER)
menu_holder.pixel_w = offset_x
menu_holder.pixel_z = offset_y
SET_PLANE_EXPLICIT(menu_holder, ABOVE_HUD_PLANE, M)
menu_holder.appearance_flags |= KEEP_APART|RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM
menu_holder.vis_contents += elements

View File

@@ -916,7 +916,7 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/splash)
for(var/i = 1; i <= length(streak); ++i)
var/intent_text = copytext(streak, i, i + 1)
var/image/intent_icon = image(icon,src,"combo_[intent_text]")
intent_icon.pixel_x = 16 * (i - 1) - 8 * length(streak)
intent_icon.pixel_w = 16 * (i - 1) - 8 * length(streak)
add_overlay(intent_icon)
return ..()

View File

@@ -220,13 +220,13 @@
// scheduled time once the EOL has been executed.
var/continuing = 0
if (time_spent >= time_before_fade)
if(m.message.pixel_y < starting_height)
var/max_height = m.message.pixel_y + m.approx_lines * CHAT_MESSAGE_APPROX_LHEIGHT - starting_height
if(m.message.pixel_z < starting_height)
var/max_height = m.message.pixel_z + m.approx_lines * CHAT_MESSAGE_APPROX_LHEIGHT - starting_height
if(max_height > 0)
animate(m.message, pixel_y = m.message.pixel_y + max_height, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
animate(m.message, pixel_z = m.message.pixel_z + max_height, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
continuing |= ANIMATION_CONTINUE
else if(mheight + starting_height >= m.message.pixel_y)
animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
else if(mheight + starting_height >= m.message.pixel_z)
animate(m.message, pixel_z = m.message.pixel_z + mheight, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
continuing |= ANIMATION_CONTINUE
continue
@@ -251,13 +251,13 @@
continuing |= ANIMATION_CONTINUE
// We run this after the alpha animate, because we don't want to interrup it, but also don't want to block it by running first
// Sooo instead we do this. bit messy but it fuckin works
if(m.message.pixel_y < starting_height)
var/max_height = m.message.pixel_y + m.approx_lines * CHAT_MESSAGE_APPROX_LHEIGHT - starting_height
if(m.message.pixel_z < starting_height)
var/max_height = m.message.pixel_z + m.approx_lines * CHAT_MESSAGE_APPROX_LHEIGHT - starting_height
if(max_height > 0)
animate(m.message, pixel_y = m.message.pixel_y + max_height, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
animate(m.message, pixel_z = m.message.pixel_z + max_height, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
continuing |= ANIMATION_CONTINUE
else if(mheight + starting_height >= m.message.pixel_y)
animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
else if(mheight + starting_height >= m.message.pixel_z)
animate(m.message, pixel_z = m.message.pixel_z + mheight, time = CHAT_MESSAGE_SPAWN_TIME, flags = continuing | ANIMATION_PARALLEL)
continuing |= ANIMATION_CONTINUE
// Reset z index if relevant
@@ -269,8 +269,8 @@
SET_PLANE_EXPLICIT(message, RUNECHAT_PLANE, message_loc)
message.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA | KEEP_APART
message.alpha = 0
message.pixel_y = starting_height
message.pixel_x = -target.base_pixel_x
message.pixel_z = starting_height
message.pixel_w = -target.base_pixel_w
message.maptext_width = CHAT_MESSAGE_WIDTH
message.maptext_height = mheight * 1.25 // We add extra because some characters are superscript, like actions
message.maptext_x = (CHAT_MESSAGE_WIDTH - owner.bound_width) * -0.5

View File

@@ -42,8 +42,8 @@
var/is_right = IS_RIGHT_INDEX(holding_mob.get_held_index_of_item(held))
var/icon_file = is_right ? held.righthand_file : held.lefthand_file
var/mutable_appearance/held_overlay = held.build_worn_icon(default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)
held_overlay.pixel_y += y_offset
held_overlay.pixel_x += x_offset * (is_right ? 1 : -1)
held_overlay.pixel_z += y_offset
held_overlay.pixel_w += x_offset * (is_right ? 1 : -1)
held_overlays += held_overlay
cached_overlays = held_overlays

View File

@@ -178,8 +178,8 @@
return
var/mutable_appearance/bayonet_appearance = mutable_appearance(bayonet_overlay_icon, bayonet_overlay)
bayonet_appearance.pixel_x = offset_x
bayonet_appearance.pixel_y = offset_y
bayonet_appearance.pixel_w = offset_x
bayonet_appearance.pixel_z = offset_y
overlays += bayonet_appearance
/datum/component/bayonet_attachable/proc/on_update_icon_state(obj/item/source)

View File

@@ -99,10 +99,10 @@
var/mutable_appearance/low_bubble = mutable_appearance('icons/effects/effects.dmi', "bubbles", CLEANABLE_OBJECT_LAYER, target, GAME_PLANE)
var/mutable_appearance/high_bubble = mutable_appearance('icons/effects/effects.dmi', "bubbles", CLEANABLE_OBJECT_LAYER, target, ABOVE_GAME_PLANE)
var/list/icon_offsets = target.get_oversized_icon_offsets()
low_bubble.pixel_x = icon_offsets["x"]
low_bubble.pixel_y = icon_offsets["y"]
high_bubble.pixel_x = icon_offsets["x"]
high_bubble.pixel_y = icon_offsets["y"]
low_bubble.pixel_w = icon_offsets["x"]
low_bubble.pixel_z = icon_offsets["y"]
high_bubble.pixel_w = icon_offsets["x"]
high_bubble.pixel_z = icon_offsets["y"]
if(target.plane > low_bubble.plane) //check if the higher overlay is necessary
target.add_overlay(high_bubble)
else if(target.plane == low_bubble.plane)

View File

@@ -77,8 +77,8 @@
clickbox_underlay = mutable_appearance('icons/ui/clickbox.dmi', clickbox_icon_state, CLICKBOX_LAYER, alpha = 1, appearance_flags = RESET_COLOR|RESET_ALPHA)
clickbox_underlay.transform = clickbox_underlay.transform.Scale(clickbox_width, clickbox_height)
//Keeps the underlay more or less centered.
clickbox_underlay.pixel_x = x_offset * 1/clickbox_width
clickbox_underlay.pixel_y = y_offset * 1/clickbox_height
clickbox_underlay.pixel_w = x_offset * 1/clickbox_width
clickbox_underlay.pixel_z = y_offset * 1/clickbox_height
mov_parent.underlays += clickbox_underlay
/datum/component/clickbox/proc/on_vv_modify_transform(atom/source)

View File

@@ -160,15 +160,15 @@
switch(fill_type)
if(CUSTOM_INGREDIENT_ICON_SCATTER)
filling.pixel_x = rand(-1,1)
filling.pixel_w = rand(-1,1)
filling.pixel_z = rand(-1,1)
if(CUSTOM_INGREDIENT_ICON_STACK)
filling.pixel_x = rand(-1,1)
filling.pixel_w = rand(-1,1)
// we're gonna abuse position layering to ensure overlays render right
filling.pixel_y = -LAZYLEN(ingredients)
filling.pixel_z = 2 * LAZYLEN(ingredients) - 1 + LAZYLEN(ingredients)
if(CUSTOM_INGREDIENT_ICON_STACKPLUSTOP)
filling.pixel_x = rand(-1,1)
filling.pixel_w = rand(-1,1)
// similar here
filling.pixel_y = -LAZYLEN(ingredients)
filling.pixel_z = 2 * LAZYLEN(ingredients) - 1 + LAZYLEN(ingredients)
@@ -186,7 +186,7 @@
atom_parent.cut_overlay(top_overlay)
top_overlay = filling
if(CUSTOM_INGREDIENT_ICON_LINE)
filling.pixel_x = filling.pixel_z = rand(-8,3)
filling.pixel_w = filling.pixel_z = rand(-8,3)
atom_parent.add_overlay(filling)

View File

@@ -137,8 +137,8 @@
var/image/overlay = scoop_overlays[i]
if(istext(overlay))
overlay = image('icons/obj/service/kitchen.dmi', overlay)
overlay.pixel_x = x_offset
overlay.pixel_y = y_offset + added_offset
overlay.pixel_w = x_offset
overlay.pixel_z = y_offset + added_offset
new_overlays += overlay
added_offset += ICE_CREAM_SCOOP_OFFSET

View File

@@ -116,7 +116,7 @@
var/angle = 5
tilt_trix.Turn(angle * pick(1, -1))
worn_overlay.transform = tilt_trix
worn_overlay.pixel_y = pixel_z_offset + attached_hat.worn_y_offset
worn_overlay.pixel_z = pixel_z_offset + attached_hat.worn_y_offset
overlays += worn_overlay
/datum/component/hat_stabilizer/proc/get_separate_worn_overlays(atom/movable/source, list/overlays, mutable_appearance/standing, mutable_appearance/draw_target, isinhands, icon_file)

View File

@@ -188,8 +188,8 @@
overlay.dir = direction
overlay.color = color
overlay.pixel_x = duct_x
overlay.pixel_y = duct_y
overlay.pixel_w = duct_x
overlay.pixel_z = duct_y
overlays += overlay
@@ -198,8 +198,8 @@
var/image/edge_overlay = image('icons/obj/pipes_n_cables/hydrochem/connects.dmi', "edge-extension", layer = duct_layer)
edge_overlay.dir = parent_movable.dir
edge_overlay.color = color
edge_overlay.pixel_x = -parent_movable.pixel_x - parent_movable.pixel_w
edge_overlay.pixel_y = -parent_movable.pixel_y - parent_movable.pixel_z
edge_overlay.pixel_w = -parent_movable.pixel_x - parent_movable.pixel_w
edge_overlay.pixel_z = -parent_movable.pixel_y - parent_movable.pixel_z
overlays += edge_overlay
// only show extension for the first pipe. This means we'll only reflect that color.
extension_handled = TRUE

View File

@@ -47,8 +47,10 @@
set_difficulty(ridden, rider)
RegisterSignal(rider, COMSIG_MOB_UNBUCKLED, PROC_REF(lose_minigame))
RegisterSignal(ridden, COMSIG_MOVABLE_ATTEMPTED_MOVE, PROC_REF(on_ridden_moved))
minigame_holder = image(icon='icons/effects/effects.dmi', loc=rider,icon_state="nothing", layer = 0, pixel_x = 32, pixel_y = 0)
heart_counter = image(icon='icons/effects/effects.dmi', loc=rider,icon_state="nothing", layer = 0, pixel_x = 0, pixel_y = -32)
minigame_holder = image(icon='icons/effects/effects.dmi', loc=rider,icon_state="nothing", layer = 0)
minigame_holder.pixel_w = 32
heart_counter = image(icon='icons/effects/effects.dmi', loc=rider,icon_state="nothing", layer = 0)
heart_counter.pixel_z = -32
SET_PLANE_EXPLICIT(minigame_holder, ABOVE_HUD_PLANE, rider)
SET_PLANE_EXPLICIT(heart_counter, ABOVE_HUD_PLANE, rider)
generate_heart_counter()

View File

@@ -273,8 +273,8 @@
var/overlay_state = "[light_overlay][light.light_on ? "_on":""]"
var/mutable_appearance/flashlight_overlay = mutable_appearance(light_overlay_icon, overlay_state)
flashlight_overlay.pixel_x = overlay_x
flashlight_overlay.pixel_y = overlay_y
flashlight_overlay.pixel_w = overlay_x
flashlight_overlay.pixel_z = overlay_y
overlays += flashlight_overlay
/// Signal proc for [COMSIG_ATOM_UPDATE_ICON_STATE] that updates our parent's icon state, if we have one.

View File

@@ -167,5 +167,5 @@
if(4 to 5)
bar_color = "windup_purple"
var/mutable_appearance/bar_overlay = mutable_appearance(icon = icon, icon_state = bar_color, layer = ABOVE_HUD_PLANE)
bar_overlay.pixel_y = bar_positions[curr_number]
bar_overlay.pixel_z = bar_positions[curr_number]
. += bar_overlay

View File

@@ -46,8 +46,8 @@
if(isnull(hat))
return
var/mutable_appearance/hat_overlay = mutable_appearance(hat.worn_icon, hat.icon_state)
hat_overlay.pixel_x = offsets[1]
hat_overlay.pixel_y = offsets[2]
hat_overlay.pixel_w = offsets[1]
hat_overlay.pixel_z = offsets[2]
overlays += hat_overlay
/datum/element/hat_wearer/proc/exited(atom/movable/source, atom/movable/exited)

View File

@@ -189,13 +189,13 @@ GLOBAL_LIST_INIT(immerse_ignored_movable, typecacheof(list(
var/last_i = width/ICON_SIZE_X
for(var/i in -1 to last_i)
var/mutable_appearance/underwater = mutable_appearance(icon, icon_state)
underwater.pixel_x = ICON_SIZE_X * i - extra_width
underwater.pixel_y = -ICON_SIZE_Y - extra_height
underwater.pixel_w = ICON_SIZE_X * i - extra_width
underwater.pixel_z = -ICON_SIZE_Y - extra_height
overlay_appearance.overlays += underwater
var/mutable_appearance/water_level = is_below_water ? underwater : mutable_appearance(immerse_icon)
water_level.pixel_x = ICON_SIZE_X * i - extra_width
water_level.pixel_y = -extra_height
water_level.pixel_w = ICON_SIZE_X * i - extra_width
water_level.pixel_z = -extra_height
overlay_appearance.overlays += water_level

View File

@@ -69,9 +69,9 @@
continue
progress_bar.listindex--
progress_bar.bar.pixel_y = ICON_SIZE_Y + offset_y + (PROGRESSBAR_HEIGHT * (progress_bar.listindex - 1))
progress_bar.bar.pixel_z = ICON_SIZE_Y + offset_y + (PROGRESSBAR_HEIGHT * (progress_bar.listindex - 1))
var/dist_to_travel = ICON_SIZE_Y + offset_y + (PROGRESSBAR_HEIGHT * (progress_bar.listindex - 1)) - PROGRESSBAR_HEIGHT
animate(progress_bar.bar, pixel_y = dist_to_travel, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
animate(progress_bar.bar, pixel_z = dist_to_travel, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
LAZYREMOVEASSOC(user.progressbars, bar_loc, src)
user = null
@@ -120,10 +120,10 @@
///Adds a smoothly-appearing progress bar image to the player's screen.
/datum/progressbar/proc/add_prog_bar_image_to_client()
bar.pixel_y = 0
bar.pixel_z = 0
bar.alpha = 0
user_client.images += bar
animate(bar, pixel_y = ICON_SIZE_Y + offset_y + (PROGRESSBAR_HEIGHT * (listindex - 1)), alpha = 255, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
animate(bar, pixel_z = ICON_SIZE_Y + offset_y + (PROGRESSBAR_HEIGHT * (listindex - 1)), alpha = 255, time = PROGRESSBAR_ANIMATION_TIME, easing = SINE_EASING)
///Updates the progress bar image visually.

View File

@@ -154,7 +154,7 @@ GLOBAL_LIST_EMPTY(heretic_arenas)
/datum/status_effect/arena_tracker/proc/on_crit_somebody()
owner.cut_overlay(crown_overlay)
crown_overlay = mutable_appearance('icons/mob/effects/crown.dmi', "arena_victor", -HALO_LAYER)
crown_overlay.pixel_y = 24
crown_overlay.pixel_z = 24
owner.add_overlay(crown_overlay)
owner.remove_traits(list(TRAIT_ELDRITCH_ARENA_PARTICIPANT, TRAIT_NO_TELEPORT), TRAIT_STATUS_EFFECT(id))
@@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(heretic_arenas)
RegisterSignal(owner, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(damage_taken))
owner.add_traits(list(TRAIT_ELDRITCH_ARENA_PARTICIPANT, TRAIT_NO_TELEPORT), TRAIT_STATUS_EFFECT(id))
crown_overlay = mutable_appearance('icons/mob/effects/crown.dmi', "arena_fighter", -HALO_LAYER)
crown_overlay.pixel_y = 24
crown_overlay.pixel_z = 24
owner.add_overlay(crown_overlay)
return TRUE

View File

@@ -364,8 +364,8 @@
return FALSE
marked_underlay = new()
marked_underlay.pixel_x = -owner.pixel_x
marked_underlay.pixel_y = -owner.pixel_y
marked_underlay.pixel_w = -owner.pixel_x
marked_underlay.pixel_z = -owner.pixel_y
marked_underlay.transform *= 0.5
owner.vis_contents += marked_underlay
animate(marked_underlay, ready_delay, transform = matrix() * 1.2, flags = CIRCULAR_EASING | EASE_IN)

View File

@@ -120,10 +120,10 @@
status_overlay = mutable_appearance(overlay_file, "[overlay_state][stacks]")
status_underlay = mutable_appearance(underlay_file, "[underlay_state][stacks]")
var/icon_height = owner.get_cached_height()
status_overlay.pixel_x = -owner.pixel_x
status_overlay.pixel_y = FLOOR(icon_height * 0.25, 1)
status_overlay.pixel_w = -owner.pixel_x
status_overlay.pixel_z = FLOOR(icon_height * 0.25, 1)
status_overlay.transform = matrix() * (icon_height/ICON_SIZE_Y) //scale the status's overlay size based on the target's icon size
status_underlay.pixel_x = -owner.pixel_x
status_underlay.pixel_w = -owner.pixel_x
status_underlay.transform = matrix() * (icon_height/ICON_SIZE_Y) * 3
status_underlay.alpha = 40
owner.add_overlay(status_overlay)

View File

@@ -549,10 +549,10 @@ Diagnostic HUDs!
/atom/proc/adjust_hud_position(image/holder, animate_time = null)
if (animate_time)
animate(holder, pixel_x = -(get_cached_width() - ICON_SIZE_X) / 2, pixel_y = get_cached_height() - ICON_SIZE_Y, time = animate_time)
animate(holder, pixel_w = -(get_cached_width() - ICON_SIZE_X) / 2, pixel_z = get_cached_height() - ICON_SIZE_Y, time = animate_time)
return
holder.pixel_x = -(get_cached_width() - ICON_SIZE_X) / 2
holder.pixel_y = get_cached_height() - ICON_SIZE_Y
holder.pixel_w = -(get_cached_width() - ICON_SIZE_X) / 2
holder.pixel_z = get_cached_height() - ICON_SIZE_Y
/atom/proc/set_hud_image_state(hud_type, hud_state, x_offset = 0, y_offset = 0)
if (!hud_list) // Still initializing
@@ -565,5 +565,5 @@ Diagnostic HUDs!
holder.icon_state = hud_state
adjust_hud_position(holder)
if (x_offset || y_offset)
holder.pixel_x += x_offset
holder.pixel_y += y_offset
holder.pixel_w += x_offset
holder.pixel_z += y_offset

View File

@@ -801,8 +801,8 @@
icon_overlay = mutable_appearance(item_data.icon, item_data.icon_state, item_data.layer, src, item_data.plane, item_data.alpha, item_data.appearance_flags)
icon_overlay.color = item_data.color
icon_overlay.appearance = item_data.appearance
icon_overlay.pixel_x = 32 + calculate_item_offset(is_x = TRUE)
icon_overlay.pixel_y = 32 + calculate_item_offset(is_x = FALSE)
icon_overlay.pixel_w = 32 + calculate_item_offset(is_x = TRUE)
icon_overlay.pixel_z = 32 + calculate_item_offset(is_x = FALSE)
return icon_overlay
/// Updates item that is in the claw.

View File

@@ -581,17 +581,17 @@
var/mutable_appearance/floorlight = mutable_appearance('icons/obj/doors/airlocks/station/overlays.dmi', "unres_[heading]", FLOAT_LAYER, src, ABOVE_LIGHTING_PLANE)
switch (heading)
if (NORTH)
floorlight.pixel_x = 0
floorlight.pixel_y = 32
floorlight.pixel_w = 0
floorlight.pixel_z = 32
if (SOUTH)
floorlight.pixel_x = 0
floorlight.pixel_y = -32
floorlight.pixel_w = 0
floorlight.pixel_z = -32
if (EAST)
floorlight.pixel_x = 32
floorlight.pixel_y = 0
floorlight.pixel_w = 32
floorlight.pixel_z = 0
if (WEST)
floorlight.pixel_x = -32
floorlight.pixel_y = 0
floorlight.pixel_w = -32
floorlight.pixel_z = 0
. += floorlight
/obj/machinery/door/airlock/run_animation(animation)

View File

@@ -658,12 +658,12 @@
if(alarm_type && powered() && !ignore_alarms)
var/mutable_appearance/hazards
hazards = mutable_appearance(icon, "[(obj_flags & EMAGGED) ? "firelock_alarm_type_emag" : alarm_type]")
hazards.pixel_x = light_xoffset
hazards.pixel_y = light_yoffset
hazards.pixel_w = light_xoffset
hazards.pixel_z = light_yoffset
. += hazards
hazards = emissive_appearance(icon, "[(obj_flags & EMAGGED) ? "firelock_alarm_type_emag" : alarm_type]", src, alpha = src.alpha)
hazards.pixel_x = light_xoffset
hazards.pixel_y = light_yoffset
hazards.pixel_w = light_xoffset
hazards.pixel_z = light_yoffset
. += hazards
/**

View File

@@ -120,20 +120,20 @@
if(NORTH,SOUTH)
if(unres_sides & NORTH)
var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_n")
side_overlay.pixel_y = dir == NORTH ? 31 : 6
side_overlay.pixel_z = dir == NORTH ? 31 : 6
. += side_overlay
if(unres_sides & SOUTH)
var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_s")
side_overlay.pixel_y = dir == NORTH ? -6 : -31
side_overlay.pixel_z = dir == NORTH ? -6 : -31
. += side_overlay
if(EAST,WEST)
if(unres_sides & EAST)
var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_e")
side_overlay.pixel_x = dir == EAST ? 31 : 6
side_overlay.pixel_w = dir == EAST ? 31 : 6
. += side_overlay
if(unres_sides & WEST)
var/image/side_overlay = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_w")
side_overlay.pixel_x = dir == EAST ? -6 : -31
side_overlay.pixel_w = dir == EAST ? -6 : -31
. += side_overlay
/obj/machinery/door/window/proc/open_and_close()

View File

@@ -394,13 +394,13 @@
if(numberleft != 0) //Don't make the number if we are 0.
var/mutable_appearance/number1 = mutable_appearance(icon, "[numberleft]")
number1.pixel_x = -shift_amount
number1.pixel_w = -shift_amount
add_overlay(number1)
else
shift_amount = 0 //We can stay centered.
var/mutable_appearance/number2 = mutable_appearance(icon, "[numberright]")
number2.pixel_x = shift_amount
number2.pixel_w = shift_amount
add_overlay(number2)
/obj/machinery/roulette/proc/handle_color_light(color)

View File

@@ -140,8 +140,8 @@
/obj/structure/spider/stickyweb/very_sticky/update_overlays()
. = ..()
var/mutable_appearance/web_overlay = mutable_appearance(icon = 'icons/effects/web.dmi', icon_state = "sticky_overlay", layer = layer + 1)
web_overlay.pixel_x -= pixel_x
web_overlay.pixel_y -= pixel_y
web_overlay.pixel_w -= pixel_x
web_overlay.pixel_z -= pixel_y
. += web_overlay

View File

@@ -617,8 +617,10 @@
creature_x = creature.x
creature_y = creature.y
modsuit_image = image(icon = icon, loc = looker.loc, icon_state = real_icon_state, layer = ABOVE_ALL_MOB_LAYER, pixel_x = ((creature.x - looker.x) * 32), pixel_y = ((creature.y - looker.y) * 32))
modsuit_image = image(icon = icon, loc = looker.loc, icon_state = real_icon_state, layer = ABOVE_ALL_MOB_LAYER)
modsuit_image.plane = ABOVE_LIGHTING_PLANE
modsuit_image.pixel_w = (creature.x - looker.x) * 32
modsuit_image.pixel_z = (creature.y - looker.y) * 32
SET_PLANE_EXPLICIT(modsuit_image, ABOVE_LIGHTING_PLANE, creature)
mod_man = WEAKREF(looker)
pinged_person = WEAKREF(creature)
@@ -653,8 +655,8 @@
if(follow_creature)
creature_y = creature.y
creature_x = creature.x
modsuit_image.pixel_x = ((creature_x - looker.x) * 32)
modsuit_image.pixel_y = ((creature_y - looker.y) * 32)
modsuit_image.pixel_w = ((creature_x - looker.x) * 32)
modsuit_image.pixel_z = ((creature_y - looker.y) * 32)
/obj/effect/temp_visual/block //color is white by default, set to whatever is needed
name = "blocking glow"

View File

@@ -128,10 +128,10 @@
return
playsound(src,'sound/machines/beep/twobeep.ogg',50,FALSE)
var/mutable_appearance/hologram = mutable_appearance(icon, "hologram")
hologram.pixel_y = 16
hologram.pixel_z = 16
add_overlay(hologram)
var/mutable_appearance/holosign = mutable_appearance(icon, "holosign")
holosign.pixel_y = 16
holosign.pixel_z = 16
add_overlay(holosign)
add_overlay("legs_extending")
cut_overlay("legs_retracted")

View File

@@ -295,12 +295,12 @@
var/mutable_appearance/laser = mutable_appearance('icons/obj/weapons/guns/projectiles.dmi', pointer_icon_state)
if(modifiers)
if(LAZYACCESS(modifiers, ICON_X))
laser.pixel_x = (text2num(LAZYACCESS(modifiers, ICON_X)) - 16)
laser.pixel_w = (text2num(LAZYACCESS(modifiers, ICON_X)) - 16)
if(LAZYACCESS(modifiers, ICON_Y))
laser.pixel_y = (text2num(LAZYACCESS(modifiers, ICON_Y)) - 16)
laser.pixel_z = (text2num(LAZYACCESS(modifiers, ICON_Y)) - 16)
else
laser.pixel_x = target.pixel_x + rand(-5,5)
laser.pixel_y = target.pixel_y + rand(-5,5)
laser.pixel_w = target.pixel_w + rand(-5,5)
laser.pixel_z = target.pixel_z + rand(-5,5)
if(outmsg)
to_chat(user, outmsg)

View File

@@ -125,7 +125,7 @@
var/offset = 0
for(var/item in contents)
var/mutable_appearance/flatpack_overlay = mutable_appearance(icon, "flatcart_flat", layer = layer + (offset * 0.01))
flatpack_overlay.pixel_y = offset
flatpack_overlay.pixel_z = offset
offset += 4
. += flatpack_overlay

View File

@@ -145,8 +145,8 @@
/obj/item/food/pancakes/proc/update_snack_overlays(obj/item/food/pancakes/pancake)
var/mutable_appearance/pancake_visual = mutable_appearance(icon, "[pancake.stack_name]_[rand(1, 3)]")
pancake_visual.pixel_x = rand(-1, 1)
pancake_visual.pixel_y = 3 * contents.len - 1
pancake_visual.pixel_w = rand(-1, 1)
pancake_visual.pixel_z = 3 * contents.len - 1
pancake_visual.layer = layer + (contents.len * 0.01)
add_overlay(pancake_visual)
update_appearance()

View File

@@ -80,10 +80,10 @@
for(var/stamp in stamps)
var/image/stamp_image = image(
icon = icon,
icon_state = stamp,
pixel_x = stamp_offset_x,
pixel_y = stamp_offset_y + bonus_stamp_offset
icon_state = stamp
)
stamp_image.pixel_w = pixel_w = stamp_offset_x
stamp_image.pixel_z = stamp_offset_y + bonus_stamp_offset
stamp_image.appearance_flags |= RESET_COLOR|KEEP_APART
bonus_stamp_offset -= 5
. += stamp_image
@@ -91,10 +91,10 @@
if(postmarked == TRUE)
var/image/postmark_image = image(
icon = icon,
icon_state = "postmark",
pixel_x = stamp_offset_x + rand(-3, 1),
pixel_y = stamp_offset_y + rand(bonus_stamp_offset + 3, 1)
icon_state = "postmark"
)
postmark_image.pixel_w = stamp_offset_x + rand(-3, 1)
postmark_image.pixel_z = stamp_offset_y + rand(bonus_stamp_offset + 3, 1)
postmark_image.appearance_flags |= RESET_COLOR|KEEP_APART
. += postmark_image

View File

@@ -264,10 +264,10 @@
continue
var/mutable_appearance/lit_image = mutable_appearance('icons/obj/fluff/puzzle_small.dmi', "light_lit")
var/mutable_appearance/emissive_image = emissive_appearance('icons/obj/fluff/puzzle_small.dmi', "light_lit", src)
lit_image.pixel_x = 8 * ((i % 3 || 3 ) - 1)
lit_image.pixel_y = -8 * (ROUND_UP(i / 3) - 1)
emissive_image.pixel_x = lit_image.pixel_x
emissive_image.pixel_y = lit_image.pixel_y
lit_image.pixel_w = 8 * ((i % 3 || 3 ) - 1)
lit_image.pixel_z = -8 * (ROUND_UP(i / 3) - 1)
emissive_image.pixel_w = lit_image.pixel_w
emissive_image.pixel_z = lit_image.pixel_z
. += lit_image
. += emissive_image
@@ -595,13 +595,13 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/puzzle/password/pin, 32)
pixel_y += round(extra_rows*(PUZZLE_DOTS_VERTICAL_OFFSET*0.5))
for(var/i in 1 to extra_rows)
var/mutable_appearance/row = mutable_appearance(icon, icon_state)
row.pixel_y = -i*PUZZLE_DOTS_VERTICAL_OFFSET
row.pixel_z = -i*PUZZLE_DOTS_VERTICAL_OFFSET
add_overlay(row)
for(var/i in 1 to pass_len)
var/mutable_appearance/colored_dot = mutable_appearance(icon, "puzzle_dot_single")
colored_dot.color = pad.digit_to_color[pass_digits[i]]
colored_dot.pixel_x = PUZZLE_DOTS_HORIZONTAL_OFFSET * ((i-1)%MAX_PUZZLE_DOTS_PER_ROW)
colored_dot.pixel_y -= CEILING((i/MAX_PUZZLE_DOTS_PER_ROW)-1, 1)*PUZZLE_DOTS_VERTICAL_OFFSET
colored_dot.pixel_w = PUZZLE_DOTS_HORIZONTAL_OFFSET * ((i-1)%MAX_PUZZLE_DOTS_PER_ROW)
colored_dot.pixel_z -= CEILING((i/MAX_PUZZLE_DOTS_PER_ROW)-1, 1)*PUZZLE_DOTS_VERTICAL_OFFSET
add_overlay(colored_dot)
#undef MAX_PUZZLE_DOTS_PER_ROW

View File

@@ -139,16 +139,16 @@
. = ..()
var/mutable_appearance/arm = mutable_appearance(icon = icon, icon_state = "borg_beaker_apparatus_arm")
if(stored)
stored.pixel_x = 0
stored.pixel_y = 0
stored.pixel_w = 0
stored.pixel_z = 0
var/mutable_appearance/stored_copy = new /mutable_appearance(stored)
if(istype(stored, /obj/item/reagent_containers/cup/beaker))
arm.pixel_y = arm.pixel_y - 3
arm.pixel_z -= 3
stored_copy.layer = FLOAT_LAYER
stored_copy.plane = FLOAT_PLANE
. += stored_copy
else
arm.pixel_y = arm.pixel_y - 5
arm.pixel_z -= 5
. += arm
/obj/item/borg/apparatus/beaker/extra
@@ -229,8 +229,8 @@
var/mutable_appearance/stored_organ = new /mutable_appearance(stored)
stored_organ.layer = FLOAT_LAYER
stored_organ.plane = FLOAT_PLANE
stored_organ.pixel_x = 0
stored_organ.pixel_y = 0
stored_organ.pixel_w = 0
stored_organ.pixel_z = 0
. += stored_organ
bag = mutable_appearance(icon, icon_state = "evidence") // full bag
else
@@ -265,8 +265,8 @@
. = ..()
var/mutable_appearance/arm = mutable_appearance(icon, "borg_stack_apparatus_arm1")
if(stored)
stored.pixel_x = 0
stored.pixel_y = 0
stored.pixel_w = 0
stored.pixel_z = 0
arm.icon_state = "borg_stack_apparatus_arm2"
var/mutable_appearance/stored_copy = new /mutable_appearance(stored)
var/underscore = findtext(stored_copy.icon_state, "_")
@@ -299,8 +299,8 @@
. = ..()
var/mutable_appearance/arm = mutable_appearance(icon, "borg_hardware_apparatus_arm1")
if(stored)
stored.pixel_x = -3
stored.pixel_y = 0
stored.pixel_w = -3
stored.pixel_z = 0
if(!istype(stored, /obj/item/circuitboard))
arm.icon_state = "borg_hardware_apparatus_arm2"
var/mutable_appearance/stored_copy = new /mutable_appearance(stored)
@@ -344,8 +344,8 @@
. = ..()
var/mutable_appearance/arm = mutable_appearance(icon, "borg_hardware_apparatus_arm1")
if(stored)
stored.pixel_x = -3
stored.pixel_y = 0
stored.pixel_w = -3
stored.pixel_z = 0
if((!istype(stored, /obj/item/plate/oven_tray)) || (!istype(stored, /obj/item/food)))
arm.icon_state = "borg_hardware_apparatus_arm2"
var/mutable_appearance/stored_copy = new /mutable_appearance(stored)

View File

@@ -52,8 +52,8 @@
return
var/image/bullet_hole = image('icons/effects/effects.dmi', "dent", OBJ_LAYER + 0.5)
bullet_hole.pixel_x = p_x - 1 //offset correction
bullet_hole.pixel_y = p_y - 1
bullet_hole.pixel_w = p_x - 1 //offset correction
bullet_hole.pixel_z = p_y - 1
if(hitting_projectile.damage_type != BRUTE)
bullet_hole.setDir(pick(GLOB.cardinals))// random scorch design
if(hitting_projectile.damage < 20 && is_generic_projectile)

View File

@@ -118,7 +118,9 @@
if (!istype(donut))
continue
. += image(icon = initial(icon), icon_state = donut.in_box_sprite(), pixel_x = donuts * DONUT_INBOX_SPRITE_WIDTH)
var/image/donut_image = image(icon = initial(icon), icon_state = donut.in_box_sprite())
donut_image.pixel_w = donuts * DONUT_INBOX_SPRITE_WIDTH
. += donut_image
donuts += 1
. += image(icon = initial(icon), icon_state = "[base_icon_state]_top")

View File

@@ -165,11 +165,11 @@
var/obj/item/clothing/accessory/medal/M = contents[i]
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
if(i > 1 && i <= 5)
medalicon.pixel_x += ((i-1)*3)
medalicon.pixel_w += ((i-1)*3)
else if(i > 5)
medalicon.pixel_y -= 7
medalicon.pixel_x -= 2
medalicon.pixel_x += ((i-6)*3)
medalicon.pixel_z -= 7
medalicon.pixel_w -= 2
medalicon.pixel_w += ((i-6)*3)
. += medalicon
/obj/item/storage/lockbox/medal/hop

View File

@@ -97,6 +97,6 @@
held_food.layer = layer
held_food.plane = plane
held_food.transform = held_food.transform.Scale(0.7, 0.7)
held_food.pixel_x = 6
held_food.pixel_y = 6
held_food.pixel_w = 6
held_food.pixel_z = 6
. += held_food

View File

@@ -52,7 +52,7 @@
buckle_requires_restraints = TRUE
to_chat(user, span_notice("You add a rod to \the [src]."))
var/mutable_appearance/rod_underlay = mutable_appearance('icons/obj/service/hydroponics/equipment.dmi', "bonfire_rod")
rod_underlay.pixel_y = 16
rod_underlay.pixel_z = 16
underlays += rod_underlay
if("Grill")
grill = TRUE

View File

@@ -41,6 +41,6 @@
return
var/image/cat_icon = image(icon = resident_cat.icon, icon_state = resident_cat.icon_state, layer = LOW_ITEM_LAYER)
cat_icon.transform = cat_icon.transform.Scale(0.7, 0.7)
cat_icon.pixel_x = 0
cat_icon.pixel_y = -9
cat_icon.pixel_w = 0
cat_icon.pixel_z = -9
. += cat_icon

View File

@@ -27,7 +27,7 @@
if(case_type && LAZYLEN(contents))
var/mutable_appearance/gun_overlay = mutable_appearance(icon, case_type)
for(var/i in 1 to contents.len)
gun_overlay.pixel_x = 3 * (i - 1)
gun_overlay.pixel_w = 3 * (i - 1)
. += new /mutable_appearance(gun_overlay)
. += "[icon_state]_[open ? "open" : "door"]"

View File

@@ -53,7 +53,7 @@
return
var/mutable_appearance/appearance = new()
appearance.copy_overlays(victim)
appearance.pixel_y = 12
appearance.pixel_z = 12
appearance.layer = layer + 0.1
. += appearance

View File

@@ -93,7 +93,7 @@
/obj/structure/mannequin/update_overlays()
. = ..()
var/mutable_appearance/pedestal = mutable_appearance(icon, "pedestal_[material]")
pedestal.pixel_y = -3
pedestal.pixel_z = -3
. += pedestal
var/datum/sprite_accessory/underwear/underwear = SSaccessories.underwear_list[underwear_name]
if(underwear)

View File

@@ -146,13 +146,13 @@
tube_overlay.icon_state = "decorative_diag"
switch(shift_dir)
if(NORTH)
tube_overlay.pixel_y = 32
tube_overlay.pixel_z = 32
if(SOUTH)
tube_overlay.pixel_y = -32
tube_overlay.pixel_z = -32
if(EAST)
tube_overlay.pixel_x = 32
tube_overlay.pixel_w = 32
if(WEST)
tube_overlay.pixel_x = -32
tube_overlay.pixel_w = -32
else
tube_overlay.icon_state = "decorative"

View File

@@ -306,8 +306,8 @@
if(WALL_DENT_HIT)
decal.icon_state = "impact[rand(1, 3)]"
decal.pixel_x = x
decal.pixel_y = y
decal.pixel_w = x
decal.pixel_z = y
if(LAZYLEN(dent_decals))
cut_overlay(dent_decals)

View File

@@ -30,8 +30,8 @@
if(isnull(underlay_tile))
return
var/image/underlay = image(icon_state = initial(underlay_tile.icon_state), icon = initial(underlay_tile.icon))
underlay.pixel_x = undertile_pixel_x //if there's a pixel offset, correct it because we should be lined up with the grid
underlay.pixel_y = undertile_pixel_y
underlay.pixel_w = undertile_pixel_x //if there's a pixel offset, correct it because we should be lined up with the grid
underlay.pixel_z = undertile_pixel_y
SET_PLANE(underlay, underlay_plane || plane, src)
underlays += underlay
@@ -82,7 +82,7 @@
// We can walk infront of the bottom cliff turf, so check that here
if(!iscliffturf(get_step(src, fall_direction)) && !(get_dir(arrived, src) & fall_direction))
return FALSE
// gravity
// marked in UNLINT due to a spacemandmm bug: https://github.com/SpaceManiac/SpacemanDMM/issues/382 (REMOVE ONCE FIXED!)
if(UNLINT(!arrived.has_gravity(src)))

View File

@@ -155,8 +155,8 @@
blood_target_image = image('icons/effects/mouse_pointers/cult_target.dmi', new_target, "glow", ABOVE_MOB_LAYER)
blood_target_image.appearance_flags = RESET_COLOR|KEEP_APART
blood_target_image.pixel_x = -new_target.pixel_x
blood_target_image.pixel_y = -new_target.pixel_y
blood_target_image.pixel_w = -new_target.pixel_x
blood_target_image.pixel_z = -new_target.pixel_y
for(var/datum/mind/cultist as anything in members)
if(!cultist.current)

View File

@@ -114,13 +114,13 @@
active_scan_cone = new(spy.loc)
var/angle = round(get_angle(spy, stealing), 10)
if(angle > 180 && angle < 360)
active_scan_cone.pixel_x -= 16
active_scan_cone.pixel_w -= 16
else if(angle < 180 && angle > 0)
active_scan_cone.pixel_x += 16
active_scan_cone.pixel_w += 16
if(angle > 90 && angle < 270)
active_scan_cone.pixel_y -= 16
active_scan_cone.pixel_z -= 16
else if(angle < 90 || angle > 270)
active_scan_cone.pixel_y += 16
active_scan_cone.pixel_z += 16
active_scan_cone.transform = active_scan_cone.transform.Turn(angle)
active_scan_cone.alpha = 0
animate(active_scan_cone, time = 0.5 SECONDS, alpha = initial(active_scan_cone.alpha))

View File

@@ -349,16 +349,16 @@
. = ..()
if(icon_generated)
var/mutable_appearance/detail = mutable_appearance(generated_icon)
detail.pixel_x = 1
detail.pixel_y = 1
detail.pixel_w = 1
detail.pixel_z = 1
. += detail
return
if(!used)
return
var/mutable_appearance/detail = mutable_appearance(icon, "[icon_state]wip")
detail.pixel_x = 1
detail.pixel_y = 1
detail.pixel_w = 1
detail.pixel_z = 1
. += detail
/obj/item/canvas/proc/generate_proper_overlay()
@@ -649,8 +649,8 @@
return
var/mutable_appearance/painting = mutable_appearance(current_canvas.generated_icon)
painting.pixel_x = current_canvas.framed_offset_x
painting.pixel_y = current_canvas.framed_offset_y
painting.pixel_w = current_canvas.framed_offset_x
painting.pixel_z = current_canvas.framed_offset_y
. += painting
var/frame_type = current_canvas.painting_metadata.frame_type
. += mutable_appearance(current_canvas.icon,"[current_canvas.icon_state]frame_[frame_type]") //add the frame

View File

@@ -88,7 +88,7 @@
attached_overlays += "timer_timing"
for (var/i in 1 to clamp(ceil(time / 10), 1, 3))
var/mutable_appearance/timer_light = mutable_appearance(icon, "timer_light", layer, src)
timer_light.pixel_x = (i - 1) * 2
timer_light.pixel_w = (i - 1) * 2
. += timer_light
/obj/item/assembly/timer/ui_status(mob/user, datum/ui_state/state)

View File

@@ -46,7 +46,7 @@
pipe.color = front_node ? front_node.pipe_color : ATMOS_COLOR_OMNI
pipe.icon_state = "pipe-[piping_layer]"
. += pipe
center.pixel_x = PIPING_LAYER_P_X * (piping_layer - PIPING_LAYER_DEFAULT)
center.pixel_w = PIPING_LAYER_P_X * (piping_layer - PIPING_LAYER_DEFAULT)
. += center
///Attempts to locate a multiz pipe that's above us, if it finds one it merges us into its pipenet

View File

@@ -54,38 +54,38 @@
/obj/structure/hoop/update_overlays()
. = ..()
var/dir_offset_x = 0
var/dir_offset_y = 0
var/dir_offset_w = 0
var/dir_offset_z = 0
switch(dir)
if(NORTH)
dir_offset_y = -32
dir_offset_z = -32
if(SOUTH)
dir_offset_y = 32
dir_offset_z = 32
if(EAST)
dir_offset_x = -32
dir_offset_w = -32
if(WEST)
dir_offset_x = 32
dir_offset_w = 32
var/mutable_appearance/scoreboard = mutable_appearance('icons/obj/signs.dmi', "basketball_scorecard")
scoreboard.pixel_x = dir_offset_x
scoreboard.pixel_y = dir_offset_y
scoreboard.pixel_w = dir_offset_w
scoreboard.pixel_z = dir_offset_z
. += scoreboard
var/ones = total_score % 10
var/mutable_appearance/ones_overlay = mutable_appearance('icons/obj/signs.dmi', "days_[ones]", layer + 0.01)
ones_overlay.pixel_x = 4
ones_overlay.pixel_w = 4
var/mutable_appearance/emissive_ones_overlay = emissive_appearance('icons/obj/signs.dmi', "days_[ones]", src, alpha = src.alpha)
emissive_ones_overlay.pixel_x = 4
emissive_ones_overlay.pixel_w = 4
scoreboard.add_overlay(ones_overlay)
scoreboard.add_overlay(emissive_ones_overlay)
var/tens = (total_score / 10) % 10
var/mutable_appearance/tens_overlay = mutable_appearance('icons/obj/signs.dmi', "days_[tens]", layer + 0.01)
tens_overlay.pixel_x = -5
tens_overlay.pixel_w = -5
var/mutable_appearance/emissive_tens_overlay = emissive_appearance('icons/obj/signs.dmi', "days_[tens]", src, alpha = src.alpha)
emissive_tens_overlay.pixel_x = -5
emissive_tens_overlay.pixel_w = -5
scoreboard.add_overlay(tens_overlay)
scoreboard.add_overlay(emissive_tens_overlay)

View File

@@ -43,7 +43,7 @@
var/mutable_appearance/hair_overlay = mutable_appearance(hair.icon, hair.icon_state, layer = -HAIR_LAYER, appearance_flags = RESET_COLOR)
hair_overlay.color = color
hair_overlay.pixel_y = hair.y_offset
hair_overlay.pixel_z = hair.y_offset
. += hair_overlay
// So that the wig actually blocks emissives.

View File

@@ -83,7 +83,7 @@
/obj/item/clothing/shoes/visual_equipped(mob/user, slot)
..()
if(offset && (slot_flags & slot))
user.pixel_y += offset
user.pixel_z += offset
worn_y_dimension -= (offset * 2)
user.update_worn_shoes()
equipped_before_drop = TRUE
@@ -96,7 +96,7 @@
/obj/item/clothing/shoes/proc/restore_offsets(mob/user)
equipped_before_drop = FALSE
user.pixel_y -= offset
user.pixel_z -= offset
worn_y_dimension = ICON_SIZE_Y
/obj/item/clothing/shoes/dropped(mob/user)

View File

@@ -97,8 +97,8 @@
if(minimize_when_attached)
transform *= 0.5
pixel_x += 8
pixel_y += (-8 + LAZYLEN(attach_to.attached_accessories) * 2)
pixel_w += 8
pixel_z += (-8 + LAZYLEN(attach_to.attached_accessories) * 2)
RegisterSignal(attach_to, COMSIG_ITEM_EQUIPPED, PROC_REF(on_uniform_equipped))
RegisterSignal(attach_to, COMSIG_ITEM_DROPPED, PROC_REF(on_uniform_dropped))

View File

@@ -793,9 +793,9 @@ GLOBAL_LIST_EMPTY(fishing_challenges_by_user)
///update the vertical pixel position of both fish and bait, and the icon state of the completion bar
/datum/fishing_challenge/proc/update_visuals(seconds_per_tick)
var/bait_offset_mult = bait_position / FISHING_MINIGAME_AREA
animate(fishing_hud.hud_bait, pixel_y = MINIGAME_SLIDER_HEIGHT * bait_offset_mult, time = seconds_per_tick SECONDS)
animate(fishing_hud.hud_bait, pixel_z = MINIGAME_SLIDER_HEIGHT * bait_offset_mult, time = seconds_per_tick SECONDS)
var/fish_offset_mult = fish_position / FISHING_MINIGAME_AREA
animate(fishing_hud.hud_fish, pixel_y = MINIGAME_SLIDER_HEIGHT * fish_offset_mult, time = seconds_per_tick SECONDS)
animate(fishing_hud.hud_fish, pixel_z = MINIGAME_SLIDER_HEIGHT * fish_offset_mult, time = seconds_per_tick SECONDS)
fishing_hud.hud_completion.update_state(completion, seconds_per_tick)
///The screen object which bait, fish, and completion bar are visually attached to.
@@ -853,11 +853,11 @@ GLOBAL_LIST_EMPTY(fishing_challenges_by_user)
/atom/movable/screen/hud_bait/update_overlays()
. = ..()
var/mutable_appearance/bait_top = mutable_appearance(icon, "bait_top")
bait_top.pixel_y += cur_height - MINIGAME_BAIT_TOP_AND_BOTTOM_HEIGHT
bait_top.pixel_z += cur_height - MINIGAME_BAIT_TOP_AND_BOTTOM_HEIGHT
. += bait_top
for (var/i in 1 to (cur_height - MINIGAME_BAIT_TOP_AND_BOTTOM_HEIGHT))
var/mutable_appearance/bait_bar = mutable_appearance(icon, "bait_bar")
bait_bar.pixel_y += i
bait_bar.pixel_z += i
. += bait_bar
/atom/movable/screen/hud_fish

View File

@@ -233,8 +233,8 @@
MICROWAVE_INGREDIENT_OVERLAY_SIZE / icon_dimensions["height"],
)
ingredient_overlay.pixel_x = ingredient_shifts_x[(ingredient_count % ingredient_shifts_x.len) + 1]
ingredient_overlay.pixel_y = ingredient_shifts_y[(ingredient_count % ingredient_shifts_y.len) + 1]
ingredient_overlay.pixel_w = ingredient_shifts_x[(ingredient_count % ingredient_shifts_x.len) + 1]
ingredient_overlay.pixel_z = ingredient_shifts_y[(ingredient_count % ingredient_shifts_y.len) + 1]
ingredient_overlay.layer = FLOAT_LAYER
ingredient_overlay.plane = FLOAT_PLANE
ingredient_overlay.blend_mode = BLEND_INSET_OVERLAY

View File

@@ -61,7 +61,7 @@
. = ..()
if(open)
var/mutable_appearance/door_overlay = mutable_appearance(icon, "[base_icon_state]_lid_open")
door_overlay.pixel_y = OVEN_LID_Y_OFFSET
door_overlay.pixel_z = OVEN_LID_Y_OFFSET
. += door_overlay
else
. += mutable_appearance(icon, "[base_icon_state]_lid_closed")

View File

@@ -100,11 +100,11 @@
var/mutable_appearance/pizza_overlay = mutable_appearance(pizza.icon, pizza.icon_state)
if(pizza.slices_left != initial(pizza.slices_left))
pizza_overlay.add_filter("pizzaslices", 1, pizza.get_slices_filter())
pizza_overlay.pixel_y = -2
pizza_overlay.pixel_z = -2
. += pizza_overlay
if(bomb)
var/mutable_appearance/bomb_overlay = mutable_appearance(bomb.icon, bomb.icon_state, layer = layer + 0.01)
bomb_overlay.pixel_y = 8
bomb_overlay.pixel_z = 8
. += bomb_overlay
return
@@ -113,13 +113,13 @@
box_offset += 3
var/obj/item/pizzabox/box = stacked_box
var/mutable_appearance/box_overlay = mutable_appearance(box.icon, box.icon_state, layer = layer + (box_offset * 0.01))
box_overlay.pixel_y = box_offset
box_overlay.pixel_z = box_offset
. += box_overlay
var/obj/item/pizzabox/box = LAZYLEN(length(boxes)) ? boxes[length(boxes)] : src
if(box.boxtag != "")
var/mutable_appearance/tag_overlay = mutable_appearance(icon, "pizzabox_tag", layer = layer + (box_offset * 0.02))
tag_overlay.pixel_y = box_offset
tag_overlay.pixel_z = box_offset
. += tag_overlay
/obj/item/pizzabox/worn_overlays(mutable_appearance/standing, isinhands, icon_file)
@@ -130,7 +130,7 @@
for(var/V in boxes) //add EXTRA BOX per box
var/mutable_appearance/M = mutable_appearance(icon_file, inhand_icon_state)
M.pixel_y = current_offset
M.pixel_z = current_offset
current_offset += 2
. += M

View File

@@ -88,8 +88,8 @@
// common code for the food thoughts appearance
food_image.loc = customer_pawn
food_image.pixel_y = 32
food_image.pixel_x = 16
food_image.pixel_w = 16
food_image.pixel_z = 32
SET_PLANE_EXPLICIT(food_image, HUD_PLANE, customer_pawn)
food_image.plane = HUD_PLANE
food_image.appearance_flags = RESET_COLOR|KEEP_APART

View File

@@ -121,7 +121,7 @@
for(var/flavor in wanted_flavors)
var/image/scoop = image('icons/obj/service/kitchen.dmi', "icecream_custom")
scoop.color = GLOB.ice_cream_flavours[flavor].color
scoop.pixel_y = added_offset
scoop.pixel_z = added_offset
i_scream.overlays += scoop
added_offset += ICE_CREAM_SCOOP_OFFSET
food_image.add_overlay(i_scream)

View File

@@ -164,8 +164,8 @@
/obj/effect/client_image_holder/proc/generate_image()
var/image/created = image(image_icon, src, image_state, image_layer, dir = src.dir)
SET_PLANE_EXPLICIT(created, image_plane, src)
created.pixel_x = image_pixel_x
created.pixel_y = image_pixel_y
created.pixel_w = image_pixel_x
created.pixel_z = image_pixel_y
if(image_color)
created.color = image_color
return created

View File

@@ -173,8 +173,8 @@
/datum/hallucination/body/weird/freezer/make_body_image(turf/location)
var/image/body = ..()
body.pixel_x = pick(rand(-208,-48), rand(48, 208))
body.pixel_y = pick(rand(-208,-48), rand(48, 208))
body.pixel_w = pick(rand(-208,-48), rand(48, 208))
body.pixel_z = pick(rand(-208,-48), rand(48, 208))
body.alpha = 245
SET_PLANE_EXPLICIT(body, ABOVE_HUD_PLANE, location)
return body
@@ -195,5 +195,5 @@
if(QDELETED(src))
return
// Spook 'em before we delete
shown_body.pixel_x = (shown_body.pixel_x / 2)
shown_body.pixel_y = (shown_body.pixel_y / 2)
shown_body.pixel_w = (shown_body.pixel_w / 2)
shown_body.pixel_z = (shown_body.pixel_z / 2)

View File

@@ -176,8 +176,8 @@
return
var/image/hit_effect = image('icons/effects/blood.dmi', hit_atom, is_wall ? hal_impact_effect_wall : hal_impact_effect, ABOVE_MOB_LAYER)
hit_effect.pixel_x = hit_atom.pixel_x + rand(-4,4)
hit_effect.pixel_y = hit_atom.pixel_y + rand(-4,4)
hit_effect.pixel_w = hit_atom.pixel_x + rand(-4,4)
hit_effect.pixel_z = hit_atom.pixel_y + rand(-4,4)
parent.hallucinator.client.images |= hit_effect
addtimer(CALLBACK(src, PROC_REF(clean_up_hit), hit_effect), is_wall ? hit_duration_wall : hit_duration)

View File

@@ -512,7 +512,7 @@
else
var/t_growthstate = clamp(round((age / myseed.maturation) * myseed.growthstages), 1, myseed.growthstages)
plant_overlay.icon_state = "[myseed.icon_grow][t_growthstate]"
plant_overlay.pixel_y = myseed.plant_icon_offset
plant_overlay.pixel_z = myseed.plant_icon_offset
return plant_overlay
/obj/machinery/hydroponics/proc/update_status_light_overlays()

View File

@@ -201,13 +201,13 @@
var/turf/draw_to = master_SW || master_NE || master_SE || master_NW
var/mutable_appearance/display = mutable_appearance('icons/turf/debug.dmi', "corner_color", LIGHT_DEBUG_LAYER, draw_to, BALLOON_CHAT_PLANE)
if(x > draw_to.x)
display.pixel_x = 16
display.pixel_w = 16
else
display.pixel_x = -16
display.pixel_w = -16
if(y > draw_to.y)
display.pixel_y = 16
display.pixel_z = 16
else
display.pixel_y = -16
display.pixel_z = -16
display.color = rgb(cache_r * 255, cache_g * 255, cache_b * 255)

View File

@@ -76,12 +76,12 @@
dir_offset[1] *= 32
dir_offset[2] *= 32
var/image/nonemissive = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_[direction]")
nonemissive.pixel_x = dir_offset[1]
nonemissive.pixel_y = dir_offset[2]
nonemissive.pixel_w = dir_offset[1]
nonemissive.pixel_z = dir_offset[2]
nonemissive.color = color
var/mutable_appearance/emissive = emissive_appearance(nonemissive.icon, nonemissive.icon_state, offset_spokesman = src, alpha = nonemissive.alpha)
emissive.pixel_y = nonemissive.pixel_y
emissive.pixel_x = nonemissive.pixel_x
emissive.pixel_w = nonemissive.pixel_w
emissive.pixel_z = nonemissive.pixel_z
return list(nonemissive, emissive)
/// Returns whatever object it may output, or null if it cant do that

View File

@@ -219,8 +219,8 @@
C.Scale(19,19)
var/mutable_appearance/puzzle_small = new(C)
puzzle_small.layer = layer + 0.1
puzzle_small.pixel_x = 7
puzzle_small.pixel_y = 7
puzzle_small.pixel_w = 7
puzzle_small.pixel_z = 7
add_overlay(puzzle_small)
/obj/structure/puzzle_element/update_icon(updates=ALL) // to prevent update_appearance calls from cutting the overlays and not adding them back

View File

@@ -112,14 +112,14 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
holder_obj.appearance = thing.appearance
thing.forceMove(holder_obj)
var/mutable_appearance/balloon2 = mutable_appearance('icons/effects/fulton_balloon.dmi', "fulton_expand", layer = VEHICLE_LAYER, appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM | KEEP_APART)
balloon2.pixel_y = 10
balloon2.pixel_z = 10
holder_obj.add_overlay(balloon2)
addtimer(CALLBACK(src, PROC_REF(create_balloon), thing, user, holder_obj, balloon2), 0.4 SECONDS)
return ITEM_INTERACT_SUCCESS
/obj/item/extraction_pack/proc/create_balloon(atom/movable/thing, mob/living/user, obj/effect/extraction_holder/holder_obj, mutable_appearance/balloon2)
var/mutable_appearance/balloon = mutable_appearance('icons/effects/fulton_balloon.dmi', "fulton_balloon", layer = VEHICLE_LAYER, appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM | KEEP_APART)
balloon.pixel_y = 10
balloon.pixel_z = 10
holder_obj.cut_overlay(balloon2)
holder_obj.add_overlay(balloon)
playsound(holder_obj.loc, 'sound/items/fulton/fultext_deploy.ogg', vol = 50, vary = TRUE, extrarange = -3)
@@ -161,7 +161,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
sleep(7 SECONDS)
var/mutable_appearance/balloon3 = mutable_appearance('icons/effects/fulton_balloon.dmi', "fulton_retract", layer = VEHICLE_LAYER, appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM | KEEP_APART)
balloon3.pixel_y = 10
balloon3.pixel_z = 10
holder_obj.cut_overlay(balloon)
holder_obj.add_overlay(balloon3)

View File

@@ -223,7 +223,7 @@
accessory = SSaccessories.wings_list[initial(accessory.name)] //get the singleton instance
var/image/img = image(icon = accessory.icon, icon_state = "m_wingsopen_[accessory.icon_state]_BEHIND") //Process the HUD elements
img.transform *= 0.5
img.pixel_x = -32
img.pixel_w = -32
if(radial_wings[accessory.name])
stack_trace("Different wing types with repeated names. Please fix as this may cause issues.")
else

View File

@@ -373,26 +373,26 @@
switch(input_dir)
if(NORTH)
ore_input.pixel_y = 32
ore_output.pixel_y = -32
ore_input.pixel_z = 32
ore_output.pixel_z = -32
if(SOUTH)
ore_input.pixel_y = -32
ore_output.pixel_y = 32
ore_input.pixel_z = -32
ore_output.pixel_z = 32
if(EAST)
ore_input.pixel_x = 32
ore_output.pixel_x = -32
ore_input.pixel_w = 32
ore_output.pixel_w = -32
if(WEST)
ore_input.pixel_x = -32
ore_output.pixel_x = 32
ore_input.pixel_w = -32
ore_output.pixel_w = 32
ore_input.color = COLOR_MODERATE_BLUE
ore_output.color = COLOR_SECURITY_RED
var/mutable_appearance/light_in = emissive_appearance(ore_input.icon, ore_input.icon_state, offset_spokesman = src, alpha = ore_input.alpha)
light_in.pixel_y = ore_input.pixel_y
light_in.pixel_x = ore_input.pixel_x
light_in.pixel_z = ore_input.pixel_z
light_in.pixel_w = ore_input.pixel_w
var/mutable_appearance/light_out = emissive_appearance(ore_output.icon, ore_output.icon_state, offset_spokesman = src, alpha = ore_output.alpha)
light_out.pixel_y = ore_output.pixel_y
light_out.pixel_x = ore_output.pixel_x
light_out.pixel_z = ore_output.pixel_z
light_out.pixel_w = ore_output.pixel_w
. += ore_input
. += ore_output
. += light_in

View File

@@ -36,8 +36,8 @@
else //amount > stack_overlays, add some.
for(var/i in 1 to difference)
var/mutable_appearance/newore = mutable_appearance(icon, icon_state)
newore.pixel_x = rand(-8,8)
newore.pixel_y = rand(-8,8)
newore.pixel_w = rand(-8,8)
newore.pixel_z = rand(-8,8)
LAZYADD(stack_overlays, newore)
if(stack_overlays)
@@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
holder.master = src
holder.on_attach()
rig_overlay = holder
rig_overlay.pixel_y -= 5
rig_overlay.pixel_z -= 5
add_overlay(rig_overlay)
RegisterSignal(src, COMSIG_IGNITER_ACTIVATE, PROC_REF(igniter_prime))
log_bomber(user, "attached [holder] to ", src)

View File

@@ -236,7 +236,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(hair_color)
hair_overlay.color = hair_color
hair_overlay.alpha = 200
hair_overlay.pixel_y = S.y_offset
hair_overlay.pixel_z = S.y_offset
add_overlay(hair_overlay)
/*

View File

@@ -268,13 +268,13 @@
. += our_box
if(our_glass)
var/mutable_appearance/glass = mutable_appearance(icon, "repairbot_glass_overlay", BELOW_MOB_LAYER - 0.02, appearance_flags = RESET_COLOR|KEEP_APART)
glass.pixel_x = -6
glass.pixel_y = -5
glass.pixel_w = -6
glass.pixel_z = -5
. += glass
if(our_iron)
var/mutable_appearance/iron = mutable_appearance(icon, "repairbot_iron_overlay", BELOW_MOB_LAYER - 0.02, appearance_flags = RESET_COLOR|KEEP_APART)
iron.pixel_y = -5
iron.pixel_x = 7
iron.pixel_w = 7
iron.pixel_z = -5
. += iron
/mob/living/basic/bot/repairbot/generate_speak_list()

View File

@@ -38,7 +38,7 @@
if(istype(head, /obj/item/clothing/mask))
used_head_icon = 'icons/mob/clothing/mask.dmi'
var/mutable_appearance/head_overlay = head.build_worn_icon(default_layer = DRONE_HEAD_LAYER, default_icon_file = used_head_icon)
head_overlay.pixel_y -= 15
head_overlay.pixel_z -= 15
drone_overlays[DRONE_HEAD_LAYER] = head_overlay

View File

@@ -32,8 +32,8 @@
var/image/ore_icon = image(icon = initial(ore_item.icon), icon_state = initial(ore_item.icon_state), layer = LOW_ITEM_LAYER)
var/list/pixel_positions = list_of_materials[ore_entry]
ore_icon.transform = ore_icon.transform.Scale(0.4, 0.4)
ore_icon.pixel_x = pixel_positions["pixel_x"]
ore_icon.pixel_y = pixel_positions["pixel_y"]
ore_icon.pixel_w = pixel_positions["pixel_x"]
ore_icon.pixel_z = pixel_positions["pixel_y"]
. += ore_icon
/obj/structure/ore_container/food_trough/gutlunch_trough

View File

@@ -16,8 +16,8 @@
for(var/obj/item/stack/ore/ore_item in contents)
var/image/ore_icon = image(icon = initial(ore_item.icon), icon_state = initial(ore_item.icon_state), layer = LOW_ITEM_LAYER)
ore_icon.transform = ore_icon.transform.Scale(0.6, 0.6)
ore_icon.pixel_x = rand(9, 17)
ore_icon.pixel_y = rand(2, 4)
ore_icon.pixel_w = rand(9, 17)
ore_icon.pixel_z = rand(2, 4)
. += ore_icon
/obj/effect/landmark/mook_village

View File

@@ -58,10 +58,10 @@
var/image/flashed_overlay = image(
icon = 'icons/effects/eldritch.dmi',
loc = viewer,
icon_state = "eye_flash",
pixel_x = -viewer.pixel_x,
pixel_y = -viewer.pixel_y,
icon_state = "eye_flash"
)
flashed_overlay.pixel_w = -viewer.pixel_x
flashed_overlay.pixel_z = -viewer.pixel_y
flick_overlay_global(flashed_overlay, show_to = GLOB.clients, duration = animation_time)
stage_timer = addtimer(CALLBACK(src, PROC_REF(hide_eye)), animation_time, TIMER_STOPPABLE)
var/mob/living/living_owner = owner
@@ -83,7 +83,9 @@
/// Display an animated overlay over our head to indicate what's going on
/datum/action/cooldown/mob_cooldown/watcher_gaze/proc/show_indicator_overlay(overlay_state)
clear_current_overlay()
current_overlay = image(icon = 'icons/effects/eldritch.dmi', loc = owner, icon_state = overlay_state, pixel_x = -owner.pixel_x, pixel_y = 28, layer = ABOVE_ALL_MOB_LAYER)
current_overlay = image(icon = 'icons/effects/eldritch.dmi', loc = owner, icon_state = overlay_state, layer = ABOVE_ALL_MOB_LAYER)
current_overlay.pixel_w = -owner.pixel_x
current_overlay.pixel_z = 28
SET_PLANE_EXPLICIT(current_overlay, ABOVE_LIGHTING_PLANE, owner)
for(var/client/add_to in GLOB.clients)
add_to.images += current_overlay

View File

@@ -174,7 +174,7 @@
if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH))
head_icon = equipped_head_fashion_item.get_overlay(dir = EAST)
head_icon.pixel_y = -8
head_icon.pixel_z = -8
head_icon.transform = head_icon.transform.Turn(180)
else
head_icon = equipped_head_fashion_item.get_overlay()
@@ -194,7 +194,7 @@
if(stat == DEAD || HAS_TRAIT(src, TRAIT_FAKEDEATH))
back_icon = equipped_back_fashion_item.get_overlay(dir = EAST)
back_icon.pixel_y = -11
back_icon.pixel_z = -11
back_icon.transform = back_icon.transform.Turn(180)
else
back_icon = equipped_back_fashion_item.get_overlay()

View File

@@ -57,11 +57,11 @@
//Offset the face to match the Gondola's height.
switch(height)
if("gondola_body_medium")
eyes_overlay.pixel_y = -4
moustache_overlay.pixel_y = -4
eyes_overlay.pixel_z = -4
moustache_overlay.pixel_z = -4
if("gondola_body_short")
eyes_overlay.pixel_y = -8
moustache_overlay.pixel_y = -8
eyes_overlay.pixel_z = -8
moustache_overlay.pixel_z = -8
cut_overlays(TRUE)
add_overlay(body_overlay)

View File

@@ -75,7 +75,7 @@
ghost_hair = mutable_appearance('icons/mob/human/human_face.dmi', "[hair_style.icon_state]", -HAIR_LAYER)
ghost_hair.alpha = 200
ghost_hair.color = ghost_hair_color
ghost_hair.pixel_y = hair_style.y_offset
ghost_hair.pixel_z = hair_style.y_offset
add_overlay(ghost_hair)
if(!isnull(ghost_facial_hairstyle) && ghost_facial_hairstyle != "Shaved")

View File

@@ -174,12 +174,12 @@
. = ..()
if(stat == DEAD)
var/mutable_appearance/dead_overlay = mutable_appearance(icon = 'icons/mob/simple/pets.dmi', icon_state = developed_path ? "dead_tree" : "growing_tree")
dead_overlay.pixel_y = -2
dead_overlay.pixel_z = -2
. += dead_overlay
return
var/pixel_offset = resting ? -2 : 2
var/mutable_appearance/living_tree = grown_tree ? grown_tree : mutable_appearance(icon = icon, icon_state = "growing_tree")
living_tree.pixel_y = pixel_offset
living_tree.pixel_z = pixel_offset
. += living_tree
/mob/living/basic/turtle/update_resting()

View File

@@ -211,7 +211,7 @@ There are several things that need to be remembered:
if (glove_offset && (!feature_y_offset || glove_offset["y"] > feature_y_offset))
feature_y_offset = glove_offset["y"]
gloves_overlay.pixel_y += feature_y_offset
gloves_overlay.pixel_z += feature_y_offset
// We dont have any >2 hands human species (and likely wont ever), so theres no point in splitting this because:
// It will only run if the left hand OR the right hand is missing, and it wont run if both are missing because you cant wear gloves with no arms
@@ -348,7 +348,7 @@ There are several things that need to be remembered:
if (foot_offset && foot_offset["y"] > feature_y_offset)
feature_y_offset = foot_offset["y"]
shoes_overlay.pixel_y += feature_y_offset
shoes_overlay.pixel_z += feature_y_offset
overlays_standing[SHOES_LAYER] = shoes_overlay
apply_overlay(SHOES_LAYER)
@@ -993,7 +993,7 @@ generate/load female uniform sprites matching all previously decided variables
else
return
appearance.pixel_y += final_offset
appearance.pixel_z += final_offset
return appearance
/**

View File

@@ -659,8 +659,8 @@
/mob/living/proc/do_slap_animation(atom/slapped)
do_attack_animation(slapped, no_effect=TRUE)
var/mutable_appearance/glove_appearance = mutable_appearance('icons/effects/effects.dmi', "slapglove")
glove_appearance.pixel_y = 10 // should line up with head
glove_appearance.pixel_x = 10
glove_appearance.pixel_z = 10 // should line up with head
glove_appearance.pixel_w = 10
var/atom/movable/flick_visual/glove = slapped.flick_overlay_view(glove_appearance, 1 SECONDS)
// And animate the attack!

View File

@@ -79,11 +79,11 @@
var/mutable_appearance/MA = mutable_appearance(portrait_icon)
if(w == 23 || h == 23)
to_chat(ai, span_notice("Small note: 23x23 Portraits are accepted, but they do not fit perfectly inside the display frame."))
MA.pixel_x = 5
MA.pixel_w = 5
MA.pixel_z = 5
else if(w == 24 || h == 24)
to_chat(ai, span_notice("Portrait Accepted. Enjoy!"))
MA.pixel_x = 4
MA.pixel_w = 4
MA.pixel_z = 4
else
to_chat(ai, span_warning("Sorry, only 23x23 and 24x24 Portraits are accepted."))

View File

@@ -226,7 +226,7 @@
if(!load || ismob(load)) //mob offsets and such are handled by the riding component / buckling
return
var/mutable_appearance/load_overlay = mutable_appearance(load.icon, load.icon_state, layer + 0.01)
load_overlay.pixel_y = initial(load.pixel_y) + 11
load_overlay.pixel_z = initial(load.pixel_z) + 11
. += load_overlay
/mob/living/simple_animal/bot/mulebot/ex_act(severity)
@@ -853,7 +853,7 @@
if(!isobserver(load))
return
var/mutable_appearance/ghost_overlay = mutable_appearance('icons/mob/simple/mob.dmi', "ghost", layer + 0.01) //use a generic ghost icon, otherwise you can metagame who's dead if they have a custom ghost set
ghost_overlay.pixel_y = 12
ghost_overlay.pixel_z = 12
. += ghost_overlay
/mob/living/simple_animal/bot/mulebot/paranormal/get_load_name() //Don't reveal the name of ghosts so we can't metagame who died and all that.

View File

@@ -607,8 +607,8 @@
/obj/structure/mining_bomb/proc/generate_image()
explosion_image = image('icons/effects/96x96.dmi', "judicial_explosion")
explosion_image.pixel_x = -32
explosion_image.pixel_y = -32
explosion_image.pixel_w = -32
explosion_image.pixel_z = -32
SET_PLANE_EXPLICIT(explosion_image, ABOVE_GAME_PLANE, src)
/obj/structure/mining_bomb/proc/prime(atom/movable/firer)

View File

@@ -222,7 +222,7 @@ GLOBAL_LIST_EMPTY(virtual_pets_list)
if(length(selected_hat))
var/mutable_appearance/our_selected_hat = selected_hat["appearance"]
var/mutable_appearance/hat_preview = mutable_appearance(our_selected_hat.icon, our_selected_hat.icon_state, appearance_flags = RESET_COLOR|KEEP_APART)
hat_preview.pixel_y = -9 + selected_hat["worn_offset"]
hat_preview.pixel_z = -9 + selected_hat["worn_offset"]
var/list/spec_hat = special_hat_placement[selected_hat["type"]]?["south"]
if(spec_hat)
hat_preview.pixel_w += spec_hat[1]

View File

@@ -53,8 +53,8 @@
if (!isnull(hover_outline_index))
pointed_atom_appearance.filters.Cut(hover_outline_index, hover_outline_index + 1)
thought_bubble.pixel_x = 16
thought_bubble.pixel_y = 32
thought_bubble.pixel_w = 16
thought_bubble.pixel_z = 32
thought_bubble.alpha = 200
var/mutable_appearance/point_visual = mutable_appearance(

View File

@@ -174,8 +174,11 @@
offset_old = pixel_x
pixel_x = -APC_PIXEL_OFFSET
var/image/hud_image = image(icon = 'icons/mob/huds/hud.dmi', icon_state = "apc_hacked")
hud_image.pixel_w = pixel_x
hud_image.pixel_z = pixel_y
hud_list = list(
MALF_APC_HUD = image(icon = 'icons/mob/huds/hud.dmi', icon_state = "apc_hacked", pixel_x = src.pixel_x, pixel_y = src.pixel_y)
MALF_APC_HUD = hud_image
)
//Assign it to its area. If mappers already assigned an area string fast load the area from it else get the current area

View File

@@ -224,9 +224,9 @@
if(suppressed && can_unsuppress) // if it can't be unsuppressed, we assume the suppressor is integrated into the gun itself and don't generate an overlay
var/mutable_appearance/MA = mutable_appearance(icon, "[icon_state]_suppressor")
if(suppressor_x_offset)
MA.pixel_x = suppressor_x_offset
MA.pixel_w = suppressor_x_offset
if(suppressor_y_offset)
MA.pixel_y = suppressor_y_offset
MA.pixel_z = suppressor_y_offset
. += MA
if(!chambered && empty_indicator) //this is duplicated in c20's update_overlayss due to a layering issue with the select fire icon.

View File

@@ -271,8 +271,8 @@
return
var/mutable_appearance/charge_overlay = mutable_appearance(icon, overlay_icon_state)
for(var/i = ratio, i >= 1, i--)
charge_overlay.pixel_x = ammo_x_offset * (i - 1)
charge_overlay.pixel_y = ammo_y_offset * (i - 1)
charge_overlay.pixel_w = ammo_x_offset * (i - 1)
charge_overlay.pixel_z = ammo_y_offset * (i - 1)
. += new /mutable_appearance(charge_overlay)

View File

@@ -142,8 +142,8 @@
/obj/machinery/chem_dispenser/proc/display_beaker()
var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker")
b_o.pixel_y = -4
b_o.pixel_x = -7
b_o.pixel_w = -7
b_o.pixel_z = -4
return b_o
/obj/machinery/chem_dispenser/proc/work_animation()
@@ -558,17 +558,17 @@
var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker")
switch(dir)
if(NORTH)
b_o.pixel_y = 7
b_o.pixel_x = rand(-9, 9)
b_o.pixel_w = rand(-9, 9)
b_o.pixel_z = 7
if(EAST)
b_o.pixel_x = 4
b_o.pixel_y = rand(-5, 7)
b_o.pixel_w = 4
b_o.pixel_z = rand(-5, 7)
if(WEST)
b_o.pixel_x = -5
b_o.pixel_y = rand(-5, 7)
b_o.pixel_w = -5
b_o.pixel_z = rand(-5, 7)
else//SOUTH
b_o.pixel_y = -7
b_o.pixel_x = rand(-9, 9)
b_o.pixel_w = rand(-9, 9)
b_o.pixel_z = -7
return b_o
/obj/machinery/chem_dispenser/drinks/fullupgrade //fully ugpraded stock parts, emagged

View File

@@ -228,8 +228,8 @@
intensity_state = "high"
///The froth fountain that we are sticking onto the bottle
var/mutable_appearance/froth = mutable_appearance('icons/obj/drinks/drink_effects.dmi', "froth_bottle_[intensity_state]")
froth.pixel_x = offset_x
froth.pixel_y = offset_y
froth.pixel_w = offset_x
froth.pixel_z = offset_y
add_overlay(froth)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay), froth), 2 SECONDS)

View File

@@ -70,14 +70,13 @@
. = ..()
// Draw the organ icon inside the jar, if present
if(!isnull(held_organ))
var/image/organ_img = image(held_organ, src)
var/image/organ_img = image(held_organ, src, layer = FLOAT_LAYER)
var/list/icon_dimensions = get_icon_dimensions(held_organ.icon)
organ_img.transform = organ_img.transform.Scale( // Make it smaller so it fits
JAR_INNER_ICON_SIZE / icon_dimensions["width"],
JAR_INNER_ICON_SIZE / icon_dimensions["height"],
)
organ_img.pixel_y -= 3
organ_img.layer = FLOAT_LAYER
organ_img.pixel_z -= 3
organ_img.plane = FLOAT_PLANE
organ_img.blend_mode = BLEND_INSET_OVERLAY
. += organ_img

View File

@@ -100,8 +100,8 @@
holder.master = src
holder.on_attach()
assembliesoverlay = holder
assembliesoverlay.pixel_x += 6
assembliesoverlay.pixel_y += 1
assembliesoverlay.pixel_w += 6
assembliesoverlay.pixel_z += 1
add_overlay(assembliesoverlay)
RegisterSignal(src, COMSIG_IGNITER_ACTIVATE, PROC_REF(rig_boom))
log_bomber(user, "attached [holder.name] to ", src)

View File

@@ -1017,8 +1017,8 @@
icon_state = initial(icon_state)//no overlays found, we default back to initial icon.
return
for(var/image/img as anything in standing)
img.pixel_x += px_x
img.pixel_y += px_y
img.pixel_w += px_x
img.pixel_z += px_y
add_overlay(standing)
/obj/item/bodypart/update_atom_colour()

Some files were not shown because too many files have changed in this diff Show More