Skip to content

Commit

Permalink
Merge branch 'master' into table_clumsy
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU authored Nov 13, 2023
2 parents 514e10d + 149e8aa commit 3af6ebe
Show file tree
Hide file tree
Showing 22 changed files with 413 additions and 53 deletions.
16 changes: 14 additions & 2 deletions _maps/map_files220/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -40047,6 +40047,7 @@
/turf/simulated/floor/plating,
/area/station/maintenance/port)
"cKC" = (
/obj/random/hampter,
/turf/simulated/floor/mech_bay_recharge_floor,
/area/station/maintenance/apmaint)
"cKD" = (
Expand Down Expand Up @@ -45782,6 +45783,13 @@
/obj/structure/cable/yellow,
/turf/simulated/floor/plating,
/area/station/hallway/secondary/exit)
"dAN" = (
/obj/structure/chair{
dir = 8
},
/obj/random/hampter,
/turf/simulated/floor/plating,
/area/station/maintenance/fpmaint)
"dAO" = (
/obj/structure/cable/yellow{
d2 = 2;
Expand Down Expand Up @@ -49485,6 +49493,10 @@
icon_state = "darkgrey"
},
/area/station/engineering/tech_storage)
"fpi" = (
/obj/random/hampter,
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint)
"fpk" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
Expand Down Expand Up @@ -110137,7 +110149,7 @@ aky
anI
aph
aqA
auE
dAN
ksz
auE
aOB
Expand Down Expand Up @@ -126419,7 +126431,7 @@ bHo
emj
cPc
cTk
emj
fpi
gVL
dhl
emj
Expand Down
23 changes: 19 additions & 4 deletions _maps/map_files220/cyberiad/cyberiad.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4983,7 +4983,6 @@
name = "Cell 3"
},
/obj/machinery/door/firedoor,
/obj/item/radio/intercom/directional/east,
/obj/machinery/door/poddoor/preopen{
id_tag = "Secure Gate";
name = "Security Blast Door"
Expand Down Expand Up @@ -6228,7 +6227,6 @@
id = "Cell 4";
name = "Cell 4"
},
/obj/item/radio/intercom/directional/east,
/obj/machinery/door/poddoor/preopen{
id_tag = "Secure Gate";
name = "Security Blast Door"
Expand Down Expand Up @@ -70067,6 +70065,16 @@
},
/turf/simulated/floor/plasteel,
/area/station/science/hallway)
"mCW" = (
/obj/structure/chair/stool{
dir = 1
},
/obj/effect/decal/cleanable/dirt,
/obj/random/hampter,
/turf/simulated/floor/plasteel{
icon_state = "grimy"
},
/area/station/maintenance/fpmaint2)
"mDs" = (
/obj/machinery/light/small/directional/east,
/obj/structure/cable{
Expand Down Expand Up @@ -72839,6 +72847,12 @@
},
/turf/simulated/floor/carpet,
/area/station/command/office/hop)
"nDi" = (
/obj/structure/bed,
/obj/machinery/light/small/directional/east,
/obj/random/hampter,
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
"nDq" = (
/obj/structure/disposalpipe/segment{
dir = 4
Expand Down Expand Up @@ -97935,6 +97949,7 @@
/obj/structure/bed,
/obj/item/bedsheet/black,
/obj/effect/spawner/random_spawners/cobweb_right_rare,
/obj/random/hampter,
/turf/simulated/floor/carpet/royalblack,
/area/station/maintenance/apmaint)
"wOf" = (
Expand Down Expand Up @@ -118106,7 +118121,7 @@ aII
aDC
aEK
aFX
aHk
mCW
aHl
aKW
aDD
Expand Down Expand Up @@ -139166,7 +139181,7 @@ nCV
ifJ
dEI
atG
apY
nDi
arS
aqc
auZ
Expand Down
10 changes: 9 additions & 1 deletion _maps/map_files220/delta/delta.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2739,6 +2739,7 @@
},
/obj/machinery/atmospherics/unary/vent_scrubber/on,
/obj/effect/landmark/damageturf,
/obj/random/hampter,
/turf/simulated/floor/wood/oak,
/area/station/maintenance/electrical_shop)
"arw" = (
Expand Down Expand Up @@ -61762,6 +61763,7 @@
"jvm" = (
/obj/structure/table/reinforced,
/obj/effect/decal/cleanable/dirt,
/obj/random/hampter,
/turf/simulated/floor/plasteel{
icon_state = "redyellowfull"
},
Expand Down Expand Up @@ -69252,6 +69254,12 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
/area/station/maintenance/aft)
"lYq" = (
/obj/structure/table/wood/poker,
/obj/effect/decal/cleanable/dirt,
/obj/random/hampter,
/turf/simulated/floor/plasteel/grimy,
/area/station/maintenance/abandonedbar)
"lYz" = (
/obj/effect/spawner/random_spawners/grille_maybe,
/obj/structure/cable{
Expand Down Expand Up @@ -123720,7 +123728,7 @@ dcM
daf
lTi
dhv
duT
lYq
dYm
lTi
dmM
Expand Down
6 changes: 3 additions & 3 deletions _maps/map_files220/generic/centcomm.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2698,7 +2698,7 @@
/turf/simulated/floor/plating,
/area/syndicate_mothership/cargo)
"bVM" = (
/obj/mecha/combat/gygax/dark/loaded,
/obj/mecha/combat/gygax/nt/loaded_red,
/turf/simulated/floor/mech_bay_recharge_floor,
/area/centcom/ss220/admin3)
"bVP" = (
Expand Down Expand Up @@ -20942,7 +20942,7 @@
/turf/simulated/floor/carpet/black,
/area/centcom/ss220/command)
"oAD" = (
/obj/mecha/combat/gygax/dark/loaded,
/obj/mecha/combat/gygax/nt/loaded_epsilon,
/turf/simulated/floor/plasteel/dark{
dir = 1;
icon_state = "darkbrown"
Expand Down Expand Up @@ -23389,7 +23389,7 @@
},
/area/centcom/ss220/bar)
"qpJ" = (
/obj/mecha/combat/gygax/dark/loaded,
/obj/mecha/combat/gygax/nt/loaded_epsilon,
/turf/simulated/floor/plasteel/dark{
dir = 9;
icon_state = "darkbrown"
Expand Down
4 changes: 4 additions & 0 deletions modular_ss220/animations/_animations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/animations
name = "Анимации"
desc = "Добавляет анимации при взаимодействи с предметами"
author = "EtSl33py"
3 changes: 3 additions & 0 deletions modular_ss220/animations/_animations.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_animations.dm"

#include "code/animations.dm"
107 changes: 107 additions & 0 deletions modular_ss220/animations/code/animations.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#define MACHINE_ANIMATION 1
#define PICKUP_ANIMATION 2

/obj/item/attack_hand(mob/user as mob)
var/in_something = src.in_inventory || src.in_storage
var/atom/itm_loc = src.loc
. = ..()
if(. && !in_something)
do_item_animation(user, src, itm_loc, PICKUP_ANIMATION, FALSE)

/obj/machinery/disposal/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/obj/machinery/kitchen_machine/add_item(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/obj/machinery/chem_master/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/obj/machinery/chem_heater/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/obj/machinery/photocopier/attackby(obj/item/O, mob/user)
. = ..()
if(!O.in_inventory) do_item_animation(user, O, src)

/obj/machinery/mineral/ore_redemption/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory) do_item_animation(user, I, src)

/proc/do_item_animation(mob/user, obj/item/itm, atom/A, anim_type = MACHINE_ANIMATION, reverse = TRUE)
var/image/I = image(icon = itm, loc = user, layer = user.layer + 0.1)
I.plane = GAME_PLANE
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
I.pixel_x = A.pixel_x - user.pixel_x
I.pixel_y = A.pixel_y - user.pixel_y

var/direction = get_dir(user, A)
if(direction & EAST) I.pixel_x += 32
else if(direction & WEST) I.pixel_x -= 32
if(direction & NORTH) I.pixel_y += 32
else if(direction & SOUTH) I.pixel_y -= 32

if(reverse)
I.loc = A
I.pixel_x*=-1
I.pixel_y*=-1

I.appearance_flags |= RESET_TRANSFORM | KEEP_APART
var/list/viewing = list()
for(var/mob/M in viewers(user))
if(M.client)
viewing += M.client
flick_overlay(I, viewing, 3)

var/matrix/new_transform = matrix()
switch(anim_type)
if(PICKUP_ANIMATION)
I.pixel_x += itm.pixel_x
I.pixel_y += itm.pixel_y
new_transform.Scale(0.5)

animate(I, pixel_x = 0, pixel_y = 0, transform = new_transform, time = 2)
animate(alpha = 0, time = 2, easing = CUBIC_EASING | EASE_IN, flags = ANIMATION_PARALLEL)
if(MACHINE_ANIMATION)
I.transform *= 0.75
var/target_y = 0

if(istype(A, /obj/machinery/disposal))
new_transform.Turn(I.pixel_x<0?120:-120)
if(A.parent_type != /obj/machinery/disposal)
target_y = 7;
animate(I, transform = new_transform, time = 2)
animate(I, pixel_x = 0, pixel_y = target_y, time = 2, flags = ANIMATION_PARALLEL)
animate(I, alpha = 0, time = 2, easing = CIRCULAR_EASING | EASE_IN, flags = ANIMATION_PARALLEL)

/obj/structure/table/attackby(obj/item/I, mob/user)
. = ..()
if(!I.in_inventory)
var/transform_old = I.transform
var/alpha_old = I.alpha
var/pixel_x_old = I.pixel_x
var/pixel_y_old = I.pixel_y

I.pixel_x = user.pixel_x
I.pixel_y = user.pixel_y

var/direction = get_dir(I, user)
if(direction & EAST) I.pixel_x = 32
else if(direction & WEST) I.pixel_x = -32
if(direction & NORTH)I.pixel_y = 32
else if(direction & SOUTH) I.pixel_y = -32

I.transform *= 0.5
I.alpha = 0
animate(I, alpha = alpha_old, pixel_x = pixel_x_old, pixel_y = pixel_y_old, transform = transform_old, time = 0.12 SECONDS, easing = QUAD_EASING)

#undef MACHINE_ANIMATION
#undef PICKUP_ANIMATION
4 changes: 4 additions & 0 deletions modular_ss220/hampter/_hampter.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/hampter
name = "Hampter Toys"
desc = "Набор игрушек хамптеров. 10 штук. Возврату не подлежат."
author = "RomainzZ, FanTik"
3 changes: 3 additions & 0 deletions modular_ss220/hampter/_hampter.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "_hampter.dm"

#include "code/hampter.dm"
Loading

0 comments on commit 3af6ebe

Please sign in to comment.