Merge branch 'master' into placeholder

This commit is contained in:
Ferner
2021-02-17 06:12:13 +01:00
351 changed files with 3947 additions and 2117 deletions
@@ -106,17 +106,15 @@
return 0
return 1
/obj/structure/closet/proc/dump_contents()
/obj/structure/closet/dump_contents()
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src)
for(var/obj/effect/dummy/chameleon/AD in contents)
AD.forceMove(loc)
for(var/obj/I in src)
if(linked_teleporter && I == linked_teleporter)
continue
for(var/obj/I in contents - linked_teleporter)
I.forceMove(loc)
for(var/mob/M in src)
for(var/mob/M in contents)
M.forceMove(loc)
if(M.client)
M.client.eye = M.client.mob
@@ -189,7 +187,7 @@
/obj/structure/closet/proc/store_mobs(var/stored_units)
var/added_units = 0
for(var/mob/living/M in loc)
if(M.buckled || M.pinned.len)
if(M.buckled_to || M.pinned.len)
continue
if(M.mob_size >= maximum_mob_size)
continue
@@ -101,9 +101,9 @@
new /obj/item/weldingtool/largetank(src)
new /obj/item/weldingtool/largetank(src)
new /obj/item/weldingtool/largetank(src)
new /obj/item/weldpack(src)
new /obj/item/weldpack(src)
new /obj/item/weldpack(src)
new /obj/item/reagent_containers/weldpack(src)
new /obj/item/reagent_containers/weldpack(src)
new /obj/item/reagent_containers/weldpack(src)
/obj/structure/closet/secure_closet/engineering_personal
name = "engineer's locker"
@@ -29,8 +29,8 @@
/obj/structure/closet/statue/Initialize(mapload, mob/living/L)
if(isliving(L))
if(L.buckled)
L.buckled = 0
if(L.buckled_to)
L.buckled_to = 0
L.anchored = 0
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
@@ -76,7 +76,7 @@
continue
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
var/obj/structure/bed/B = O
if(B.buckled_mob)
if(B.buckled)
continue
O.forceMove(src)
itemcount++
+14 -13
View File
@@ -28,25 +28,26 @@
/obj/structure/bed/nest/update_icon()
return
/obj/structure/bed/nest/user_unbuckle_mob(mob/user)
if(buckled_mob?.buckled == src)
/obj/structure/bed/nest/user_unbuckle(mob/user)
if(buckled?.buckled_to == src)
add_fingerprint(user)
if(buckled_mob != user)
buckled_mob.visible_message("<b>[user]</b> pulls [buckled_mob] free from the sticky flesh!", SPAN_NOTICE("[user] pulls you free from the gelatinous flesh."), SPAN_WARNING("You hear squelching..."))
unbuckle_buckled_mob(buckled_mob)
else
if(world.time <= buckled_mob.last_special + NEST_RESIST_TIME)
if(buckled != user)
buckled.visible_message("<b>[user]</b> pulls [buckled] free from the sticky flesh!", SPAN_NOTICE("[user] pulls you free from the gelatinous flesh."), SPAN_WARNING("You hear squelching..."))
unbuckle_buckled_mob(buckled)
else if(istype(buckled, /mob/living))
var/mob/living/M = buckled
if(world.time <= M.last_special + NEST_RESIST_TIME)
return
buckled_mob.last_special = world.time
buckled_mob.visible_message(SPAN_WARNING("[buckled_mob] starts struggling to break free of the sticky flesh..."), SPAN_WARNING("You struggle to break free from the gelatinous flesh..."), SPAN_WARNING("You hear squelching..."))
if(do_after(buckled_mob, NEST_RESIST_TIME, TRUE))
unbuckle_buckled_mob(buckled_mob)
M.last_special = world.time
M.visible_message(SPAN_WARNING("[M] starts struggling to break free of the sticky flesh..."), SPAN_WARNING("You struggle to break free from the gelatinous flesh..."), SPAN_WARNING("You hear squelching..."))
if(do_after(M, NEST_RESIST_TIME, TRUE))
unbuckle_buckled_mob(M)
/obj/structure/bed/nest/proc/unbuckle_buckled_mob(var/mob/buck)
if(buckled_mob == buck && buck.buckled == src)
if(buckled == buck && buck.buckled_to == src)
buck.pixel_y = 0
buck.old_y = 0
unbuckle_mob()
unbuckle()
/obj/structure/bed/nest/attackby(obj/item/W, mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+1 -1
View File
@@ -24,7 +24,7 @@
return prob(60)
var/obj/structure/bed/B = A
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
if (istype(A, /obj/structure/bed) && B.buckled)//if it's a bed/chair and someone is buckled_to, it will not pass
return 0
if(istype(A, /obj/vehicle)) //no vehicles
+1 -1
View File
@@ -211,7 +211,7 @@
if(!material.radioactivity)
return
for(var/mob/living/L in range(1,src))
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED)
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
..(newloc, MATERIAL_IRON, complexity)
@@ -16,10 +16,8 @@
icon = 'icons/obj/furniture.dmi'
icon_state = "bed"
anchored = TRUE
can_buckle = TRUE
buckle_dir = SOUTH
buckle_lying = 1
build_amt = 2
var/material/padding_material
@@ -32,6 +30,10 @@
var/makes_rolling_sound = TRUE
slowdown = 5
/obj/structure/bed/Initialize()
..()
LAZYADD(can_buckle, /mob/living)
/obj/structure/bed/New(newloc, new_material = MATERIAL_STEEL, new_padding_material)
..(newloc)
color = null
@@ -43,7 +45,7 @@
padding_material = SSmaterials.get_material_by_name(new_padding_material)
update_icon()
/obj/structure/bed/buckle_mob(mob/living/M)
/obj/structure/bed/buckle(mob/living/M)
. = ..()
if(. && buckling_sound)
playsound(src, buckling_sound, 20)
@@ -84,8 +86,8 @@
/obj/structure/bed/forceMove(atom/dest)
. = ..()
if(buckled_mob)
buckled_mob.forceMove(dest)
if(buckled)
buckled.forceMove(dest)
/obj/structure/bed/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSTABLE))
@@ -153,17 +155,17 @@
if(do_after(user, 20))
affecting.forceMove(loc)
spawn(0)
if(buckle_mob(affecting))
if(buckle(affecting))
affecting.visible_message(\
"<span class='danger'>[affecting.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='danger'>[affecting.name] is buckled_to to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled_to to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
qdel(W)
else if(istype(W, /obj/item/gripper) && buckled_mob)
else if(istype(W, /obj/item/gripper) && buckled)
var/obj/item/gripper/G = W
if(!G.wrapped)
user_unbuckle_mob(user)
user_unbuckle(user)
else if(istype(W, /obj/item/disk))
user.drop_from_inventory(W, get_turf(src))
@@ -228,8 +230,14 @@
var/obj/item/reagent_containers/beaker
var/iv_attached = 0
var/iv_stand = TRUE
var/patient_shift = 9 //How much are mobs moved up when they are buckled_to.
var/bag_strap = "standard_straps"
slowdown = 0
/obj/structure/bed/roller/Initialize()
..()
LAZYADD(can_buckle, /obj/structure/closet/body_bag)
/obj/structure/bed/roller/update_icon()
overlays.Cut()
if(density)
@@ -247,6 +255,8 @@
if(density)
iv.pixel_y = 6
overlays += iv
if(bag_strap && istype(buckled, /obj/structure/closet/body_bag))
buckled.overlays += image(icon, bag_strap)
/obj/structure/bed/roller/attackby(obj/item/I, mob/user)
if(iswrench(I) || istype(I, /obj/item/stack) || iswirecutter(I))
@@ -261,7 +271,7 @@
..()
/obj/structure/bed/roller/attack_hand(mob/living/user)
if(beaker && !buckled_mob)
if(beaker && !buckled)
remove_beaker(user)
else
..()
@@ -272,14 +282,14 @@
qdel(src)
/obj/structure/bed/roller/process()
if(!iv_attached || !buckled_mob || !beaker)
if(!iv_attached || !buckled || !beaker)
return PROCESS_KILL
if(SSprocessing.times_fired % 2)
return
if(beaker.volume > 0)
beaker.reagents.trans_to_mob(buckled_mob, beaker.amount_per_transfer_from_this, CHEM_BLOOD)
beaker.reagents.trans_to_mob(buckled, beaker.amount_per_transfer_from_this, CHEM_BLOOD)
update_icon()
/obj/structure/bed/roller/proc/remove_beaker(mob/user)
@@ -310,20 +320,20 @@
return
if(!(ishuman(usr) || isrobot(usr)))
return
if(over_object == buckled_mob && beaker)
if(over_object == buckled && beaker)
if(iv_attached)
detach_iv(buckled_mob, usr)
detach_iv(buckled, usr)
else
attach_iv(buckled_mob, usr)
attach_iv(buckled, usr)
return
if(ishuman(over_object))
if(user_buckle_mob(over_object, usr))
attach_iv(buckled_mob, usr)
if(user_buckle(over_object, usr))
attach_iv(buckled, usr)
return
if(beaker)
remove_beaker(usr)
return
if(buckled_mob)
if(buckled)
return
collapse()
@@ -331,33 +341,44 @@
..()
if(makes_rolling_sound)
playsound(src, 'sound/effects/roll.ogg', 100, 1)
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.forceMove(src.loc)
if(buckled)
if(buckled.buckled_to == src)
buckled.forceMove(src.loc)
buckled.layer = src.layer + 1
else
buckled_mob = null
buckled = null
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
/obj/structure/bed/roller/post_buckle(atom/movable/MA)
. = ..()
if(M == buckled_mob)
if(MA == buckled)
if(istype(MA, /mob/living))
var/mob/living/M = MA
M.old_y = patient_shift
density = TRUE
M.pixel_y = 6
M.old_y = 6
buckled.pixel_y = patient_shift
update_icon()
else
if(istype(MA, /mob/living))
var/mob/living/M = MA
M.old_y = 0
if(iv_attached)
detach_iv(M, usr)
else
MA.overlays.Cut() //Remove straps
MA.update_icon() //Add label back (if it had one)
density = FALSE
M.pixel_y = 0
M.old_y = 0
if(iv_attached)
detach_iv(M, usr)
MA.pixel_y = 0
update_icon()
/obj/structure/bed/roller/hover
name = "medical hoverbed"
icon_state = "hover_down"
base_state = "hover"
makes_rolling_sound = FALSE
item_bedpath = /obj/item/roller/hover
patient_shift = 6
bag_strap = null
/obj/structure/bed/roller/hover/Initialize()
.=..()
@@ -372,7 +393,7 @@
pickup_sound = 'sound/items/pickup/axe.ogg'
center_of_mass = list("x" = 17,"y" = 7)
var/bedpath = /obj/structure/bed/roller
w_class = ITEMSIZE_LARGE // Can't be put in backpacks. Oh well.
w_class = ITEMSIZE_NORMAL
/obj/item/roller/hover
name = "medical hoverbed"
@@ -8,7 +8,7 @@
build_amt = 1
buckle_dir = 0
buckle_lying = 0 //force people to sit up in chairs when buckled
buckle_lying = 0 //force people to sit up in chairs when buckled_to
obj_flags = OBJ_FLAG_ROTATABLE_ANCHORED
var/propelled = 0 // Check for fire-extinguisher-driven chairs
@@ -28,11 +28,11 @@
qdel(src)
/obj/structure/bed/chair/do_simple_ranged_interaction(var/mob/user)
if(!buckled_mob && user)
if(!buckled && user)
rotate(user)
return TRUE
/obj/structure/bed/chair/post_buckle_mob()
/obj/structure/bed/chair/post_buckle()
update_icon()
return ..()
@@ -60,7 +60,7 @@
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
if(buckled_mob)
if(buckled)
cache_key = "[base_icon]-[material.name]-armrest"
if(!stool_cache[cache_key])
var/image/I = image(icon, "[base_icon]_armrest")
@@ -81,8 +81,8 @@
/obj/structure/bed/chair/set_dir()
. = ..()
if(buckled_mob)
buckled_mob.set_dir(dir)
if(buckled)
buckled.set_dir(dir)
// Leaving this in for the sake of compilation.
/obj/structure/bed/chair/comfy
@@ -135,43 +135,41 @@
. = ..()
if(makes_rolling_sound)
playsound(src, 'sound/effects/roll.ogg', 100, 1)
if(buckled_mob)
var/mob/living/occupant = buckled_mob
occupant.buckled = null
if(buckled)
var/mob/living/occupant = buckled
occupant.buckled_to = null
occupant.Move(src.loc)
occupant.buckled = src
occupant.buckled_to = src
if (occupant && (src.loc != occupant.loc))
if (propelled)
for (var/mob/O in src.loc)
if (O != occupant)
Collide(O)
else
unbuckle_mob()
unbuckle()
/obj/structure/bed/chair/office/Collide(atom/A)
. = ..()
if(!buckled_mob)
if(!buckled)
return
if(propelled)
var/mob/living/occupant = unbuckle_mob()
var/mob/living/occupant = unbuckle()
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
occupant.apply_effect(6, STUN)
occupant.apply_effect(6, WEAKEN)
occupant.apply_effect(6, STUTTER)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src.loc, "punch", 50, 1, -1)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
victim.apply_effect(6, STUN)
victim.apply_effect(6, WEAKEN)
victim.apply_effect(6, STUTTER)
victim.apply_damage(10, BRUTE, def_zone)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/bed/chair/office/light
@@ -258,8 +256,8 @@
can_dismantle = FALSE
anchored = TRUE
/obj/structure/bed/chair/shuttle/post_buckle_mob()
if(buckled_mob)
/obj/structure/bed/chair/shuttle/post_buckle()
if(buckled)
base_icon = "shuttlechair-b"
else
base_icon = "shuttlechair"
@@ -267,7 +265,7 @@
/obj/structure/bed/chair/shuttle/update_icon()
..()
if(!buckled_mob)
if(!buckled)
var/image/I = image(icon, "[base_icon]_special")
I.layer = ABOVE_MOB_LAYER
if(material_alteration & MATERIAL_ALTERATION_COLOR)
@@ -283,14 +281,14 @@
/obj/structure/bed/chair/pool/update_icon()
return
/obj/structure/bed/chair/pool/buckle_mob(mob/living/M)
/obj/structure/bed/chair/pool/buckle(mob/living/M)
if(!iscarbon(M))
return FALSE
return ..()
/obj/structure/bed/chair/pool/post_buckle_mob(mob/living/M)
/obj/structure/bed/chair/pool/post_buckle(mob/living/M)
. = ..()
if(M == buckled_mob)
if(M == buckled)
M.pixel_y = -6
else
M.pixel_y = initial(M.pixel_y)
@@ -115,8 +115,8 @@
dismantle()
qdel(src)
var/blocked = target.run_armor_check(hit_zone, "melee")
target.Weaken(10 * BLOCKED_MULT(blocked))
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
target.Weaken(10 * (1 - blocked))
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
return
@@ -17,8 +17,8 @@
/obj/structure/bed/chair/wheelchair/set_dir()
. = ..()
if(buckled_mob)
buckled_mob.set_dir(dir)
if(buckled)
buckled.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/W as obj, mob/user as mob)
if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter())
@@ -33,7 +33,7 @@
user.pulledby = null
to_chat(user, "<span class='warning'>You lost your grip!</span>")
return
if(buckled_mob && pulling && user == buckled_mob)
if(buckled && pulling && user == buckled)
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
pulling.pulledby = null
pulling = null
@@ -51,7 +51,7 @@
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
to_chat(user, "<span class='warning'>You cannot go there.</span>")
return
if(pulling && buckled_mob && (buckled_mob == user))
if(pulling && buckled && (buckled == user))
to_chat(user, "<span class='warning'>You cannot drive while being pushed.</span>")
return
@@ -59,10 +59,10 @@
driving = 1
var/turf/T = null
//--1---Move occupant---1--//
if(buckled_mob)
buckled_mob.buckled = null
step(buckled_mob, direction)
buckled_mob.buckled = src
if(buckled)
buckled.buckled_to = null
step(buckled, direction)
buckled.buckled_to = src
//--2----Move driver----2--//
if(pulling)
T = pulling.loc
@@ -70,8 +70,8 @@
step(pulling, get_dir(pulling.loc, src.loc))
//--3--Move wheelchair--3--//
step(src, direction)
if(buckled_mob) // Make sure it stays beneath the occupant
Move(buckled_mob.loc)
if(buckled) // Make sure it stays beneath the occupant
Move(buckled.loc)
set_dir(direction)
if(pulling) // Driver
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
@@ -89,19 +89,19 @@
/obj/structure/bed/chair/wheelchair/Move()
. = ..()
playsound(src, 'sound/effects/roll.ogg', 75, 1)
if(buckled_mob)
var/mob/living/occupant = buckled_mob
if(buckled)
var/mob/living/occupant = buckled
if(!driving)
occupant.buckled = null
occupant.buckled_to = null
occupant.Move(src.loc)
occupant.buckled = src
occupant.buckled_to = src
if (occupant && (src.loc != occupant.loc))
if (propelled)
for (var/mob/O in src.loc)
if (O != occupant)
Collide(O)
else
unbuckle_mob()
unbuckle()
if (pulling && (get_dist(src, pulling) > 1))
pulling.pulledby = null
to_chat(pulling, "<span class='warning'>You lost your grip!</span>")
@@ -114,13 +114,13 @@
if (pulling)
MouseDrop(usr)
else
user_unbuckle_mob(user)
user_unbuckle(user)
return
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
if(in_range(src, user))
if(!ishuman(user)) return
if(user == buckled_mob)
if(user == buckled)
to_chat(user, "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>")
return
if(!pulling)
@@ -138,11 +138,11 @@
/obj/structure/bed/chair/wheelchair/Collide(atom/A)
. = ..()
if(!buckled_mob)
if(!buckled)
return
if(propelled || (pulling && (pulling.a_intent == I_HURT)))
var/mob/living/occupant = unbuckle_mob()
var/mob/living/occupant = unbuckle()
if (pulling && (pulling.a_intent == I_HURT))
occupant.throw_at(A, 3, 3, pulling)
@@ -150,21 +150,19 @@
occupant.throw_at(A, 3, propelled)
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
occupant.apply_effect(6, STUN)
occupant.apply_effect(6, WEAKEN)
occupant.apply_effect(6, STUTTER)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src.loc, "punch", 50, 1, -1)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/victim = A
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
victim.apply_effect(6, STUN)
victim.apply_effect(6, WEAKEN)
victim.apply_effect(6, STUTTER)
victim.apply_damage(10, BRUTE, def_zone)
if(pulling)
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
@@ -188,7 +186,7 @@
B.set_dir(newdir)
bloodiness--
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/bed/chair/wheelchair/buckle(mob/M as mob, mob/user as mob)
if(M == pulling)
pulling = null
usr.pulledby = null
@@ -215,7 +213,7 @@
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr))
return FALSE
if(buckled_mob)
if(buckled)
return FALSE
visible_message(SPAN_NOTICE("[usr] collapses [src]."))
var/obj/item/wheelchair/R = new(get_turf(src))
+12 -11
View File
@@ -42,7 +42,7 @@
set category = "Object"
set src in oview(1)
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened || usr.lying || usr.restrained() || usr.buckled)
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened || usr.lying || usr.restrained() || usr.buckled_to)
return
if(on)
@@ -62,12 +62,13 @@
var/datum/powernet/PN = C.powernet
flick("echair1", src)
spark(src, 12, alldirs)
if(buckled_mob && istype(C))
if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD))
to_chat(buckled_mob, "<span class='danger'>You feel a deep shock course through your body!</span>")
if(istype(buckled, /mob/living) && istype(C))
var/mob/living/M = buckled
if(electrocute_mob(M, C, src, 1.25, BP_HEAD))
to_chat(M, "<span class='danger'>You feel a deep shock course through your body!</span>")
sleep(1)
if(electrocute_mob(buckled_mob, C, src, 1.25, BP_HEAD))
buckled_mob.Stun(PN.get_electrocute_damage()*10)
if(electrocute_mob(M, C, src, 1.25, BP_HEAD))
M.Stun(PN.get_electrocute_damage()*10)
visible_message("<span class='danger'>The electric chair goes off!</span>", "<span class='danger'>You hear an electrical discharge!</span>")
return
@@ -418,11 +419,11 @@
if (do_mob(user, L, 30, needhand = 0))
var/bucklestatus = L.bucklecheck(user)
if (!bucklestatus)//incase the patient got buckled during the delay
if (!bucklestatus)//incase the patient got buckled_to during the delay
return
if (bucklestatus == 2)
var/obj/structure/LB = L.buckled
LB.user_unbuckle_mob(user)
var/obj/structure/LB = L.buckled_to
LB.user_unbuckle(user)
if (L.client)
L.client.perspective = EYE_PERSPECTIVE
@@ -463,8 +464,8 @@
if (do_mob(user, H, 30, needhand = 0))
if (bucklestatus == 2)
var/obj/structure/LB = H.buckled
LB.user_unbuckle_mob(user)
var/obj/structure/LB = H.buckled_to
LB.user_unbuckle(user)
if (H.client)
H.client.perspective = EYE_PERSPECTIVE
H.client.eye = src
@@ -35,7 +35,7 @@
return
..()
/obj/structure/bed/chair/remote/user_buckle_mob(mob/user)
/obj/structure/bed/chair/remote/user_buckle(mob/user)
..()
var/area/A = get_area(src)
if(!A.powered(EQUIP))
@@ -52,15 +52,15 @@
/obj/structure/bed/chair/remote/process()
..()
if(buckled_mob)
if(buckled)
var/area/A = get_area(src)
if(!A.powered(EQUIP))
user_unbuckle_mob(buckled_mob)
user_unbuckle(buckled)
// Return to our body in the unfortunate event that we get unbuckled while plugged in
/obj/structure/bed/chair/remote/user_unbuckle_mob(mob/user)
if(buckled_mob)
var/mob/M = buckled_mob
/obj/structure/bed/chair/remote/user_unbuckle(mob/user)
if(buckled)
var/mob/M = buckled
if(istype(M) && M.vr_mob)
M.vr_mob.body_return()
cut_overlays()
@@ -3,7 +3,7 @@
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the remote network."
remote_network = REMOTE_GENERIC_MECH
/obj/structure/bed/chair/remote/mech/user_buckle_mob(mob/user)
/obj/structure/bed/chair/remote/mech/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -3,7 +3,7 @@
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the remote network."
remote_network = REMOTE_GENERIC_ROBOT
/obj/structure/bed/chair/remote/robot/user_buckle_mob(mob/user)
/obj/structure/bed/chair/remote/robot/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
+1 -2
View File
@@ -119,8 +119,7 @@
to_chat(user, SPAN_NOTICE("[GM.name] needs to be on the urinal."))
return
user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!"))
var/blocked = GM.run_armor_check("melee")
GM.apply_damage(8, def_zone = BP_HEAD, blocked = blocked, used_weapon = "blunt force")
GM.apply_damage(8, def_zone = BP_HEAD, used_weapon = "blunt force")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 1.5)
else
to_chat(user, SPAN_NOTICE("You need a tighter grip."))
@@ -9,6 +9,7 @@
var/obj/item/held_weapon
/obj/structure/weapon_rack/Initialize()
. = ..()
if(held_weapon)
held_weapon = new held_weapon(src)
icon_state = initial(icon_state) + "_[held_weapon.icon_state]"
+3 -4
View File
@@ -278,22 +278,21 @@
qdel(G) //gotta delete it here because if window breaks, it won't get deleted
var/def_zone = ran_zone(BP_HEAD, 20)
var/blocked = M.run_armor_check(def_zone, "melee")
switch (state)
if(1)
M.visible_message(SPAN_WARNING("[user] slams [M] against \the [src]!"))
M.apply_damage(7, damtype, def_zone, blocked, src)
M.apply_damage(7, damtype, def_zone, used_weapon = src)
hit(10)
if(2)
M.visible_message(SPAN_DANGER("[user] bashes [M] against \the [src]!"))
if (prob(50))
M.Weaken(1)
M.apply_damage(10, damtype, def_zone, blocked, src)
M.apply_damage(10, damtype, def_zone, used_weapon = src)
hit(25)
if(3)
M.visible_message(SPAN_DANGER("<big>[user] crushes [M] against \the [src]!</big>"))
M.Weaken(5)
M.apply_damage(20, damtype, def_zone, blocked, src)
M.apply_damage(20, damtype, def_zone, used_weapon = src)
hit(50)
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)