Files
Ben10Omintrix 914a85d562 snails (#90505)
## About The Pull Request
adds snails to the game

![image](https://github.com/user-attachments/assets/f1745795-695f-443a-827e-1f1987d4fdb6)

these are harmless critters you can find in maints. they love eating all
variety of fruits, and are gravitated towards snail people, where
they'll dance around them.

you can also pick them up and put them on your head.

finally, you can also grab them and put them in hydrotrays (they will
swim around in it very slowly). they'll help ur plants grow as they act
as natural weed-repellants, as they'll eat weeds that grow in trays.

![image](https://github.com/user-attachments/assets/512f0974-d0d1-4f90-a540-c03d1c969328)


## Why It's Good For The Game
there's not that many mobs you can usually find in maints, currently
there's only mice and cockroaches, this helps expand the pools a bit.

## Changelog
🆑
add: adds snails to the game. (keep them away from salt!)
/🆑
2025-05-08 19:19:40 -04:00

23 lines
748 B
Plaintext

#define SNAIL_MOVEMENT_DISTANCE 5
#define SNAIL_MOVEMENT_TIME 10 SECONDS
/obj/effect/overlay/vis_effect/snail
name = "snail"
vis_flags = VIS_INHERIT_PLANE
icon = 'icons/obj/service/hydroponics/equipment.dmi'
icon_state = "snail_hydrotray"
///are we currently walking?
var/is_waddling = FALSE
/obj/effect/overlay/vis_effect/snail/proc/handle_animation()
if(is_waddling)
return
is_waddling = TRUE
var/movement_direction = pixel_x >= 0 ? -1 : 1
transform = transform.Scale(-1, 1) //face the other direction
animate(src, pixel_x = movement_direction * SNAIL_MOVEMENT_DISTANCE, time = SNAIL_MOVEMENT_TIME)
addtimer(VARSET_CALLBACK(src, is_waddling, FALSE), SNAIL_MOVEMENT_TIME)
#undef SNAIL_MOVEMENT_DISTANCE
#undef SNAIL_MOVEMENT_TIME