mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Adds some new wheelchair types
This commit is contained in:
@@ -510,6 +510,7 @@ var/global/datum/controller/occupations/job_master
|
|||||||
to_chat(H, "<span class='danger'>Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.</span>")
|
to_chat(H, "<span class='danger'>Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug.</span>")
|
||||||
|
|
||||||
if(istype(H)) //give humans wheelchairs, if they need them.
|
if(istype(H)) //give humans wheelchairs, if they need them.
|
||||||
|
<<<<<<< HEAD
|
||||||
if(istype(H.loc, /obj/belly)) //unless in a gut
|
if(istype(H.loc, /obj/belly)) //unless in a gut
|
||||||
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
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/organ/external/r_foot = H.get_organ("r_foot")
|
||||||
@@ -526,6 +527,40 @@ var/global/datum/controller/occupations/job_master
|
|||||||
if(R)
|
if(R)
|
||||||
W.color = R.color
|
W.color = R.color
|
||||||
qdel(R)
|
qdel(R)
|
||||||
|
||||||| parent of bc30b1d143... Merge pull request #9882 from VOREStation/upstream-merge-7849
|
||||||
|
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
|
||||||
|
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)
|
||||||
|
W.buckle_mob(H)
|
||||||
|
H.update_canmove()
|
||||||
|
W.set_dir(H.dir)
|
||||||
|
W.add_fingerprint(H)
|
||||||
|
if(R)
|
||||||
|
W.color = R.color
|
||||||
|
qdel(R)
|
||||||
|
=======
|
||||||
|
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
|
||||||
|
if(S)
|
||||||
|
R = locate() in S.contents
|
||||||
|
if(!l_foot || !r_foot || R)
|
||||||
|
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)
|
||||||
|
>>>>>>> bc30b1d143... Merge pull request #9882 from VOREStation/upstream-merge-7849
|
||||||
|
|
||||||
to_chat(H, "<B>You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].</B>")
|
to_chat(H, "<B>You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].</B>")
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,59 @@
|
|||||||
/obj/structure/bed/chair/wheelchair
|
/obj/structure/bed/chair/wheelchair
|
||||||
name = "wheelchair"
|
name = "wheelchair"
|
||||||
desc = "You sit in this. Either by will or force."
|
desc = "You sit in this. Either by will or force."
|
||||||
|
icon = 'icons/obj/wheelchair.dmi'
|
||||||
icon_state = "wheelchair"
|
icon_state = "wheelchair"
|
||||||
anchored = 0
|
anchored = 0
|
||||||
buckle_movable = 1
|
buckle_movable = 1
|
||||||
|
|
||||||
|
var/folded_type = /obj/item/wheelchair
|
||||||
var/driving = 0
|
var/driving = 0
|
||||||
var/mob/living/pulling = null
|
var/mob/living/pulling = null
|
||||||
var/bloodiness
|
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()
|
/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()
|
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||||
..()
|
. = ..()
|
||||||
cut_overlays()
|
if(.)
|
||||||
var/image/O = image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
if(has_buckled_mobs())
|
||||||
add_overlay(O)
|
for(var/A in buckled_mobs)
|
||||||
if(has_buckled_mobs())
|
var/mob/living/L = A
|
||||||
for(var/A in buckled_mobs)
|
L.set_dir(dir)
|
||||||
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)
|
/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))
|
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)
|
/obj/structure/bed/chair/wheelchair/Moved(atom/old_loc, direction, forced = FALSE)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
cut_overlays()
|
|
||||||
playsound(src, 'sound/effects/roll.ogg', 75, 1)
|
playsound(src, 'sound/effects/roll.ogg', 75, 1)
|
||||||
if(has_buckled_mobs())
|
if(has_buckled_mobs())
|
||||||
for(var/A in buckled_mobs)
|
for(var/A in buckled_mobs)
|
||||||
@@ -203,28 +234,13 @@
|
|||||||
usr.pulledby = null
|
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)
|
/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((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||||
if(!ishuman(usr)) return
|
if(!ishuman(usr)) return
|
||||||
if(has_buckled_mobs()) return 0
|
if(has_buckled_mobs()) return 0
|
||||||
visible_message("[usr] collapses \the [src.name].")
|
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.name = src.name
|
||||||
R.color = src.color
|
R.color = src.color
|
||||||
spawn(0)
|
spawn(0)
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -119,15 +119,6 @@
|
|||||||
display_name = "Fountain Pen"
|
display_name = "Fountain Pen"
|
||||||
path = /obj/item/weapon/pen/fountain
|
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
|
/datum/gear/utility/umbrella
|
||||||
display_name = "Umbrella"
|
display_name = "Umbrella"
|
||||||
path = /obj/item/weapon/melee/umbrella
|
path = /obj/item/weapon/melee/umbrella
|
||||||
@@ -137,6 +128,20 @@
|
|||||||
..()
|
..()
|
||||||
gear_tweaks += gear_tweak_free_color_choice
|
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
|
modular computers
|
||||||
****************/
|
****************/
|
||||||
|
|||||||
@@ -670,3 +670,10 @@
|
|||||||
path = /obj/item/clothing/glasses/aerogelgoggles
|
path = /obj/item/clothing/glasses/aerogelgoggles
|
||||||
whitelisted = SPECIES_TESHARI
|
whitelisted = SPECIES_TESHARI
|
||||||
sort_category = "Xenowear"
|
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
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 19 KiB |
BIN
icons/obj/wheelchair.dmi
Normal file
BIN
icons/obj/wheelchair.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -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.dm"
|
||||||
#include "code\game\objects\structures\stool_bed_chair_nest\stools_vr.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.dm"
|
||||||
|
#include "code\game\objects\structures\stool_bed_chair_nest\wheelchair_item.dm"
|
||||||
#include "code\game\turfs\simulated.dm"
|
#include "code\game\turfs\simulated.dm"
|
||||||
#include "code\game\turfs\simulated_ch.dm"
|
#include "code\game\turfs\simulated_ch.dm"
|
||||||
#include "code\game\turfs\simulated_vr.dm"
|
#include "code\game\turfs\simulated_vr.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user