diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm index aa9e74f02b7..0605e602f6b 100644 --- a/code/controllers/subsystems/job.dm +++ b/code/controllers/subsystems/job.dm @@ -351,7 +351,7 @@ LateSpawn(H, rank) // Moving wheelchair if they have one - if(H.buckled_to && istype(H.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + if(H.buckled_to && istype(H.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) H.buckled_to.forceMove(H.loc) H.buckled_to.set_dir(H.dir) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 32eccb6b7a9..1b81441b437 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -177,8 +177,8 @@ open() return - if(istype(AM, /obj/structure/bed/stool/chair/wheelchair)) - var/obj/structure/bed/stool/chair/wheelchair/wheel = AM + if(istype(AM, /obj/structure/bed/stool/chair/office/wheelchair)) + var/obj/structure/bed/stool/chair/office/wheelchair/wheel = AM if(density) if(wheel.pulling && (src.allowed(wheel.pulling))) open() diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 19014255ef6..eef64d1b6a2 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -106,8 +106,8 @@ LAZYINITLIST(perp.feet_blood_DNA) if (blood_DNA) perp.feet_blood_DNA |= blood_DNA.Copy() - else if (perp.buckled_to && istype(perp.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) - var/obj/structure/bed/stool/chair/wheelchair/W = perp.buckled_to + else if (perp.buckled_to && istype(perp.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) + var/obj/structure/bed/stool/chair/office/wheelchair/W = perp.buckled_to W.bloodiness = 4 perp.update_inv_shoes(1) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index cf04c0271fe..7c5ade5a281 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -26,9 +26,11 @@ var/buckling_sound = 'sound/effects/buckle.ogg' var/can_dismantle = TRUE + var/can_pad = TRUE + gfi_layer_rotation = GFI_ROTATION_DEFDIR var/makes_rolling_sound = FALSE - var/held_item = null + var/held_item = null // Set to null if you don't want people to pick this up. slowdown = 5 /obj/structure/bed/Initialize() @@ -118,14 +120,16 @@ /obj/structure/bed/attackby(obj/item/W as obj, mob/user as mob) if(W.iswrench()) if(can_dismantle) - playsound(src.loc, W.usesound, 50, 1) - dismantle() + dismantle(W, user) else if(istype(W,/obj/item/stack)) + if(!can_pad) + return if(padding_material) to_chat(user, "\The [src] is already padded.") return var/obj/item/stack/C = W if(C.get_amount() < 1) // How?? + to_chat(user, SPAN_WARNING("You don't have enough [C]!")) qdel(C) return var/padding_type //This is awful but it needs to be like this until tiles are given a material var. @@ -147,6 +151,8 @@ return else if (W.iswirecutter()) + if(!can_pad) + return if(!padding_material) to_chat(user, "\The [src] has no padding to remove.") return @@ -154,6 +160,15 @@ playsound(src, 'sound/items/wirecutter.ogg', 100, 1) remove_padding() + else if (W.isscrewdriver()) + if(anchored) + anchored = FALSE + to_chat(user, "You unfasten \the [src] from floor.") + else + anchored = TRUE + to_chat(user, "You fasten \the [src] to the floor.") + playsound(src, 'sound/items/screwdriver.ogg', 100, 1) + else if(istype(W, /obj/item/grab)) var/obj/item/grab/G = W var/mob/living/affecting = G.affecting @@ -163,9 +178,9 @@ spawn(0) if(buckle(affecting)) affecting.visible_message(\ - "[affecting.name] is buckled to [src] by [user.name]!",\ - "You are buckled to [src] by [user.name]!",\ - "You hear metal clanking.") + SPAN_DANGER("[affecting.name] is buckled to [src] by [user.name]!"),\ + SPAN_DANGER("You are buckled to [src] by [user.name]!"),\ + SPAN_NOTICE("You hear metal clanking.")) qdel(W) else if(istype(W, /obj/item/gripper) && buckled) @@ -191,10 +206,14 @@ padding_material = SSmaterials.get_material_by_name(padding_type) update_icon() -/obj/structure/bed/dismantle() - if(padding_material) - padding_material.place_sheet(get_turf(src)) - ..() +/obj/structure/bed/dismantle(obj/item/W, mob/user) + playsound(src.loc, W.usesound, 50, 1) + user.visible_message("[user] begins dismantling \the [src].", SPAN_NOTICE("You begin dismantling \the [src].")) + if(!do_after(user, 20 / W.toolspeed)) + user.visible_message("\The [user] dismantles \the [src].", SPAN_NOTICE("You dismantle \the [src].")) + if(padding_material) + padding_material.place_sheet(get_turf(src)) + ..() /obj/structure/bed/psych name = "psychiatrist's couch" diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 42bdea59643..7b5e4abd7da 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -3,6 +3,7 @@ desc = "You sit in this. Either by will or force." icon_state = "chair_preview" base_icon = "chair" + anchored = TRUE build_amt = 1 buckle_dir = 0 buckle_lying = 0 //force people to sit up in chairs when buckled_to @@ -14,12 +15,6 @@ . = ..() LAZYADD(can_buckle, /mob/living) -/obj/structure/bed/stool/chair/MouseDrop(over_object, src_location, over_location) - if(padding_material) // No picking up padded chairs. For reasons. - return - else - . = ..() - /obj/structure/bed/stool/chair/do_simple_ranged_interaction(var/mob/user) if(!buckled && user) rotate(user) @@ -86,8 +81,9 @@ return ..() /obj/structure/bed/stool/chair/CanPass(atom/movable/mover, turf/target, height, air_group) - if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover)))) - return FALSE + if(anchored && padding_material) + if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover)))) + return FALSE return ..() /obj/structure/bed/stool/chair/padded/brown/New(var/newloc) @@ -244,45 +240,59 @@ ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME) -/obj/structure/bed/stool/chair/office +/obj/structure/bed/stool/chair/office // For the love of god, don't use this. name = "office chair" material_alteration = MATERIAL_ALTERATION_DESC makes_rolling_sound = TRUE - anchored = 0 - buckle_movable = 1 + anchored = FALSE + buckle_movable = TRUE build_amt = 5 held_item = null -/obj/structure/bed/stool/chair/office/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || W.iswirecutter()) - return - ..() + can_pad = FALSE + + var/driving = FALSE // Shit for wheelchairs. Doesn't really get used here, but it's for code cleanliness. + var/mob/living/pulling = null /obj/structure/bed/stool/chair/office/Move() . = ..() if(makes_rolling_sound) - playsound(src, 'sound/effects/roll.ogg', 100, 1) + playsound(src, 'sound/effects/roll.ogg', 50, 1) if(buckled) var/mob/living/occupant = buckled - occupant.buckled_to = null - occupant.Move(src.loc) - 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() + if(!driving) + occupant.buckled_to = null + occupant.Move(src.loc) + 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() + if (pulling && (get_dist(src, pulling) > 1)) + pulling.pulledby = null + to_chat(pulling, SPAN_WARNING("You lost your grip!")) + pulling = null + else + if (occupant && (src.loc != occupant.loc)) + src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving + /obj/structure/bed/stool/chair/office/Collide(atom/A) . = ..() if(!buckled) return - if(propelled) + if(propelled || (pulling && (pulling.a_intent == I_HURT))) var/mob/living/occupant = unbuckle() + if (pulling && (pulling.a_intent == I_HURT)) + occupant.throw_at(A, 3, 3, pulling) + else if (propelled) + occupant.throw_at(A, 3, propelled) + var/def_zone = ran_zone() occupant.throw_at(A, 3, propelled) occupant.apply_effect(6, STUN) @@ -297,7 +307,14 @@ victim.apply_effect(6, WEAKEN) victim.apply_effect(6, STUTTER) victim.apply_damage(10, BRUTE, def_zone) - occupant.visible_message("[occupant] crashed into \the [A]!") + + if(pulling) + occupant.visible_message(SPAN_DANGER("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!")) + pulling.attack_log += "\[[time_stamp()]\] Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]" + occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]" + msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (JMP)",ckey=key_name(pulling),ckey_target=key_name(occupant)) + else + occupant.visible_message(SPAN_DANGER("[occupant] crashed into \the [A]!")) /obj/structure/bed/stool/chair/office/light icon_state = "officechair_white_preview" @@ -312,7 +329,7 @@ desc = "It exudes authority... and looks about as comfortable as a brick." icon_state = "bridge_preview" base_icon = "bridge" - anchored = 1 + anchored = TRUE /obj/structure/bed/stool/chair/office/bridge/legion name = "legion pilot seat" @@ -337,6 +354,7 @@ base_icon = "hover_chair" makes_rolling_sound = FALSE can_dismantle = FALSE + can_pad = TRUE held_item = null /obj/structure/bed/stool/chair/office/hover/New(var/newloc) @@ -361,11 +379,7 @@ material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC build_amt = 3 held_item = /obj/item/material/stool/chair/wood - -/obj/structure/bed/stool/chair/wood/attackby(obj/item/W as obj, mob/user as mob) - if(istype(W,/obj/item/stack) || W.iswirecutter()) - return - ..() + can_pad = FALSE /obj/structure/bed/stool/chair/wood/New(var/newloc) ..(newloc, MATERIAL_WOOD) @@ -438,7 +452,7 @@ desc = "Bar brawl essential. Now all that's missing is a ragtime piano." desc_info = "Click it while in hand to right it." icon = 'icons/obj/furniture.dmi' - icon_state = "chair_toppled" + icon_state = "chair_item" item_state = "chair" base_icon = "chair" item_icons = list( @@ -451,19 +465,19 @@ // Because wood chairs are snowflake sprites. /obj/item/material/stool/chair/wood - icon_state = "wooden_chair_toppled" + icon_state = "wooden_chair_item" item_state = "woodenchair" base_icon = "wooden_chair" origin_type = /obj/structure/bed/stool/chair/wood /obj/item/material/stool/chair/wood/wings - icon_state = "wooden_chair_wings_toppled" + icon_state = "wooden_chair_wings_item" item_state = "woodenchair" - base_icon= "wooden_chair_wings" + base_icon = "wooden_chair_wings" origin_type = /obj/structure/bed/stool/chair/wood/wings /obj/item/material/stool/chair/folding // Todo : "borrow" CM code for stacking and general tomfoolery. - icon_state = "folding_chair_toppled" + icon_state = "folding_chair_item" item_state = "folding_chair" base_icon = "folding_chair" origin_type = /obj/structure/bed/stool/chair/folding diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 01525e0bf27..b53e33f59da 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -8,6 +8,7 @@ buckle_lying = FALSE //force people to sit up in chairs when buckled build_amt = 2 held_item = /obj/item/material/stool // if null it can't be picked up. Automatically applies materials. + var/withdraw_verb = "grab" //Self explanatory. Replace if necessary. /obj/structure/bed/stool/Initialize() . = ..() @@ -16,9 +17,9 @@ /obj/structure/bed/stool/MouseDrop(over_object, src_location, over_location) . = ..() if(over_object == usr && Adjacent(usr)) - if(!held_item || use_check_and_message(usr) || buckled || !can_dismantle) + if(!held_item || use_check_and_message(usr) || buckled || !can_dismantle || (anchored && padding_material)) return - usr.visible_message(SPAN_NOTICE("[usr] grabs \the [src.name]."), SPAN_NOTICE("You grab \the [src.name].")) + usr.visible_message(SPAN_NOTICE("[usr] [withdraw_verb]s \the [src.name]."), SPAN_NOTICE("You [withdraw_verb] \the [src.name].")) var/obj/item/material/stool/S = new held_item(src.loc, material.name, padding_material ? padding_material.name : null) // Handles all the material code so you don't have to. TransferComponents(S) if(material_alteration & MATERIAL_ALTERATION_COLOR) // For snowflakes like wood chairs. @@ -68,6 +69,9 @@ /obj/structure/bed/stool/padded/lime/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME) +/obj/structure/bed/stool/wood/New(var/newloc) + ..(newloc, MATERIAL_WOOD) + /obj/structure/bed/stool/bar name = "bar stool" desc = "It has some unsavory stains on it..." @@ -88,9 +92,6 @@ /obj/structure/bed/stool/bar/padded/red/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_CARPET) -/obj/structure/bed/stool/bar/padded/red/New(var/newloc) - ..(newloc, MATERIAL_STEEL, MATERIAL_CARPET) - /obj/structure/bed/stool/bar/padded/teal/New(var/newloc) ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL) @@ -135,7 +136,7 @@ slot_l_hand_str = 'icons/mob/items/lefthand_chairs.dmi', slot_r_hand_str = 'icons/mob/items/righthand_chairs.dmi', ) - icon_state = "stool_toppled_preview" + icon_state = "stool_item_preview" item_state = "stool" var/base_icon = "stool" desc_info = "Use in-hand or alt-click to right this." @@ -150,6 +151,7 @@ applies_material_colour = FALSE var/material/padding_material var/obj/structure/bed/stool/origin_type = /obj/structure/bed/stool + var/deploy_verb = "right" /obj/item/material/stool/New(var/newloc, var/new_material, var/new_padding_material) ..(newloc, new_material) // new_material handled in material_weapons.dm @@ -210,7 +212,7 @@ to_chat(user, SPAN_DANGER("There is already something here.")) return - user.visible_message(SPAN_NOTICE("[user] rights \the [src.name]."), SPAN_NOTICE("You right \the [name].")) + user.visible_message(SPAN_NOTICE("[user] [deploy_verb]s \the [src.name]."), SPAN_NOTICE("You [deploy_verb] \the [name].")) // playsound(src, deploy_sound ? deploy_sound : drop_sound, DROP_SOUND_VOLUME) user.drop_from_inventory(src) var/obj/structure/bed/stool/S = new origin_type(get_turf(loc)) @@ -224,10 +226,10 @@ qdel(src) /obj/item/material/stool/update_icon() - icon_state = "[base_icon]_toppled" + icon_state = "[base_icon]_item" cut_overlays() if(padding_material) // Handles padding overlay and inhand overlays. - var/image/padding_overlay = image(icon, "[base_icon]_toppled_padding") + var/image/padding_overlay = image(icon, "[base_icon]_item_padding") padding_overlay.appearance_flags = RESET_COLOR build_from_parts = TRUE worn_overlay = "padding" @@ -261,13 +263,13 @@ return /obj/item/material/stool/bar - icon_state = "bar_stool_toppled_preview" + icon_state = "bar_stool_item_preview" item_state = "bar_stool" base_icon = "bar_stool" origin_type = /obj/structure/bed/stool/bar /obj/item/material/stool/hover - icon_state = "hover_stool_toppled" + icon_state = "hover_stool_item" item_state = "hover_stool" base_icon = "hover_stool" origin_type = /obj/structure/bed/stool/hover diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index a0bf773c4f5..08e026ef9ee 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -1,38 +1,34 @@ -/obj/structure/bed/stool/chair/wheelchair +/obj/structure/bed/stool/chair/office/wheelchair name = "wheelchair" - desc = "You sit in this. Either by will or force." - icon_state = "wheelchair" - anchored = 0 - buckle_movable = 1 - held_item = /obj/item/wheelchair + icon_state = "wheelchair_padded_preview" + base_icon = "wheelchair" + anchored = FALSE + buckle_movable = TRUE + material_alteration = MATERIAL_ALTERATION_DESC + held_item = /obj/item/material/stool/chair/wheelchair + withdraw_verb = "fold" + + can_dismantle = FALSE - var/driving = 0 - var/mob/living/pulling = null var/bloodiness slowdown = 0 -/obj/structure/bed/stool/chair/wheelchair/update_icon() - cut_overlays() - add_overlay(image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER)) +/obj/structure/bed/stool/chair/office/wheelchair/New(var/newloc) // Colorable wheelchairs? + ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH) -/obj/structure/bed/stool/chair/wheelchair/set_dir() +/obj/structure/bed/stool/chair/office/wheelchair/set_dir() . = ..() if(buckled) buckled.set_dir(dir) -/obj/structure/bed/stool/chair/wheelchair/attackby(obj/item/W as obj, mob/user as mob) - if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter()) - return - ..() - -/obj/structure/bed/stool/chair/wheelchair/relaymove(mob/user, direction) +/obj/structure/bed/stool/chair/office/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 - to_chat(user, "You lost your grip!") + to_chat(user, SPAN_WARNING("You've lost your grip!")) return if(buckled && pulling && user == buckled) if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained()) @@ -50,14 +46,14 @@ if(user==pulling) return if(pulling && (get_dir(src.loc, pulling.loc) == direction)) - to_chat(user, "You cannot go there.") + to_chat(user, SPAN_WARNING("You cannot go there.")) return if(pulling && buckled && (buckled == user)) - to_chat(user, "You cannot drive while being pushed.") + to_chat(user, SPAN_WARNING("You cannot drive while being pushed.")) return // Let's roll - driving = 1 + driving = TRUE var/turf/T = null //--1---Move occupant---1--// if(buckled) @@ -85,44 +81,20 @@ pulling.set_dir(get_dir(pulling, src)) // When everything is right, face the wheelchair if(bloodiness) create_track() - driving = 0 + driving = FALSE -/obj/structure/bed/stool/chair/wheelchair/Move() - . = ..() - playsound(src, 'sound/effects/roll.ogg', 75, 1) - if(buckled) - var/mob/living/occupant = buckled - if(!driving) - occupant.buckled_to = null - occupant.Move(src.loc) - 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() - if (pulling && (get_dist(src, pulling) > 1)) - pulling.pulledby = null - to_chat(pulling, "You lost your grip!") - pulling = null - else - if (occupant && (src.loc != occupant.loc)) - src.forceMove(occupant.loc) // Failsafe to make sure the wheelchair stays beneath the occupant after driving - -/obj/structure/bed/stool/chair/wheelchair/attack_hand(mob/living/user as mob) - if (pulling) - MouseDrop(usr) +/obj/structure/bed/stool/chair/office/wheelchair/attack_hand(mob/living/user as mob) + if(pulling) + MouseDrop() else user_unbuckle(user) return -/obj/structure/bed/stool/chair/wheelchair/CtrlClick(var/mob/user) +/obj/structure/bed/stool/chair/office/wheelchair/CtrlClick(var/mob/user) if(in_range(src, user)) if(!ishuman(user)) return if(user == buckled) - to_chat(user, "You realize you are unable to push the wheelchair you sit in.") + to_chat(user, SPAN_WARNING("You realize you are unable to push the wheelchair you sit in.")) return if(!pulling) pulling = user @@ -132,48 +104,12 @@ user.set_dir(get_dir(user, src)) to_chat(user, "You grip \the [name]'s handles.") else - to_chat(usr, "You let go of \the [name]'s handles.") + to_chat(user, "You let go of \the [name]'s handles.") pulling.pulledby = null pulling = null return -/obj/structure/bed/stool/chair/wheelchair/Collide(atom/A) - . = ..() - if(!buckled) - return - - if(propelled || (pulling && (pulling.a_intent == I_HURT))) - var/mob/living/occupant = unbuckle() - - if (pulling && (pulling.a_intent == I_HURT)) - occupant.throw_at(A, 3, 3, pulling) - else if (propelled) - occupant.throw_at(A, 3, propelled) - - var/def_zone = ran_zone() - occupant.throw_at(A, 3, propelled) - 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(isliving(A)) - var/mob/living/victim = A - def_zone = ran_zone() - 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("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!") - - pulling.attack_log += "\[[time_stamp()]\] Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]" - occupant.attack_log += "\[[time_stamp()]\] Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]" - msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (JMP)",ckey=key_name(pulling),ckey_target=key_name(occupant)) - else - occupant.visible_message("[occupant] crashed into \the [A]!") - -/obj/structure/bed/stool/chair/wheelchair/proc/create_track() +/obj/structure/bed/stool/chair/office/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) @@ -187,40 +123,22 @@ B.set_dir(newdir) bloodiness-- -/obj/structure/bed/stool/chair/wheelchair/buckle(mob/M as mob, mob/user as mob) +/obj/structure/bed/stool/chair/office/wheelchair/buckle(mob/M as mob, mob/user as mob) if(M == pulling) pulling = null usr.pulledby = null ..() -/obj/item/wheelchair +/obj/item/material/stool/chair/wheelchair name = "wheelchair" desc = "A folded wheelchair that can be carried around." - icon = 'icons/obj/furniture.dmi' - icon_state = "wheelchair_folded" + icon_state = "wheelchair_item_preview" item_state = "wheelchair" + base_icon = "wheelchair" w_class = ITEMSIZE_HUGE // Can't be put in backpacks. Oh well. - -/obj/item/wheelchair/attack_self(mob/user) - var/obj/structure/bed/stool/chair/wheelchair/R = new /obj/structure/bed/stool/chair/wheelchair(user.loc) - R.add_fingerprint(user) - R.name = src.name - R.desc = src.desc - R.color = src.color - qdel(src) + origin_type = /obj/structure/bed/stool/chair/office/wheelchair + deploy_verb = "deploy" + +/obj/item/material/stool/chair/wheelchair/New(var/newloc) + ..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH) -/obj/structure/bed/stool/chair/wheelchair/MouseDrop(over_object, src_location, over_location) - ..() - if(!ishuman(usr)) - return FALSE - if(buckled) - return FALSE - if(!usr.Adjacent(src)) - return FALSE - visible_message(SPAN_NOTICE("[usr] collapses [src].")) - var/obj/item/wheelchair/R = new(get_turf(src)) - R.name = src.name - R.desc = src.desc - R.color = src.color - usr.put_in_hands(R) - qdel(src) diff --git a/code/modules/cargo/bounties/assistant.dm b/code/modules/cargo/bounties/assistant.dm index 82bbe2c3589..12b8b1126b7 100644 --- a/code/modules/cargo/bounties/assistant.dm +++ b/code/modules/cargo/bounties/assistant.dm @@ -80,7 +80,7 @@ reward_low = 2300 reward_high = 4000 required_count = 2 - wanted_types = list(/obj/structure/bed/stool/chair/wheelchair, /obj/item/wheelchair) + wanted_types = list(/obj/structure/bed/stool/chair/office/wheelchair, /obj/item/material/stool/chair/wheelchair) /datum/bounty/item/assistant/film name = "Camera Film" diff --git a/code/modules/cargo/random_stock/t1_common.dm b/code/modules/cargo/random_stock/t1_common.dm index 58651144711..dcd7d6b0382 100644 --- a/code/modules/cargo/random_stock/t1_common.dm +++ b/code/modules/cargo/random_stock/t1_common.dm @@ -185,7 +185,7 @@ STOCK_ITEM_COMMON(wheelchair, 1) T = U break - new /obj/structure/bed/stool/chair/wheelchair(T) + new /obj/structure/bed/stool/chair/office/wheelchair(T) STOCK_ITEM_COMMON(trap, 2) new /obj/item/trap(L) diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm index 1a04a11b84e..2647d8f36f7 100644 --- a/code/modules/client/preference_setup/loadout/loadout_utility.dm +++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm @@ -98,7 +98,7 @@ /datum/gear/utility/wheelchair/color display_name = "wheelchair" - path = /obj/item/wheelchair + path = /obj/item/material/stool/chair/wheelchair cost = 4 /datum/gear/utility/wheelchair/color/New() diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 9a3ea71ca50..b77648cacad 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -966,9 +966,9 @@ if(wearer.pulledby || wearer.buckled_to) // Wheelchair driving! if(istype(wearer.loc, /turf/space)) return // No wheelchair driving in space - if(istype(wearer.pulledby, /obj/structure/bed/stool/chair/wheelchair)) + if(istype(wearer.pulledby, /obj/structure/bed/stool/chair/office/wheelchair)) return wearer.pulledby.relaymove(wearer, direction) - else if(istype(wearer.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + else if(istype(wearer.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) if(ishuman(wearer.buckled_to)) var/obj/item/organ/external/l_hand = wearer.get_organ(BP_L_HAND) var/obj/item/organ/external/r_hand = wearer.get_organ(BP_R_HAND) diff --git a/code/modules/mob/abstract/new_player/new_player.dm b/code/modules/mob/abstract/new_player/new_player.dm index 930a929b967..2ae5d082681 100644 --- a/code/modules/mob/abstract/new_player/new_player.dm +++ b/code/modules/mob/abstract/new_player/new_player.dm @@ -274,7 +274,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player) character.lastarea = get_area(loc) // Moving wheelchair if they have one - if(character.buckled_to && istype(character.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + if(character.buckled_to && istype(character.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) character.buckled_to.forceMove(character.loc) character.buckled_to.set_dir(character.dir) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 7484d7e4d8e..da7d93e49fc 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -733,7 +733,7 @@ /datum/species/proc/handle_movement_tally(var/mob/living/carbon/human/H) var/tally = 0 - if(istype(H.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + if(istype(H.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) for(var/organ_name in list(BP_L_HAND,BP_R_HAND,BP_L_ARM,BP_R_ARM)) var/obj/item/organ/external/E = H.get_organ(organ_name) if(!E || E.is_stump()) diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 102f3d9d866..72300508888 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -908,7 +908,7 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL, /datum/species/golem/technomancer/handle_movement_tally(var/mob/living/carbon/human/H) var/tally = 0 - if(istype(H.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + if(istype(H.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) for(var/organ_name in list(BP_L_HAND,BP_R_HAND,BP_L_ARM,BP_R_ARM)) var/obj/item/organ/external/E = H.get_organ(organ_name) if(!E || E.is_stump()) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index e44efa05388..e61167d7372 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1166,7 +1166,7 @@ proc/is_blind(A) return species.handle_stance_damage(src, TRUE) >= 4 /mob/living/carbon/human/proc/equip_wheelchair() - var/obj/structure/bed/stool/chair/wheelchair/W = new(get_turf(src)) + var/obj/structure/bed/stool/chair/office/wheelchair/W = new(get_turf(src)) if(isturf(loc)) buckled_to = W update_canmove() diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 1b778fa5ea9..8f5c5e3b53d 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -280,7 +280,7 @@ //TODO: Fuck wheelchairs. //Toss away all this snowflake code here, and rewrite wheelchairs as a vehicle. - else if(istype(mob.buckled_to, /obj/structure/bed/stool/chair/wheelchair)) + else if(istype(mob.buckled_to, /obj/structure/bed/stool/chair/office/wheelchair)) var/min_move_delay = 0 if(ishuman(mob.buckled_to)) var/mob/living/carbon/human/driver = mob.buckled_to @@ -325,7 +325,7 @@ //Wheelchair pushing goes here for now. //TODO: Fuck wheelchairs. - if(istype(mob.pulledby, /obj/structure/bed/stool/chair/wheelchair) || istype(mob.pulledby, /obj/structure/janitorialcart)) + if(istype(mob.pulledby, /obj/structure/bed/stool/chair/office/wheelchair) || istype(mob.pulledby, /obj/structure/janitorialcart)) move_delay += 1 return mob.pulledby.relaymove(mob, direct) diff --git a/html/changelogs/wezzy_wheelchair_work.yml b/html/changelogs/wezzy_wheelchair_work.yml new file mode 100644 index 00000000000..cf03543d112 --- /dev/null +++ b/html/changelogs/wezzy_wheelchair_work.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Adds a short delay for dismantling chairs to prevent accidental deconstruction." + - bugfix: "Fixes some density problems with wheelchairs and office chairs." diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 60eb402a7e0..dfb40353c21 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/lefthand_chairs.dmi b/icons/mob/items/lefthand_chairs.dmi index 62383026794..007612ac2ef 100644 Binary files a/icons/mob/items/lefthand_chairs.dmi and b/icons/mob/items/lefthand_chairs.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 59176024ae1..7bc4f325d71 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/mob/items/righthand_chairs.dmi b/icons/mob/items/righthand_chairs.dmi index f2a8d93932b..62436ce57d0 100644 Binary files a/icons/mob/items/righthand_chairs.dmi and b/icons/mob/items/righthand_chairs.dmi differ diff --git a/icons/obj/furniture.dmi b/icons/obj/furniture.dmi index 37aa439ea1e..526a5fb4ffb 100644 Binary files a/icons/obj/furniture.dmi and b/icons/obj/furniture.dmi differ diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm index dec6bb33a01..94915a11904 100644 --- a/maps/aurora/aurora-3_sublevel.dmm +++ b/maps/aurora/aurora-3_sublevel.dmm @@ -19403,7 +19403,7 @@ /turf/simulated/floor/plating, /area/medical/morgue) "aNm" = ( -/obj/structure/bed/stool/chair/wheelchair{ +/obj/structure/bed/stool/chair/office/wheelchair{ dir = 4 }, /obj/effect/floor_decal/industrial/outline/yellow, @@ -19746,7 +19746,7 @@ /turf/simulated/floor/tiled/white, /area/medical/morgue) "aOd" = ( -/obj/structure/bed/stool/chair/wheelchair{ +/obj/structure/bed/stool/chair/office/wheelchair{ dir = 4 }, /obj/item/device/radio/intercom{ diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm index 91531bb2a12..c7aafd7905c 100644 --- a/maps/aurora/aurora-4_mainlevel.dmm +++ b/maps/aurora/aurora-4_mainlevel.dmm @@ -41309,7 +41309,7 @@ /area/maintenance/medbay) "buG" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/bed/stool/chair/wheelchair{ +/obj/structure/bed/stool/chair/office/wheelchair{ dir = 4 }, /obj/machinery/light/small/emergency{ @@ -60044,7 +60044,7 @@ /obj/structure/window/reinforced{ dir = 8 }, -/obj/structure/bed/stool/chair/wheelchair, +/obj/structure/bed/stool/chair/office/wheelchair, /obj/item/extinguisher, /turf/simulated/floor/plating, /area/maintenance/medbay) @@ -62168,7 +62168,7 @@ /obj/structure/window/reinforced{ dir = 4 }, -/obj/structure/bed/stool/chair/wheelchair, +/obj/structure/bed/stool/chair/office/wheelchair, /obj/item/extinguisher, /turf/simulated/floor/plating, /area/maintenance/medbay) diff --git a/maps/aurora/aurora-5_interstitial.dmm b/maps/aurora/aurora-5_interstitial.dmm index 94bcb9b3222..c4f6e73eb00 100644 --- a/maps/aurora/aurora-5_interstitial.dmm +++ b/maps/aurora/aurora-5_interstitial.dmm @@ -4388,7 +4388,7 @@ /turf/simulated/floor/tiled, /area/medical/psych) "lf" = ( -/obj/structure/bed/stool/chair/wheelchair, +/obj/structure/bed/stool/chair/office/wheelchair, /turf/simulated/floor/tiled, /area/medical/psych) "lg" = ( @@ -10696,7 +10696,7 @@ /area/maintenance/interstitial_construction_site) "SF" = ( /obj/effect/floor_decal/industrial/outline/yellow, -/obj/structure/bed/stool/chair/wheelchair{ +/obj/structure/bed/stool/chair/office/wheelchair{ dir = 4 }, /turf/simulated/floor/tiled, @@ -11288,7 +11288,7 @@ /turf/simulated/floor/tiled, /area/maintenance/interstitial_main) "Wm" = ( -/obj/structure/bed/stool/chair/wheelchair{ +/obj/structure/bed/stool/chair/office/wheelchair{ dir = 4 }, /obj/effect/floor_decal/industrial/outline/yellow, diff --git a/maps/aurora/aurora-6_surface.dmm b/maps/aurora/aurora-6_surface.dmm index ba7c200ff78..df6490392a8 100644 --- a/maps/aurora/aurora-6_surface.dmm +++ b/maps/aurora/aurora-6_surface.dmm @@ -12186,6 +12186,7 @@ /turf/simulated/floor/plating, /area/maintenance/arrivals) "kFc" = ( +/obj/structure/bed/stool/padded/red, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, diff --git a/maps/event/odin_departure/odin_depature-1.dmm b/maps/event/odin_departure/odin_depature-1.dmm index 41659d95855..ac7cb389afe 100644 --- a/maps/event/odin_departure/odin_depature-1.dmm +++ b/maps/event/odin_departure/odin_depature-1.dmm @@ -5640,7 +5640,7 @@ /area/shuttle/skipjack) "aKt" = ( /obj/machinery/atmospherics/pipe/simple/hidden, -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/simulated/floor/plating, /area/shuttle/skipjack) "aKx" = ( @@ -8059,7 +8059,7 @@ }, /area/centcom/holding) "bmV" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/plating, /area/shuttle/skipjack) @@ -8775,7 +8775,7 @@ }, /area/centcom/holding) "bKL" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/simulated/floor/tiled/dark, /area/shuttle/skipjack) "bLj" = ( @@ -10139,7 +10139,7 @@ /turf/unsimulated/floor/plating, /area/shuttle/escape) "cJm" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/effect/ghostspawpoint{ identifier = "ERTSpawn"; name = "igs - ERT" @@ -11297,7 +11297,7 @@ /turf/simulated/floor/tiled/dark, /area/shuttle/administration) "dpM" = ( -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /turf/unsimulated/floor{ icon_state = "wood" }, @@ -11387,7 +11387,7 @@ /turf/unsimulated/floor/plating, /area/shuttle/burglar) "dus" = ( -/obj/item/stool/hover, +/obj/structure/bed/stool/hover, /turf/simulated/floor/ice, /area/centcom/shared_dream) "dvj" = ( @@ -14856,7 +14856,7 @@ /turf/simulated/floor/wood, /area/merchant_station) "fDN" = ( -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /obj/effect/landmark{ name = "lonerspawn" }, @@ -15249,7 +15249,7 @@ /obj/effect/floor_decal/spline/fancy/wood{ dir = 1 }, -/obj/item/stool/padded{ +/obj/structure/bed/stool/padded/red{ pixel_y = 10 }, /turf/unsimulated/floor{ @@ -15646,7 +15646,7 @@ /turf/simulated/floor/tiled, /area/merchant_station) "fYr" = ( -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /obj/effect/landmark{ name = "raiderstart" }, @@ -16512,7 +16512,7 @@ }, /area/centcom/control) "gwf" = ( -/obj/item/stool/padded{ +/obj/structure/bed/stool/padded/red{ pixel_y = 10 }, /obj/effect/floor_decal/spline/fancy/wood{ @@ -18876,7 +18876,7 @@ /obj/effect/floor_decal/spline/fancy/wood{ dir = 1 }, -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /turf/unsimulated/floor{ icon_state = "wood" }, @@ -20185,7 +20185,7 @@ }, /area/centcom/checkpoint/fore) "iJc" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/simulated/floor/wood, /area/merchant_station/warehouse) "iJr" = ( @@ -21865,7 +21865,7 @@ /obj/effect/floor_decal/spline/fancy/wood{ dir = 8 }, -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /turf/unsimulated/floor{ icon_state = "wood" }, @@ -28673,7 +28673,7 @@ /turf/unsimulated/floor, /area/antag/mercenary) "nWh" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/unsimulated/floor{ icon_state = "wood" }, @@ -29300,7 +29300,7 @@ /turf/unsimulated/floor, /area/centcom/spawning) "otw" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/effect/ghostspawpoint{ identifier = "NTERTSpawn"; name = "igs - NTERT" @@ -29452,7 +29452,7 @@ /turf/unsimulated/floor, /area/centcom/ferry) "oAu" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/effect/ghostspawpoint{ identifier = "NTERTSpawn"; name = "igs - NTERT" @@ -29655,7 +29655,7 @@ }, /area/centcom/distress_prep) "oII" = ( -/obj/item/stool/padded{ +/obj/structure/bed/stool/padded/red{ pixel_y = 10 }, /obj/effect/ghostspawpoint{ @@ -30885,7 +30885,7 @@ /turf/template_noop, /area/template_noop) "pCe" = ( -/obj/item/stool/bar/padded, +/obj/structure/bed/stool/bar/padded/red, /obj/effect/floor_decal/spline/fancy/wood{ dir = 8 }, @@ -34813,7 +34813,7 @@ }, /area/antag/mercenary) "snR" = ( -/obj/item/stool/wood, +/obj/structure/bed/stool/wood, /turf/simulated/floor/beach/sand{ icon_state = "desert" }, @@ -36698,7 +36698,7 @@ /obj/effect/floor_decal/corner/green{ dir = 10 }, -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/unsimulated/floor, /area/centcom/bar) "tFz" = ( @@ -40539,7 +40539,7 @@ /turf/simulated/floor/shuttle/black, /area/shuttle/escape) "wgo" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /turf/unsimulated/floor, /area/centcom/legion) "wgM" = ( @@ -40617,7 +40617,7 @@ /turf/unsimulated/floor, /area/antag/mercenary) "wha" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/machinery/light{ dir = 4; icon_state = "tube1" @@ -42487,7 +42487,7 @@ }, /area/centcom/legion/hangar5) "xhC" = ( -/obj/item/stool/padded{ +/obj/structure/bed/stool/padded/red{ pixel_y = 10 }, /obj/machinery/light{ @@ -43354,7 +43354,7 @@ /turf/simulated/floor/shuttle/black, /area/shuttle/escape) "xFV" = ( -/obj/item/stool/padded, +/obj/structure/bed/stool/padded/red, /obj/machinery/light{ icon_state = "tube1" }, diff --git a/maps/exodus/exodus-1_station.dmm b/maps/exodus/exodus-1_station.dmm index bd52d6d6ff6..b48c93ed55b 100644 --- a/maps/exodus/exodus-1_station.dmm +++ b/maps/exodus/exodus-1_station.dmm @@ -33900,7 +33900,7 @@ name = "north bump"; pixel_y = 24 }, -/obj/structure/bed/stool/chair/wheelchair, +/obj/structure/bed/stool/chair/office/wheelchair, /obj/structure/cable/green{ d2 = 2; icon_state = "0-2"