diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index 5bf406e052..e8ce56ecfd 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -510,22 +510,23 @@ var/global/datum/controller/occupations/job_master
to_chat(H, "Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.")
if(istype(H)) //give humans wheelchairs, if they need them.
- if(istype(H.loc, /obj/belly)) //unless in a gut
+ if(istype(H.loc, /obj/belly)) //CHOMPedit start unless in a gut
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
var/obj/item/weapon/storage/S = locate() in H.contents
- var/obj/item/wheelchair/R = null
+ var/obj/item/wheelchair/R
if(S)
R = locate() in S.contents
if(!l_foot || !r_foot || R)
- var/obj/structure/bed/chair/wheelchair/W = new /obj/structure/bed/chair/wheelchair(H.loc)
+ var/wheelchair_type = R?.unfolded_type || /obj/structure/bed/chair/wheelchair
+ var/obj/structure/bed/chair/wheelchair/W = new wheelchair_type(H.loc)
W.buckle_mob(H)
H.update_canmove()
W.set_dir(H.dir)
W.add_fingerprint(H)
if(R)
W.color = R.color
- qdel(R)
+ qdel(R) //CHOMPedit end
to_chat(H, "You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].")
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 089e65fc04..7459fcab6c 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
@@ -1,26 +1,59 @@
/obj/structure/bed/chair/wheelchair
name = "wheelchair"
desc = "You sit in this. Either by will or force."
+ icon = 'icons/obj/wheelchair.dmi'
icon_state = "wheelchair"
anchored = 0
buckle_movable = 1
+ var/folded_type = /obj/item/wheelchair
var/driving = 0
var/mob/living/pulling = null
var/bloodiness
+ var/min_mob_buckle_size = MOB_SMALL
+ var/max_mob_buckle_size = MOB_LARGE
+
+/obj/structure/bed/chair/wheelchair/Initialize()
+ . = ..()
+ update_icon()
+
+/obj/structure/bed/chair/wheelchair/motor
+ name = "electric wheelchair"
+ desc = "A motorized wheelchair controlled with a joystick on one armrest"
+ icon_state = "motorchair"
+ folded_type = /obj/item/wheelchair/motor
+
+/obj/structure/bed/chair/wheelchair/smallmotor
+ name = "small electric wheelchair"
+ desc = "A small motorized wheelchair, it looks around the right size for a Teshari"
+ icon_state = "teshchair"
+ min_mob_buckle_size = MOB_SMALL
+ max_mob_buckle_size = MOB_MEDIUM
+ folded_type = /obj/item/wheelchair/motor/small
+
+/obj/structure/bed/chair/wheelchair/can_buckle_check(mob/living/M, forced = FALSE)
+ . = ..()
+ if(.)
+ if(M.mob_size < min_mob_buckle_size)
+ to_chat(M, SPAN_WARNING("You are too small to use \the [src]."))
+ . = FALSE
+ else if(M.mob_size >= max_mob_buckle_size)
+ to_chat(M, SPAN_WARNING("You are too large to use \the [src]."))
+ . = FALSE
/obj/structure/bed/chair/wheelchair/update_icon()
- return
+ cut_overlays()
+ var/image/O = image(icon = icon, icon_state = "[icon_state]_overlay", layer = ABOVE_MOB_LAYER)
+ O.plane = MOB_PLANE
+ add_overlay(O)
/obj/structure/bed/chair/wheelchair/set_dir()
- ..()
- cut_overlays()
- var/image/O = image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
- add_overlay(O)
- if(has_buckled_mobs())
- for(var/A in buckled_mobs)
- var/mob/living/L = A
- L.set_dir(dir)
+ . = ..()
+ if(.)
+ if(has_buckled_mobs())
+ for(var/A in buckled_mobs)
+ var/mob/living/L = A
+ L.set_dir(dir)
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench() || W.is_wirecutter() || istype(W,/obj/item/stack))
@@ -93,8 +126,6 @@
/obj/structure/bed/chair/wheelchair/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
-
- cut_overlays()
playsound(src, 'sound/effects/roll.ogg', 75, 1)
if(has_buckled_mobs())
for(var/A in buckled_mobs)
@@ -203,28 +234,13 @@
usr.pulledby = null
..()
-/obj/item/wheelchair
- name = "wheelchair"
- desc = "A folded wheelchair that can be carried around."
- icon = 'icons/obj/furniture.dmi'
- icon_state = "wheelchair_folded"
- item_state = "wheelchair"
- w_class = ITEMSIZE_HUGE // Can't be put in backpacks. Oh well.
-
-/obj/item/wheelchair/attack_self(mob/user)
- var/obj/structure/bed/chair/wheelchair/R = new /obj/structure/bed/chair/wheelchair(user.loc)
- R.add_fingerprint(user)
- R.name = src.name
- R.color = src.color
- qdel(src)
-
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
..()
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
if(has_buckled_mobs()) return 0
visible_message("[usr] collapses \the [src.name].")
- var/obj/item/wheelchair/R = new/obj/item/wheelchair(get_turf(src))
+ var/obj/item/wheelchair/R = new folded_type(get_turf(src))
R.name = src.name
R.color = src.color
spawn(0)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair_item.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair_item.dm
new file mode 100644
index 0000000000..d18a9a88f1
--- /dev/null
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair_item.dm
@@ -0,0 +1,29 @@
+/obj/item/wheelchair
+ name = "wheelchair"
+ desc = "A folded wheelchair that can be carried around."
+ icon = 'icons/obj/wheelchair.dmi'
+ icon_state = "wheelchair_folded"
+ item_state = "wheelchair"
+ w_class = ITEMSIZE_HUGE // Can't be put in backpacks. Oh well.
+ var/unfolded_type = /obj/structure/bed/chair/wheelchair
+
+/obj/item/wheelchair/attack_self(mob/user)
+ var/obj/structure/bed/chair/wheelchair/R = new unfolded_type(user.loc)
+ R.add_fingerprint(user)
+ R.name = src.name
+ R.color = src.color
+ qdel(src)
+
+/obj/item/wheelchair/motor
+ name = "electric wheelchair"
+ desc = "A motorized wheelchair controlled with a joystick on one armrest"
+ icon_state = "motorchair_folded"
+ item_state = "motorchair"
+ unfolded_type = /obj/structure/bed/chair/wheelchair/motor
+
+/obj/item/wheelchair/motor/small
+ name = "small electric wheelchair"
+ desc = "A small motorized wheelchair, it looks around the right size for a Teshari."
+ icon_state = "teshchair_folded"
+ item_state = "teshchair"
+ unfolded_type = /obj/structure/bed/chair/wheelchair/smallmotor
diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm
index 8140f1388c..4798a4b994 100644
--- a/code/modules/client/preference_setup/loadout/loadout_utility.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm
@@ -119,15 +119,6 @@
display_name = "Fountain Pen"
path = /obj/item/weapon/pen/fountain
-/datum/gear/utility/wheelchair/color
- display_name = "wheelchair"
- path = /obj/item/wheelchair
- cost = 4
-
-/datum/gear/utility/wheelchair/color/New()
- ..()
- gear_tweaks += gear_tweak_free_color_choice
-
/datum/gear/utility/umbrella
display_name = "Umbrella"
path = /obj/item/weapon/melee/umbrella
@@ -137,6 +128,20 @@
..()
gear_tweaks += gear_tweak_free_color_choice
+/datum/gear/utility/wheelchair
+ display_name = "wheelchair selection"
+ path = /obj/item/wheelchair
+ cost = 4
+
+/datum/gear/utility/wheelchair/New()
+ ..()
+ gear_tweaks += gear_tweak_free_color_choice
+ var/list/wheelchairs = list(
+ "wheelchair" = /obj/item/wheelchair,
+ "motorized wheelchair" = /obj/item/wheelchair/motor
+ )
+ gear_tweaks += new/datum/gear_tweak/path(wheelchairs)
+
/****************
modular computers
****************/
diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm
index f2996bed5b..11792b86e4 100644
--- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm
@@ -670,3 +670,10 @@
path = /obj/item/clothing/glasses/aerogelgoggles
whitelisted = SPECIES_TESHARI
sort_category = "Xenowear"
+
+/datum/gear/utility/teshchair
+ display_name = "small electric wheelchair (Teshari)"
+ path = /obj/item/wheelchair/motor/small
+ whitelisted = SPECIES_TESHARI
+ sort_category = "Xenowear"
+ cost = 4
diff --git a/icons/obj/furniture.dmi b/icons/obj/furniture.dmi
index 2ec3eb1b6d..098fc4461c 100644
Binary files a/icons/obj/furniture.dmi and b/icons/obj/furniture.dmi differ
diff --git a/icons/obj/wheelchair.dmi b/icons/obj/wheelchair.dmi
new file mode 100644
index 0000000000..e58bf4e09b
Binary files /dev/null and b/icons/obj/wheelchair.dmi differ
diff --git a/vorestation.dme b/vorestation.dme
index 98f406d18b..1f8a13effb 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -1612,6 +1612,7 @@
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\stools_vr.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair.dm"
+#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair_item.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\simulated_ch.dm"
#include "code\game\turfs\simulated_vr.dm"