mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-27 22:56:17 +01:00
@@ -12,6 +12,7 @@
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon_state = "bed"
|
||||
var/mob/living/buckled_mob
|
||||
var/movable = 0
|
||||
|
||||
/obj/structure/stool/bed/psych
|
||||
name = "psych bed"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "chair"
|
||||
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
||||
return
|
||||
|
||||
@@ -115,13 +117,39 @@
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
var/moved = buckled_mob.Move(src.loc)
|
||||
buckled_mob.buckled = src
|
||||
if(!moved)
|
||||
unbuckle()
|
||||
var/mob/living/occupant = buckled_mob
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
|
||||
if(propelled)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
occupant.throw_at(A, 3, 2)
|
||||
occupant.apply_effect(6, STUN, 0)
|
||||
occupant.apply_effect(6, WEAKEN, 0)
|
||||
occupant.apply_effect(6, STUTTER, 0)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/victim = A
|
||||
victim.apply_effect(6, STUN, 0)
|
||||
victim.apply_effect(6, WEAKEN, 0)
|
||||
victim.apply_effect(6, STUTTER, 0)
|
||||
victim.take_organ_damage(10)
|
||||
occupant.visible_message("<span class='danger'>[occupant] clashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
/obj/structure/stool/bed/chair/wheelchair
|
||||
name = "wheelchair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "wheelchair"
|
||||
anchored = 0
|
||||
movable = 1
|
||||
|
||||
var/driving = 0
|
||||
var/mob/living/pulling = null
|
||||
var/bloodiness
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
user << "\red You lost your grip!"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
if(user.pulling && (user == pulling))
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
return
|
||||
if(propelled)
|
||||
return
|
||||
if(pulling && (get_dist(src, pulling) > 1))
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
if(user==pulling)
|
||||
return
|
||||
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
|
||||
user << "\red You cannot go there."
|
||||
return
|
||||
if(pulling && buckled_mob && (buckled_mob == user))
|
||||
user << "\red You cannot drive while being pushed."
|
||||
return
|
||||
|
||||
// Let's roll
|
||||
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
|
||||
//--2----Move driver----2--//
|
||||
if(pulling)
|
||||
T = pulling.loc
|
||||
if(get_dist(src, pulling) >= 1)
|
||||
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)
|
||||
dir = direction
|
||||
handle_rotation()
|
||||
if(pulling) // Driver
|
||||
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
|
||||
pulling.loc = T
|
||||
else
|
||||
spawn(0)
|
||||
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
pulling.dir = get_dir(pulling, src) // When everything is right, face the wheelchair
|
||||
if(bloodiness)
|
||||
create_track()
|
||||
driving = 0
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
if(!driving)
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
occupant.buckled = src
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
if (propelled)
|
||||
for (var/mob/O in src.loc)
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "\red You lost your grip!"
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
else
|
||||
manual_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && in_range(src, usr))
|
||||
if(!ishuman(usr)) return
|
||||
if(usr == buckled_mob)
|
||||
usr << "\red You realize you are unable to push the wheelchair you sit in."
|
||||
return
|
||||
if(!pulling)
|
||||
pulling = usr
|
||||
usr.pulledby = src
|
||||
if(usr.pulling)
|
||||
usr.stop_pulling()
|
||||
usr.dir = get_dir(usr, src)
|
||||
usr << "You grip \the [name]'s handles."
|
||||
else
|
||||
if(usr != pulling)
|
||||
for(var/mob/O in viewers(pulling, null))
|
||||
O.show_message("\red [usr] breaks [pulling]'s grip on the wheelchair.", 1)
|
||||
else
|
||||
usr << "You let go of \the [name]'s handles."
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
|
||||
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
|
||||
if (pulling && (pulling.a_intent == "hurt"))
|
||||
occupant.throw_at(A, 3, 3, pulling)
|
||||
else if (propelled)
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
|
||||
occupant.apply_effect(6, STUN, 0)
|
||||
occupant.apply_effect(6, WEAKEN, 0)
|
||||
occupant.apply_effect(6, STUTTER, 0)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/victim = A
|
||||
victim.apply_effect(6, STUN, 0)
|
||||
victim.apply_effect(6, WEAKEN, 0)
|
||||
victim.apply_effect(6, STUTTER, 0)
|
||||
victim.take_organ_damage(10)
|
||||
if(pulling)
|
||||
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
|
||||
|
||||
pulling.attack_log += "\[[time_stamp()]\]<font color='red'> Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]</font>"
|
||||
occupant.attack_log += "\[[time_stamp()]\]<font color='orange'> Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]</font>"
|
||||
msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[pulling.x];Y=[pulling.y];Z=[pulling.z]'>JMP</a>)")
|
||||
else
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
|
||||
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
|
||||
var/newdir = get_dir(get_step(loc, dir), loc)
|
||||
if(newdir == dir)
|
||||
B.dir = newdir
|
||||
else
|
||||
newdir = newdir | dir
|
||||
if(newdir == 3)
|
||||
newdir = 1
|
||||
else if(newdir == 12)
|
||||
newdir = 4
|
||||
B.dir = newdir
|
||||
bloodiness--
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if(M == pulling)
|
||||
pulling = null
|
||||
usr.pulledby = null
|
||||
..()
|
||||
@@ -21,7 +21,7 @@
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
var/health = 200
|
||||
|
||||
/obj/structure/table/proc/update_adjacent()
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
@@ -311,14 +311,14 @@
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
var/chance = 30
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
chance += 50 //Lying down lets you catch less bullets
|
||||
if(flipped)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
chance += 50
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
@@ -364,7 +364,7 @@
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) slams [M.name]'s([M.ckey]) face against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) slams [M.name]'s([M.ckey]) face against \the [src]! - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
|
||||
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
else
|
||||
user << "\red You need a better grip to do that!"
|
||||
@@ -545,7 +545,7 @@
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon_state = "wood_table"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
health = 50
|
||||
health = 100
|
||||
/*
|
||||
* Reinforced tables
|
||||
*/
|
||||
@@ -553,7 +553,7 @@
|
||||
name = "reinforced table"
|
||||
desc = "A version of the four legged table. It is stronger."
|
||||
icon_state = "reinf_table"
|
||||
health = 200
|
||||
health = 400
|
||||
var/status = 2
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
|
||||
|
||||
@@ -180,20 +180,20 @@
|
||||
M.apply_damage(7)
|
||||
hit(10)
|
||||
visible_message("\red [user] slams [M] against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) slams [M.name]'s([M.ckey]) against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) slams [M.name]'s([M.ckey]) against \the [src]! - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
|
||||
if(2)
|
||||
if (prob(50))
|
||||
M.Weaken(1)
|
||||
M.apply_damage(10)
|
||||
hit(25)
|
||||
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
|
||||
msg_admin_attack("[user.name]([user.ckey]) bashes [M.name]'s([M.ckey]) against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) bashes [M.name]'s([M.ckey]) against \the [src]! - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
|
||||
if(3)
|
||||
M.Weaken(5)
|
||||
M.apply_damage(20)
|
||||
hit(50)
|
||||
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
|
||||
msg_admin_attack("[user.name]([user.ckey]) crushes [M.name]'s([M.ckey]) against \the [src]!")
|
||||
msg_admin_attack("[user.name]([user.ckey]) crushes [M.name]'s([M.ckey]) against \the [src]! - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
|
||||
Reference in New Issue
Block a user