Dragging storage bags now drops items around the mouse pointer (#27790)

* Standardize attom scatter and make bag drops offset it based on mouse position

* Init sanity

* Update code/game/atoms_movable.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2025-01-06 18:02:09 +00:00
committed by GitHub
co-authored by DGamerL
parent a387c18e16
commit 8e60888659
39 changed files with 94 additions and 94 deletions
@@ -223,9 +223,11 @@
/mob/living/simple_animal/chick/Initialize(mapload)
. = ..()
scatter_atom()
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
/mob/living/simple_animal/chick/scatter_atom(x_offset, y_offset)
pixel_x = rand(-6, 6) + x_offset
pixel_y = rand(0, 10) + y_offset
/mob/living/simple_animal/chick/Life(seconds, times_fired)
. =..()
@@ -302,11 +304,14 @@ GLOBAL_VAR_INIT(chicken_count, 0)
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)
scatter_atom()
update_appearance(UPDATE_ICON_STATE)
GLOB.chicken_count += 1
/mob/living/simple_animal/chick/scatter_atom(x_offset, y_offset)
pixel_x = rand(-6, 6) + x_offset
pixel_y = rand(0, 10) + y_offset
/mob/living/simple_animal/chicken/death(gibbed)
// Only execute the below if we successfully died
. = ..(gibbed)
@@ -339,8 +344,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
visible_message("[src] [pick(layMessage)]")
eggsleft--
var/obj/item/E = new egg_type(get_turf(src))
E.pixel_x = rand(-6,6)
E.pixel_y = rand(-6,6)
E.scatter_atom()
if(eggsFertile)
if(GLOB.chicken_count < MAX_CHICKENS && prob(25))
START_PROCESSING(SSobj, E)