Fix merge conflicts

This commit is contained in:
DZD
2015-09-27 11:24:51 -04:00
227 changed files with 8312 additions and 7536 deletions
+100
View File
@@ -0,0 +1,100 @@
/obj
var/can_buckle = 0
var/buckle_lying = -1 //bed-like behaviour, forces mob.lying = buckle_lying if != -1
var/buckle_requires_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
var/mob/living/buckled_mob = null
//Interaction
/obj/attack_hand(mob/living/user)
. = ..()
if(can_buckle && buckled_mob)
return user_unbuckle_mob(user)
/obj/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(can_buckle && istype(M))
return user_buckle_mob(M, user)
//Cleanup
/obj/Destroy()
. = ..()
unbuckle_mob()
//procs that handle the actual buckling and unbuckling
/obj/proc/buckle_mob(mob/living/M)
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || (buckle_requires_restraints && !M.restrained()))
return 0
if (isslime(M) || isAI(M))
if(M == usr)
M << "<span class='warning'>You are unable to buckle yourself to the [src]!</span>"
else
usr << "<span class='warning'>You are unable to buckle [M] to the [src]!</span>"
return 0
M.buckled = src
M.dir = dir
buckled_mob = M
M.update_canmove()
post_buckle_mob(M)
return 1
/obj/proc/unbuckle_mob()
if(buckled_mob && buckled_mob.buckled == src)
. = buckled_mob
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
buckled_mob = null
post_buckle_mob(.)
//Handle any extras after buckling/unbuckling
//Called on buckle_mob() and unbuckle_mob()
/obj/proc/post_buckle_mob(mob/living/M)
return
//Wrapper procs that handle sanity and user feedback
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
if(!in_range(user, src) || user.stat || user.restrained())
return 0
add_fingerprint(user)
unbuckle_mob()
if(buckle_mob(M))
if(M == user)
M.visible_message(\
"<span class='notice'>[M] buckles themself to [src].</span>",\
"<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='italics'>You hear metal clanking.</span>")
else
M.visible_message(\
"<span class='warning'>[user] buckles [M] to [src]!</span>",\
"<span class='warning'>[user] buckles you to [src]!</span>",\
"<span class='italics'>You hear metal clanking.</span>")
return 1
/obj/proc/user_unbuckle_mob(mob/user)
var/mob/living/M = unbuckle_mob()
if(M)
if(M != user)
M.visible_message(\
"<span class='notice'>[user] unbuckles [M] from [src].</span>",\
"<span class='notice'>[user] unbuckles you from [src].</span>",\
"<span class='italics'>You hear metal clanking.</span>")
else
M.visible_message(\
"<span class='notice'>[M] unbuckles themselves from [src].</span>",\
"<span class='notice'>You unbuckle yourself from [src].</span>",\
"<span class='italics'>You hear metal clanking.</span>")
add_fingerprint(user)
return M
+31 -41
View File
@@ -769,40 +769,35 @@ steam.start() -- spawns the effect
var/processing = 1
var/on = 1
set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/ion_trail_follow/set_up(atom/atom)
attach(atom)
start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
spawn(0)
var/turf/T = get_turf(src.holder)
if(T != src.oldposition)
if(istype(T, /turf/space))
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
src.oldposition = T
I.dir = src.holder.dir
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
if(I) I.delete()
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
proc/stop()
/datum/effect/effect/system/ion_trail_follow/start() //Whoever is responsible for this abomination of code should become an hero
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
src.on = 0
var/turf/T = get_turf(src.holder)
if(T != src.oldposition)
if(!has_gravity(T))
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
I.dir = src.holder.dir
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
if(I)
I.delete()
src.oldposition = T
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/ion_trail_follow/proc/stop()
src.processing = 0
src.on = 0
oldposition = null
/datum/effect/effect/system/ion_trail_follow/space_trail
var/turf/oldloc // secondary ion trail loc
@@ -850,15 +845,10 @@ steam.start() -- spawns the effect
spawn( 20 )
if(I) I.delete()
if(II) II.delete()
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
spawn(2)
if(src.on)
src.processing = 1
src.start()
currloc = T
@@ -18,6 +18,10 @@
qdel(song)
song = null
return ..()
/obj/item/device/violin/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/violin/attack_self(mob/user as mob)
interact(user)
+6 -1
View File
@@ -623,7 +623,12 @@
assignment = "Green Team Fighter"
icon_state = "TDgreen"
desc = "This ID card is given to those who fought inside the thunderdome for the Green Team. Not many have lived to see one of those, even fewer lived to keep it."
/obj/item/weapon/card/id/lifetime
name = "Lifetime ID Card"
desc = "A modified ID card given only to those people who have devoted their lives to the better interests of Nanotrasen. It sparkles blue."
icon_state = "lifetimeid"
// Decals
/obj/item/weapon/id_decal
name = "identification card decal"
+12 -14
View File
@@ -105,27 +105,29 @@
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
if(C) C.propelled = 4
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
if(C) C.propelled = 3
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
if(C) C.propelled = 2
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
if(C) C.propelled = 1
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
if(C) C.propelled = 0
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
sleep(3)
B.Move(get_step(usr,movementdirection), movementdirection)
step(B, movementdirection)
else user.newtonian_move(turn(direction, 180))
var/turf/T = get_turf(target)
var/turf/T1 = get_step(T,turn(direction, 90))
@@ -161,9 +163,5 @@
if(W.loc == my_target) break
sleep(2)
if(!has_gravity(user))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
else
return ..()
return ..()
@@ -23,6 +23,8 @@
if (source.handcuffed)
var/obj/item/weapon/W = source.handcuffed
source.handcuffed = null
if(source.buckled && source.buckled.buckle_requires_restraints)
source.buckled.unbuckle_mob()
source.update_inv_handcuffed()
if (source.client)
source.client.screen -= W
@@ -53,7 +53,7 @@
/obj/item/weapon/implantpad/verb/remove_implant()
set category = "Object"
set name = "Remove Implant"
set src in view(1)
set src in usr
if (usr.stat || usr.restrained())
return
+2 -2
View File
@@ -51,12 +51,12 @@
if (reagents.total_volume > 0)
if(M == user)
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
reagents.trans_to_ingest(M, reagents.total_volume)
reagents.trans_to(M, reagents.total_volume)
else
M.visible_message("<span class='warning'>\The [user] attempts to feed some [loaded] to \the [M] with \the [src].</span>")
if(!do_mob(user, M)) return
M.visible_message("<span class='warning'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
reagents.trans_to_ingest(M, reagents.total_volume)
reagents.trans_to(M, reagents.total_volume)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been utensil fed by [user.name] ([user.ckey]) with [src.name]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Utensil fed [M.name] ([M.ckey]) with [src.name]</font>")
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
+21 -50
View File
@@ -95,69 +95,40 @@
return
//EXTRA LIGHTERS
/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda
/obj/item/weapon/lighter/zippo/nt_rep
name = "gold engraved zippo"
desc = "An engraved golden Zippo lighter with the letters NT on it."
icon_state = "zippo_nt_off"
icon_on = "zippo_nt_on"
icon_off = "zippo_nt_off"
/obj/item/weapon/lighter/zippo/blue
name = "blue zippo lighter"
desc = "A zippo lighter made of some blue metal."
icon = 'icons/obj/custom_items.dmi'
icon_state = "bluezippo"
icon_on = "bluezippoon"
icon_off = "bluezippo"
/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 //Dragor23: Michael Guess
name = "engraved lighter"
desc = "A golden lighter, engraved with some ornaments and a G."
icon = 'icons/obj/custom_items.dmi'
icon_state = "guessip"
icon_on = "guessipon"
icon_off = "guessip"
/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
name = "Riley's black zippo"
desc = "A black zippo lighter, which holds some form of sentimental value."
icon = 'icons/obj/custom_items.dmi'
/obj/item/weapon/lighter/zippo/black
name = "black zippo lighter"
desc = "A black zippo lighter."
icon_state = "blackzippo"
icon_on = "blackzippoon"
icon_off = "blackzippo"
/obj/item/weapon/lighter/zippo/fluff/fay_sullivan_1 //furohman: Fay Sullivan
name = "Graduation Lighter"
desc = "A silver engraved lighter with 41 on one side and Tharsis University on the other. The lid reads Fay Sullivan, Cybernetic Engineering, 2541"
icon = 'icons/obj/custom_items.dmi'
icon_state = "gradzippo"
icon_on = "gradzippoon"
icon_off = "gradzippo"
/obj/item/weapon/lighter/zippo/fluff/executivekill_1 //executivekill: Hunter Duke
name = "Gonzo Fist zippo"
desc = "A Zippo lighter with the iconic Gonzo Fist on a matte black finish."
icon = 'icons/obj/custom_items.dmi'
icon_state = "gonzozippo"
icon_on = "gonzozippoon"
icon_off = "gonzozippo"
/obj/item/weapon/lighter/zippo/fluff/naples_1 //naples: Russell Vierson
name = "Engraved zippo"
desc = "A intricately engraved Zippo lighter."
icon = 'icons/obj/custom_items.dmi'
/obj/item/weapon/lighter/zippo/engraved
name = "engraved zippo lighter"
desc = "A intricately engraved zippo lighter."
icon_state = "engravedzippo"
icon_on = "engravedzippoon"
icon_off = "engravedzippo"
/obj/item/weapon/lighter/zippo/fluff/nt_rep
name = "gold engraved zippo"
desc = "An engraved golden Zippo lighter with the letters NT on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "zippo_nt_off"
icon_on = "zippo_nt_on"
icon_off = "zippo_nt_off"
/obj/item/weapon/lighter/zippo/fluff/purple
name = "purple engraved zippo"
desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
icon = 'icons/obj/custom_items.dmi'
icon_state = "purple_zippo_off"
icon_on = "purple_zippo_on"
icon_off = "purple_zippo_off"
/obj/item/weapon/lighter/zippo/gonzofist
name = "Gonzo Fist zippo"
desc = "A Zippo lighter with the iconic Gonzo Fist on a matte black finish."
icon_state = "gonzozippo"
icon_on = "gonzozippoon"
icon_off = "gonzozippo"
///////////
//MATCHES//
@@ -809,6 +809,12 @@
</html>
"}
/obj/item/weapon/book/manual/security_space_law/black
name = "Space Law - Limited Edition"
desc = "A leather-bound, immaculately-written copy of JUSTICE."
icon_state = "bookSpaceLawblack"
title = "Space Law - Limited Edition"
/obj/item/weapon/book/manual/engineering_guide
name = "Engineering Textbook"
+1 -1
View File
@@ -74,7 +74,7 @@
return
if(user && user.buckled)
user.buckled.unbuckle()
user.buckled.unbuckle_mob()
var/list/tempL = L
var/attempt = null
+11 -9
View File
@@ -125,6 +125,8 @@
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob()
C.update_inv_handcuffed()
return
else
@@ -168,15 +170,15 @@
reagents.add_reagent("fuel", max_fuel)
update_icon()
return
/obj/item/weapon/weldingtool/examine(mob/user)
if(!..(user, 0))
user << "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weapon/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds \his every orifice closed! It looks like \he's trying to commit suicide..</span>")
return (FIRELOSS)
/obj/item/weapon/weldingtool/proc/update_torch()
overlays.Cut()
if(welding)
@@ -235,7 +237,7 @@
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if (!S)
return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2)
return ..()
@@ -254,7 +256,7 @@
else if(S.open != 2)
user << "<span class='notice'>Nothing to fix!</span>"
else
return ..()
return ..()
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
@@ -388,7 +390,7 @@
spawn(100)
user.disabilities &= ~NEARSIGHTED
return
/obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
user << "<span class='warning'>Turn it off first!</span>"
@@ -428,7 +430,7 @@
/obj/item/weapon/weldingtool/largetank/flamethrower_screwdriver()
return
/obj/item/weapon/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
@@ -439,8 +441,8 @@
change_icons = 0
/obj/item/weapon/weldingtool/mini/flamethrower_screwdriver()
return
return
/obj/item/weapon/weldingtool/hugetank
name = "Upgraded Welding Tool"
desc = "An upgraded welder based of the industrial welder."
+2 -5
View File
@@ -20,11 +20,6 @@
if(3.0)
return
/obj/structure/Destroy()
if(hascall(src, "unbuckle"))
src:unbuckle()
return ..()
/obj/structure/mech_melee_attack(obj/mecha/M)
if(M.damtype == "brute")
M.occupant_message("<span class='danger'>You hit [src].</span>")
@@ -47,6 +42,8 @@
do_climb(usr)
/obj/structure/MouseDrop_T(var/atom/movable/C, mob/user as mob)
if(..())
return
if(C == user)
do_climb(user)
@@ -250,7 +250,7 @@
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/glasses/hud/health_advanced
new /obj/item/clothing/head/beret/centcom/officer(src)
new /obj/item/clothing/suit/armor/vest/fluff/deus_blueshield(src)
new /obj/item/clothing/suit/armor/vest/blueshield(src)
new /obj/item/clothing/suit/storage/blueshield(src)
new /obj/item/clothing/shoes/centcom(src)
new /obj/item/clothing/accessory/holster(src)
+37 -166
View File
@@ -5,17 +5,10 @@
var/empstun = 0
var/health = 100
var/destroyed = 0
var/inertia_dir = 0
var/allowMove = 1
var/delay = 1
var/move_delay = 1
var/keytype = /obj/item/key
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
/obj/structure/stool/bed/chair/cart/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = loc
/obj/structure/stool/bed/chair/cart/process()
if(empstun > 0)
empstun--
@@ -54,120 +47,28 @@
if(istype(W, /obj/item/key))
user << "Hold [W] in one of your hands while you drive this [name]."
/obj/structure/stool/bed/chair/cart/proc/Process_Spacemove(var/check_drift = 0, mob/user)
//First check to see if we can do things
/*
if(istype(src,/mob/living/carbon))
if(src.l_hand && src.r_hand)
return 0
*/
var/dense_object = 0
if(!user)
for(var/turf/turf in oview(1,src))
if(istype(turf,/turf/space))
continue
/*
if((istype(turf,/turf/simulated/floor))
if(user)
if(user.lastarea.has_gravity == 0)
continue*/
/*
if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
continue
*/
dense_object++
break
if(!dense_object && (locate(/obj/structure/lattice) in oview(1, src)))
dense_object++
//Lastly attempt to locate any dense objects we could push off of
//TODO: If we implement objects drifing in space this needs to really push them
//Due to a few issues only anchored and dense objects will now work.
if(!dense_object)
for(var/obj/O in oview(1, src))
if((O) && (O.density) && (O.anchored))
dense_object++
break
else
for(var/turf/turf in oview(1,user))
if(istype(turf,/turf/space))
continue
/*
if((istype(turf,/turf/simulated/floor))
if(user)
if(user.lastarea.has_gravity == 0)
continue*/
/*
if(istype(turf,/turf/simulated/floor) && (src.flags & NOGRAV))
continue
*/
dense_object++
break
if(!dense_object && (locate(/obj/structure/lattice) in oview(1, user)))
dense_object++
//Lastly attempt to locate any dense objects we could push off of
//TODO: If we implement objects drifing in space this needs to really push them
//Due to a few issues only anchored and dense objects will now work.
if(!dense_object)
for(var/obj/O in oview(1, user))
if((O) && (O.density) && (O.anchored))
dense_object++
break
//Nothing to push off of so end here
if(!dense_object)
return 0
/* The cart has very grippy tires and or magnets to keep it from slipping when on a good surface
//Check to see if we slipped
if(prob(Process_Spaceslipping(5)))
src << "\blue <B>You slipped!</B>"
src.inertia_dir = src.last_move
step(src, src.inertia_dir)
return 0
//If not then we can reset inertia and move
*/
inertia_dir = 0
return 1
/obj/structure/stool/bed/chair/cart/buckle_mob(mob/M, mob/user)
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon) || destroyed)
/obj/structure/stool/bed/chair/cart/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
return
unbuckle()
M.visible_message(\
"<span class='notice'>[M] climbs onto the [name]!</span>",\
"<span class='notice'>You climb onto the [name]!</span>")
M.buckled = src
M.loc = loc
M.dir = dir
M.update_canmove()
buckled_mob = M
update_mob()
add_fingerprint(user)
return
/obj/structure/stool/bed/chair/cart/unbuckle()
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
if(A.density)
if(A != src && A != M)
return
M.loc = loc //we move the mob on the janicart's turf before checking if we can buckle.
..()
update_mob()
/obj/structure/stool/bed/chair/cart/post_buckle_mob(mob/living/M)
update_mob()
return ..()
/obj/structure/stool/bed/chair/cart/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
M.pixel_y = 0
return M
/obj/structure/stool/bed/chair/cart/handle_rotation()
if(dir == SOUTH)
@@ -222,11 +123,11 @@
if(act >= 0)
visible_message("<span class='warning'>[buckled_mob.name] is hit by [Proj]!")
if(istype(Proj, /obj/item/projectile/energy))
unbuckle()
unbuckle_mob()
return
if(istype(Proj, /obj/item/projectile/energy/electrode))
if(prob(25))
unbuckle()
unbuckle_mob()
visible_message("<span class='warning'>The [src.name] absorbs the [Proj]")
if(!istype(buckled_mob, /mob/living/carbon/human))
return buckled_mob.bullet_act(Proj)
@@ -245,7 +146,7 @@
destroyed = 1
density = 0
if(buckled_mob)
unbuckle()
unbuckle_mob()
visible_message("<span class='warning'>The [name] explodes!</span>")
explosion(src.loc,-1,0,2,7,10)
icon_state = "pussywagon_destroyed"
@@ -271,16 +172,12 @@
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/weapon/storage/bag/trash/mybag = null
/obj/structure/stool/bed/chair/cart/janicart/New()
..()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
/obj/structure/stool/bed/chair/cart/janicart/examine(mob/user)
if(!..(user, 1))
return
@@ -316,27 +213,21 @@
/obj/structure/stool/bed/chair/cart/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis || destroyed)
unbuckle()
unbuckle_mob()
return
if(empstun > 0)
if(user)
user << "\red \the [src] is unresponsive."
return
if((istype(src.loc, /turf/space)))
if(!src.Process_Spacemove(0)) return
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
if(!allowMove)
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
return
allowMove = 0
step(src, direction)
update_mob()
handle_rotation()
sleep(delay)
allowMove = 1
/*
if(istype(src.loc, /turf/space) && (!src.Process_Spacemove(0, user)))
var/turf/space/S = src.loc
S.Entered(src)*/
move_delay = 1
spawn(2)
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this pimpin' ride.</span>"
@@ -346,52 +237,32 @@
name = "ambulance"
icon = 'icons/obj/vehicles.dmi'
icon_state = "docwagon"
anchored = 1
anchored = 0
density = 1
/var/brightness = 4
/var/strobe = 0
/obj/structure/stool/bed/chair/cart/ambulance/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis || destroyed)
unbuckle()
unbuckle_mob()
return
if(empstun > 0)
if(user)
user << "\red \the [src] is unresponsive."
return
if((istype(src.loc, /turf/space)))
if(!src.Process_Spacemove(0)) return
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
if(!allowMove)
if(istype(user.l_hand, keytype) || istype(user.r_hand, keytype))
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || move_delay || !isturf(loc))
return
allowMove = 0
step(src, direction)
// NEW PULLING CODE
if (istype(user.pulling, /obj/structure/stool/bed/roller))
var/turf/T = loc
step(user.pulling, get_dir(user.pulling.loc, T))
// END NEW PULLING CODE
update_mob()
handle_rotation()
sleep(delay)
allowMove = 1
/*
if(istype(src.loc, /turf/space) && (!src.Process_Spacemove(0, user)))
var/turf/space/S = src.loc
S.Entered(src)*/
move_delay = 1
spawn(2)
move_delay = 0
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this ambulance.</span>"
/obj/item/key
name = "key"
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
+22 -16
View File
@@ -3,7 +3,7 @@
/datum/song
var/name = "Untitled"
var/list/lines = new()
var/tempo = 5
var/tempo = 5 // delay between notes
var/playing = 0 // if we're playing
var/help = 0 // if help is open
@@ -16,6 +16,7 @@
var/obj/instrumentObj = null // the associated obj playing the sound
/datum/song/New(dir, obj)
tempo = sanitize_tempo(tempo)
instrumentDir = dir
instrumentObj = obj
@@ -59,13 +60,17 @@
// and play
var/turf/source = get_turf(instrumentObj)
for(var/mob/M in hearers(15, source))
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
continue
M.playsound_local(source, soundfile, 100, falloff = 5)
/datum/song/proc/updateDialog(mob/user as mob)
instrumentObj.updateDialog() // assumes it's an object in world, override if otherwise
/datum/song/proc/shouldStopPlaying()
/datum/song/proc/shouldStopPlaying(mob/user)
if(instrumentObj)
//if(!user.canUseTopic(instrumentObj))
//return 1
return !instrumentObj.anchored // add special cases to stop in subclasses
else
return 1
@@ -85,7 +90,7 @@
var/list/notes = text2list(beat, "/")
for(var/note in text2list(notes[1], "-"))
//world << "note: [note]"
if(!playing || shouldStopPlaying())//If the instrument is playing, or special case
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
playing = 0
return
if(lentext(note) == 0)
@@ -105,7 +110,7 @@
cur_oct[cur_note] = text2num(ni)
playnote(cur_note, cur_acc[cur_note], cur_oct[cur_note])
if(notes.len >= 2 && text2num(notes[2]))
sleep(tempo / text2num(notes[2]))
sleep(sanitize_tempo(tempo / text2num(notes[2])))
else
sleep(tempo)
repeat--
@@ -137,10 +142,8 @@
dat += "<B><A href='?src=\ref[src];edit=1'>Hide Editor</A></B>"
dat += " <A href='?src=\ref[src];newsong=1'>Start a New Song</A>"
dat += " <A href='?src=\ref[src];import=1'>Import a Song</A><BR><BR>"
var/calctempo = round(600 / tempo)
var/calcstep = tempo - 600 / (calctempo+1)
var/calcstep_b = tempo - 600 / (calctempo+10)
dat += "Tempo: <A href='?src=\ref[src];tempo=[calcstep_b]'>-</A><A href='?src=\ref[src];tempo=[calcstep]'>-</A> [calctempo] BPM <A href='?src=\ref[src];tempo=-[calcstep]'>+</A><A href='?src=\ref[src];tempo=-[calcstep_b]'>+</A><BR><BR>"
var/bpm = round(600 / tempo)
dat += "Tempo: <A href='?src=\ref[src];tempo=[world.tick_lag]'>-</A> [bpm] BPM <A href='?src=\ref[src];tempo=-[world.tick_lag]'>+</A><BR><BR>"
var/linecount = 0
for(var/line in lines)
linecount += 1
@@ -184,7 +187,7 @@
if(href_list["newsong"])
lines = new()
tempo = 5 // default 120 BPM
tempo = sanitize_tempo(5) // default 120 BPM
name = ""
else if(href_list["import"])
@@ -204,10 +207,10 @@
spawn()
lines = text2list(t, "\n")
if(copytext(lines[1],1,6) == "BPM: ")
tempo = 600 / max(1, text2num(copytext(lines[1],6)))
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
lines.Cut(1,2)
else
tempo = 5 // default 120 BPM
tempo = sanitize_tempo(5) // default 120 BPM
if(lines.len > 50)
usr << "Too many lines!"
lines.Cut(51)
@@ -236,11 +239,7 @@
repeat = max_repeats
else if(href_list["tempo"])
tempo += text2num(href_list["tempo"])
if(tempo < 1)
tempo = 1
if(tempo > 600)
tempo = 600
tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]))
else if(href_list["play"])
playing = 1
@@ -280,6 +279,9 @@
updateDialog(usr)
return
/datum/song/proc/sanitize_tempo(new_tempo)
new_tempo = abs(new_tempo)
return max(round(new_tempo, world.tick_lag), world.tick_lag)
// subclass for handheld instruments, like violin
/datum/song/handheld
@@ -322,6 +324,10 @@
qdel(song)
song = null
return ..()
/obj/structure/piano/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/structure/piano/attack_hand(mob/user as mob)
interact(user)
+35 -45
View File
@@ -16,9 +16,19 @@
space_move = new /datum/global_iterator/space_movement(null,0)
return
/obj/structure/stool/bed/chair/segway/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated()) //user can't move the mob on the janicart's turf if incapacitated
return
for(var/atom/movable/A in get_turf(src)) //we check for obstacles on the turf.
if(A.density)
if(A != src && A != M)
return
M.loc = loc //we move the mob on the janicart's turf before checking if we can buckle.
..()
/obj/structure/stool/bed/chair/segway/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle()
unbuckle_mob()
icon_state = "sec_seg_idle"
if(istype(user.l_hand, /obj/item/sec_seg_key) || istype(user.r_hand, /obj/item/sec_seg_key))
if(!allowMove)
@@ -38,7 +48,7 @@
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
buckled_mob.Stun(8)
buckled_mob.Weaken(5)
unbuckle()
unbuckle_mob()
step(src, dir)
sleep(delay)
allowMove = 1
@@ -47,10 +57,6 @@
/obj/structure/stool/bed/chair/segway/Move()
. = ..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = loc
return .
/obj/structure/stool/bed/chair/segway/Bump(var/atom/obstacle)
if(istype(obstacle, /mob))
@@ -59,47 +65,31 @@
obstacle.Bumped(src)
return
/obj/structure/stool/bed/chair/segway/buckle_mob(mob/M, mob/user)
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
return
/obj/structure/stool/bed/chair/segway/post_buckle_mob(mob/living/M)
update_mob()
add_fingerprint(M)
M.pixel_x = 0
M.pixel_y = 5
return ..()
unbuckle()
M.visible_message(\
"<span class='notice'>[M] climbs onto the [src.name]!</span>",\
"<span class='notice'>You climb onto the [src.name]!</span>")
M.buckled = src
M.loc = loc
M.dir = dir
M.update_canmove()
buckled_mob = M
update_mob()
add_fingerprint(user)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 5
/obj/structure/stool/bed/chair/segway/unbuckle()
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
..()
/obj/structure/stool/bed/chair/segway/unbuckle_mob()
var/mob/living/M = ..()
if(M)
M.pixel_x = 0
M.pixel_y = 0
return M
/obj/structure/stool/bed/chair/segway/handle_rotation()
if(dir == NORTH)
layer = OBJ_LAYER
else
layer = FLY_LAYER
if(dir == NORTH)
layer = OBJ_LAYER
else
layer = FLY_LAYER
if(buckled_mob)
if(buckled_mob.loc != loc)
buckled_mob.buckled = null
buckled_mob.buckled = src
update_mob()
update_mob()
/obj/structure/stool/bed/chair/segway/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
if(buckled_mob)
buckled_mob.dir = dir
/obj/structure/stool/bed/chair/segway/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
@@ -147,7 +137,7 @@
/obj/structure/stool/bed/chair/segway/snowmobile/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle()
unbuckle_mob()
if(!allowMove)
return
if(src.space_move.active())
@@ -159,14 +149,14 @@
if(istype(src.loc, /turf/space))
src.space_move.start(list(src,direction))
if(istype(src.loc, /turf/simulated))
health -= 5
damage(5)
usr << "Your snowmobile takes damage from not being on snow!"
var/turf/simulated/T = src.loc
if(T.wet == 2) //Lube! Fall off!
if(T && T.wet == 2) //Lube! Fall off!
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
buckled_mob.Stun(8)
buckled_mob.Weaken(5)
unbuckle()
unbuckle_mob()
step(src, dir)
sleep(delay)
allowMove = 1
@@ -1,5 +1,4 @@
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
#define NEST_RESIST_TIME 1200
/obj/structure/stool/bed/nest
name = "alien nest"
@@ -7,68 +6,75 @@
icon = 'icons/mob/alien.dmi'
icon_state = "nest"
var/health = 100
var/image/nest_overlay
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
"<span class='notice'>You hear squelching...</span>")
buckled_mob.pixel_y = 0
unbuckle()
else
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
return
buckled_mob.visible_message(\
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
"<span class='warning'>You struggle to break free from the gelatinous resin... (This will take around 2 minutes and you need to stay still)</span>",\
"<span class='notice'>You hear squelching...</span>")
spawn(NEST_RESIST_TIME)
if(user && buckled_mob && user.buckled == src)
buckled_mob.last_special = world.time
buckled_mob.pixel_y = 0
unbuckle()
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/New()
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
return ..()
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
/obj/structure/stool/bed/nest/user_unbuckle_mob(mob/living/user)
if(buckled_mob && buckled_mob.buckled == src)
var/mob/living/M = buckled_mob
if(isalien(user))
unbuckle_mob()
add_fingerprint(user)
return
if(M != user)
M.visible_message(\
"<span class='notice'>[user.name] pulls [M.name] free from the sticky nest!</span>",\
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
"<span class='notice'>You hear squelching...</span>")
else
buckled_mob.visible_message(\
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
"<span class='warning'>You struggle to break free from the gelatinous resin... (This will take around 2 minutes and you need to stay still)</span>",\
"<span class='notice'>You hear squelching...</span>")
if(!do_after(M, 1200, target = src))
if(M && M.buckled)
M << "<span class='warning'>You fail to escape \the [src]!</span>"
return
if(!M.buckled)
return
M.visible_message(\
"<span class='warning'>[M.name] breaks free from the gelatinous resin!</span>",\
"<span class='notice'>You break free from the gelatinous resin!</span>",\
"<span class='italics'>You hear squelching...</span>")
unbuckle_mob()
add_fingerprint(user)
/obj/structure/stool/bed/nest/user_buckle_mob(mob/living/M, mob/living/user)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
if(istype(M,/mob/living/carbon/alien))
if(isalien(M))
return
if(!istype(user,/mob/living/carbon/alien/humanoid))
if(!isalien(user))
return
unbuckle()
unbuckle_mob()
if(M == usr)
return
else
if(buckle_mob(M))
M.visible_message(\
"<span class='notice'>[user.name] secretes a thick vile goo, securing [M.name] into [src]!</span>",\
"<span class='warning'>[user.name] drenches you in a foul-smelling resin, trapping you in the [src]!</span>",\
"<span class='notice'>You hear squelching...</span>")
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.update_canmove()
M.pixel_y += 1
M.pixel_x += 2
M.anchored = anchored
src.buckled_mob = M
src.add_fingerprint(user)
src.overlays += image('icons/mob/alien.dmi', "nestoverlay", layer=6)
return
"[user.name] secretes a thick vile goo, securing [M.name] into [src]!",\
"<span class='danger'>[user.name] drenches you in a foul-smelling resin, trapping you in [src]!</span>",\
"<span class='italics'>You hear squelching...</span>")
/obj/structure/stool/bed/nest/unbuckle()
if(buckled_mob)
buckled_mob.pixel_y -= 1
buckled_mob.pixel_x -= 2
overlays.Cut()
..()
/obj/structure/stool/bed/nest/post_buckle_mob(mob/living/M)
if(M == buckled_mob)
M.pixel_y = 0
M.pixel_x = initial(M.pixel_x) + 2
M.layer = MOB_LAYER - 0.3
overlays += nest_overlay
else
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
M.layer = initial(M.layer)
overlays -= nest_overlay
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -11,111 +11,54 @@
name = "bed"
desc = "This is used to lie in, sleep in or strap on."
icon_state = "bed"
var/mob/living/buckled_mob
can_buckle = 1
buckle_lying = 1
var/movable = 0 // For mobility checks
/obj/structure/stool/bed/MouseDrop(atom/over_object)
..(over_object, 1)
/obj/structure/stool/psychbed
name = "psych bed"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
var/mob/living/buckled_mob
can_buckle = 1
buckle_lying = 1
/obj/structure/stool/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
icon_state = "abed"
/obj/structure/stool/bed/Destroy()
unbuckle()
/obj/structure/stool/bed/Move(atom/newloc, direct) //Some bed children move
. = ..()
if(buckled_mob)
if(!buckled_mob.Move(loc, direct))
loc = buckled_mob.loc //we gotta go back
last_move = buckled_mob.last_move
inertia_dir = last_move
buckled_mob.inertia_dir = last_move
. = 0
/obj/structure/stool/bed/Process_Spacemove(movement_dir = 0)
if(buckled_mob)
return buckled_mob.Process_Spacemove(movement_dir)
return ..()
/obj/structure/stool/bed/attack_hand(mob/user as mob)
manual_unbuckle(user)
return
/obj/structure/stool/bed/CanPass(atom/movable/mover, turf/target, height=1.5)
if(mover == buckled_mob)
return 1
return ..()
/obj/structure/stool/bed/proc/handle_rotation()
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/attack_animal(var/mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
qdel(src)
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) //Called after somebody buckled / unbuckled
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
"You were unbuckled from [src] by [user.name].",\
"You hear metal clanking")
else
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled \himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
unbuckle()
src.add_fingerprint(user)
return 1
return 0
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stunned || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
return
unbuckle()
if (M == usr)
M.visible_message(\
"\blue [M.name] buckles in!",\
"You buckle yourself to [src].",\
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You are buckled in to [src] by [user.name].",\
"You hear metal clanking")
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return
/*
* Roller beds
*/
@@ -125,41 +68,44 @@
icon_state = "down"
anchored = 0
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/roller_holder))
if(buckled_mob)
manual_unbuckle()
else
visible_message("[user] collapses \the [src.name].")
new/obj/item/roller(get_turf(src))
spawn(0)
qdel(src)
return
..()
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M)
if(M == buckled_mob)
density = 1
icon_state = "up"
M.pixel_y = initial(M.pixel_y)
else
density = 0
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"
desc = "A collapsed roller bed that can be carried around."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "folded"
w_class = 4.0 // Can't be put in backpacks. Oh well.
w_class = 4 // Can't be put in backpacks.
/obj/item/roller/attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/roller/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
user << "\blue You collect the roller bed."
src.loc = RH
RH.held = src
return
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
if(!ishuman(usr))
return
if(buckled_mob)
return 0
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
new/obj/item/roller(get_turf(src))
qdel(src)
return
/obj/item/roller_holder
name = "roller bed rack"
@@ -173,7 +119,6 @@
held = new /obj/item/roller(src)
/obj/item/roller_holder/attack_self(mob/user as mob)
if(!held)
user << "\blue The rack is empty."
return
@@ -182,46 +127,4 @@
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
qdel(held)
held = null
/obj/structure/stool/bed/roller/Move()
..()
if(buckled_mob)
if(buckled_mob.buckled == src)
buckled_mob.loc = src.loc
else
buckled_mob = null
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
return
M.pixel_y = 6
density = 1
icon_state = "up"
..()
return
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.pixel_y = 0
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.buckled = null
buckled_mob.update_canmove()
buckled_mob = null
density = 0
icon_state = "down"
..()
return
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
if(buckled_mob) return 0
visible_message("[usr] collapses \the [src.name]")
new/obj/item/roller(get_turf(src))
spawn(0)
qdel(src)
return
held = null
@@ -2,12 +2,10 @@
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair"
buckle_lying = 0 //you sit in a chair, not lay
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/stool/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull
@@ -16,6 +14,10 @@
handle_rotation()
return
/obj/structure/stool/bed/chair/Move(atom/newloc, direct)
..()
handle_rotation()
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/assembly/shock_kit))
@@ -66,11 +68,6 @@
handle_rotation()
return
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
return
// Chair types
/obj/structure/stool/bed/chair/wood
// TODO: Special ash subtype that looks like charred chair legs
@@ -106,7 +103,7 @@
return ..()
/obj/structure/stool/bed/chair/comfy/afterbuckle()
/obj/structure/stool/bed/chair/comfy/post_buckle_mob(mob/living/M)
if(buckled_mob)
overlays += armrest
else
@@ -143,29 +140,13 @@
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/office/Move()
..()
if(buckled_mob)
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()
unbuckle_mob()
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
@@ -32,7 +32,9 @@
qdel(src)
return
/obj/structure/stool/MouseDrop(atom/over_object)
/obj/structure/stool/MouseDrop(atom/over_object, skip_fucking_stool_shit = 0)
if(skip_fucking_stool_shit)
return ..(over_object)
if (istype(over_object, /mob/living/carbon/human))
var/mob/living/carbon/human/H = over_object
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
@@ -42,6 +42,16 @@
user << "\red You cannot drive while being pushed."
return
if(istype(user.loc, /turf/space))
return
if(ishuman(user))
var/mob/living/carbon/human/driver = user
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck!
// Let's roll
driving = 1
var/turf/T = null
@@ -88,7 +98,7 @@
if (O != occupant)
Bump(O)
else
unbuckle()
unbuckle_mob()
if (pulling && (get_dist(src, pulling) > 1))
pulling.pulledby = null
pulling << "\red You lost your grip!"
@@ -102,7 +112,7 @@
if (pulling)
MouseDrop(usr)
else
manual_unbuckle(user)
user_unbuckle_mob(user, user)
return
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
@@ -135,7 +145,7 @@
if(propelled || (pulling && (pulling.a_intent == I_HARM)))
var/mob/living/occupant = buckled_mob
unbuckle()
unbuckle_mob()
if (pulling && (pulling.a_intent == "hurt"))
occupant.throw_at(A, 3, 3, pulling)
@@ -25,6 +25,11 @@
return ..()
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
return 1
else return ..()
/obj/structure/transit_tube_pod/proc/follow_tube(var/reverse_launch)
if(moving)
return
@@ -67,7 +72,7 @@
if(current_tube == null)
dir = next_dir
Move(get_step(loc, dir)) // Allow collisions when leaving the tubes.
Move(get_step(loc, dir), dir) // Allow collisions when leaving the tubes.
break
last_delay = current_tube.enter_delay(src, next_dir)
@@ -82,21 +87,6 @@
density = 1
// If the pod is no longer in a tube, move in a line until stopped or slowed to a halt.
// /turf/inertial_drift appears to only work on mobs, and re-implementing some of the
// logic allows a gradual slowdown and eventual stop when passing over non-space turfs.
if(!current_tube && last_delay <= 10)
do
sleep(last_delay)
if(!istype(loc, /turf/space))
last_delay++
if(last_delay > 10)
break
while(isturf(loc) && Move(get_step(loc, dir)))
moving = 0