mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
fixes
This commit is contained in:
@@ -114,6 +114,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define MOBILITY_PULL (1<<6)
|
||||
/// can hold non-nodropped items voluntarily
|
||||
#define MOBILITY_HOLD (1<<7)
|
||||
/// Can resist out of buckling, grabs, cuffs, etc, in the usual order (buckle --> cuffs --> grab)
|
||||
#define MOBILITY_RESIST (1<<8)
|
||||
|
||||
#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL)
|
||||
#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_PICKUP | MOBILITY_USE | MOBILITY_UI | MOBILITY_STORAGE | MOBILITY_PULL | MOBILITY_RESIST)
|
||||
#define MOBILITY_FLAGS_ANY_INTERACTION (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_UI | MOBILITY_STORAGE)
|
||||
|
||||
@@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"CAN_MASTURBATE_WITH" = CAN_MASTURBATE_WITH,
|
||||
"MASTURBATE_LINKED_ORGAN" = MASTURBATE_LINKED_ORGAN,
|
||||
"CAN_CLIMAX_WITH" = CAN_CLIMAX_WITH
|
||||
|
||||
|
||||
),
|
||||
"mob_biotypes" = list (
|
||||
"MOB_ORGANIC" = MOB_ORGANIC,
|
||||
@@ -227,5 +227,16 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"MOB_EPIC" = MOB_EPIC,
|
||||
"MOB_REPTILE" = MOB_REPTILE,
|
||||
"MOB_SPIRIT" = MOB_SPIRIT
|
||||
),
|
||||
"mobility_flags" = list(
|
||||
"MOBILITY_MOVE" = MOBILITY_MOVE,
|
||||
"MOBILITY_STAND" = MOBILITY_STAND,
|
||||
"MOBILITY_PICKUP" = MOBILITY_PICKUP,
|
||||
"MOBILITY_USE" = MOBILITY_USE,
|
||||
"MOBILITY_UI" = MOBILITY_UI,
|
||||
"MOBILITY_STORAGE" = MOBILITY_STORAGE,
|
||||
"MOBILITY_PULL" = MOBILITY_PULL,
|
||||
"MOBILITY_HOLD" = MOBILITY_HOLD,
|
||||
"MOBILITY_RESIST" = MOBILITY_RESIST
|
||||
)
|
||||
))
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
|
||||
/atom/movable/CanPass(atom/movable/mover, turf/target)
|
||||
if(mover in buckled_mobs)
|
||||
return 1
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
buckle_cd = O.breakouttime
|
||||
visible_message("<span class='warning'>[src] attempts to unbuckle [p_them()]self!</span>", \
|
||||
"<span class='notice'>You attempt to unbuckle yourself... (This will take around [round(buckle_cd/600,1)] minute\s, and you need to stay still.)</span>")
|
||||
if(do_after(src, buckle_cd, 0, target = src))
|
||||
if(do_after(src, buckle_cd, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||
if(!buckled)
|
||||
return
|
||||
buckled.user_unbuckle_mob(src,src)
|
||||
@@ -341,7 +341,7 @@
|
||||
if(!cuff_break)
|
||||
visible_message("<span class='warning'>[src] attempts to remove [I]!</span>")
|
||||
to_chat(src, "<span class='notice'>You attempt to remove [I]... (This will take around [DisplayTimeText(breakouttime)] and you need to stand still.)</span>")
|
||||
if(do_after(src, breakouttime, 0, target = src))
|
||||
if(do_after(src, breakouttime, 0, target = src, required_mobility_flags = MOBILITY_RESIST))
|
||||
clear_cuffs(I, cuff_break)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You fail to remove [I]!</span>")
|
||||
|
||||
@@ -43,3 +43,12 @@
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
|
||||
/mob/living/carbon/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/mob/living/mobdude = mover
|
||||
if(istype(mobdude) && !(mobdude in buckled_mobs))
|
||||
if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && !CHECK_BITFIELD(mobdude.mobility_flags, MOBILITY_STAND))
|
||||
if(!(mobdude.pass_flags & PASSMOB))
|
||||
return FALSE
|
||||
|
||||
@@ -110,11 +110,18 @@
|
||||
var/restrained = restrained()
|
||||
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
|
||||
var/canmove = !immobilize && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && (has_arms || ignore_legs || has_legs) && !pinned && !recoveringstam
|
||||
var/canresist = !stun && conscious && !stat_softcrit && !paralyze && (has_arms || ignore_legs || has_legs) && !recoveringstam
|
||||
|
||||
if(canmove)
|
||||
mobility_flags |= MOBILITY_MOVE
|
||||
else
|
||||
mobility_flags &= ~MOBILITY_MOVE
|
||||
|
||||
if(canresist)
|
||||
mobility_flags |= MOBILITY_RESIST
|
||||
else
|
||||
mobility_flags &= !MOBILITY_RESIST
|
||||
|
||||
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying) && !recoveringstam
|
||||
var/canstand = canstand_involuntary && !resting
|
||||
|
||||
@@ -125,9 +132,6 @@
|
||||
|
||||
if(should_be_lying)
|
||||
mobility_flags &= ~MOBILITY_STAND
|
||||
if(buckled)
|
||||
if(buckled.buckle_lying != -1)
|
||||
lying = buckled.buckle_lying
|
||||
if(!lying) //force them on the ground
|
||||
lying = pick(90, 270)
|
||||
else
|
||||
|
||||
4
code/modules/mob/living/silicon/silicon_mobility.dm
Normal file
4
code/modules/mob/living/silicon/silicon_mobility.dm
Normal file
@@ -0,0 +1,4 @@
|
||||
/mob/living/silicon/resist_a_rest()
|
||||
if(!resting)
|
||||
return FALSE
|
||||
return set_resting(FALSE)
|
||||
@@ -8,16 +8,6 @@
|
||||
//oh no vore time
|
||||
var/voremode = FALSE
|
||||
|
||||
/mob/living/carbon/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/mob/living/mobdude = mover
|
||||
if(istype(mobdude))
|
||||
if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && !CHECK_BITFIELD(mobdude.mobility_flags, MOBILITY_STAND))
|
||||
if(!(mobdude.pass_flags & PASSMOB))
|
||||
return FALSE
|
||||
return .
|
||||
|
||||
/mob/living/carbon/proc/toggle_combat_mode(forced, silent)
|
||||
if(!forced)
|
||||
if(recoveringstam || stat != CONSCIOUS)
|
||||
|
||||
@@ -2257,6 +2257,7 @@
|
||||
#include "code\modules\mob\living\silicon\say.dm"
|
||||
#include "code\modules\mob\living\silicon\silicon.dm"
|
||||
#include "code\modules\mob\living\silicon\silicon_defense.dm"
|
||||
#include "code\modules\mob\living\silicon\silicon_mobility.dm"
|
||||
#include "code\modules\mob\living\silicon\silicon_movement.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\ai.dm"
|
||||
#include "code\modules\mob\living\silicon\ai\ai_defense.dm"
|
||||
|
||||
Reference in New Issue
Block a user