Files
f00535983e [MDB IGNORE] [IDB IGNORE] atom damage (#5235)
## About The Pull Request

adds generic system for atom health / integrity / damage

everything that isn't flagged with not-bludgeonable can, well, now be
bludgeoned.

## Why It's Good For The Game

more interactive game world through the means of making people able to
break Everything.

## Changelog

🆑
add: atom damage - (almost) everything is now breakable.
refactor: new /atom level materials system
refactor: a lot of the combat system / click code
refactor: melee attack styles
/🆑

---------

Co-authored-by: silicons <no@you.cat>
2023-11-11 17:33:57 -07:00

50 lines
1.6 KiB
Plaintext

/obj/effect/falling_effect
name = "you should not see this"
desc = "no data"
invisibility = INVISIBILITY_ABSTRACT
anchored = TRUE
density = FALSE
integrity_flags = INTEGRITY_ACIDPROOF | INTEGRITY_FIREPROOF | INTEGRITY_INDESTRUCTIBLE | INTEGRITY_INDESTRUCTIBLE
var/falling_type = /obj/item/reagent_containers/food/snacks/sliceable/pizza/margherita
var/crushing = TRUE
/obj/effect/falling_effect/Initialize(mapload)
. = ..()
new falling_type(src)
var/atom/movable/dropped = pick(contents) // Stupid, but allows to get spawn result without efforts if it is other type(Or if it was randomly generated).
dropped.loc = get_turf(src)
var/initial_x = dropped.pixel_x
var/initial_y = dropped.pixel_y
dropped.plane = 1
dropped.pixel_x = rand(-150, 150)
dropped.pixel_y = 500 // When you think that pixel_z is height but you are wrong
dropped.density = FALSE
dropped.opacity = FALSE
animate(dropped, pixel_y = initial_y, pixel_x = initial_x , time = 7)
addtimer(CALLBACK(dropped, TYPE_PROC_REF(/atom/movable, end_fall)), 7)
return INITIALIZE_HINT_QDEL
/atom/movable/proc/end_fall(var/crushing = FALSE)
if(crushing)
for(var/atom/movable/AM in loc)
if(AM != src)
LEGACY_EX_ACT(AM, 1, null)
explosion(src.loc, 0, 0, 1, 1, 0)
for(var/mob/living/M in oviewers(3, src))
shake_camera(M, 2, 2)
playsound(src, 'sound/effects/meteorimpact.ogg', 50, 1)
density = initial(density)
opacity = initial(opacity)
plane = initial(plane)
/obj/effect/falling_effect/singularity_act()
return
/obj/effect/falling_effect/singularity_pull()
return
/obj/effect/falling_effect/legacy_ex_act()
return