Files
Will 5d31f14e94 Climbable Element (#17764)
* Initial work

* small fix

* another fix

* this better?

* proper type

* condensing this a bit

* functioning

* death reporting subsystemed

* fixed

* cleanup

* use proper sql sending

* listvar

* add more climbable things

* moving things while climbing them is considered shaking

* tabbing fix

* knockdown should stop climbing

* no need to bother

* spaces

* more climbable objects

* fix

* small fixes

* office climbables

* yet more stuff

* engineering things

* a few more

* it's funny

* fixes

* additional

* Moved to element

* some more stragglers

* unneeded

* more graceful

* cliffs require special handling

* don't do dumb init things

* unneeded sanitization, mass insert sanitizes

* some small condition fixes

* return if climbable

* incorporeal check

* stop using numbers directly

* .

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-06-20 09:56:56 +02:00

146 lines
4.2 KiB
Plaintext

/atom/proc/stumble_into(mob/living/M)
playsound(src, "punch", 25, 1, -1)
visible_message(span_warning("[M] [pick("ran", "slammed")] into \the [src]!"))
to_chat(M, span_warning("You just [pick("ran", "slammed")] into \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.stop_flying()
/obj/structure/table/stumble_into(mob/living/M)
var/obj/occupied = can_climb_turf(src)
if(occupied)
return ..()
if(material)
playsound(src, material.tableslam_noise, 25, 1, -1)
else
playsound(src, 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message(span_warning("[M] flopped onto \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
M.stop_flying()
/obj/machinery/disposal/stumble_into(mob/living/M)
playsound(src, 'sound/effects/clang.ogg', 25, 1, -1)
visible_message(span_warning("[M] [pick("tripped", "stumbled")] into \the [src]!"))
log_and_message_admins("stumbled into \the [src]", M)
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(src)
M.stop_flying()
update()
/obj/structure/inflatable/stumble_into(mob/living/M)
playsound(src, "sound/effects/Glasshit.ogg", 25, 1, -1)
visible_message(span_warning("[M] [pick("ran", "slammed")] into \the [src]!"))
M.Weaken(1)
M.stop_flying()
/obj/structure/kitchenspike/stumble_into(mob/living/M)
playsound(src, "sound/weapons/pierce.ogg", 25, 1, -1)
visible_message(span_warning("[M] [pick("ran", "slammed")] into the spikes on \the [src]!"))
M.apply_damage(15, BRUTE, sharp = TRUE)
M.Weaken(5)
M.stop_flying()
/obj/structure/m_tray/stumble_into(mob/living/M)
playsound(src, 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message(span_warning("[M] flopped onto \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
M.stop_flying()
/obj/structure/c_tray/stumble_into(mob/living/M)
playsound(src, 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message(span_warning("[M] flopped onto \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
M.stop_flying()
/obj/structure/window/stumble_into(mob/living/M)
visible_message(span_warning("[M] [pick("ran", "slammed")] into \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
hitby(M)
M.stop_flying()
/obj/structure/railing/stumble_into(mob/living/M)
var/obj/occupied = can_climb_turf(src)
if(occupied)
return ..()
playsound(src, 'sound/misc/slip.ogg', 25, 1, -1)
visible_message(span_warning("[M] [pick("tripped", "stumbled")] over \the [src]!"))
M.Weaken(2)
M.stop_flying()
if(get_turf(M) == get_turf(src))
var/turf/T = get_step(src, src.dir)
if(T?.Enter(M, get_turf(src)))
M.forceMove(T)
else
M.forceMove(get_turf(src))
/obj/machinery/door/window/stumble_into(mob/living/M)
..()
bumpopen(M)
/obj/machinery/door/airlock/stumble_into(mob/living/M)
..()
bumpopen(M)
/obj/machinery/appliance/cooker/fryer/stumble_into(mob/living/M)
visible_message(span_warning("[M] [pick("ran", "slammed")] into \the [src]!"))
M.apply_damage(15, BURN)
M.Weaken(5)
M.emote("scream")
M.stop_flying()
/obj/machinery/atmospherics/unary/cryo_cell/stumble_into(mob/living/M)
if((stat & (NOPOWER|BROKEN)) || !istype(M, /mob/living/carbon) || occupant || M.abiotic() || !node)
return ..()
playsound(src, 'sound/effects/Glasshit.ogg', 25, 1, -1)
visible_message(span_warning("[M] [pick("tripped", "stumbled")] into \the [src]!"))
M.apply_damage(5, BRUTE)
M.Weaken(2)
put_mob(M)
M.stop_flying()
/obj/machinery/porta_turret/stumble_into(mob/living/M)
..()
if(!attacked && !emagged)
attacked = 1
spawn()
sleep(60)
attacked = 0
/obj/machinery/space_heater/stumble_into(mob/living/M)
..()
if(state)
M.apply_damage(10, BURN)
M.emote("scream")
/obj/machinery/suit_storage_unit/stumble_into(mob/living/M)
if(!ishuman(M) || !isopen || !ispowered || isbroken || OCCUPANT || HELMET || SUIT)
return ..()
playsound(src, 'sound/effects/clang.ogg', 25, 1, -1)
visible_message(span_warning("[M] [pick("tripped", "stumbled")] into \the [src]!"))
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
OCCUPANT = M
isopen = 0
update_icon()
add_fingerprint(M)
updateUsrDialog(M)
M.stop_flying()
/obj/machinery/vending/stumble_into(mob/living/M)
..()
if(prob(2))
throw_item()