mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
TG Buckle Update (#12375)
This commit is contained in:
committed by
variableundefined
parent
7846268dae
commit
c87389a595
@@ -398,12 +398,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
if(ventcrawler)
|
||||
ventcrawlerlocal = ventcrawler
|
||||
|
||||
if(!ventcrawler)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
ventcrawlerlocal = H.dna.species.ventcrawler
|
||||
|
||||
if(!ventcrawlerlocal) return
|
||||
if(!ventcrawlerlocal)
|
||||
return
|
||||
|
||||
if(stat)
|
||||
to_chat(src, "You must be conscious to do this!")
|
||||
@@ -413,8 +409,11 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
to_chat(src, "You can't vent crawl while you're stunned!")
|
||||
return
|
||||
|
||||
if(buckled_mob)
|
||||
to_chat(src, "You can't vent crawl with [buckled_mob] on you!")
|
||||
if(has_buckled_mobs())
|
||||
to_chat(src, "<span class='warning'>You can't vent crawl with other creatures on you!</span>")
|
||||
return
|
||||
if(buckled)
|
||||
to_chat(src, "<span class='warning'>You can't vent crawl while buckled!</span>")
|
||||
return
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
@@ -450,6 +449,10 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
if(!do_after(src, 45, target = src))
|
||||
return
|
||||
|
||||
if(has_buckled_mobs())
|
||||
to_chat(src, "<span class='warning'>You can't vent crawl with other creatures on you!</span>")
|
||||
return
|
||||
|
||||
if(buckled)
|
||||
to_chat(src, "<span class='warning'>You cannot crawl into a vent while buckled to something!</span>")
|
||||
return
|
||||
@@ -626,7 +629,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
else if(I == handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
buckled.unbuckle_mob(src)
|
||||
update_handcuffed()
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
@@ -934,7 +937,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
var/obj/item/W = handcuffed
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
buckled.unbuckle_mob(src)
|
||||
update_handcuffed()
|
||||
if(client)
|
||||
client.screen -= W
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
overlays -= image('icons/effects/effects.dmi', icon_state = "zzz_glow")
|
||||
..()
|
||||
|
||||
if(dna.species && dna.species.ventcrawler)
|
||||
if(ventcrawler)
|
||||
to_chat(src, "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>")
|
||||
update_pipe_vision()
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/punchstunthreshold = 9 //damage at which punches from this race will stun //yes it should be to the attacked race but it's not useful that way even if it's logical
|
||||
var/list/default_genes = list()
|
||||
|
||||
var/ventcrawler = 0 //Determines if the mob can go through the vents.
|
||||
var/ventcrawler = VENTCRAWLER_NONE //Determines if the mob can go through the vents.
|
||||
var/has_fine_manipulation = 1 // Can use small items.
|
||||
|
||||
var/list/allowed_consumed_mobs = list() //If a species can consume mobs, put the type of mobs it can consume here.
|
||||
@@ -280,10 +280,12 @@
|
||||
H.unEquip(thing)
|
||||
if(H.hud_used)
|
||||
H.hud_used.update_locked_slots()
|
||||
H.ventcrawler = ventcrawler
|
||||
|
||||
/datum/species/proc/on_species_loss(mob/living/carbon/human/H)
|
||||
if(H.butcher_results) //clear it out so we don't butcher a actual human.
|
||||
H.butcher_results = null
|
||||
H.ventcrawler = initial(H.ventcrawler)
|
||||
|
||||
/datum/species/proc/updatespeciescolor(mob/living/carbon/human/H) //Handles changing icobase for species that have multiple skin colors.
|
||||
return
|
||||
|
||||
@@ -404,18 +404,11 @@
|
||||
name = "Plastic Golem"
|
||||
prefix = "Plastic"
|
||||
special_names = null
|
||||
ventcrawler = VENTCRAWLER_NUDE
|
||||
golem_colour = rgb(255, 255, 255)
|
||||
skinned_type = /obj/item/stack/sheet/plastic
|
||||
info_text = "As a <span class='danger'>Plastic Golem</span>, you are capable of ventcrawling if you're naked."
|
||||
|
||||
/datum/species/golem/plastic/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
. = ..()
|
||||
C.ventcrawler = VENTCRAWLER_NUDE
|
||||
|
||||
/datum/species/golem/plastic/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
C.ventcrawler = initial(C.ventcrawler)
|
||||
|
||||
//Immune to physical bullets and resistant to brute, but very vulnerable to burn damage. Dusts on death.
|
||||
/datum/species/golem/sand
|
||||
name = "Sand Golem"
|
||||
@@ -533,7 +526,7 @@
|
||||
if(!isturf(picked))
|
||||
return
|
||||
if(H.buckled)
|
||||
H.buckled.unbuckle_mob()
|
||||
H.buckled.unbuckle_mob(H, force = TRUE)
|
||||
do_teleport(H, picked)
|
||||
return TRUE
|
||||
|
||||
@@ -617,7 +610,7 @@
|
||||
if(!isturf(picked))
|
||||
return
|
||||
if(H.buckled)
|
||||
H.buckled.unbuckle_mob()
|
||||
H.buckled.unbuckle_mob(H, force = TRUE)
|
||||
do_teleport(H, picked)
|
||||
last_teleport = world.time
|
||||
UpdateButtonIcon() //action icon looks unavailable
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
can_craft = FALSE
|
||||
is_small = 1
|
||||
has_fine_manipulation = 0
|
||||
ventcrawler = 1
|
||||
ventcrawler = VENTCRAWLER_NUDE
|
||||
show_ssd = 0
|
||||
eyes = "blank_eyes"
|
||||
death_message = "lets out a faint chimper as it collapses and stops moving..."
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
X.stored_slimes -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/can_unbuckle()
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/slime/can_buckle()
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/slime/get_mob_buckling_height(mob/seat)
|
||||
if(..())
|
||||
return 3
|
||||
|
||||
/mob/living/carbon/slime/regenerate_icons()
|
||||
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
|
||||
overlays.len = 0
|
||||
|
||||
@@ -446,12 +446,7 @@
|
||||
on_fire = 0
|
||||
suiciding = 0
|
||||
if(buckled) //Unbuckle the mob and clear the alerts.
|
||||
buckled.buckled_mob = null
|
||||
buckled = null
|
||||
anchored = initial(anchored)
|
||||
update_canmove()
|
||||
clear_alert("buckled")
|
||||
post_buckle_mob(src)
|
||||
buckled.unbuckle_mob(src, force = TRUE)
|
||||
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
@@ -637,11 +632,14 @@
|
||||
START RESIST PROCS
|
||||
*///////////////////////
|
||||
|
||||
/mob/living/can_resist()
|
||||
return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE, ignore_lying = TRUE))
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(src) || next_move > world.time || stat || weakened || stunned || paralysis)
|
||||
if(!can_resist())
|
||||
return
|
||||
changeNext_move(CLICK_CD_RESIST)
|
||||
|
||||
|
||||
@@ -216,6 +216,9 @@
|
||||
fire_stacks += L.fire_stacks
|
||||
IgniteMob()
|
||||
|
||||
/mob/living/can_be_pulled(user, grab_state, force)
|
||||
return ..() && !(buckled && buckled.buckle_prevents_pull)
|
||||
|
||||
/mob/living/water_act(volume, temperature, source, method = TOUCH)
|
||||
. = ..()
|
||||
adjust_fire_stacks(-(volume * 0.2))
|
||||
|
||||
@@ -1173,6 +1173,9 @@ var/list/ai_verbs_default = list(
|
||||
to_chat(src, "You have been downloaded to a mobile storage device. Remote device connection severed.")
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")
|
||||
|
||||
/mob/living/silicon/ai/can_buckle()
|
||||
return FALSE
|
||||
|
||||
// Pass lying down or getting up to our pet human, if we're in a rig.
|
||||
/mob/living/silicon/ai/lay_down()
|
||||
set name = "Rest"
|
||||
|
||||
@@ -124,6 +124,11 @@
|
||||
securityActive2 = null
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/pai/can_unbuckle()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/can_buckle()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/movement_delay()
|
||||
. = ..()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
maxHealth = 50
|
||||
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
a_intent = INTENT_HARM //No swapping
|
||||
buckle_lying = 0
|
||||
buckle_lying = FALSE
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
radio_channel = "Supply"
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
|
||||
if(isobj(AM))
|
||||
var/obj/O = AM
|
||||
if(O.buckled_mob || (locate(/mob) in AM)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
if(O.has_buckled_mobs() || (locate(/mob) in AM)) //can't load non crates objects with mobs buckled to it or inside it.
|
||||
buzz(SIGH)
|
||||
return
|
||||
|
||||
@@ -398,19 +398,11 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/post_buckle_mob(mob/living/M)
|
||||
if(M == buckled_mob) //post buckling
|
||||
M.pixel_y = initial(M.pixel_y) + 9
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.1
|
||||
|
||||
else //post unbuckling
|
||||
reset_buckled_mob(M)
|
||||
M.pixel_y = initial(M.pixel_y) + 9
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.01
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/post_unbuckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
reset_buckled_mob(M)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/proc/reset_buckled_mob(mob/living/M)
|
||||
load = null
|
||||
M.layer = initial(M.layer)
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
@@ -429,12 +421,13 @@
|
||||
if(ismob(load))
|
||||
var/mob/M = load
|
||||
M.reset_perspective(null)
|
||||
unbuckle_mob()
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(load)
|
||||
load.forceMove(loc)
|
||||
load.pixel_y = initial(load.pixel_y)
|
||||
load.layer = initial(load.layer)
|
||||
load.plane = initial(load.plane)
|
||||
if(dirn)
|
||||
var/turf/T = loc
|
||||
var/turf/newT = get_step(T,dirn)
|
||||
@@ -453,6 +446,7 @@
|
||||
AM.forceMove(loc)
|
||||
AM.layer = initial(AM.layer)
|
||||
AM.pixel_y = initial(AM.pixel_y)
|
||||
AM.plane = initial(AM.plane)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.reset_perspective(null)
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
if(T.density)
|
||||
forceMove(H.loc)
|
||||
if(H.buckled)
|
||||
H.buckled.unbuckle_mob()
|
||||
H.buckled.unbuckle_mob(H, force = TRUE)
|
||||
manifested = TRUE
|
||||
Manifest()
|
||||
to_chat(H, "<span class='userdanger'>You feel the floor closing in on your feet!</span>")
|
||||
|
||||
+38
-13
@@ -17,7 +17,7 @@
|
||||
qdel(tkgrabbed_objects[I])
|
||||
tkgrabbed_objects = null
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob()
|
||||
buckled.unbuckle_mob(src, force = TRUE)
|
||||
if(viewing_alternate_appearances)
|
||||
for(var/datum/alternate_appearance/AA in viewing_alternate_appearances)
|
||||
AA.viewers -= src
|
||||
@@ -1192,31 +1192,52 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/handle_ventcrawl()
|
||||
return // Only living mobs can ventcrawl
|
||||
|
||||
//You can buckle on mobs if you're next to them since most are dense
|
||||
/mob/buckle_mob(mob/living/M, force = 0)
|
||||
/**
|
||||
* Buckle to another mob
|
||||
*
|
||||
* You can buckle on mobs if you're next to them since most are dense
|
||||
*
|
||||
* Turns you to face the other mob too
|
||||
*/
|
||||
/mob/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(M.buckled)
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
if(M.loc != T)
|
||||
var/old_density = density
|
||||
density = 0
|
||||
density = FALSE
|
||||
var/can_step = step_towards(M, T)
|
||||
density = old_density
|
||||
if(!can_step)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
//Default buckling shift visual for mobs
|
||||
///Call back post buckle to a mob to offset your visual height
|
||||
/mob/post_buckle_mob(mob/living/M)
|
||||
if(M == buckled_mob) //post buckling
|
||||
M.pixel_y = initial(M.pixel_y) + 9
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.1
|
||||
else //post unbuckling
|
||||
M.layer = initial(M.layer)
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
var/height = M.get_mob_buckling_height(src)
|
||||
M.pixel_y = initial(M.pixel_y) + height
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.1
|
||||
|
||||
/mob/proc/can_unbuckle(mob/user)
|
||||
///Call back post unbuckle from a mob, (reset your visual height here)
|
||||
/mob/post_unbuckle_mob(mob/living/M)
|
||||
M.layer = initial(M.layer)
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
///returns the height in pixel the mob should have when buckled to another mob.
|
||||
/mob/proc/get_mob_buckling_height(mob/seat)
|
||||
if(isliving(seat))
|
||||
var/mob/living/L = seat
|
||||
if(L.mob_size <= MOB_SIZE_SMALL) //being on top of a small mob doesn't put you very high.
|
||||
return 0
|
||||
return 9
|
||||
|
||||
///can the mob be buckled to something by default?
|
||||
/mob/proc/can_buckle()
|
||||
return 1
|
||||
|
||||
///can the mob be unbuckled from something by default?
|
||||
/mob/proc/can_unbuckle()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1307,6 +1328,10 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
.["Gib"] = "?_src_=vars;gib=[UID()]"
|
||||
|
||||
///Can this mob resist (default FALSE)
|
||||
/mob/proc/can_resist()
|
||||
return FALSE //overridden in living.dm
|
||||
|
||||
/mob/proc/spin(spintime, speed)
|
||||
set waitfor = 0
|
||||
var/D = dir
|
||||
|
||||
@@ -74,7 +74,11 @@
|
||||
var/a_intent = INTENT_HELP//Living
|
||||
var/m_intent = MOVE_INTENT_RUN//Living
|
||||
var/lastKnownIP = null
|
||||
/// movable atoms buckled to this mob
|
||||
var/atom/movable/buckled = null//Living
|
||||
/// movable atom we are buckled to
|
||||
var/atom/movable/buckling
|
||||
|
||||
var/obj/item/l_hand = null//Living
|
||||
var/obj/item/r_hand = null//Living
|
||||
var/obj/item/back = null//Human/Monkey
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
if(mover.checkpass(PASSMOB))
|
||||
return 1
|
||||
if(buckled == mover)
|
||||
return 1
|
||||
return TRUE
|
||||
if(ismob(mover))
|
||||
var/mob/moving_mob = mover
|
||||
if((other_mobs && moving_mob.other_mobs))
|
||||
return 1
|
||||
if(mover == buckled_mob)
|
||||
return 1
|
||||
return TRUE
|
||||
if(mover in buckled_mobs)
|
||||
return TRUE
|
||||
return (!mover.density || !density || lying)
|
||||
|
||||
|
||||
@@ -362,10 +362,14 @@
|
||||
/mob/proc/Move_Pulled(atom/A)
|
||||
if(!canmove || restrained() || !pulling)
|
||||
return
|
||||
if(pulling.anchored)
|
||||
return
|
||||
if(!pulling.Adjacent(src))
|
||||
if(pulling.anchored || pulling.move_resist > move_force || !pulling.Adjacent(src))
|
||||
stop_pulling()
|
||||
return
|
||||
if(isliving(pulling))
|
||||
var/mob/living/L = pulling
|
||||
if(L.buckled && L.buckled.buckle_prevents_pull) //if they're buckled to something that disallows pulling, prevent it
|
||||
stop_pulling()
|
||||
return
|
||||
if(A == loc && pulling.density)
|
||||
return
|
||||
if(!Process_Spacemove(get_dir(pulling.loc, A)))
|
||||
|
||||
Reference in New Issue
Block a user