mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
TG Buckle Update (#12375)
This commit is contained in:
committed by
variableundefined
parent
7846268dae
commit
c87389a595
@@ -248,23 +248,32 @@ var/obj/machinery/gateway/centerstation/the_gateway = null
|
||||
toggleoff()
|
||||
|
||||
|
||||
/obj/machinery/gateway/centeraway/Bumped(atom/movable/M as mob|obj)
|
||||
/obj/machinery/gateway/centeraway/Bumped(atom/movable/AM)
|
||||
if(!ready)
|
||||
return
|
||||
if(!active)
|
||||
return
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(exilecheck(M))
|
||||
if(!stationgate || QDELETED(stationgate))
|
||||
return
|
||||
if(isliving(AM))
|
||||
if(exilecheck(AM))
|
||||
return
|
||||
if(istype(M, /obj))
|
||||
if(M.can_buckle && M.has_buckled_mobs())
|
||||
if(exilecheck(M.buckled_mob))
|
||||
else
|
||||
for(var/mob/living/L in AM.contents)
|
||||
if(exilecheck(L))
|
||||
atom_say("Rejecting [AM]: Exile implant detected in contained lifeform.")
|
||||
return
|
||||
for(var/mob/living/carbon/F in M)
|
||||
if(exilecheck(F))
|
||||
if(AM.has_buckled_mobs())
|
||||
for(var/mob/living/L in AM.buckled_mobs)
|
||||
if(exilecheck(L))
|
||||
atom_say("Rejecting [AM]: Exile implant detected in close proximity lifeform.")
|
||||
return
|
||||
M.forceMove(get_step(stationgate.loc, SOUTH))
|
||||
M.dir = SOUTH
|
||||
AM.forceMove(get_step(stationgate.loc, SOUTH))
|
||||
AM.setDir(SOUTH)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
M.client.move_delay = max(world.time + 5, M.client.move_delay)
|
||||
|
||||
/obj/machinery/gateway/centeraway/proc/exilecheck(var/mob/living/carbon/M)
|
||||
for(var/obj/item/implant/exile/E in M)//Checking that there is an exile implant in the contents
|
||||
|
||||
@@ -2050,7 +2050,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("ghost_radio")
|
||||
toggles ^= CHAT_GHOSTRADIO
|
||||
|
||||
|
||||
if("ghost_pda")
|
||||
toggles ^= CHAT_GHOSTPDA
|
||||
|
||||
@@ -2104,7 +2104,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
"High" = PARALLAX_HIGH,
|
||||
"Insane" = PARALLAX_INSANE
|
||||
)
|
||||
parallax = parallax_styles[input(user, "Pick a parallax style", "Parallax Style") as null|anything in parallax_styles]
|
||||
parallax = parallax_styles[input(user, "Pick a parallax style", "Parallax Style") as null|anything in parallax_styles]
|
||||
if(parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
@@ -2189,12 +2189,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/obj/item/organ/external/l_foot = character.get_organ("l_foot")
|
||||
var/obj/item/organ/external/r_foot = character.get_organ("r_foot")
|
||||
if(!l_foot && !r_foot)
|
||||
var/obj/structure/chair/wheelchair/W = new /obj/structure/chair/wheelchair (character.loc)
|
||||
character.buckled = W
|
||||
character.update_canmove()
|
||||
W.dir = character.dir
|
||||
W.buckled_mob = character
|
||||
W.add_fingerprint(character)
|
||||
var/obj/structure/chair/wheelchair/W = new /obj/structure/chair/wheelchair(character.loc)
|
||||
W.buckle_mob(character, TRUE)
|
||||
|
||||
character.underwear = underwear
|
||||
character.undershirt = undershirt
|
||||
|
||||
@@ -80,9 +80,7 @@
|
||||
phaseanim.layer = FLY_LAYER
|
||||
phaseanim.master = user
|
||||
user.ExtinguishMob()
|
||||
if(user.buckled)
|
||||
user.buckled.unbuckle_mob()
|
||||
user.loc = holder
|
||||
user.forceMove(holder)
|
||||
flick("chronophase", phaseanim)
|
||||
spawn(7)
|
||||
if(user)
|
||||
|
||||
@@ -323,8 +323,6 @@
|
||||
var/turf/picked = pick(turfs)
|
||||
if(!isturf(picked))
|
||||
return
|
||||
if(H.buckled)
|
||||
H.buckled.unbuckle_mob()
|
||||
H.forceMove(picked)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -268,7 +268,8 @@
|
||||
|
||||
/datum/personal_crafting/proc/close(mob/user)
|
||||
var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main")
|
||||
ui.close()
|
||||
if(ui)
|
||||
ui.close()
|
||||
|
||||
/datum/personal_crafting/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
@@ -455,8 +455,8 @@
|
||||
master = null
|
||||
mutations.Cut()
|
||||
set_opacity(0)
|
||||
if(buckled_mob)
|
||||
unbuckle_mob()
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs(force = TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/structure/spacevine/proc/add_mutation(datum/spacevine_mutation/mutation)
|
||||
@@ -639,7 +639,7 @@
|
||||
SM.on_grow(src)
|
||||
|
||||
/obj/structure/spacevine/proc/entangle_mob()
|
||||
if(!buckled_mob && prob(25))
|
||||
if(!has_buckled_mobs() && prob(25))
|
||||
for(var/mob/living/V in loc)
|
||||
entangle(V)
|
||||
if(has_buckled_mobs())
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
icon_state = "bonfire"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
buckle_lying = 0
|
||||
buckle_lying = FALSE
|
||||
var/burning = 0
|
||||
var/fire_stack_strength = 5
|
||||
|
||||
@@ -119,8 +119,8 @@
|
||||
if(istype(W, /obj/item/stack/rods) && !can_buckle)
|
||||
var/obj/item/stack/rods/R = W
|
||||
R.use(1)
|
||||
can_buckle = 1
|
||||
buckle_requires_restraints = 1
|
||||
can_buckle = TRUE
|
||||
buckle_requires_restraints = TRUE
|
||||
to_chat(user, "<span class='italics'>You add a rod to [src].")
|
||||
var/image/U = image(icon='icons/obj/hydroponics/equipment.dmi',icon_state="bonfire_rod",pixel_y=16)
|
||||
underlays += U
|
||||
@@ -191,11 +191,10 @@
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bonfire/buckle_mob(mob/living/M, force = 0)
|
||||
/obj/structure/bonfire/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(..())
|
||||
M.pixel_y += 13
|
||||
|
||||
/obj/structure/bonfire/unbuckle_mob(force=0)
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_y -= 13
|
||||
. = ..()
|
||||
/obj/structure/bonfire/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
if(..())
|
||||
buckled_mob.pixel_y -= 13
|
||||
@@ -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)))
|
||||
|
||||
@@ -92,17 +92,17 @@
|
||||
potion_action.target = src
|
||||
potion_action.Grant(user)
|
||||
actions += potion_action
|
||||
|
||||
|
||||
if(hotkey_help)
|
||||
hotkey_help.target = src
|
||||
hotkey_help.Grant(user)
|
||||
actions += hotkey_help
|
||||
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL, .proc/XenoSlimeClickCtrl)
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT, .proc/XenoSlimeClickAlt)
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT, .proc/XenoSlimeClickShift)
|
||||
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT, .proc/XenoTurfClickShift)
|
||||
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL, .proc/XenoTurfClickCtrl)
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL, .proc/XenoSlimeClickCtrl)
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT, .proc/XenoSlimeClickAlt)
|
||||
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT, .proc/XenoSlimeClickShift)
|
||||
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT, .proc/XenoTurfClickShift)
|
||||
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL, .proc/XenoTurfClickCtrl)
|
||||
RegisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL, .proc/XenoMonkeyClickCtrl)
|
||||
|
||||
if(!connected_recycler)
|
||||
@@ -112,12 +112,12 @@
|
||||
connected_recycler.connected += src
|
||||
|
||||
/obj/machinery/computer/camera_advanced/xenobio/remove_eye_control(mob/living/user)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT)
|
||||
UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT)
|
||||
UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL)
|
||||
UnregisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT)
|
||||
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT)
|
||||
UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT)
|
||||
UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL)
|
||||
UnregisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/xenobio/attack_hand(mob/user)
|
||||
@@ -197,7 +197,7 @@
|
||||
break
|
||||
if(!S.ckey)
|
||||
if(S.buckled)
|
||||
S.buckled.unbuckle_mob()
|
||||
S.buckled.unbuckle_mob(S, force = TRUE)
|
||||
S.Feedstop()
|
||||
S.visible_message("[S] vanishes in a flash of light!")
|
||||
S.forceMove(X)
|
||||
@@ -240,7 +240,7 @@
|
||||
var/mob/camera/aiEye/remote/xenobio/remote_eye = C.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = target
|
||||
var/obj/machinery/monkey_recycler/recycler = X.connected_recycler
|
||||
|
||||
|
||||
if(!recycler)
|
||||
to_chat(owner, "<span class='notice'>There is no connected monkey recycler. Use a multitool to link one.</span>")
|
||||
return
|
||||
@@ -335,8 +335,9 @@
|
||||
..()
|
||||
|
||||
//Pick up monkey
|
||||
/mob/living/carbon/monkey/CtrlClick(mob/user)
|
||||
SEND_SIGNAL(user, COMSIG_XENO_MONKEY_CLICK_CTRL, src)
|
||||
/mob/living/carbon/human/CtrlClick(mob/user)
|
||||
if(issmall(src))
|
||||
SEND_SIGNAL(user, COMSIG_XENO_MONKEY_CLICK_CTRL, src)
|
||||
..()
|
||||
|
||||
// Scans slime
|
||||
@@ -379,7 +380,7 @@
|
||||
return
|
||||
if(!S.ckey)
|
||||
if(S.buckled)
|
||||
S.buckled.unbuckle_mob()
|
||||
S.buckled.unbuckle_mob(S, force = TRUE)
|
||||
S.Feedstop()
|
||||
S.visible_message("[S] vanishes in a flash of light!")
|
||||
S.forceMove(X)
|
||||
@@ -419,7 +420,7 @@
|
||||
to_chat(user, "[X] now has [X.monkeys] monkeys left.")
|
||||
|
||||
//Pick up monkey
|
||||
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoMonkeyClickCtrl(mob/living/user, mob/living/carbon/monkey/M)
|
||||
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoMonkeyClickCtrl(mob/living/user, mob/living/carbon/human/M)
|
||||
if(!cameranet.checkTurfVis(M.loc))
|
||||
to_chat(user, "<span class='warning'>Target is not near a camera. Cannot proceed.</span>")
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
return
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
var/mob/living/L = buckled_mob
|
||||
var/mob/living/L = locate() in buckled_mobs
|
||||
if(!L)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You attempt to sacrifice [L] by invoking the sacrificial ritual.</span>")
|
||||
|
||||
@@ -594,7 +594,7 @@
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.buckled)
|
||||
M.buckled.unbuckle_mob(M, 1)
|
||||
M.buckled.unbuckle_mob(M, force = TRUE)
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
L.stop_pulling()
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
AA.Remove(M)
|
||||
|
||||
/obj/vehicle/ambulance/post_unbuckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
AA.Remove(M)
|
||||
return ..()
|
||||
|
||||
/obj/item/key/ambulance
|
||||
name = "ambulance key"
|
||||
@@ -69,20 +69,22 @@
|
||||
|
||||
/obj/vehicle/ambulance/handle_vehicle_offsets()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
switch(buckled_mob.dir)
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 13
|
||||
buckled_mob.pixel_y = 7
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -13
|
||||
buckled_mob.pixel_y = 7
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
switch(buckled_mob.dir)
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 13
|
||||
buckled_mob.pixel_y = 7
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -13
|
||||
buckled_mob.pixel_y = 7
|
||||
|
||||
/obj/vehicle/ambulance/Move(newloc, Dir)
|
||||
var/oldloc = loc
|
||||
@@ -92,8 +94,10 @@
|
||||
if(bed && get_dist(oldloc, loc) <= 2)
|
||||
bed.Move(oldloc)
|
||||
bed.dir = Dir
|
||||
if(bed.buckled_mob)
|
||||
bed.buckled_mob.dir = Dir
|
||||
if(bed.has_buckled_mobs())
|
||||
for(var/m in bed.buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.setDir(Dir)
|
||||
|
||||
/obj/structure/bed/amb_trolley
|
||||
name = "ambulance train trolley"
|
||||
|
||||
@@ -16,10 +16,13 @@
|
||||
atvcover.layer = MOB_LAYER + 0.1
|
||||
|
||||
/obj/vehicle/atv/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mob)
|
||||
overlays += atvcover
|
||||
else
|
||||
overlays -= atvcover
|
||||
add_overlay(atvcover)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/atv/post_unbuckle_mob(mob/living/M)
|
||||
if(!has_buckled_mobs())
|
||||
cut_overlay(atvcover)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/atv/handle_vehicle_layer()
|
||||
if(dir == SOUTH)
|
||||
|
||||
@@ -10,20 +10,22 @@
|
||||
|
||||
/obj/vehicle/janicart/handle_vehicle_offsets()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
switch(buckled_mob.dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -12
|
||||
buckled_mob.pixel_y = 7
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 12
|
||||
buckled_mob.pixel_y = 7
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
switch(buckled_mob.dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -12
|
||||
buckled_mob.pixel_y = 7
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 7
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 12
|
||||
buckled_mob.pixel_y = 7
|
||||
|
||||
|
||||
/obj/item/key/janitor
|
||||
|
||||
@@ -16,11 +16,14 @@
|
||||
bikecover.layer = MOB_LAYER + 0.1
|
||||
|
||||
|
||||
obj/vehicle/motorcycle/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mob)
|
||||
overlays += bikecover
|
||||
else
|
||||
overlays -= bikecover
|
||||
/obj/vehicle/motorcycle/post_buckle_mob(mob/living/M)
|
||||
add_overlay(bikecover)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/motorcycle/post_unbuckle_mob(mob/living/M)
|
||||
if(!has_buckled_mobs())
|
||||
cut_overlay(bikecover)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/vehicle/motorcycle/handle_vehicle_layer()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
overlays += overlay
|
||||
|
||||
/obj/vehicle/space/speedbike/Move(newloc,move_dir)
|
||||
if(buckled_mob)
|
||||
if(has_buckled_mobs())
|
||||
new /obj/effect/temp_visual/dir_setting/speedbike_trail(loc)
|
||||
. = ..()
|
||||
|
||||
@@ -29,21 +29,23 @@
|
||||
pixel_y = 0
|
||||
|
||||
/obj/vehicle/space/speedbike/handle_vehicle_offsets()
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = -8
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -10
|
||||
buckled_mob.pixel_y = 5
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 10
|
||||
buckled_mob.pixel_y = 5
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.setDir(dir)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = -8
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 4
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = -10
|
||||
buckled_mob.pixel_y = 5
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 10
|
||||
buckled_mob.pixel_y = 5
|
||||
|
||||
/obj/vehicle/space/speedbike/red
|
||||
icon_state = "speedbike_red"
|
||||
|
||||
@@ -15,29 +15,33 @@
|
||||
carcover = image("icons/vehicles/sportscar.dmi", "sportscar_cover")
|
||||
carcover.layer = MOB_LAYER + 0.1
|
||||
|
||||
|
||||
/obj/vehicle/car/post_buckle_mob(mob/living/M)
|
||||
if(buckled_mob)
|
||||
overlays += carcover
|
||||
else
|
||||
overlays -= carcover
|
||||
add_overlay(carcover)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/car/post_unbuckle_mob(mob/living/M)
|
||||
if(!has_buckled_mobs())
|
||||
cut_overlay(carcover)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/car/handle_vehicle_offsets()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
switch(buckled_mob.dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 2
|
||||
buckled_mob.pixel_y = 20
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = 20
|
||||
buckled_mob.pixel_y = 23
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 20
|
||||
buckled_mob.pixel_y = 27
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 34
|
||||
buckled_mob.pixel_y = 10
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
switch(buckled_mob.dir)
|
||||
if(NORTH)
|
||||
buckled_mob.pixel_x = 2
|
||||
buckled_mob.pixel_y = 20
|
||||
if(EAST)
|
||||
buckled_mob.pixel_x = 20
|
||||
buckled_mob.pixel_y = 23
|
||||
if(SOUTH)
|
||||
buckled_mob.pixel_x = 20
|
||||
buckled_mob.pixel_y = 27
|
||||
if(WEST)
|
||||
buckled_mob.pixel_x = 34
|
||||
buckled_mob.pixel_y = 10
|
||||
|
||||
|
||||
/obj/vehicle/car/handle_vehicle_layer()
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
icon_state = "scooter"
|
||||
density = 1
|
||||
anchored = 0
|
||||
can_buckle = 1
|
||||
buckle_lying = 0
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0)
|
||||
var/keytype = null //item typepath, if non-null an item of this type is needed in your hands to drive this vehicle
|
||||
var/next_vehicle_move = 0 //used for move delays
|
||||
var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower
|
||||
var/auto_door_open = TRUE
|
||||
var/needs_gravity = 0//To allow non-space vehicles to move in no gravity or not, mostly for adminbus
|
||||
var/needs_gravity = 0 //To allow non-space vehicles to move in no gravity or not, mostly for adminbus
|
||||
//Pixels
|
||||
var/generic_pixel_x = 0 //All dirs show this pixel_x for the driver
|
||||
var/generic_pixel_y = 0 //All dirs shwo this pixel_y for the driver
|
||||
@@ -37,25 +37,26 @@
|
||||
//if they differ between directions, otherwise use the
|
||||
//generic variables
|
||||
/obj/vehicle/proc/handle_vehicle_offsets()
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
buckled_mob.pixel_x = generic_pixel_x
|
||||
buckled_mob.pixel_y = generic_pixel_y
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.setDir(dir)
|
||||
buckled_mob.pixel_x = generic_pixel_x
|
||||
buckled_mob.pixel_y = generic_pixel_y
|
||||
|
||||
|
||||
/obj/vehicle/update_icon()
|
||||
return
|
||||
|
||||
|
||||
|
||||
//KEYS
|
||||
/obj/vehicle/proc/keycheck(mob/user)
|
||||
if(keytype)
|
||||
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/key
|
||||
name = "key"
|
||||
@@ -66,8 +67,8 @@
|
||||
|
||||
|
||||
//BUCKLE HOOKS
|
||||
/obj/vehicle/unbuckle_mob(force = 0)
|
||||
if(buckled_mob)
|
||||
/obj/vehicle/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
if(istype(buckled_mob))
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 0
|
||||
. = ..()
|
||||
@@ -80,38 +81,45 @@
|
||||
if(A.density)
|
||||
if(A != src && A != M)
|
||||
return
|
||||
M.loc = get_turf(src)
|
||||
M.forceMove(get_turf(src))
|
||||
..()
|
||||
handle_vehicle_offsets()
|
||||
|
||||
|
||||
/obj/vehicle/bullet_act(obj/item/projectile/Proj)
|
||||
if(buckled_mob)
|
||||
buckled_mob.bullet_act(Proj)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.bullet_act(Proj)
|
||||
|
||||
//MOVEMENT
|
||||
/obj/vehicle/relaymove(mob/user, direction)
|
||||
if(user.incapacitated())
|
||||
unbuckle_mob()
|
||||
unbuckle_mob(user)
|
||||
return
|
||||
|
||||
if(world.time < next_vehicle_move)
|
||||
return
|
||||
next_vehicle_move = world.time + vehicle_move_delay
|
||||
if(keycheck(user))
|
||||
if(!Process_Spacemove(direction) || world.time < next_vehicle_move || !isturf(loc)) return
|
||||
next_vehicle_move = world.time + vehicle_move_delay
|
||||
|
||||
if(!Process_Spacemove(direction) || !isturf(loc))
|
||||
return
|
||||
step(src, direction)
|
||||
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.loc != loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
buckled_mob.buckled = src //Restoring
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
if(buckled_mob.loc != loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
buckled_mob.buckled = src //Restoring
|
||||
|
||||
if(istype(src.loc, /turf/simulated))
|
||||
var/turf/simulated/T = src.loc
|
||||
if(issimulatedturf(loc))
|
||||
var/turf/simulated/T = loc
|
||||
if(T.wet == TURF_WET_LUBE) //Lube! Fall off!
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
buckled_mob.Stun(7)
|
||||
buckled_mob.Weaken(7)
|
||||
unbuckle_mob()
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.Weaken(5)
|
||||
unbuckle_all_mobs()
|
||||
step(src, dir)
|
||||
|
||||
handle_vehicle_layer()
|
||||
@@ -121,7 +129,7 @@
|
||||
|
||||
|
||||
/obj/vehicle/Move(NewLoc,Dir=0,step_x=0,step_y=0)
|
||||
..()
|
||||
. = ..()
|
||||
handle_vehicle_layer()
|
||||
handle_vehicle_offsets()
|
||||
|
||||
@@ -133,11 +141,12 @@
|
||||
|
||||
/obj/vehicle/Bump(atom/movable/M)
|
||||
if(!spaceworthy && isspaceturf(get_turf(src)))
|
||||
return 0
|
||||
return FALSE
|
||||
. = ..()
|
||||
if(auto_door_open)
|
||||
if(istype(M, /obj/machinery/door) && buckled_mob)
|
||||
M.Bumped(buckled_mob)
|
||||
if(istype(M, /obj/machinery/door) && has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
M.Bumped(m)
|
||||
|
||||
/obj/vehicle/proc/RunOver(var/mob/living/carbon/human/H)
|
||||
return //write specifics for different vehicles
|
||||
@@ -145,19 +154,19 @@
|
||||
|
||||
/obj/vehicle/Process_Spacemove(direction)
|
||||
if(has_gravity(src))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(pulledby && pulledby != buckled_mob) // no pulling the vehicle you're driving through space!
|
||||
return 1
|
||||
if(pulledby && (pulledby.loc != loc))
|
||||
return TRUE
|
||||
|
||||
if(needs_gravity)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/vehicle/space
|
||||
pressure_resistance = INFINITY
|
||||
spaceworthy = TRUE
|
||||
|
||||
/obj/vehicle/space/Process_Spacemove(direction)
|
||||
return 1
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user