mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Add a spont vore interaction to buckling (#17066)
This commit is contained in:
@@ -123,9 +123,19 @@
|
||||
if(M in buckled_mobs)
|
||||
to_chat(user, span_warning("\The [M] is already buckled to \the [src]."))
|
||||
return FALSE
|
||||
if(!can_buckle_check(M, forced))
|
||||
if(!can_buckle_check(M, forced, TRUE))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs)
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
if(istype(L) && M.CanStumbleVore(L))
|
||||
unbuckle_mob(L, TRUE)
|
||||
if(M == user)
|
||||
M.visible_message(span_warning("[M.name] sits down on [L.name]!"))
|
||||
else
|
||||
M.visible_message(span_warning("[M.name] is forced to sit down on [L.name] by [user.name]!"))
|
||||
M.perform_the_nom(user, L, M, M.vore_selected, 1)
|
||||
|
||||
add_fingerprint(user)
|
||||
// unbuckle_mob()
|
||||
|
||||
@@ -191,18 +201,22 @@
|
||||
else
|
||||
L.set_dir(buckle_dir)
|
||||
|
||||
/atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE)
|
||||
/atom/movable/proc/can_buckle_check(mob/living/M, forced = FALSE, can_do_spont_vore = FALSE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (buckled_mobs.len >= max_buckled_mobs) || (buckle_require_restraints && !M.restrained()))
|
||||
if((!can_buckle && !forced) || M.buckled || M.pinned.len || (max_buckled_mobs == 0) || (buckle_require_restraints && !M.restrained()))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs() && buckled_mobs.len >= max_buckled_mobs) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
to_chat(M, span_notice("\The [src] can't buckle anymore people."))
|
||||
if(can_do_spont_vore && is_vore_predator(M) && M.vore_selected)
|
||||
for(var/mob/living/buckled in buckled_mobs)
|
||||
if(M.CanStumbleVore(buckled))
|
||||
return TRUE
|
||||
to_chat(M, span_notice("\The [src] can't buckle any more people."))
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user