Adds crawling. (#17899)

* crawling?

* knockdown. CONTAINS CHANGES THAT NEED REVERTING

* plotting can_moves death

* CANMOVE IS DEAD

* mappers are insane

* removes todos as the are todone

* decreases crawling speed

* silly-con fixes

* surgery fixes

* fixes death

* pAI fixes

* removes var/lying

* runtime fix

* decreases default crawling speed

* correct crawling dir

* some more fixes

* stunbaton tweak, revert later

* rejuv fix

* restraint and incapacitated refactor

* crawling dir in line with TG

* fixes vehicle movement and grabs

* alien rest fixes

* antistun fixes

* fixed fall sounds

* forgor to stage this

* first review

* canmove zombie dispersal

* fix

* lots of fixes

* defines

* fixes the trait helper

* if you got no legs you can still crawl

* sillyconfix

* no reverty keepy

* jaunt fix

* hopefully fixes perma sleepy zzz

* admin rejuv temp fix

* rest canceling

* antistun chems now remove knockdown

* buckle offset fix

* fixes some stuff

* crawling delay = 4

* descuffs bed

* sleeping hotfix

* fixes simple mob resting

* V is the macro for resting

* projectiles no dodgy

* refines the projectile check

* god I hate strings

* MORE FIXES

* I hate buckling

* fixes capulettium plus

* winding down

* farie review

* bugs did stop showing up

* SEAN

* todo

* sean review

* ed209

* i HATE cyborgs

* steel review

* laaaaaast things

* reverts stun baton changes

* and done
This commit is contained in:
Charlie
2022-06-30 11:57:52 -05:00
committed by GitHub
parent 5e2f62800c
commit bead47ea29
190 changed files with 1012 additions and 725 deletions
+10 -3
View File
@@ -73,14 +73,17 @@
if(!check_loc && M.loc != loc)
M.forceMove(loc)
if(!buckle_lying)
M.set_body_position(STANDING_UP)
else
M.set_body_position(LYING_DOWN)
M.buckling = null
M.buckled = src
M.setDir(dir)
buckled_mobs |= M
M.update_canmove()
ADD_TRAIT(M, TRAIT_IMMOBILIZED, BUCKLING_TRAIT)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
post_buckle_mob(M)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force)
return TRUE
@@ -96,10 +99,14 @@
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
REMOVE_TRAIT(buckled_mob, TRAIT_IMMOBILIZED, BUCKLING_TRAIT)
buckled_mob.clear_alert("buckled")
buckled_mobs -= buckled_mob
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
if((buckled_mob.mobility_flags & MOBILITY_STAND) && !buckled_mob.resting)
buckled_mob.stand_up()
else if(!buckle_lying)
buckled_mob.fall()
post_unbuckle_mob(.)
+3 -11
View File
@@ -60,10 +60,8 @@
if(AM in T.affecting)
return
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = FALSE
if(immobilize)
ADD_TRAIT(A, TRAIT_IMMOBILIZED, "[UID()]")
affecting.Add(AM)
while(AM && !stopthrow)
@@ -94,13 +92,7 @@
AM.setDir(predir)
affecting.Remove(AM)
if(isliving(AM))
var/mob/living/M = AM
if(immobilize)
M.canmove = TRUE
REMOVE_TRAIT(A, TRAIT_IMMOBILIZED, "[UID()]")
/* Stops things thrown by a thrower, doesn't do anything */
+2 -2
View File
@@ -723,7 +723,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/mob/living/L = user
if(!(user.client.prefs.toggles2 & PREFTOGGLE_2_SEE_ITEM_OUTLINES))
return
if(istype(L) && L.incapacitated(ignore_lying = TRUE))
if(istype(L) && HAS_TRAIT(L, TRAIT_HANDS_BLOCKED))
apply_outline(L, COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now
else
apply_outline(L) //if the player's alive and well we send the command with no color set, so it uses the theme's color
@@ -734,7 +734,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
remove_outline()
/obj/item/MouseDrop_T(obj/item/I, mob/user)
if(!user || user.incapacitated(ignore_lying = TRUE) || src == I)
if(!user || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || src == I)
return
if(loc && I.loc == loc && istype(loc, /obj/item/storage) && loc.Adjacent(user)) // Are we trying to swap two items in the storage?
+1 -1
View File
@@ -268,7 +268,7 @@
to_chat(M, "<font color = #ffc4c4><h5>oblivion... </h5></font>")
var/mob/living/silicon/pai/P = M
if(istype(P))
if(P.resting || P.canmove)
if(IS_HORIZONTAL(P))
P.close_up()
M.death(0, 1)
removePersonality()
@@ -21,7 +21,7 @@
icon_state = "pizzabox_bomb"
timer_set = 1
timer = (input(user, "Set a timer, from one second to ten seconds.", "Timer", "[timer]") as num) * 10
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
if(!in_range(src, usr) || issilicon(usr) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || usr.restrained())
timer_set = 0
name = "pizza box"
desc = "A box suited for pizzas."
@@ -61,7 +61,7 @@
if(istype(I, /obj/item/wirecutters) && primed)
to_chat(user, "<span class='danger'>Oh God, what wire do you cut?!</span>")
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
if(!in_range(src, usr) || issilicon(usr) || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
playsound(src, I.usesound, 50, 1, 1)
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")
+5 -8
View File
@@ -81,29 +81,26 @@
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
else if(ishuman(M))
if(user.lying)
if(M.resting)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", "<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
M.stand_up()
else
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", "<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", "<span class='notice'>You pet [M]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
if(CYBORG_HUG)
if(M.health >= 0)
if(ishuman(M))
if(M.lying)
if(M.resting)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", "<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
M.resting = FALSE
M.stand_up()
else if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", "<span class='warning'>You bop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
else
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", "<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
if(M.resting)
M.resting = FALSE
M.update_canmove()
else
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", "<span class='warning'>You bop [M] on the head!</span>")
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
+1 -2
View File
@@ -313,7 +313,6 @@
if(!locomotion)
O.lockcharge = 1
O.update_canmove()
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
else
@@ -337,7 +336,7 @@
/obj/item/robot_parts/robot_suit/Topic(href, href_list)
var/mob/living/living_user = usr
if(living_user.lying || living_user.stat || living_user.IsStunned() || !Adjacent(living_user))
if(HAS_TRAIT(living_user, TRAIT_HANDS_BLOCKED) || living_user.stat || !Adjacent(living_user))
return
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/multitool))
+1 -1
View File
@@ -274,7 +274,7 @@
set category = "Object"
set src in range(0)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_UI_BLOCKED) || usr.restrained())
return
if(guest_pass)
@@ -108,7 +108,7 @@
if(field == F)
var/turf/currentpos = get_turf(src)
var/mob/living/user = src.loc
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !user.lying && (user.stat == CONSCIOUS))
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && !IS_HORIZONTAL(user) && (user.stat == CONSCIOUS))
return 1
field_disconnect(F)
return 0
@@ -13,7 +13,7 @@
update_mob()
var/turf/epicenter = get_turf(src)
for(var/mob/living/carbon/human/H in epicenter)
if(H.resting) //grenade is jumped on but get real fucked up
if(IS_HORIZONTAL(H)) //grenade is jumped on but get real fucked up
embed_shrapnel(H, max_shrapnel)
range = 1
explosion(loc, 0, 1, range, breach = FALSE)
@@ -37,10 +37,10 @@
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
imp_in.SetStunned(0)
imp_in.SetWeakened(0)
imp_in.SetKnockDown(0)
imp_in.SetParalysis(0)
imp_in.adjustStaminaLoss(-75)
imp_in.lying = 0
imp_in.update_canmove()
imp_in.stand_up(TRUE)
imp_in.reagents.add_reagent("synaptizine", 10)
imp_in.reagents.add_reagent("omnizine", 10)
+1 -1
View File
@@ -112,7 +112,7 @@
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
if(IS_HORIZONTAL(H))
H.apply_damage(trap_damage, BRUTE,"chest")
else
H.apply_damage(trap_damage, BRUTE,(pick("l_leg", "r_leg")))
-2
View File
@@ -37,8 +37,6 @@
animate(user, pixel_y = pixel_y + 10 , time = 1, loop = 1)
animate(user, pixel_y = pixel_y, time = 10, loop = 1, easing = SINE_EASING)
animate(user)
if(user.lying)//aka. if they have just been stunned
user.pixel_y -= 6
else
if(wielded)
to_chat(user, "<span class='notice'>You hold \the [src] between your legs.</span>")
@@ -98,7 +98,7 @@
return
var/mob/M = usr
if(istype(M.loc, /obj/mecha) || M.incapacitated(FALSE, TRUE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
if(istype(M.loc, /obj/mecha) || M.incapacitated(FALSE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
@@ -108,14 +108,14 @@
return
if((istype(over_object, /obj/structure/table) || isfloorturf(over_object)) && length(contents) \
&& loc == M && !M.stat && !M.restrained() && M.canmove && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
&& loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
var/turf/T = get_turf(over_object)
if(isfloorturf(over_object))
if(get_turf(M) != T)
return // Can only empty containers onto the floor under you
if(alert(M, "Empty [src] onto [T]?", "Confirm", "Yes", "No") != "Yes")
return
if(!(M && over_object && length(contents) && loc == M && !M.stat && !M.restrained() && M.canmove && get_turf(M) == T))
if(!(M && over_object && length(contents) && loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && get_turf(M) == T))
return // Something happened while the player was thinking
hide_from(M)
M.face_atom(over_object)
@@ -150,7 +150,7 @@
/obj/item/storage/AltClick(mob/user)
. = ..()
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE))
show_to(user)
playsound(loc, "rustle", 50, TRUE, -5)
add_fingerprint(user)
@@ -197,6 +197,7 @@
L.Weaken(stunforce)
L.Stuttering(stunforce)
if(user)
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
+3 -2
View File
@@ -92,7 +92,8 @@
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
if(IS_HORIZONTAL(M))
return //No spamming this on people.
M.Weaken(10 SECONDS)
to_chat(M, "<span class='warning'>You topple as \the [src] moves under you!</span>")
@@ -140,7 +141,7 @@
if(user.restrained() || user.buckled)
to_chat(user, "<span class='notice'>You need your hands and legs free for this.</span>")
return 0
if(user.stat || user.IsParalyzed() || user.IsSleeping() || user.lying || user.IsWeakened())
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return 0
if(issilicon(user))
to_chat(user, "<span class='notice'>You need hands for this.</span>")
@@ -236,7 +236,7 @@
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.IsWeakened() || user.IsStunned() || user.IsParalyzed() || user.lying)
if(user.restrained() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
return
@@ -223,7 +223,7 @@
set category = null
set name = "Toggle Lock"
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr) || isrobot(usr))
@@ -40,7 +40,7 @@
set name = "Activate Electric Chair"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(last_time + delay_time > world.time)
to_chat(usr, "<span class='warning'>\The [src] is not ready yet!</span>")
+2 -2
View File
@@ -207,7 +207,7 @@
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
if(!ismob(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
O.forceMove(loc)
if(user != O)
@@ -430,7 +430,7 @@
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
if(!ismob(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
O.forceMove(loc)
if(user != O)
+1 -1
View File
@@ -71,7 +71,7 @@
return TRUE
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return TRUE
if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
if(!IS_HORIZONTAL(M) && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return FALSE
return ..()
@@ -72,8 +72,8 @@
add_overlay(nest_overlay)
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
M.pixel_x = M.get_standard_pixel_x_offset()
M.pixel_y = M.get_standard_pixel_y_offset()
M.layer = initial(M.layer)
cut_overlay(nest_overlay)
@@ -62,6 +62,12 @@
new buildstacktype(loc, buildstackamount)
..()
/obj/structure/bed/post_buckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset()
/obj/structure/bed/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset()
/*
* Roller beds
*/
@@ -70,6 +76,7 @@
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
buckle_offset = 0
face_while_pulling = FALSE
resistance_flags = NONE
anchored = FALSE
@@ -93,13 +100,12 @@
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
density = TRUE
icon_state = "up"
M.pixel_y = initial(M.pixel_y)
..()
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
density = FALSE
icon_state = "down"
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
..()
/obj/item/roller
name = "roller bed"
+1 -1
View File
@@ -761,7 +761,7 @@
deconstruct(TRUE)
/obj/structure/rack/attack_hand(mob/living/user)
if(user.IsWeakened() || user.resting || user.lying)
if(user.IsWeakened())
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
@@ -306,7 +306,7 @@
set name = "Rotate Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(anchored)
to_chat(usr, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
@@ -338,7 +338,7 @@
set name = "Flip Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
if(usr.stat || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.restrained())
return
if(facing == "l")