diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index e8944d1b89b..b81dacb290a 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -198,8 +198,8 @@
//BUCKLE HOOKS
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
if(buckled_mob)
- buckled_mob.pixel_x = 0
- buckled_mob.pixel_y = 0
+ buckled_mob.pixel_x = buckled_mob.base_pixel_x
+ buckled_mob.pixel_y = buckled_mob.base_pixel_y
if(buckled_mob.client)
buckled_mob.client.view_size.resetToDefault()
diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm
index 04c7bc91aed..8f7b341282d 100644
--- a/code/datums/martial/wrestling.dm
+++ b/code/datums/martial/wrestling.dm
@@ -243,35 +243,35 @@
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
- A.pixel_x = 0
- A.pixel_y = 0
- D.pixel_x = 0
- D.pixel_y = 0
+ A.pixel_x = A.base_pixel_x
+ A.pixel_y = A.base_pixel_y
+ D.pixel_x = D.base_pixel_x
+ D.pixel_y = D.base_pixel_y
return
if (!isturf(A.loc) || !isturf(D.loc))
to_chat(A, "You can't slam [D] here!")
- A.pixel_x = 0
- A.pixel_y = 0
- D.pixel_x = 0
- D.pixel_y = 0
+ A.pixel_x = A.base_pixel_x
+ A.pixel_y = A.base_pixel_y
+ D.pixel_x = D.base_pixel_x
+ D.pixel_y = D.base_pixel_y
return
else
if (A)
- A.pixel_x = 0
- A.pixel_y = 0
+ A.pixel_x = A.base_pixel_x
+ A.pixel_y = A.base_pixel_y
if (D)
- D.pixel_x = 0
- D.pixel_y = 0
+ D.pixel_x = D.base_pixel_x
+ D.pixel_y = D.base_pixel_y
return
sleep(1)
if (A && D)
- A.pixel_x = 0
- A.pixel_y = 0
- D.pixel_x = 0
- D.pixel_y = 0
+ A.pixel_x = A.base_pixel_x
+ A.pixel_y = A.base_pixel_y
+ D.pixel_x = D.base_pixel_x
+ D.pixel_y = D.base_pixel_y
if (get_dist(A, D) > 1)
to_chat(A, "[D] is too far away!")
@@ -310,11 +310,11 @@
else
if (A)
- A.pixel_x = 0
- A.pixel_y = 0
+ A.pixel_x = A.base_pixel_x
+ A.pixel_y = A.base_pixel_y
if (D)
- D.pixel_x = 0
- D.pixel_y = 0
+ D.pixel_x = D.base_pixel_x
+ D.pixel_y = D.base_pixel_y
log_combat(A, D, "body-slammed")
@@ -386,7 +386,7 @@
A.forceMove(ST)
A.visible_message("[A] climbs onto [surface]!", \
"You climb onto [surface]!")
- A.pixel_y = 10
+ A.pixel_y = A.base_pixel_y + 10
falling = 1
sleep(10)
@@ -394,7 +394,7 @@
// These are necessary because of the sleep call.
if ((falling == 0 && get_dist(A, D) > 1) || (falling == 1 && get_dist(A, D) > 2)) // We climbed onto stuff.
- A.pixel_y = 0
+ A.pixel_y = A.base_pixel_y
if (falling == 1)
A.visible_message("...and dives head-first into the ground, ouch!", \
"...and dive head-first into the ground, ouch!")
@@ -404,7 +404,7 @@
return
if (!isturf(A.loc) || !isturf(D.loc))
- A.pixel_y = 0
+ A.pixel_y = A.base_pixel_y
to_chat(A, "You can't drop onto [D] from here!")
return
@@ -432,11 +432,11 @@
D.Paralyze(40)
- A.pixel_y = 0
+ A.pixel_y = A.base_pixel_y
else
if (A)
- A.pixel_y = 0
+ A.pixel_y = A.base_pixel_y
log_combat(A, D, "leg-dropped")
return
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 072da3ab5df..37b35ab79d0 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -120,6 +120,10 @@
/// A luminescence-shifted value of the last color calculated for chatmessage overlays
var/chat_color_darkened
+ ///Default pixel x shifting for the atom's icon.
+ var/base_pixel_x = 0
+ ///Default pixel y shifting for the atom's icon.
+ var/base_pixel_y = 0
///Used for changing icon states for different base sprites.
var/base_icon_state
@@ -1051,6 +1055,12 @@
if(NAMEOF(src, opacity))
set_opacity(var_value)
. = TRUE
+ if(NAMEOF(src, base_pixel_x))
+ set_base_pixel_x(var_value)
+ . = TRUE
+ if(NAMEOF(src, base_pixel_y))
+ set_base_pixel_y(var_value)
+ . = TRUE
if(!isnull(.))
datum_flags |= DF_VAR_EDITED
@@ -1500,6 +1510,27 @@
custom_materials = SSmaterials.FindOrCreateMaterialCombo(materials, multiplier)
+
+///Setter for the `base_pixel_x` variable to append behavior related to its changing.
+/atom/proc/set_base_pixel_x(new_value)
+ if(base_pixel_x == new_value)
+ return
+ . = base_pixel_x
+ base_pixel_x = new_value
+
+ pixel_x = pixel_x + base_pixel_x - .
+
+
+///Setter for the `base_pixel_y` variable to append behavior related to its changing.
+/atom/proc/set_base_pixel_y(new_value)
+ if(base_pixel_y == new_value)
+ return
+ . = base_pixel_y
+ base_pixel_y = new_value
+
+ pixel_y = pixel_y + base_pixel_y - .
+
+
/**Returns the material composition of the atom.
*
* Used when recycling items, specifically to turn alloys back into their component mats.
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 575481f5f4e..ff14734ffb3 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -912,7 +912,7 @@
animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
setMovetype(movement_type | FLOATING)
else if (!on && (movement_type & FLOATING))
- animate(src, pixel_y = initial(pixel_y), time = 10)
+ animate(src, pixel_y = base_pixel_y, time = 10)
setMovetype(movement_type & ~FLOATING)
@@ -1054,21 +1054,21 @@
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
var/turf/T = get_turf(src)
var/direction
- var/to_x = 0
- var/to_y = 0
+ var/to_x = target.base_pixel_x
+ var/to_y = target.base_pixel_y
if(!QDELETED(T) && !QDELETED(target))
direction = get_dir(T, target)
if(direction & NORTH)
- to_y = 32
+ to_y += 32
else if(direction & SOUTH)
- to_y = -32
+ to_y -= 32
if(direction & EAST)
- to_x = 32
+ to_x += 32
else if(direction & WEST)
- to_x = -32
+ to_x -= 32
if(!direction)
- to_y = 16
+ to_y += 16
flick_overlay(I, GLOB.clients, 6)
var/matrix/M = new
M.Turn(pick(-30, 30))
diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm
index 6cdbf09145e..4d225656d09 100644
--- a/code/game/objects/effects/decals/cleanable/misc.dm
+++ b/code/game/objects/effects/decals/cleanable/misc.dm
@@ -16,8 +16,8 @@
/obj/effect/decal/cleanable/ash/Initialize()
. = ..()
reagents.add_reagent(/datum/reagent/ash, 30)
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
/obj/effect/decal/cleanable/ash/crematorium
//crematoriums need their own ash cause default ash deletes itself if created in an obj
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 1bc1a8eeae5..709b9aa6c58 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -84,8 +84,8 @@
var/list/faction = list("spiders")
/obj/structure/spider/eggcluster/Initialize()
- pixel_x = rand(3,-3)
- pixel_y = rand(3,-3)
+ pixel_x = base_pixel_x + rand(3,-3)
+ pixel_y = base_pixel_y + rand(3,-3)
START_PROCESSING(SSobj, src)
. = ..()
diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm
index 7a20d93e80b..306f18db292 100644
--- a/code/game/objects/structures/beds_chairs/alien_nest.dm
+++ b/code/game/objects/structures/beds_chairs/alien_nest.dm
@@ -71,8 +71,8 @@
add_overlay(nest_overlay)
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
- M.pixel_x = M.get_standard_pixel_x_offset(M.body_position == LYING_DOWN)
- M.pixel_y = M.get_standard_pixel_y_offset(M.body_position == LYING_DOWN)
+ M.pixel_x = M.base_pixel_x + M.get_standard_pixel_x_offset(M.body_position == LYING_DOWN)
+ M.pixel_y = M.base_pixel_y + M.get_standard_pixel_y_offset(M.body_position == LYING_DOWN)
M.layer = initial(M.layer)
cut_overlay(nest_overlay)
diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm
index 09c4f239e50..4a63540209c 100644
--- a/code/game/objects/structures/beds_chairs/bed.dm
+++ b/code/game/objects/structures/beds_chairs/bed.dm
@@ -101,8 +101,8 @@
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
density = FALSE
icon_state = "down"
- M.pixel_x = M.get_standard_pixel_x_offset(M.body_position == LYING_DOWN)
- M.pixel_y = M.get_standard_pixel_y_offset(M.body_position == LYING_DOWN)
+ M.pixel_x = M.base_pixel_x + M.get_standard_pixel_x_offset(M.body_position == LYING_DOWN)
+ M.pixel_y = M.base_pixel_y + M.get_standard_pixel_y_offset(M.body_position == LYING_DOWN)
/obj/item/roller
diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm
index f42763f5336..ab85eca0d73 100644
--- a/code/game/objects/structures/kitchen_spike.dm
+++ b/code/game/objects/structures/kitchen_spike.dm
@@ -82,7 +82,7 @@
var/matrix/m180 = matrix(L.transform)
m180.Turn(180)
animate(L, transform = m180, time = 3)
- L.pixel_y = L.get_standard_pixel_y_offset(180)
+ L.pixel_y = L.get_standard_pixel_y_offset(TRUE)
else if (has_buckled_mobs())
for(var/mob/living/L in buckled_mobs)
user_unbuckle_mob(L, user)
@@ -124,7 +124,7 @@
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
- M.pixel_y = M.get_standard_pixel_y_offset(180)
+ M.pixel_y = M.base_pixel_y + M.get_standard_pixel_y_offset(TRUE)
M.adjustBruteLoss(30)
src.visible_message(text("[M] falls free of [src]!"))
unbuckle_mob(M,force=1)
diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm
index be832d087ca..c68a5bdd0eb 100644
--- a/code/game/objects/structures/manned_turret.dm
+++ b/code/game/objects/structures/manned_turret.dm
@@ -35,8 +35,8 @@
if(istype(I, /obj/item/gun_control))
qdel(I)
if(istype(buckled_mob))
- buckled_mob.pixel_x = 0
- buckled_mob.pixel_y = 0
+ buckled_mob.pixel_x = buckled_mob.base_pixel_x
+ buckled_mob.pixel_y = buckled_mob.base_pixel_y
if(buckled_mob.client)
buckled_mob.client.view_size.resetToDefault()
anchored = FALSE
diff --git a/code/modules/antagonists/morph/morph.dm b/code/modules/antagonists/morph/morph.dm
index 606dd1e7202..ac275aebc4c 100644
--- a/code/modules/antagonists/morph/morph.dm
+++ b/code/modules/antagonists/morph/morph.dm
@@ -97,8 +97,8 @@
copy_overlays(target)
alpha = max(alpha, 150) //fucking chameleons
transform = initial(transform)
- pixel_y = initial(pixel_y)
- pixel_x = initial(pixel_x)
+ pixel_y = base_pixel_y
+ pixel_x = base_pixel_x
//Morphed is weaker
melee_damage_lower = melee_damage_disguised
diff --git a/code/modules/cargo/gondolapod.dm b/code/modules/cargo/gondolapod.dm
index d8fa2f80a47..8ede2a26dc2 100644
--- a/code/modules/cargo/gondolapod.dm
+++ b/code/modules/cargo/gondolapod.dm
@@ -14,7 +14,9 @@
icon_state = "gondola"
icon_living = "gondola"
pixel_x = -16//2x2 sprite
+ base_pixel_x = -16
pixel_y = -5
+ base_pixel_y = -5
layer = TABLE_LAYER//so that deliveries dont appear underneath it
loot = list(/obj/effect/decal/cleanable/blood/gibs, /obj/item/stack/sheet/animalhide/gondola = 2, /obj/item/food/meat/slab/gondola = 2)
//Gondolas aren't affected by cold.
diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
index bbdfed7ebc9..5bcd0c3a11e 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm
@@ -220,7 +220,7 @@
if (!gibturf.density && (src in view(gibturf)))
new gibtype(gibturf,i,diseases)
- pixel_x = initial(pixel_x) //return to its spot after shaking
+ pixel_x = base_pixel_x //return to its spot after shaking
operating = FALSE
update_icon()
diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
index a646238521e..d0e35632784 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm
@@ -81,7 +81,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers)
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking
use_power(500)
stored_matter += cube_production
- addtimer(VARSET_CALLBACK(src, pixel_x, initial(pixel_x)))
+ addtimer(VARSET_CALLBACK(src, pixel_x, base_pixel_x))
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, user, "The machine now has [stored_matter] monkey\s worth of material stored."))
/obj/machinery/monkey_recycler/interact(mob/user)
diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
index edba9ab3feb..710f3b8ab81 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm
@@ -123,7 +123,7 @@
log_admin("DEBUG: [O] in processor doesn't have a suitable recipe. How do you put it in?")
continue
process_food(P, O)
- pixel_x = initial(pixel_x) //return to its spot after shaking
+ pixel_x = base_pixel_x //return to its spot after shaking
processing = FALSE
visible_message("\The [src] finishes processing.")
@@ -155,12 +155,12 @@
if(!(i = slimecores.Find(AM.type))) // If the item is not found
return
if (i <= 16) // If in the first 12 slots
- AM.pixel_x = -12 + ((i%4)*8)
- AM.pixel_y = -12 + (round(i/4)*8)
+ AM.pixel_x = AM.base_pixel_x - 12 + ((i%4)*8)
+ AM.pixel_y = AM.base_pixel_y - 12 + (round(i/4)*8)
return i
var/ii = i - 16
- AM.pixel_x = -8 + ((ii%3)*8)
- AM.pixel_y = -8 + (round(ii/3)*8)
+ AM.pixel_x = AM.base_pixel_x - 8 + ((ii%3)*8)
+ AM.pixel_y = AM.base_pixel_y - 8 + (round(ii/3)*8)
return i
/obj/machinery/processor/slime/process()
diff --git a/code/modules/hydroponics/beekeeping/honey_frame.dm b/code/modules/hydroponics/beekeeping/honey_frame.dm
index 370b31da177..71f9be1c8fd 100644
--- a/code/modules/hydroponics/beekeeping/honey_frame.dm
+++ b/code/modules/hydroponics/beekeeping/honey_frame.dm
@@ -9,5 +9,5 @@
/obj/item/honey_frame/Initialize()
. = ..()
- pixel_x = rand(8,-8)
- pixel_y = rand(8,-8)
+ pixel_x = base_pixel_x + rand(8, -8)
+ pixel_y = base_pixel_y + rand(8, -8)
diff --git a/code/modules/hydroponics/beekeeping/honeycomb.dm b/code/modules/hydroponics/beekeeping/honeycomb.dm
index c0ce6dfb6db..8018c40fe78 100644
--- a/code/modules/hydroponics/beekeeping/honeycomb.dm
+++ b/code/modules/hydroponics/beekeeping/honeycomb.dm
@@ -15,8 +15,8 @@
/obj/item/reagent_containers/honeycomb/Initialize()
. = ..()
- pixel_x = rand(8,-8)
- pixel_y = rand(8,-8)
+ pixel_x = base_pixel_x + rand(8, -8)
+ pixel_y = base_pixel_y + rand(8, -8)
update_icon()
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index f02c7df8540..d4852a40900 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -35,8 +35,8 @@
seed = new seed()
seed.adjust_potency(50-seed.potency)
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
if(dried_type == -1)
dried_type = src.type
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index c0378a63293..50932a0e5d7 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -206,8 +206,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
- W.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- W.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ W.pixel_x = W.base_pixel_x + clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ W.pixel_y = W.base_pixel_y + clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
else
return ..()
diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm
index 2fbca01cbc5..eb2ca46ef5d 100644
--- a/code/modules/hydroponics/growninedible.dm
+++ b/code/modules/hydroponics/growninedible.dm
@@ -19,8 +19,8 @@
seed = new seed()
seed.adjust_potency(50-seed.potency)
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
if(seed)
for(var/datum/plant_gene/trait/T in seed.genes)
diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm
index 5d5493aa03a..319decc4ae0 100644
--- a/code/modules/hydroponics/hydroitemdefines.dm
+++ b/code/modules/hydroponics/hydroitemdefines.dm
@@ -248,8 +248,8 @@
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize()
. = ..()
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
/obj/item/reagent_containers/glass/bottle/nutrient/ez
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index 0472d8bdc89..621b6488179 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -64,8 +64,8 @@
/obj/item/seeds/Initialize(mapload, nogenes = 0)
. = ..()
- pixel_x = rand(-8, 8)
- pixel_y = rand(-8, 8)
+ pixel_x = base_pixel_x + rand(-8, 8)
+ pixel_y = base_pixel_y + rand(-8, 8)
if(!icon_grow)
icon_grow = "[species]-grow"
diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm
index c9b701facb3..558567ec9f3 100644
--- a/code/modules/mining/lavaland/ash_flora.dm
+++ b/code/modules/mining/lavaland/ash_flora.dm
@@ -180,8 +180,8 @@
/obj/item/reagent_containers/food/snacks/grown/ash_flora/Initialize()
. = ..()
- pixel_x = rand(-4, 4)
- pixel_y = rand(-4, 4)
+ pixel_x = base_pixel_x + rand(-4, 4)
+ pixel_y = base_pixel_y + rand(-4, 4)
/obj/item/reagent_containers/food/snacks/grown/ash_flora/shavings //So we can't craft bowls from everything.
diff --git a/code/modules/mining/lavaland/ruins/gym.dm b/code/modules/mining/lavaland/ruins/gym.dm
index ba0dbdd0449..d37f7c14bd9 100644
--- a/code/modules/mining/lavaland/ruins/gym.dm
+++ b/code/modules/mining/lavaland/ruins/gym.dm
@@ -48,7 +48,7 @@
playsound(user, 'sound/machines/click.ogg', 60, TRUE)
obj_flags &= ~IN_USE
- user.pixel_y = 0
+ user.pixel_y = user.base_pixel_y
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise)
icon_state = initial(icon_state)
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index cade32a68b7..5b9ed970a44 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -318,8 +318,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
/obj/item/stack/ore/Initialize()
. = ..()
- pixel_x = rand(0,16)-8
- pixel_y = rand(0,8)-8
+ pixel_x = base_pixel_x + rand(0, 16) - 8
+ pixel_y = base_pixel_y + rand(0, 8) - 8
/obj/item/stack/ore/ex_act(severity, target)
if (!severity || severity >= 2)
@@ -353,8 +353,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
. = ..()
coinflip = pick(sideslist)
icon_state = "coin_[coinflip]"
- pixel_x = rand(0,16)-8
- pixel_y = rand(0,8)-8
+ pixel_x = base_pixel_x + rand(0, 16) - 8
+ pixel_y = base_pixel_y + rand(0, 8) - 8
/obj/item/coin/set_custom_materials(list/materials, multiplier = 1)
. = ..()
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 077c683ee8a..f64a88f5940 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -479,8 +479,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/stop_orbit(datum/component/orbiter/orbits)
. = ..()
//restart our floating animation after orbit is done.
- pixel_y = 0
- animate(src, pixel_y = 2, time = 10, loop = -1)
+ pixel_y = base_pixel_y
+ animate(src, pixel_y = base_pixel_y + 2, time = 1 SECONDS, loop = -1)
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 27f8e702c6f..0d1b86a65ad 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -173,8 +173,8 @@
if(I.pulledby)
I.pulledby.stop_pulling()
update_inv_hands()
- I.pixel_x = initial(I.pixel_x)
- I.pixel_y = initial(I.pixel_y)
+ I.pixel_x = I.base_pixel_x
+ I.pixel_y = I.base_pixel_y
return hand_index
//Puts the item into the first available left hand if possible and calls all necessary triggers/updates. returns 1 on success.
@@ -284,8 +284,8 @@
/mob/proc/dropItemToGround(obj/item/I, force = FALSE, silent = FALSE)
. = doUnEquip(I, force, drop_location(), FALSE, silent = silent)
if(. && I) //ensure the item exists and that it was dropped properly.
- I.pixel_x = rand(-6,6)
- I.pixel_y = rand(-6,6)
+ I.pixel_x = I.base_pixel_x + rand(-6, 6)
+ I.pixel_y = I.base_pixel_y + rand(-6, 6)
//for when the item will be immediately placed in a loc other than the ground
/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE, silent = TRUE)
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 69cad88162d..8faac355aaf 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -116,7 +116,7 @@ Des: Removes all infected images from the alien.
return FALSE
return TRUE
-/mob/living/carbon/alien/get_standard_pixel_y_offset(lying = 0)
+/mob/living/carbon/alien/get_standard_pixel_y_offset(lying = FALSE)
return initial(pixel_y)
/mob/living/carbon/alien/proc/alien_evolve(mob/living/carbon/alien/new_xeno)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index eaa8743a1c9..1cd3feddb2c 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -80,7 +80,7 @@
pulledby.stop_pulling()
. = 0
-/mob/living/carbon/alien/humanoid/get_standard_pixel_y_offset(lying = 0)
+/mob/living/carbon/alien/humanoid/get_standard_pixel_y_offset(lying = FALSE)
if(leaping)
return -32
else if(custom_pixel_y_offset)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm
index 28357dfea4a..8e402b2950e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm
@@ -34,15 +34,15 @@
icon = alt_icon
alt_icon = old_icon
icon_state = "alien[caste]_leap"
- pixel_x = -32
- pixel_y = -32
+ pixel_x = base_pixel_x - 32
+ pixel_y = base_pixel_y - 32
else
if(alt_icon != initial(alt_icon))
var/old_icon = icon
icon = alt_icon
alt_icon = old_icon
- pixel_x = get_standard_pixel_x_offset(body_position == LYING_DOWN)
- pixel_y = get_standard_pixel_y_offset(body_position == LYING_DOWN)
+ pixel_x = base_pixel_x + get_standard_pixel_x_offset(body_position == LYING_DOWN)
+ pixel_y = base_pixel_y + get_standard_pixel_y_offset(body_position == LYING_DOWN)
update_inv_hands()
update_inv_handcuffed()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index 3b8a435bae0..ba15f06583f 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -4,6 +4,7 @@
status_flags = 0
ventcrawler = VENTCRAWLER_NONE //pull over that ass too fat
pixel_x = -16
+ base_pixel_x = -16
bubble_icon = "alienroyal"
mob_size = MOB_SIZE_LARGE
layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 4f87b39aa00..8e7fa64f5af 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -406,7 +406,7 @@
update_inv_legcuffed()
return TRUE
-/mob/living/carbon/get_standard_pixel_y_offset(lying = 0)
+/mob/living/carbon/get_standard_pixel_y_offset(lying = FALSE)
if(lying)
return -6
else
diff --git a/code/modules/mob/living/carbon/carbon_update_icons.dm b/code/modules/mob/living/carbon/carbon_update_icons.dm
index a8723e43e84..0971109f868 100644
--- a/code/modules/mob/living/carbon/carbon_update_icons.dm
+++ b/code/modules/mob/living/carbon/carbon_update_icons.dm
@@ -8,11 +8,11 @@
changed++
ntransform.TurnTo(lying_prev , lying_angle)
if(!lying_angle) //Lying to standing
- final_pixel_y = get_standard_pixel_y_offset()
+ final_pixel_y = base_pixel_y + get_standard_pixel_y_offset()
else //if(lying != 0)
if(lying_prev == 0) //Standing to lying
- pixel_y = get_standard_pixel_y_offset()
- final_pixel_y = get_standard_pixel_y_offset(lying_angle)
+ pixel_y = base_pixel_y + get_standard_pixel_y_offset()
+ final_pixel_y = base_pixel_y + get_standard_pixel_y_offset(lying_angle)
if(dir & (EAST|WEST)) //Facing east or west
final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass
if(resize != RESIZE_DEFAULT_SIZE)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 3b7a84ac8a2..2d06f1aae04 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -338,22 +338,22 @@
M.setDir(get_dir(M, src))
switch(M.dir)
if(NORTH)
- animate(M, pixel_x = 0, pixel_y = offset, 3)
+ animate(M, pixel_x = M.base_pixel_x, pixel_y = M.base_pixel_y + offset, 3)
if(SOUTH)
- animate(M, pixel_x = 0, pixel_y = -offset, 3)
+ animate(M, pixel_x = M.base_pixel_x, pixel_y = M.base_pixel_y - offset, 3)
if(EAST)
if(M.lying_angle == 270) //update the dragged dude's direction if we've turned
M.set_lying_angle(90)
- animate(M, pixel_x = offset, pixel_y = 0, 3)
+ animate(M, pixel_x = M.base_pixel_x + offset, pixel_y = M.base_pixel_y, 3)
if(WEST)
if(M.lying_angle == 90)
M.set_lying_angle(270)
- animate(M, pixel_x = -offset, pixel_y = 0, 3)
+ animate(M, pixel_x = M.base_pixel_x - offset, pixel_y = M.base_pixel_y, 3)
/mob/living/proc/reset_pull_offsets(mob/living/M, override)
if(!override && M.buckled)
return
- animate(M, pixel_x = 0, pixel_y = 0, 1)
+ animate(M, pixel_x = base_pixel_x, pixel_y = base_pixel_y, 1)
//mob verbs are a lot faster than object verbs
//for more info on why this is not atom/pull, see examinate() in mob.dm
@@ -935,7 +935,7 @@
animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
setMovetype(movement_type | FLOATING)
else if(((!on || fixed) && (movement_type & FLOATING)))
- animate(src, pixel_y = get_standard_pixel_y_offset(lying_angle), time = 10)
+ animate(src, pixel_y = base_pixel_y + get_standard_pixel_y_offset(lying_angle), time = 1 SECONDS)
setMovetype(movement_type & ~FLOATING)
// The src mob is trying to strip an item from someone
@@ -1023,8 +1023,8 @@
var/amplitude = min(4, (jitteriness/100) + 1)
var/pixel_x_diff = rand(-amplitude, amplitude)
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
- var/final_pixel_x = get_standard_pixel_x_offset(body_position == LYING_DOWN)
- var/final_pixel_y = get_standard_pixel_y_offset(body_position == LYING_DOWN)
+ var/final_pixel_x = base_pixel_x + get_standard_pixel_x_offset(body_position == LYING_DOWN)
+ var/final_pixel_y = base_pixel_y + get_standard_pixel_y_offset(body_position == LYING_DOWN)
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = 6)
animate(pixel_x = final_pixel_x , pixel_y = final_pixel_y , time = 2)
setMovetype(movement_type & ~FLOATING) // If we were without gravity, the bouncing animation got stopped, so we make sure to restart it in next life().
@@ -1041,10 +1041,10 @@
loc_temp = heat_turf.temperature
return loc_temp
-/mob/living/proc/get_standard_pixel_x_offset(lying = 0)
+/mob/living/proc/get_standard_pixel_x_offset(lying = FALSE)
return initial(pixel_x)
-/mob/living/proc/get_standard_pixel_y_offset(lying = 0)
+/mob/living/proc/get_standard_pixel_y_offset(lying = FALSE)
return initial(pixel_y)
/mob/living/cancel_camera()
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 2aa0d7cceb7..9445f1a187c 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -276,8 +276,8 @@
/mob/living/simple_animal/chick/Initialize()
. = ..()
- pixel_x = rand(-6, 6)
- pixel_y = rand(0, 10)
+ pixel_x = base_pixel_x + rand(-6, 6)
+ pixel_y = base_pixel_y + rand(0, 10)
add_cell_sample()
/mob/living/simple_animal/chick/add_cell_sample()
@@ -347,8 +347,8 @@
icon_state = "[icon_prefix]_[body_color]"
icon_living = "[icon_prefix]_[body_color]"
icon_dead = "[icon_prefix]_[body_color]_dead"
- pixel_x = rand(-6, 6)
- pixel_y = rand(0, 10)
+ pixel_x = base_pixel_x + rand(-6, 6)
+ pixel_y = base_pixel_y + rand(0, 10)
++chicken_count
add_cell_sample()
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 71c8c98cb85..9bfbc7cb1fe 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -182,6 +182,7 @@
maxHealth = 20
health = 20
pixel_x = -16
+ base_pixel_x = -16
mob_size = MOB_SIZE_LARGE
random_color = FALSE
food_type = list()
diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm
index 1b9dcb366fd..fe410b194f3 100644
--- a/code/modules/mob/living/simple_animal/hostile/illusion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm
@@ -40,8 +40,9 @@
multiply_chance = replicate
faction -= "neutral"
transform = initial(transform)
- pixel_y = initial(pixel_y)
- pixel_x = initial(pixel_x)
+ pixel_x = base_pixel_x
+ pixel_y = base_pixel_y
+
/mob/living/simple_animal/hostile/illusion/examine(mob/user)
if(parent_mob)
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
index 0c5506ab0a0..cb5d9e39b82 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm
@@ -18,6 +18,7 @@
projectilesound = 'sound/weapons/pierce.ogg'
ranged_cooldown_time = 30
pixel_x = -16
+ base_pixel_x = -16
layer = LARGE_MOB_LAYER
speed = 10
stat_attack = HARD_CRIT
@@ -123,7 +124,9 @@
icon_state = "lily_pad"
layer = BELOW_MOB_LAYER
pixel_x = -32
+ base_pixel_x = -32
pixel_y = -32
+ base_pixel_y = -32
duration = 30
/mob/living/simple_animal/hostile/jungle/leaper/Initialize()
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
index 375a09e3869..841d24e8cf7 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/mega_arachnid.dm
@@ -15,6 +15,7 @@
speed = 1
ranged = 1
pixel_x = -16
+ base_pixel_x = -16
move_to_delay = 10
aggro_vision_range = 9
speak_emote = list("chitters")
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/mook.dm b/code/modules/mob/living/simple_animal/hostile/jungle/mook.dm
index 17e1bb988a4..ef31752fedd 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/mook.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/mook.dm
@@ -15,11 +15,13 @@
icon_dead = "mook_dead"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
pixel_x = -16
+ base_pixel_x = -16
+ pixel_y = -8
+ base_pixel_y = -8
maxHealth = 45
health = 45
melee_damage_lower = 30
melee_damage_upper = 30
- pixel_y = -8
ranged = TRUE
ranged_cooldown_time = 10
pass_flags = LETPASSTHROW
@@ -217,7 +219,9 @@
icon_state = "mook_leap_cloud"
layer = BELOW_MOB_LAYER
pixel_x = -16
+ base_pixel_x = -16
pixel_y = -16
+ base_pixel_y = -16
duration = 10
#undef MOOK_ATTACK_NEUTRAL
diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm b/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
index 870c3cd0c56..8e20b79a229 100644
--- a/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
+++ b/code/modules/mob/living/simple_animal/hostile/jungle/seedling.dm
@@ -18,7 +18,9 @@
melee_damage_lower = 30
melee_damage_upper = 30
pixel_x = -16
+ base_pixel_x = -16
pixel_y = -14
+ base_pixel_y = -14
minimum_distance = 3
move_to_delay = 20
vision_range = 9
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
index 9440257946f..5b414d364d5 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
@@ -40,6 +40,7 @@ Difficulty: Medium
ranged = TRUE
ranged_cooldown_time = 16
pixel_x = -16
+ base_pixel_x = -16
crusher_loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator, /obj/item/crusher_trophy/miner_eye)
loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator)
wander = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index 34a0968e62b..a572fdc7f7a 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -54,6 +54,7 @@ Difficulty: Hard
melee_queue_distance = 20 // as far as possible really, need this because of blood warp
ranged = TRUE
pixel_x = -32
+ base_pixel_x = -32
del_on_death = TRUE
crusher_loot = list(/obj/structure/closet/crate/necropolis/bubblegum/crusher)
loot = list(/obj/structure/closet/crate/necropolis/bubblegum)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
index aa799eb0032..7a8f0f87605 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm
@@ -44,6 +44,7 @@ Difficulty: Very Hard
move_to_delay = 10
ranged = TRUE
pixel_x = -32
+ base_pixel_x = -32
del_on_death = TRUE
gps_name = "Angelic Signal"
achievement_type = /datum/award/achievement/boss/colossus_kill
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
index 32d4db1ed3c..96aadcd5a18 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
@@ -58,6 +58,7 @@ Difficulty: Medium
move_to_delay = 5
ranged = TRUE
pixel_x = -16
+ base_pixel_x = -16
crusher_loot = list(/obj/structure/closet/crate/necropolis/dragon/crusher)
loot = list(/obj/structure/closet/crate/necropolis/dragon)
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/bone = 30)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
index 1c43ede1143..7edd36a4394 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm
@@ -42,8 +42,10 @@
achievement_type = /datum/award/achievement/boss/legion_kill
crusher_achievement_type = /datum/award/achievement/boss/legion_crusher
score_achievement_type = /datum/award/score/legion_score
- pixel_y = -16
pixel_x = -32
+ base_pixel_x = -32
+ pixel_y = -16
+ base_pixel_y = -16
loot = list(/obj/item/stack/sheet/bone = 3)
vision_range = 13
wander = FALSE
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
index 07520712f57..6ac5e103de9 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/wendigo.dm
@@ -29,6 +29,7 @@ Difficulty: Hard
melee_queue_distance = 20 // as far as possible really, need this because of charging and teleports
ranged = TRUE
pixel_x = -16
+ base_pixel_x = -16
loot = list()
butcher_results = list()
guaranteed_butcher_results = list(/obj/item/wendigo_blood = 1)
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
index 4601d83a42c..b13f01854b3 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm
@@ -100,6 +100,7 @@
icon_dead = "watcher_dead"
health_doll_icon = "watcher"
pixel_x = -10
+ base_pixel_x = -10
throw_message = "bounces harmlessly off of"
melee_damage_lower = 15
melee_damage_upper = 15
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
index 75eb7a945b8..7a3fa749998 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm
@@ -95,6 +95,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
icon = 'icons/obj/lavaland/tumor.dmi'
icon_state = "tumor"
pixel_x = -16
+ base_pixel_x = -16
light_color = COLOR_SOFT_RED
light_range = 3
anchored = TRUE
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index b4cf8bcf90d..d9792890b10 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -162,6 +162,7 @@
maxHealth = 150
health = 150
pixel_x = -16
+ base_pixel_x = -16
speed = 10
harm_intent_damage = 5
melee_damage_lower = 5
@@ -187,6 +188,7 @@
maxHealth = 400
health = 400
pixel_x = -16
+ base_pixel_x = -16
speed = 2
harm_intent_damage = 15
melee_damage_lower = 15
@@ -284,6 +286,7 @@
maxHealth = 130
health = 130
pixel_x = -16
+ base_pixel_x = -16
speed = -5
harm_intent_damage = 10
melee_damage_lower = 10
diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
index 67c966383a2..3fe359d2b45 100644
--- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm
@@ -49,6 +49,7 @@
mob_size = MOB_SIZE_LARGE
armour_penetration = 30
pixel_x = -16
+ base_pixel_x = -16
turns_per_move = 5
ranged = TRUE
mouse_opacity = MOUSE_OPACITY_ICON
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 7d7148c0cc1..31b558d12a9 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -21,6 +21,7 @@
mob_size = MOB_SIZE_LARGE
pixel_x = -16
+ base_pixel_x = -16
harm_intent_damage = 5
melee_damage_lower = 8
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index c82142ace1f..419eb585e8f 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -129,7 +129,7 @@
/mob/living/simple_animal/hostile/venus_human_trap/Moved(atom/OldLoc, Dir)
. = ..()
- pixel_x = dir & (NORTH|WEST) ? 2 : -2
+ pixel_x = base_pixel_x + (dir & (NORTH|WEST) ? 2 : -2)
/mob/living/simple_animal/hostile/venus_human_trap/AttackingTarget()
. = ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
index c958a784067..c2e567674a5 100644
--- a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
+++ b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm
@@ -20,6 +20,7 @@
maxHealth = 50
health = 50
pixel_x = -16
+ base_pixel_x = -16
harm_intent_damage = 5
obj_damage = 0
melee_damage_lower = 0
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 3583968de77..47fc1507c28 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -142,10 +142,11 @@
if(buckled)
buckled.unbuckle_mob(src,force=1)
buckled = null
- pixel_x = initial(pixel_x)
- pixel_y = initial(pixel_y)
+ pixel_x = base_pixel_x
+ pixel_y = base_pixel_y
+
+ return ..()
- ..(gibbed)
/mob/living/simple_animal/parrot/get_status_tab_items()
. = ..()
diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm
index 81555340b21..1d074868c4a 100644
--- a/code/modules/modular_computers/hardware/_hardware.dm
+++ b/code/modules/modular_computers/hardware/_hardware.dm
@@ -24,8 +24,8 @@
/obj/item/computer_hardware/New(obj/L)
..()
- pixel_x = rand(-8, 8)
- pixel_y = rand(-8, 8)
+ pixel_x = base_pixel_x + rand(-8, 8)
+ pixel_y = base_pixel_y + rand(-8, 8)
/obj/item/computer_hardware/Destroy()
if(holder)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index d5ca09fe44c..a1808b2d503 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -101,8 +101,8 @@
/obj/item/paper/Initialize()
. = ..()
- pixel_y = rand(-8, 8)
- pixel_x = rand(-9, 9)
+ pixel_x = base_pixel_x + rand(-9, 9)
+ pixel_y = base_pixel_y + rand(-8, 8)
update_icon()
/obj/item/paper/update_icon_state()
diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm
index 50a27914f62..bb530368655 100644
--- a/code/modules/paperwork/paper_cutter.dm
+++ b/code/modules/paperwork/paper_cutter.dm
@@ -121,8 +121,8 @@
/obj/item/paperslip/Initialize()
. = ..()
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
/obj/item/hatchet/cutterblade
diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm
index 7fed4f02e13..397e0963239 100644
--- a/code/modules/paperwork/paperplane.dm
+++ b/code/modules/paperwork/paperplane.dm
@@ -21,8 +21,8 @@
/obj/item/paperplane/Initialize(mapload, obj/item/paper/newPaper)
. = ..()
- pixel_y = rand(-8, 8)
- pixel_x = rand(-9, 9)
+ pixel_x = base_pixel_x + rand(-9, 9)
+ pixel_y = base_pixel_y + rand(-8, 8)
if(newPaper)
internalPaper = newPaper
flags_1 = newPaper.flags_1
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 6c59bbcc993..7cee678f604 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -206,8 +206,8 @@
* * copied_item - The paper, document, or photo that was just spawned on top of the printer.
*/
/obj/machinery/photocopier/proc/give_pixel_offset(obj/item/copied_item)
- copied_item.pixel_x = rand(-10, 10)
- copied_item.pixel_y = rand(-10, 10)
+ copied_item.pixel_x = copied_item.base_pixel_x + rand(-10, 10)
+ copied_item.pixel_y = copied_item.base_pixel_y + rand(-10, 10)
/**
* Handles the copying of devil contract paper. Transfers all the text, stamps and so on from the old paper, to the copy.
diff --git a/code/modules/photography/camera/silicon_camera.dm b/code/modules/photography/camera/silicon_camera.dm
index 37e2f49157d..454c2474ff6 100644
--- a/code/modules/photography/camera/silicon_camera.dm
+++ b/code/modules/photography/camera/silicon_camera.dm
@@ -84,8 +84,8 @@
to_chat(user, "Invalid Image.")
return
var/obj/item/photo/p = new /obj/item/photo(C.loc, selection)
- p.pixel_x = rand(-10, 10)
- p.pixel_y = rand(-10, 10)
+ p.pixel_x = p.base_pixel_x + rand(-10, 10)
+ p.pixel_y = p.base_pixel_y + rand(-10, 10)
C.toner -= printcost //All fun allowed.
visible_message("[C.name] spits out a photograph from a narrow slot on its chassis.")
to_chat(usr, "You print a photograph.")
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index ed1be864592..f826ecfca33 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -414,8 +414,8 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/item/stack/cable_coil/Initialize(mapload, new_amount = null)
. = ..()
- pixel_x = rand(-2,2)
- pixel_y = rand(-2,2)
+ pixel_x = base_pixel_x + rand(-2, 2)
+ pixel_y = base_pixel_y + rand(-2, 2)
update_icon()
/obj/item/stack/cable_coil/examine(mob/user)
@@ -593,8 +593,8 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
. = ..()
if(!amount)
amount = rand(1,2)
- pixel_x = rand(-2,2)
- pixel_y = rand(-2,2)
+ pixel_x = base_pixel_x + rand(-2, 2)
+ pixel_y = base_pixel_y + rand(-2, 2)
update_icon()
/obj/item/stack/cable_coil/cyborg
diff --git a/code/modules/power/pipecleaners.dm b/code/modules/power/pipecleaners.dm
index da5ded778a1..37386750439 100644
--- a/code/modules/power/pipecleaners.dm
+++ b/code/modules/power/pipecleaners.dm
@@ -233,8 +233,8 @@ By design, d1 is the smallest direction and d2 is the highest
if(pipe_cleaner_colors[pipe_cleaner_color])
pipe_cleaner_color = pipe_cleaner_colors[pipe_cleaner_color]
- pixel_x = rand(-2,2)
- pixel_y = rand(-2,2)
+ pixel_x = base_pixel_x + rand(-2, 2)
+ pixel_y = base_pixel_y + rand(-2, 2)
update_icon()
///////////////////////////////////
@@ -460,8 +460,8 @@ By design, d1 is the smallest direction and d2 is the highest
. = ..()
if(!amount)
amount = rand(1,2)
- pixel_x = rand(-2,2)
- pixel_y = rand(-2,2)
+ pixel_x = base_pixel_x + rand(-2, 2)
+ pixel_y = base_pixel_y + rand(-2, 2)
update_icon()
/obj/item/stack/pipe_cleaner_coil/cut/red
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index be2cdc1eddc..34dcbc13698 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -388,8 +388,8 @@
if(istype(I, /obj/item/turret_control))
qdel(I)
if(istype(buckled_mob))
- buckled_mob.pixel_x = 0
- buckled_mob.pixel_y = 0
+ buckled_mob.pixel_x = buckled_mob.base_pixel_x
+ buckled_mob.pixel_y = buckled_mob.base_pixel_y
if(buckled_mob.client)
buckled_mob.client.view_size.resetToDefault()
auto.Remove(buckled_mob)
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index e60ad51be57..81f78112220 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -222,8 +222,8 @@
randomise_offset(random_offset)
/obj/item/solar_assembly/proc/randomise_offset(amount)
- pixel_x = rand(-amount,amount)
- pixel_y = rand(-amount,amount)
+ pixel_x = base_pixel_x + rand(-amount, amount)
+ pixel_y = base_pixel_y + rand(-amount, amount)
// Give back the glass type we were supplied with
/obj/item/solar_assembly/proc/give_glass(device_broken)
diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammunition.dm
index 9598ffe2251..8077d7ec42b 100644
--- a/code/modules/projectiles/ammunition/_ammunition.dm
+++ b/code/modules/projectiles/ammunition/_ammunition.dm
@@ -30,8 +30,8 @@
. = ..()
if(projectile_type)
BB = new projectile_type(src)
- pixel_x = rand(-10, 10)
- pixel_y = rand(-10, 10)
+ pixel_x = base_pixel_x + rand(-10, 10)
+ pixel_y = base_pixel_y + rand(-10, 10)
setDir(pick(GLOB.alldirs))
update_icon()
diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 589c8c7c058..864256a2446 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -431,23 +431,23 @@
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
if (AM == beaker)
- AM.pixel_x = -8
- AM.pixel_y = 8
+ AM.pixel_x = AM.base_pixel_x - 8
+ AM.pixel_y = AM.base_pixel_y + 8
return null
else if (AM == bottle)
if (length(bottle.contents))
- AM.pixel_x = -13
+ AM.pixel_x = AM.base_pixel_x - 13
else
- AM.pixel_x = -7
- AM.pixel_y = -8
+ AM.pixel_x = AM.base_pixel_x - 7
+ AM.pixel_y = AM.base_pixel_y - 8
return null
else
var/md5 = md5(AM.name)
for (var/i in 1 to 32)
. += hex2num(md5[i])
. = . % 9
- AM.pixel_x = ((.%3)*6)
- AM.pixel_y = -8 + (round( . / 3)*8)
+ AM.pixel_x = AM.base_pixel_x + ((.%3)*6)
+ AM.pixel_y = AM.base_pixel_y - 8 + (round( . / 3)*8)
/**
* Translates styles data into UI compatible format
diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm
index 1b48d4d1f4f..f47744d6e8f 100644
--- a/code/modules/research/designs.dm
+++ b/code/modules/research/designs.dm
@@ -80,8 +80,8 @@ other types of metals and chemistry for reagents).
/obj/item/disk/design_disk/Initialize()
. = ..()
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
for(var/i in 1 to max_blueprints)
blueprints += null
diff --git a/code/modules/research/research_disk.dm b/code/modules/research/research_disk.dm
index 223e5f184c1..62eca2aedf7 100644
--- a/code/modules/research/research_disk.dm
+++ b/code/modules/research/research_disk.dm
@@ -8,8 +8,8 @@
/obj/item/disk/tech_disk/Initialize()
. = ..()
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
stored_research = new /datum/techweb
/obj/item/disk/tech_disk/debug
diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm
index 9cde16cddb9..17ed354741b 100644
--- a/code/modules/research/stock_parts.dm
+++ b/code/modules/research/stock_parts.dm
@@ -130,8 +130,8 @@ If you create T5+ please take a pass at mech_fabricator.dm. The parts being good
/obj/item/stock_parts/Initialize()
. = ..()
- pixel_x = rand(-5, 5)
- pixel_y = rand(-5, 5)
+ pixel_x = base_pixel_x + rand(-5, 5)
+ pixel_y = base_pixel_y + rand(-5, 5)
/obj/item/stock_parts/get_part_rating()
return rating
diff --git a/code/modules/research/xenobiology/crossbreeding/consuming.dm b/code/modules/research/xenobiology/crossbreeding/consuming.dm
index c1e3f3de3f6..5183c2c5c99 100644
--- a/code/modules/research/xenobiology/crossbreeding/consuming.dm
+++ b/code/modules/research/xenobiology/crossbreeding/consuming.dm
@@ -35,8 +35,8 @@ Consuming extracts:
last_produced = world.time
for(var/i in 1 to cookies)
var/obj/item/S = spawncookie()
- S.pixel_x = rand(-5, 5)
- S.pixel_y = rand(-5, 5)
+ S.pixel_x = base_pixel_x + rand(-5, 5)
+ S.pixel_y = base_pixel_y + rand(-5, 5)
return
..()
diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm
index 87c454c6beb..ad4d75d35b4 100644
--- a/code/modules/vehicles/atv.dm
+++ b/code/modules/vehicles/atv.dm
@@ -50,20 +50,20 @@
turret.forceMove(get_turf(src))
switch(dir)
if(NORTH)
- turret.pixel_x = 0
- turret.pixel_y = 4
+ turret.pixel_x = base_pixel_x
+ turret.pixel_y = base_pixel_y + 4
turret.layer = ABOVE_MOB_LAYER
if(EAST)
- turret.pixel_x = -12
- turret.pixel_y = 4
+ turret.pixel_x = base_pixel_x - 12
+ turret.pixel_y = base_pixel_y + 4
turret.layer = OBJ_LAYER
if(SOUTH)
- turret.pixel_x = 0
- turret.pixel_y = 4
+ turret.pixel_x = base_pixel_x
+ turret.pixel_y = base_pixel_y + 4
turret.layer = OBJ_LAYER
if(WEST)
- turret.pixel_x = 12
- turret.pixel_y = 4
+ turret.pixel_x = base_pixel_x + 12
+ turret.pixel_y = base_pixel_y + 4
turret.layer = OBJ_LAYER
/obj/vehicle/ridden/atv/welder_act(mob/living/user, obj/item/I)