Merge branch 'master' into final_shuttle_touches_and_stuff

# Conflicts:
#	code/game/objects/structures/window.dm
#	code/modules/client/preference_setup/loadout/loadout_uniform.dm
This commit is contained in:
alberyk
2021-12-21 16:51:40 -03:00
375 changed files with 118163 additions and 3628 deletions
+18 -10
View File
@@ -94,26 +94,34 @@
if(MA == user)
MA.visible_message(\
"<b>[MA.name]</b> buckles themselves to [src].",\
"<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
SPAN_NOTICE("You buckle yourself to [src]."),\
SPAN_NOTICE("You hear metal clanking."))
else if(isliving(MA))
MA.visible_message(\
SPAN_DANGER("[MA.name] is buckled to [src] by [user.name]!"),\
SPAN_DANGER("You are buckled to [src] by [user.name]!"),\
SPAN_NOTICE("You hear metal clanking."))
else
MA.visible_message(\
"<span class='danger'>[MA.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
SPAN_DANGER("\The [MA] is buckled to [src] by [user.name]!"),\
SPAN_NOTICE("You hear metal clanking."))
/obj/proc/user_unbuckle(mob/user)
var/atom/movable/MA = unbuckle()
if(MA)
if(MA != user)
if(MA == user)
MA.visible_message(\
"<b>[MA.name]</b> unbuckles themselves.",\
SPAN_NOTICE("You unbuckle yourself from [src]."),\
SPAN_NOTICE("You hear metal clanking."))
else if(isliving(MA))
MA.visible_message(\
"<b>[user.name]</b> unbuckles [MA.name].", \
"<span class='notice'>You were unbuckled from [src] by [user.name].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
SPAN_NOTICE("You were unbuckled from [src] by [user.name]."),\
SPAN_NOTICE("You hear metal clanking."))
else
MA.visible_message(\
"<b>[MA.name]</b> unbuckles themselves.",\
"<span class='notice'>You unbuckle yourself from [src].</span>",\
"<span class='notice'>You hear metal clanking.</span>")
SPAN_NOTICE("You hear metal clanking."))
add_fingerprint(user)
return MA
@@ -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/chair/wheelchair))
var/obj/structure/bed/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)
+13 -5
View File
@@ -68,6 +68,7 @@
var/build_from_parts = FALSE // when it uses coloration and a part of it wants to remain uncolored. e.g., handle of the screwdriver is colored while the head is not.
var/worn_overlay = null // used similarly as above, except for inhands.
var/worn_overlay_color = null // When you want your worn overlay to have colors. So you can have more than one modular coloring.
//ITEM_ICONS ARE DEPRECATED. USE CONTAINED SPRITES IN FUTURE
// Used to specify the icon file to be used when the item is worn. If not set the default icon for that slot will be used.
@@ -457,22 +458,23 @@ var/list/global/slot_flags_enumeration = list(
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if(slot_flags & SLOT_DENYPOCKET)
return 0
if( w_class > 2 && !(slot_flags & SLOT_POCKET) )
return 0
if(slot_s_store)
if(isvaurca(H) && src.w_class <= ITEMSIZE_SMALL)
var/can_hold_s_store = (slot_flags & SLOT_S_STORE)
if(!can_hold_s_store && H.species.can_hold_s_store(src))
can_hold_s_store = TRUE
if(can_hold_s_store)
return TRUE
if(!H.wear_suit && (slot_wear_suit in mob_equip))
if(!disable_warning)
to_chat(H, "<span class='warning'>You need a suit before you can attach this [name].</span>")
return 0
if(!H.wear_suit.allowed)
if(H.wear_suit && !length(H.wear_suit.allowed))
if(!disable_warning)
to_chat(usr, "<span class='warning'>You somehow have a suit with no defined allowed items for suit storage, stop that.</span>")
return 0
if( !(istype(src, /obj/item/modular_computer) || src.ispen() || is_type_in_list(src, H.wear_suit.allowed)) )
if(!istype(src, /obj/item/modular_computer) && !ispen() && !is_type_in_list(src, H.wear_suit.allowed))
return 0
if(slot_handcuffed)
if(!istype(src, /obj/item/handcuffs))
@@ -950,5 +952,11 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/get_mask_examine_text(var/mob/user)
return "on [user.get_pronoun("his")] face"
/obj/item/proc/get_head_examine_text(var/mob/user)
return "on [user.get_pronoun("his")] head"
/obj/item/proc/should_equip() // when you press E with an empty hand, will this item be pulled from suit storage / back slot and put into your hand
return FALSE
/obj/item/proc/can_swap_hands(var/mob/user)
return TRUE
+12 -1
View File
@@ -10,7 +10,18 @@
pickup_sound = 'sound/items/pickup/cloth.ogg'
/obj/item/bodybag/attack_self(mob/user)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
deploy_bag(user, user.loc)
/obj/item/bodybag/afterattack(obj/target, mob/user, proximity)
if(!proximity)
return
if(isturf(target))
var/turf/T = target
if(!T.density)
deploy_bag(user, target)
/obj/item/bodybag/proc/deploy_bag(mob/user, atom/location)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(location)
R.add_fingerprint(user)
playsound(src, 'sound/items/drop/cloth.ogg', 30)
qdel(src)
@@ -201,7 +201,7 @@
set src in usr
normal_layer = !normal_layer
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer ? "under" : "over"] your outerwear."))
to_chat(usr, SPAN_NOTICE("\The [src] will now layer [normal_layer ? "over" : "under"] your outerwear."))
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_wrists()
@@ -453,11 +453,11 @@ var/global/list/default_medbay_channels = list(
//#### Sending the signal to all subspace receivers ####//
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
R.receive_signal(signal)
INVOKE_ASYNC(R, /obj/proc/receive_signal, signal)
// Allinone can act as receivers.
for(var/obj/machinery/telecomms/allinone/R in telecomms_list)
R.receive_signal(signal)
INVOKE_ASYNC(R, /obj/proc/receive_signal, signal)
// Receiving code can be located in Telecommunications.dm
var/position_z_in_level = FALSE // this particular band-aid is required to make antag radios say "talks into" and not "tries to talk into" when using a radio, due to how their signals are made
@@ -513,7 +513,7 @@ var/global/list/default_medbay_channels = list(
signal.frequency = connection.frequency // Quick frequency set
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
R.receive_signal(signal)
INVOKE_ASYNC(R, /obj/proc/receive_signal, signal)
sleep(rand(10,25)) // wait a little...
+1
View File
@@ -137,6 +137,7 @@
var/obj/item/holder/H = A
if(H.w_class <= ITEMSIZE_SMALL)
contains = JAR_HOLDER
user.drop_from_inventory(H)
scoop(H, user)
else
scoop_fail(H, user)
+1 -1
View File
@@ -67,7 +67,7 @@
return ..()
/obj/item/holomenu/examine(mob/user, distance)
if(anchored && length(menu_text) && Adjacent(user))
if(anchored && length(menu_text))
interact(user)
return
return ..()
+2
View File
@@ -52,4 +52,6 @@ var/list/mob_icon_icon_states = list()
var/image/I
if(build_from_parts)
I = overlay_image(mob_icon, "[item_state][contained_sprite ? slot_str_to_contained_flag(slot) : ""]_[worn_overlay]", null, RESET_COLOR|RESET_ALPHA)
if(worn_overlay_color)
I.color = worn_overlay_color
return I
+1 -1
View File
@@ -8,7 +8,7 @@
contained_sprite = TRUE
var/working = FALSE
var/obj/item/yarn/ball
var/static/list/knitables = list(/obj/item/clothing/accessory/sweater, /obj/item/clothing/suit/storage/toggle/cardigan, /obj/item/clothing/suit/storage/toggle/cardigan/sweater, /obj/item/clothing/suit/storage/toggle/cardigan/argyle, /obj/item/clothing/accessory/sweatervest, /obj/item/clothing/accessory/sweaterturtleneck, /obj/item/clothing/gloves/fingerless/colour/knitted, /obj/item/clothing/gloves/knitted, /obj/item/clothing/ears/bandanna/colorable/knitted, /obj/item/clothing/accessory/scarf)
var/static/list/knitables = list(/obj/item/clothing/accessory/sweater, /obj/item/clothing/suit/storage/toggle/cardigan, /obj/item/clothing/suit/storage/toggle/cardigan/sweater, /obj/item/clothing/suit/storage/toggle/cardigan/argyle, /obj/item/clothing/accessory/sweatervest, /obj/item/clothing/accessory/sweaterturtleneck, /obj/item/clothing/gloves/fingerless/colour/knitted, /obj/item/clothing/gloves/knitted, /obj/item/clothing/accessory/bandanna/colorable/knitted, /obj/item/clothing/accessory/scarf)
var/static/list/name2knit
/obj/item/knittingneedles/Destroy()
+2 -2
View File
@@ -158,7 +158,7 @@
if("Nralakk")
hologram_message = pick("You see the Jargon system sky projected on the ceiling.",
"You see planets slowly orbiting Nralakk above the projector.",
"You hear faint ceremonial hymms.")
"You hear faint ceremonial hymns.")
if(hologram_message)
visible_message("<span class='notice'>[hologram_message]</span>")
@@ -223,4 +223,4 @@
item_state = "resident_starlight"
flippable = FALSE
v_flippable = FALSE
badge_string = null
badge_string = null
@@ -184,8 +184,9 @@
icon_state = "urn"
applies_material_colour = TRUE
w_class = ITEMSIZE_SMALL
flags = NOBLUDGEON
/obj/item/material/urn/attack(var/obj/A, var/mob/user, var/proximity)
/obj/item/material/urn/afterattack(var/obj/A, var/mob/user, var/proximity)
if(!istype(A, /obj/effect/decal/cleanable/ash))
return ..()
else if(proximity)
@@ -105,7 +105,7 @@
/obj/item/circuitboard/research_shuttle
name = T_BOARD("research shuttle console")
build_path = /obj/machinery/computer/shuttle_control/research
build_path = /obj/machinery/computer/shuttle_control/multi/research
origin_tech = list(TECH_DATA = 2)
/obj/item/circuitboard/area_atmos
@@ -164,9 +164,11 @@
/obj/item/extinguisher/proc/propel_object(var/obj/O, mob/user, movementdirection)
if(O.anchored) return
var/obj/structure/bed/chair/C
if(istype(O, /obj/structure/bed/chair))
C = O
var/obj/structure/bed/stool/chair/C
if(!istype(O, /obj/structure/bed/stool/chair/office))
return
C = O
var/list/move_speed = list(1, 1, 1, 2, 2, 3)
for(var/i in 1 to 6)
@@ -13,6 +13,7 @@
var/use_material_name = TRUE // Does the finished item put the material name in front of it?
var/use_material_sound = TRUE
var/use_material_shatter = TRUE // If it has a custom shatter message.
var/applies_material_colour = 1
var/unbreakable
var/force_divisor = 0.5
@@ -90,11 +91,11 @@
/obj/item/material/proc/shatter(var/consumed)
var/turf/T = get_turf(src)
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
if(use_material_shatter)
T.visible_message(SPAN_DANGER("\The [src] [material.destruction_desc]!"))
if(istype(loc, /mob/living))
var/mob/living/M = loc
M.drop_from_inventory(src)
playsound(src, material.shatter_sound, 70, 1)
if(!consumed && drops_debris) material.place_shard(T)
qdel(src)
@@ -76,6 +76,11 @@
return ..()
/obj/item/material/twohanded/can_swap_hands(mob/user)
if(wielded)
return FALSE
return ..()
/obj/item/material/twohanded/dropped(mob/user as mob)
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
@@ -657,7 +657,7 @@
desc = "A Vaurca cloak with storage pockets."
icon_state = "cape"
item_state = "cape"
sprite_sheets = list(BODYTYPE_VAURCA = 'icons/mob/species/vaurca/back.dmi')
sprite_sheets = list(BODYTYPE_VAURCA = 'icons/mob/species/vaurca/back.dmi', BODYTYPE_VAURCA_BULWARK = 'icons/mob/species/bulwark/back.dmi')
var/hooded = FALSE
/obj/item/storage/backpack/cloak/verb/toggle_cloak_hood()
@@ -963,9 +963,10 @@
"SmileyFace" = image(icon = src.icon, icon_state = "paperbag_SmileyFace")
))
choice = show_radial_menu(user, src, papersack_designs, radius = 42, tooltips = TRUE)
if(!choice)
var/selected = show_radial_menu(user, src, papersack_designs, radius = 42, tooltips = TRUE)
if(!selected)
return
choice = selected
switch(choice)
if("None")
desc = "A sack neatly crafted out of paper."
@@ -2,7 +2,7 @@
name = "business card holder"
desc = "A sleek holster for your business card. You wouldn't want it getting damaged in any way."
storage_slots = 5
icon = 'icons/obj/office_supplies.dmi'
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "holder"
w_class = ITEMSIZE_TINY
max_w_class = ITEMSIZE_TINY
@@ -10,27 +10,88 @@
/obj/item/storage/business_card_holder/update_icon()
cut_overlays()
var/overlay_type
if(length(contents))
var/mutable_appearance/card_overlay = mutable_appearance(icon, "holder-overlay")
card_overlay.appearance_flags = RESET_COLOR
var/obj/O = contents[1]
if(istype(O, /obj/item/paper/business_card/glass)) // Could be better, I guess. But it works well enough.
overlay_type = "glass"
else
overlay_type = "paper"
var/mutable_appearance/card_overlay = mutable_appearance(icon, "holder-overlay_[overlay_type]")
if(O.color)
card_overlay.color = O.color
else
card_overlay.appearance_flags = RESET_COLOR
add_overlay(card_overlay)
/obj/item/storage/business_card_holder/wood
icon_state = "holder_wood"
/obj/item/storage/business_card_holder/leather
icon_state = "holder_leather"
/obj/item/storage/business_card_holder/plastic
icon_state = "holder_plastic"
/obj/item/paper/business_card
name = "business card"
desc = "A small slip of paper, capable of elevating your status on the social hierachy between you and your co-workers, provided you picked the right font."
icon = 'icons/obj/office_supplies.dmi'
icon_state = "generic_card1"
icon_state = "business_card"
var/last_flash = 0 //spam limiter
can_fold = FALSE
/obj/item/paper/business_card/attack_self(mob/living/user)
user.examinate(src)
if(last_flash <= world.time - 20)
last_flash = world.time
card_flash(user) // Shamelessly copypasta'd from id_flash from cards_ids.dm
/obj/item/paper/business_card/proc/card_flash(var/mob/user, var/quality = pick("the tasteful thickness of it", "that subtle off-white coloring", "the carefully curated font", "that watermark", "that bold, contemporary serif"), var/complement = pick("Oh my god.", "Impressive.", "Very nice.", "Nice.", "Jesus.", "Cool.", "How'd they get so tasteful?"))
var/list/card_viewers = viewers(3, user) // or some other distance - this distance could be defined as a var on the ID
var/message = "<b>[user]</b> flashes [user.get_pronoun("his")] [icon2html(src, card_viewers)] [src.name]."
var/blind_message = "You flash your [icon2html(src, card_viewers)] [src.name]."
var/add_text = "Look at [quality]. [complement]"
var/blind_add_text = "You show off [quality]."
if(add_text != "")
message += " [add_text]"
if(blind_add_text != "")
blind_message += " [blind_add_text]"
user.visible_message(message, blind_message)
/obj/item/paper/business_card/show_content(mob/user, forceshow)
var/datum/browser/paper_win = new(user, name, null, 525, 300, null, TRUE)
paper_win.set_content(get_content(user, can_read(user, forceshow)))
paper_win.add_stylesheet("paper_languages", 'html/browser/paper_languages.css')
paper_win.open()
/obj/item/paper/business_card/alt
icon_state = "generic_card2"
icon_state = "business_card-alt"
/obj/item/paper/business_card/rounded
icon_state = "rounded_corners"
icon_state = "business_card-rounded"
/obj/item/paper/business_card/glass
name = "glass business card"
desc = "A fancy variant of the classic business card. This one immediately indicates that you're serious about your business, but the contents of the card will seal the deal."
icon_state = "glass_card"
icon_state = "business_card-glass"
drop_sound = 'sound/items/drop/glass_small.ogg'
pickup_sound = 'sound/items/pickup/glass_small.ogg'
build_from_parts = TRUE
paper_like = FALSE
/obj/item/paper/business_card/glass/card_flash(var/mob/user)
var/quality = pick("the tasteful transparency of it", "that subtle light refraction", "the carefully curated font", "that watermark", "that bold, contemporary serif")
var/complement = pick("Oh my god.", "Impressive.", "Very nice.", "Nice.", "Jesus.", "Cool.", "How'd they get so tasteful?")
return ..(user, quality, complement)
/obj/item/paper/business_card/glass/b
worn_overlay = "business_card-glass-b"
/obj/item/paper/business_card/glass/g
worn_overlay = "business_card-glass-g"
/obj/item/paper/business_card/glass/s
worn_overlay = "business_card-glass-s"
/obj/item/paper/business_card/glass/w
worn_overlay = "business_card-glass-w"
@@ -566,6 +566,12 @@
src.add_fingerprint(user)
return
/obj/item/storage/handle_middle_mouse_click(var/mob/user)
if(Adjacent(user))
open(user)
return TRUE
return FALSE
/obj/item/storage/verb/toggle_gathering_mode()
set name = "Switch Gathering Method"
set category = "Object"
@@ -773,4 +779,4 @@
//return 2**(w_class-1) //1,2,4,8,16,...
#undef STORAGE_SPACE_CAP
#undef STORAGE_SPACE_CAP
@@ -31,7 +31,7 @@
return null
/obj/item/tank/jetpack
name = "jetpack (empty)"
name = "jetpack"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
icon_state = "jetpack"
item_state = "jetpack"
@@ -156,6 +156,8 @@ Frequency:
var/obj/machinery/teleport/station/linked_station
var/list/active_teleporters
var/max_portals = 2
/obj/item/hand_tele/examine(mob/user, distance)
. = ..()
if(linked_station)
@@ -168,7 +170,7 @@ Frequency:
/obj/item/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location || isNotStationLevel(current_location.z))
if(!current_location || isAdminLevel(current_location.z))
to_chat(user, SPAN_WARNING("\The [src] can't get a bearing on anything right now."))
return
@@ -177,13 +179,20 @@ Frequency:
to_chat(user, SPAN_DANGER("\The [src] can't seem to find a lock. Something in the area must be preventing the portal from opening..."))
return
if(LAZYLEN(active_teleporters) >= 3)
if(LAZYLEN(active_teleporters) >= max_portals)
user.show_message(SPAN_WARNING("\The [src] is recharging!"))
return
var/teleport_turf
if(linked_station && linked_station.locked_obj)
teleport_turf = get_turf(linked_station.locked_obj.resolve())
var/turf/teleport_turf
if(linked_station)
if(linked_station.stat & (NOPOWER|BROKEN))
to_chat(user, SPAN_WARNING("The station \the [src] is connected doesn't seem to be responding!"))
return
if(!AreConnectedZLevels(current_location.z, linked_station.z))
to_chat(user, SPAN_WARNING("The station \the [src] is connected to isn't close enough to lock onto now!"))
return
if(linked_station.locked_obj)
teleport_turf = get_turf(linked_station.locked_obj.resolve())
else
var/list/potential_turfs = list()
for(var/turf/T in orange(10))
@@ -201,10 +210,13 @@ Frequency:
if(!teleport_turf)
to_chat(user, SPAN_WARNING("\The [src] was unable to get a lock onto anything!"))
return
if(isAdminLevel(teleport_turf.z))
to_chat(user, SPAN_WARNING("The signal to the beacon seems to be scrambled!"))
return
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(src), teleport_turf, src)
LAZYADD(active_teleporters, P)
if(LAZYLEN(active_teleporters) >= 3)
if(LAZYLEN(active_teleporters) >= max_portals)
check_maptext(SMALL_FONTS(6, "Charge"))
add_fingerprint(user)
@@ -216,12 +228,14 @@ Frequency:
/obj/item/hand_tele/CtrlClick(mob/user)
if(user == loc)
var/turf/current_location = get_turf(src)
var/list/teleport_options = list()
for(var/obj/machinery/teleport/station/S in SSmachinery.all_machines)
if(S.engaged)
teleport_options["[S.id] (Active)"] = S
else
teleport_options["[S.id] (Inactive)"] = S
if(AreConnectedZLevels(current_location.z, S.z))
if(S.engaged)
teleport_options["[S.id] (Active)"] = S
else
teleport_options["[S.id] (Inactive)"] = S
teleport_options["None (Dangerous)"] = null
var/teleport_choice = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in teleport_options
if(!teleport_choice)
@@ -241,7 +255,7 @@ Frequency:
/obj/item/hand_tele/proc/remove_portal(var/obj/effect/portal/P)
LAZYREMOVE(active_teleporters, P)
if(LAZYLEN(active_teleporters) < 3)
if(LAZYLEN(active_teleporters) < max_portals)
check_maptext(SMALL_FONTS(7, "Ready"))
/obj/item/closet_teleporter
@@ -27,7 +27,10 @@
icon_state = "shaper_helmet"
item_state = "shaper_helmet"
contained_sprite = TRUE
species_restricted = list(BODYTYPE_VAURCA)
sprite_sheets = list(
BODYTYPE_VAURCA_BULWARK = 'icons/mob/species/bulwark/head.dmi'
)
species_restricted = list(BODYTYPE_VAURCA, BODYTYPE_VAURCA_BULWARK)
body_parts_covered = HEAD|FACE|EYES
/obj/item/clothing/head/expression
+1 -1
View File
@@ -7,7 +7,7 @@
var/obj/item/clothing/head/hat
var/list/allowed_coats = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/toggle/det_trench,
/obj/item/clothing/suit/storage/toggle/forensics, /obj/item/clothing/suit/storage/toggle/trench,
/obj/item/clothing/suit/storage/det_jacket)
/obj/item/clothing/suit/storage/det_jacket, /obj/item/clothing/accessory/poncho/tajarancloak)
var/list/allowed_hats = list(/obj/item/clothing/head/det, /obj/item/clothing/head/beret/security, /obj/item/clothing/head/softcap/security)
/obj/structure/coatrack/attack_hand(mob/user as mob)
@@ -54,6 +54,8 @@
new /obj/item/storage/box/mousetraps(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
new /obj/item/clothing/head/surgery/hairnet(src)
new /obj/item/clothing/head/surgery/hairnet(src)
/*
* Janitor
@@ -324,8 +324,6 @@
new /obj/item/clothing/under/rank/geneticist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(src)
new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(src)
return
@@ -340,8 +338,6 @@
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/shoes/biochem(src)
new /obj/item/clothing/shoes/biochem(src)
new /obj/item/clothing/suit/storage/toggle/labcoat/biochemist(src)
new /obj/item/clothing/suit/storage/toggle/labcoat/biochemist(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
return
+3 -2
View File
@@ -280,8 +280,9 @@
/obj/structure/railing/can_climb(var/mob/living/user, climb_dir, post_climb_check=0)
. = ..()
var/turf/dest = get_step(user, climb_dir)
if(. && get_turf(user) == get_turf(src))
if(turf_is_crowded(TRUE) || !user.Adjacent(get_step(src, climb_dir)))
if(turf_is_crowded(TRUE) || !user.Adjacent(dest) || turf_contains_dense_objects(dest) && get_turf(src) != dest)
to_chat(user, SPAN_DANGER("You can't climb there, the way is blocked."))
return FALSE
@@ -303,7 +304,7 @@
LAZYREMOVE(climbers, user)
return
user.forceMove(get_step(src, climb_dir))
user.forceMove(get_step(user, climb_dir))
user.visible_message(SPAN_WARNING("\The [user] climbs over \the [src]!"))
LAZYREMOVE(climbers, user)
@@ -26,17 +26,29 @@
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 = TRUE
var/makes_rolling_sound = FALSE
var/held_item = null // Set to null if you don't want people to pick this up.
slowdown = 5
var/driving = FALSE // Shit for wheelchairs. Doesn't really get used here, but it's for code cleanliness.
var/mob/living/pulling = null
var/propelled = 0 // Check for fire-extinguisher-driven chairs
/obj/structure/bed/Initialize()
. = ..()
LAZYADD(can_buckle, /mob/living)
/obj/structure/bed/New(newloc, new_material = MATERIAL_STEEL, new_padding_material)
..(newloc)
color = null
if(can_buckle)
desc_info = "Click and drag yourself (or anyone) to this to buckle in. Click on this with an empty hand to undo the buckles.<br>\
Anyone with restraints, such as handcuffs, will not be able to unbuckle themselves. They must use the Resist button, or verb, to break free of \
the buckles instead. "
if(held_item)
desc_info += "Click and drag this onto yourself to pick it up. "
material = SSmaterials.get_material_by_name(new_material)
if(!istype(material))
qdel(src)
@@ -56,24 +68,24 @@
icon_state = ""
cut_overlays()
// Base icon.
var/list/stool_cache = SSicon_cache.stool_cache
var/list/furniture_cache = SSicon_cache.furniture_cache
var/cache_key = "[base_icon]-[material.name]"
if(!stool_cache[cache_key])
if(!furniture_cache[cache_key])
var/image/I = image('icons/obj/furniture.dmi', base_icon)
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
furniture_cache[cache_key] = I
add_overlay(furniture_cache[cache_key])
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[base_icon]-[padding_material.name]-padding"
if(!stool_cache[padding_cache_key])
if(!furniture_cache[padding_cache_key])
var/image/I = image(icon, "[base_icon]_padding")
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
furniture_cache[padding_cache_key] = I
add_overlay(furniture_cache[padding_cache_key])
// Strings.
if(material_alteration & MATERIAL_ALTERATION_NAME)
@@ -112,14 +124,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.
@@ -141,6 +155,8 @@
return
else if (W.iswirecutter())
if(!can_pad)
return
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
@@ -148,6 +164,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
@@ -157,9 +182,9 @@
spawn(0)
if(buckle(affecting))
affecting.visible_message(\
"<span class='danger'>[affecting.name] is buckled to [src] by [user.name]!</span>",\
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
"<span class='notice'>You hear metal clanking.</span>")
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)
@@ -185,10 +210,75 @@
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("<b>[user]</b> 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/Move()
. = ..()
if(makes_rolling_sound)
playsound(src, 'sound/effects/roll.ogg', 50, 1)
if(buckled && !istype(src, /obj/structure/bed/roller))
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, 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/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(SPAN_DANGER("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!"))
pulling.attack_log += "\[[time_stamp()]\]<span class='warning'> Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]</span>"
occupant.attack_log += "\[[time_stamp()]\]<font color='orange'> Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]</font>"
msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[pulling.x];Y=[pulling.y];Z=[pulling.z]'>JMP</a>)",ckey=key_name(pulling),ckey_target=key_name(occupant))
else
occupant.visible_message(SPAN_DANGER("[occupant] crashed into \the [A]!"))
/obj/structure/bed/psych
name = "psychiatrist's couch"
@@ -226,8 +316,9 @@
icon_state = "standard_down"
item_state = "rollerbed"
anchored = FALSE
makes_rolling_sound = TRUE
var/base_state = "standard"
var/item_bedpath = /obj/item/roller
held_item = /obj/item/roller
var/obj/item/reagent_containers/beaker
var/obj/item/vitals_monitor/vitals
var/iv_attached = 0
@@ -298,8 +389,8 @@
..()
/obj/structure/bed/roller/proc/collapse()
visible_message("<b>[usr]</b> collapses \the [src].")
new item_bedpath(get_turf(src))
usr.visible_message(SPAN_NOTICE("<b>[usr]</b> collapses \the [src]."), SPAN_NOTICE("You collapse \the [src]"))
new held_item(get_turf(src))
qdel(src)
/obj/structure/bed/roller/process()
@@ -332,13 +423,13 @@
if(!beaker)
return
if(do_mob(user, target, 1 SECOND))
visible_message("<b>[user]</b> attaches [target] to the IV on \the [src].")
user.visible_message(SPAN_NOTICE("<b>[user]</b> attaches [target] to the IV on \the [src]."), SPAN_NOTICE("You attach the IV to \the [target]."))
iv_attached = TRUE
update_icon()
START_PROCESSING(SSprocessing, src)
/obj/structure/bed/roller/proc/detach_iv(mob/living/carbon/human/target, mob/user)
visible_message("<b>[user]</b> takes [target] off the IV on \the [src].")
user.visible_message(SPAN_NOTICE("<b>[user]</b> takes [target] off the IV on \the [src]."), SPAN_NOTICE("You take the IV off \the [target]."))
iv_attached = FALSE
update_icon()
STOP_PROCESSING(SSprocessing, src)
@@ -371,8 +462,6 @@
/obj/structure/bed/roller/Move()
..()
if(makes_rolling_sound)
playsound(src, 'sound/effects/roll.ogg', 100, 1)
if(buckled)
if(buckled.buckled_to == src)
buckled.forceMove(src.loc)
@@ -407,7 +496,7 @@
icon_state = "hover_down"
base_state = "hover"
makes_rolling_sound = FALSE
item_bedpath = /obj/item/roller/hover
held_item = /obj/item/roller/hover
patient_shift = 6
bag_strap = null
@@ -428,14 +517,14 @@
drop_sound = 'sound/items/drop/axe.ogg'
pickup_sound = 'sound/items/pickup/axe.ogg'
center_of_mass = list("x" = 17,"y" = 7)
var/bedpath = /obj/structure/bed/roller
var/origin_type = /obj/structure/bed/roller
w_class = ITEMSIZE_NORMAL
/obj/item/roller/hover
name = "medical hoverbed"
desc = "A collapsed hoverbed that can be carried around."
icon_state = "hover_folded"
bedpath = /obj/structure/bed/roller/hover
origin_type = /obj/structure/bed/roller/hover
/obj/item/roller/attack_self(mob/user)
..()
@@ -450,19 +539,17 @@
deploy_roller(user, target)
/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
to_chat(user, "<span class='notice'>You collect the roller bed.</span>")
to_chat(user, SPAN_NOTICE("You collect the roller bed."))
src.forceMove(RH)
RH.held = src
return
..()
/obj/item/roller/proc/deploy_roller(mob/user, atom/location)
var/obj/structure/bed/roller/R = new bedpath(location)
var/obj/structure/bed/roller/R = new origin_type(location)
R.add_fingerprint(user)
qdel(src)
@@ -478,12 +565,10 @@
held = new /obj/item/roller(src)
/obj/item/roller_holder/attack_self(mob/user as mob)
if(!held)
to_chat(user, "<span class='notice'>The rack is empty.</span>")
to_chat(user, SPAN_NOTICE("The rack is empty."))
return
to_chat(user, "<span class='notice'>You deploy the roller bed.</span>")
to_chat(user, SPAN_NOTICE("You deploy the roller bed."))
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
qdel(held)
@@ -1,83 +1,77 @@
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
/obj/structure/bed/stool/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete // Not anymore. - Wezzy
name = "chair"
desc = "You sit in this. Either by will or force."
icon_state = "chair_preview"
base_icon = "chair"
color = "#666666"
anchored = TRUE
build_amt = 1
buckle_dir = 0
buckle_lying = 0 //force people to sit up in chairs when buckled_to
obj_flags = OBJ_FLAG_ROTATABLE_ANCHORED
var/propelled = 0 // Check for fire-extinguisher-driven chairs
held_item = /obj/item/material/stool/chair/
/obj/structure/bed/chair/do_simple_ranged_interaction(var/mob/user)
/obj/structure/bed/stool/chair/Initialize()
. = ..()
LAZYADD(can_buckle, /mob/living)
/obj/structure/bed/stool/chair/do_simple_ranged_interaction(var/mob/user)
if(!buckled && user)
rotate(user)
return TRUE
/obj/structure/bed/chair/post_buckle()
/obj/structure/bed/stool/chair/post_buckle()
update_icon()
return ..()
/obj/structure/bed/chair/update_icon()
..()
/obj/structure/bed/stool/chair/update_icon()
..() // This handles all chair-specific funky stuff, such as chair backrests, armrests, padding and buckles.
var/list/stool_cache = SSicon_cache.stool_cache
var/list/furniture_cache = SSicon_cache.furniture_cache
var/cache_key = "[base_icon]-[material.name]-over"
if(!stool_cache[cache_key])
if(!furniture_cache[cache_key])
var/image/I = image('icons/obj/furniture.dmi', "[base_icon]_over")
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = material.icon_colour
I.layer = FLY_LAYER
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
furniture_cache[cache_key] = I
add_overlay(furniture_cache[cache_key])
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[base_icon]-[padding_material.name]-padding-over"
if(!stool_cache[padding_cache_key])
if(!furniture_cache[padding_cache_key])
var/image/I = image(icon, "[base_icon]_padding_over")
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = padding_material.icon_colour
I.layer = FLY_LAYER
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
furniture_cache[padding_cache_key] = I
add_overlay(furniture_cache[padding_cache_key])
if(buckled)
cache_key = "[base_icon]-[material.name]-armrest"
if(!stool_cache[cache_key])
if(!furniture_cache[cache_key])
var/image/I = image(icon, "[base_icon]_armrest")
I.layer = FLY_LAYER
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
furniture_cache[cache_key] = I
add_overlay(furniture_cache[cache_key])
if(padding_material)
cache_key = "[base_icon]-[padding_material.name]-padding-armrest"
if(!stool_cache[cache_key])
if(!furniture_cache[cache_key])
var/image/I = image(icon, "[base_icon]_padding_armrest")
I.layer = FLY_LAYER
if(material_alteration & MATERIAL_ALTERATION_COLOR)
I.color = padding_material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
furniture_cache[cache_key] = I
add_overlay(furniture_cache[cache_key])
/obj/structure/bed/chair/set_dir()
/obj/structure/bed/stool/chair/set_dir()
. = ..()
if(buckled)
buckled.set_dir(dir)
// Leaving this in for the sake of compilation.
/obj/structure/bed/chair/comfy
name = "comfy chair"
desc = "It's a chair. It looks comfy."
icon_state = "comfychair_preview"
base_icon = "comfychair"
build_amt = 2
/obj/structure/bed/chair/comfy/MouseDrop_T(mob/target, mob/user)
/obj/structure/bed/stool/chair/MouseDrop_T(mob/target, mob/user)
if(target == user && user.loc != loc && (reverse_dir[dir] & angle2dir(Get_Angle(src, user))))
user.visible_message("<b>[user]</b> starts climbing over the back of \the [src]...", SPAN_NOTICE("You start climbing over the back of \the [src]..."))
if(do_after(user, 2 SECONDS))
@@ -85,221 +79,255 @@
return
return ..()
/obj/structure/bed/chair/comfy/CanPass(atom/movable/mover, turf/target, height, air_group)
if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover))))
return FALSE
/obj/structure/bed/stool/chair/CanPass(atom/movable/mover, turf/target, height, air_group)
if(anchored && padding_material)
if(mover.density && isliving(mover) && (reverse_dir[dir] & angle2dir(Get_Angle(src, mover))))
return FALSE
return ..()
/obj/structure/bed/chair/comfy/brown/New(var/newloc)
/obj/structure/bed/stool/chair/padded/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
/obj/structure/bed/chair/comfy/red/New(var/newloc)
/obj/structure/bed/stool/chair/padded/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
/obj/structure/bed/chair/comfy/teal/New(var/newloc)
/obj/structure/bed/stool/chair/padded/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/chair/comfy/black/New(var/newloc)
/obj/structure/bed/stool/chair/padded/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/chair/comfy/green/New(var/newloc)
/obj/structure/bed/stool/chair/padded/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/chair/comfy/purp/New(var/newloc)
/obj/structure/bed/stool/chair/padded/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/chair/comfy/blue/New(var/newloc)
/obj/structure/bed/stool/chair/padded/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/chair/comfy/beige/New(var/newloc)
/obj/structure/bed/stool/chair/padded/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
/obj/structure/bed/chair/comfy/lime/New(var/newloc)
/obj/structure/bed/stool/chair/padded/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/chair/comfy/sofa
/obj/structure/bed/stool/chair/sofa
name = "sofa"
desc = "A sofa, how nice!"
icon_state = "sofamiddle_preview"
base_icon = "sofamiddle"
/obj/structure/bed/chair/comfy/sofa/leather/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
obj/structure/bed/chair/comfy/sofa/comfy/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
obj/structure/bed/chair/comfy/sofa/cloth/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/stool/chair/sofa/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/chair/sofa/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/chair/sofa/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/chair/sofa/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/chair/sofa/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
/obj/structure/bed/chair/comfy/sofa/left
/obj/structure/bed/stool/chair/sofa/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/stool/chair/sofa/left
icon_state = "sofaend_left_preview"
base_icon = "sofaend_left"
/obj/structure/bed/chair/comfy/sofa/left/leather/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/left/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
obj/structure/bed/chair/comfy/sofa/left/comfy/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/left/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
obj/structure/bed/chair/comfy/sofa/left/cloth/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/left/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/stool/chair/sofa/left/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/chair/sofa/left/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/chair/sofa/left/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/chair/sofa/left/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/chair/sofa/left/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
/obj/structure/bed/chair/comfy/sofa/right
/obj/structure/bed/stool/chair/sofa/left/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/stool/chair/sofa/right
icon_state = "sofaend_right_preview"
base_icon = "sofaend_right"
/obj/structure/bed/chair/comfy/sofa/right/leather/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/right/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
obj/structure/bed/chair/comfy/sofa/right/comfy/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/right/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
obj/structure/bed/chair/comfy/sofa/right/cloth/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/right/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/stool/chair/sofa/right/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/chair/sofa/right/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/chair/sofa/right/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/chair/sofa/right/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/chair/sofa/right/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
/obj/structure/bed/chair/comfy/sofa/corner
/obj/structure/bed/stool/chair/sofa/right/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/stool/chair/sofa/corner
icon_state = "sofacorner_preview"
base_icon = "sofacorner"
/obj/structure/bed/chair/comfy/sofa/corner/leather/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/corner/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
obj/structure/bed/chair/comfy/sofa/corner/comfy/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/corner/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
/obj/structure/bed/stool/chair/sofa/corner/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/stool/chair/sofa/corner/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/chair/sofa/corner/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/chair/sofa/corner/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/chair/sofa/corner/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/chair/sofa/corner/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
/obj/structure/bed/chair/office
/obj/structure/bed/stool/chair/sofa/corner/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/stool/chair/office // For the love of god, don't use this.
name = "office chair"
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
anchored = 0
buckle_movable = 1
material_alteration = MATERIAL_ALTERATION_DESC
makes_rolling_sound = TRUE
anchored = FALSE
buckle_movable = TRUE
build_amt = 5
held_item = null
/obj/structure/bed/chair/office/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/chair/office/Move()
. = ..()
if(makes_rolling_sound)
playsound(src, 'sound/effects/roll.ogg', 100, 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()
/obj/structure/bed/chair/office/Collide(atom/A)
. = ..()
if(!buckled)
return
if(propelled)
var/mob/living/occupant = unbuckle()
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)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/bed/chair/office/light
/obj/structure/bed/stool/chair/office/light
icon_state = "officechair_white_preview"
base_icon = "officechair_white"
/obj/structure/bed/chair/office/dark
/obj/structure/bed/stool/chair/office/dark
icon_state = "officechair_dark_preview"
base_icon = "officechair_dark"
/obj/structure/bed/chair/office/bridge
/obj/structure/bed/stool/chair/office/bridge
name = "command chair"
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/chair/office/bridge/legion
/obj/structure/bed/stool/chair/office/bridge/legion
name = "legion pilot seat"
desc = "A comfortable seat for a pilot."
icon_state = "bridge_legion_preview"
base_icon = "bridge_legion"
/obj/structure/bed/chair/office/bridge/generic
/obj/structure/bed/stool/chair/office/bridge/generic
icon_state = "bridge_generic_preview"
base_icon = "bridge_generic"
/obj/structure/bed/chair/office/bridge/pilot
/obj/structure/bed/stool/chair/office/bridge/pilot
name = "pilot seat"
desc = "A comfortable seat for a pilot."
icon_state = "pilot_preview"
base_icon = "pilot"
/obj/structure/bed/chair/office/hover
/obj/structure/bed/stool/chair/office/hover
name = "hoverchair"
desc = "Adjusts itself to the sitter's weight resulting in a most comfortable sitting experience. Like floating on a cloud."
icon_state = "hover_chair"
icon_state = "hover_chair_preview"
base_icon = "hover_chair"
makes_rolling_sound = FALSE
can_dismantle = FALSE
can_pad = TRUE
held_item = null
/obj/structure/bed/chair/office/hover/Initialize()
.=..()
/obj/structure/bed/stool/chair/office/hover/New(var/newloc)
..(newloc, MATERIAL_SHUTTLE_SKRELL)
set_light(1,1,LIGHT_COLOR_CYAN)
/obj/structure/bed/chair/office/hover/command
icon_state = "hover_command"
/obj/structure/bed/stool/chair/office/hover/command
icon_state = "hover_command_preview"
base_icon = "hover_command"
// Chair types
/obj/structure/bed/chair/plastic
/obj/structure/bed/stool/chair/plastic
/obj/structure/bed/chair/plastic/New(var/newloc)
/obj/structure/bed/stool/chair/plastic/New(var/newloc)
..(newloc, MATERIAL_PLASTIC)
/obj/structure/bed/chair/wood
/obj/structure/bed/stool/chair/wood
name = "classic chair"
desc = "Old is never too old to not be in fashion."
icon_state = "wooden_chair_preview"
base_icon = "wooden_chair"
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
build_amt = 3
held_item = /obj/item/material/stool/chair/wood
can_pad = FALSE
/obj/structure/bed/chair/wood/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/stack) || W.iswirecutter())
return
..()
/obj/structure/bed/chair/wood/New(var/newloc)
/obj/structure/bed/stool/chair/wood/New(var/newloc)
..(newloc, MATERIAL_WOOD)
/obj/structure/bed/chair/wood/wings
/obj/structure/bed/stool/chair/wood/wings
name = "winged chair"
icon_state = "wooden_chair_wings_preview"
base_icon = "wooden_chair_wings"
held_item = /obj/item/material/stool/chair/wood/wings
/obj/structure/bed/chair/unmovable
can_dismantle = 0
/obj/structure/bed/stool/chair/unmovable
can_dismantle = FALSE
/obj/structure/bed/chair/shuttle
/obj/structure/bed/stool/chair/shuttle
name = "shuttle chair"
icon_state = "shuttlechair_preview"
base_icon = "shuttlechair"
@@ -308,14 +336,14 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
can_dismantle = FALSE
anchored = TRUE
/obj/structure/bed/chair/shuttle/post_buckle()
/obj/structure/bed/stool/chair/shuttle/post_buckle()
if(buckled)
base_icon = "shuttlechair-b"
else
base_icon = "shuttlechair"
..()
/obj/structure/bed/chair/shuttle/update_icon()
/obj/structure/bed/stool/chair/shuttle/update_icon()
..()
if(!buckled)
var/image/I = image(icon, "[base_icon]_special")
@@ -325,22 +353,65 @@ obj/structure/bed/chair/comfy/sofa/corner/cloth/New(var/newloc)
overlays |= I
// pool chair, to sit with your feet in the water. only works when facing south, because water overlays weirdly otherwise
/obj/structure/bed/chair/pool
/obj/structure/bed/stool/chair/pool
name = "pool chair"
desc = "A simple plastic contraption that allows you to sit comfortably, dipping your feet into the pool."
icon_state = "pool_chair"
held_item = null
/obj/structure/bed/chair/pool/update_icon()
/obj/structure/bed/stool/chair/pool/update_icon()
return
/obj/structure/bed/chair/pool/buckle(mob/living/M)
/obj/structure/bed/stool/chair/pool/buckle(mob/living/M)
if(!iscarbon(M))
return FALSE
return ..()
/obj/structure/bed/chair/pool/post_buckle(mob/living/M)
/obj/structure/bed/stool/chair/pool/post_buckle(mob/living/M)
. = ..()
if(M == buckled)
M.pixel_y = -6
else
M.pixel_y = initial(M.pixel_y)
/obj/structure/bed/stool/chair/folding
name = "folding chair"
desc = "Temporary seating perfect for your next office party and/or wrestling match."
icon_state = "folding_chair_preview"
base_icon = "folding_chair"
held_item = /obj/item/material/stool/chair/folding
/obj/item/material/stool/chair
name = "chair"
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_item"
item_state = "chair"
base_icon = "chair"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_chairs.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_chairs.dmi',
)
w_class = ITEMSIZE_HUGE
force_divisor = 0.5
origin_type = /obj/structure/bed/stool/chair
// Because wood chairs are snowflake sprites.
/obj/item/material/stool/chair/wood
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_item"
item_state = "woodenchair"
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_item"
item_state = "folding_chair"
base_icon = "folding_chair"
origin_type = /obj/structure/bed/stool/chair/folding
@@ -1,128 +1,195 @@
//Todo: add leather and cloth for arbitrary coloured stools.
/obj/item/stool
/obj/structure/bed/stool
name = "stool"
desc = "Apply butt."
icon = 'icons/obj/furniture.dmi'
icon_state = "stool_preview" //set for the map
randpixel = 0
center_of_mass = null
force = 10
throwforce = 10
w_class = ITEMSIZE_HUGE
item_state_slots = list(
slot_l_hand_str = "stool",
slot_r_hand_str = "stool"
)
var/base_icon = "stool"
var/material/material
var/material/padding_material
icon_state = "stool_preview"
base_icon = "stool"
anchored = FALSE
buckle_dir = 0
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/item/stool/padded
icon_state = "stool_padded_preview" //set for the map
/obj/structure/bed/stool/Initialize()
. = ..()
can_buckle = FALSE // Some idiot decided can_buckle should be a list...
/obj/item/stool/New(var/newloc, var/new_material, var/new_padding_material)
..(newloc)
if(!new_material)
new_material = DEFAULT_WALL_MATERIAL
material = SSmaterials.get_material_by_name(new_material)
if(new_padding_material)
padding_material = SSmaterials.get_material_by_name(new_padding_material)
if(!istype(material))
/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 || (anchored && padding_material))
return
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.
S.color = material.icon_colour
if(material_alteration & MATERIAL_ALTERATION_NAME)
S.name = name // Get the name and desc of the stool, rather. We already went through all the trouble in New in bed.dm
if(material_alteration & MATERIAL_ALTERATION_DESC)
S.desc = desc
if(blood_DNA)
S.blood_DNA |= blood_DNA // Transfer blood, if any.
S.add_blood()
S.dir = dir
S.add_fingerprint(usr)
usr.put_in_hands(S)
qdel(src)
return
force = round(material.get_blunt_damage()*0.4)
update_icon()
/obj/item/stool/padded/New(var/newloc, var/new_material)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
/obj/item/stool/wood/New(var/newloc, var/new_material)
/obj/structure/bed/stool/wood/New(var/newloc)
..(newloc, MATERIAL_WOOD)
/obj/item/stool/bar
name = "bar stool"
base_icon = "bar_stool"
icon_state = "bar_stool_preview"
/obj/structure/bed/stool/padded
icon_state = "stool_padded_preview" //set for the map
/obj/item/stool/bar/padded
icon_state = "bar_stool_padded_preview"
/obj/structure/bed/stool/padded/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
/obj/item/stool/bar/padded/New(var/newloc, var/new_material)
/obj/structure/bed/stool/padded/red/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CARPET)
/obj/item/stool/hover
/obj/structure/bed/stool/padded/teal/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_TEAL)
/obj/structure/bed/stool/padded/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/padded/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/padded/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/padded/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/padded/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
/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..."
icon_state = "bar_stool_preview"
item_state = "bar_stool"
base_icon = "bar_stool"
held_item = /obj/item/material/stool/bar
/obj/structure/bed/stool/bar/wood/New(var/newloc)
..(newloc, MATERIAL_WOOD)
/obj/structure/bed/stool/bar/padded
icon_state = "bar_stool_padded_preview"
/obj/structure/bed/stool/bar/padded/brown/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_LEATHER)
/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)
/obj/structure/bed/stool/bar/padded/black/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLACK)
/obj/structure/bed/stool/bar/padded/green/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_GREEN)
/obj/structure/bed/stool/bar/padded/purp/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_PURPLE)
/obj/structure/bed/stool/bar/padded/blue/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BLUE)
/obj/structure/bed/stool/bar/padded/beige/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_BEIGE)
/obj/structure/bed/stool/bar/padded/lime/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH_LIME)
/obj/structure/bed/stool/bar/wood/New(var/newloc)
..(newloc, MATERIAL_WOOD)
/obj/structure/bed/stool/hover
name = "hoverstool"
desc = "Apply butt. Now as comfortable as a cloud."
desc = "As comfortable as a cloud."
icon_state = "hover_stool"
item_state_slots = null
item_state = "hover_stool"
base_icon = "hover_stool"
can_dismantle = FALSE
material_alteration = MATERIAL_ALTERATION_NAME || MATERIAL_ALTERATION_DESC
held_item = /obj/item/material/stool/hover
/obj/item/stool/hover/New(var/newloc, var/new_material)
/obj/structure/bed/stool/hover/New(var/newloc)
..(newloc, MATERIAL_SHUTTLE_SKRELL)
/obj/item/stool/hover/Initialize()
.=..()
set_light(1,1,LIGHT_COLOR_CYAN)
/obj/item/stool/hover/update_icon()
/obj/item/material/stool // Not intended to be spawned in. You will be sad. Thankfully will self-correct.
icon = 'icons/obj/furniture.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_chairs.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_chairs.dmi',
)
icon_state = "stool_item_preview"
item_state = "stool"
var/base_icon = "stool"
desc_info = "Use in-hand or alt-click to right this."
randpixel = 0
center_of_mass = null
force = 10 // Doesn't really matter. Will get overriden by set_material.
throwforce = 10
throw_range = 5
force_divisor = 0.4
w_class = ITEMSIZE_HUGE
use_material_name = FALSE
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
if(new_padding_material)
padding_material = SSmaterials.get_material_by_name(new_padding_material)
update_icon()
/obj/item/material/stool/attack_self(mob/user)
deploy(user)
/obj/item/material/stool/AltClick(mob/user)
deploy(user)
/obj/item/material/stool/MouseDrop(mob/user)
if((user && (!use_check(user))) && (user.contents.Find(src)) || in_range(src, user))
if(!istype(user, /mob/living/carbon/slime) && !istype(user, /mob/living/simple_animal))
if( !user.get_active_hand() ) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
to_chat(user, SPAN_NOTICE("You try to move your [temp.name], but cannot!"))
return
to_chat(user, SPAN_NOTICE("You pick up \the [src]."))
user.put_in_hands(src)
return
/obj/item/stool/update_icon()
// Prep icon.
icon_state = ""
cut_overlays()
var/list/stool_cache = SSicon_cache.stool_cache
// Base icon.
var/cache_key = "[initial(name)]-[material.name]"
if(!stool_cache[cache_key])
var/image/I = image(icon, base_icon)
I.color = material.icon_colour
stool_cache[cache_key] = I
add_overlay(stool_cache[cache_key])
// Padding overlay.
if(padding_material)
var/padding_cache_key = "[initial(name)]-padding-[padding_material.name]"
if(!stool_cache[padding_cache_key])
var/image/I = image(icon, "[base_icon]_padding")
I.color = padding_material.icon_colour
stool_cache[padding_cache_key] = I
add_overlay(stool_cache[padding_cache_key])
// Strings.
if(padding_material)
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
else
name = "[material.display_name] [initial(name)]"
desc = "A stool. Apply butt with care. It's made of [material.use_name]."
/obj/item/stool/proc/add_padding(var/padding_type)
padding_material = SSmaterials.get_material_by_name(padding_type)
update_icon()
/obj/item/stool/proc/remove_padding()
if(padding_material)
padding_material.place_sheet(get_turf(src))
padding_material = null
update_icon()
/obj/item/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if (prob(5))
user.visible_message("<span class='danger'>[user] breaks [src] over [target]'s back!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(target)
user.remove_from_mob(src)
dismantle()
qdel(src)
/obj/item/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if(prob(300 / force)) // Weaker materials are more likely to shatter on people randomly.
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
target.Weaken(10 * (1 - blocked))
target.apply_damage(20, BRUTE, hit_zone, blocked, src)
return
target.Weaken(force * BLOCKED_MULT(blocked))
target.apply_damage(force * 2, BRUTE, hit_zone, blocked, src)
user.visible_message(SPAN_DANGER("[user] [material.destruction_desc] \the [src] to pieces against \the [target]'s [hit_zone]!"), SPAN_DANGER("\The [src] [material.destruction_desc] to pieces against \the [target]'s [hit_zone]!"))
use_material_shatter = FALSE
shatter()
..()
/obj/item/stool/ex_act(severity)
/obj/item/material/stool/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
@@ -136,49 +203,71 @@
qdel(src)
return
/obj/item/stool/proc/dismantle()
if(material)
material.place_sheet(get_turf(src))
if(padding_material)
padding_material.place_sheet(get_turf(src))
/obj/item/material/stool/proc/deploy(mob/user)
for(var/obj/A in get_turf(loc))
if(istype(A, /obj/structure/bed))
to_chat(user, SPAN_DANGER("There is already a [A.name] here."))
return
if(A.density)
to_chat(user, SPAN_DANGER("There is already something here."))
return
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), material.name, padding_material ? padding_material.name : null) // Fuck me.
S.update_icon()
TransferComponents(S)
S.dir = user.dir // Plant it where the user's facing
if(blood_DNA)
S.blood_DNA |= blood_DNA // Transfer blood.
qdel(src)
/obj/item/stool/attackby(obj/item/W as obj, mob/user as mob)
if(W.iswrench())
playsound(src.loc, W.usesound, 50, 1)
dismantle()
qdel(src)
else if(istype(W,/obj/item/stack))
if(padding_material)
to_chat(user, "\The [src] is already padded.")
return
var/obj/item/stack/C = W
if(C.get_amount() < 1) // How??
qdel(C)
return
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
if(istype(W,/obj/item/stack/tile/carpet))
padding_type = MATERIAL_CARPET
else if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/M = W
if(M.material && (M.material.flags & MATERIAL_PADDING))
padding_type = "[M.material.name]"
if(!padding_type)
to_chat(user, "You cannot pad \the [src] with that.")
return
C.use(1)
if(!istype(src.loc, /turf))
user.drop_from_inventory(src)
src.forceMove(get_turf(src))
to_chat(user, "You add padding to \the [src].")
add_padding(padding_type)
return
else if (W.iswirecutter())
if(!padding_material)
to_chat(user, "\The [src] has no padding to remove.")
return
to_chat(user, "You remove the padding from \the [src].")
playsound(src, 'sound/items/wirecutter.ogg', 100, 1)
remove_padding()
/obj/item/material/stool/update_icon()
icon_state = "[base_icon]_item"
cut_overlays()
if(padding_material) // Handles padding overlay and inhand overlays.
var/image/padding_overlay = image(icon, "[base_icon]_item_padding")
padding_overlay.appearance_flags = RESET_COLOR
build_from_parts = TRUE
worn_overlay = "padding"
if(padding_material.icon_colour)
padding_overlay.color = padding_material.icon_colour
worn_overlay_color = padding_material.icon_colour
add_overlay(padding_overlay)
else
..()
build_from_parts = FALSE
update_held_icon()
/obj/item/material/stool/shatter()
if(padding_material)
padding_material.place_sheet(get_turf(src))
padding_material = null
update_icon()
..()
/obj/item/material/stool/ex_act(severity)
switch(severity)
if(1.0)
shatter(src)
return
if(2.0)
if(prob(50))
shatter(src)
return
if(3.0)
if(prob(5))
shatter(src)
return
/obj/item/material/stool/bar
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_item"
item_state = "hover_stool"
base_icon = "hover_stool"
origin_type = /obj/structure/bed/stool/hover
@@ -1,37 +1,34 @@
/obj/structure/bed/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
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/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/chair/wheelchair/set_dir()
/obj/structure/bed/stool/chair/office/wheelchair/set_dir()
. = ..()
if(buckled)
buckled.set_dir(dir)
/obj/structure/bed/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/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, "<span class='warning'>You lost your grip!</span>")
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())
@@ -49,14 +46,14 @@
if(user==pulling)
return
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
to_chat(user, "<span class='warning'>You cannot go there.</span>")
to_chat(user, SPAN_WARNING("You cannot go there."))
return
if(pulling && buckled && (buckled == user))
to_chat(user, "<span class='warning'>You cannot drive while being pushed.</span>")
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)
@@ -84,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/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, "<span class='warning'>You lost your grip!</span>")
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/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/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, "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>")
to_chat(user, SPAN_WARNING("You realize you are unable to push the wheelchair you sit in."))
return
if(!pulling)
pulling = user
@@ -131,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/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("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
pulling.attack_log += "\[[time_stamp()]\]<span class='warning'> Crashed [occupant.name]'s ([occupant.ckey]) [name] into \a [A]</span>"
occupant.attack_log += "\[[time_stamp()]\]<font color='orange'> Thrusted into \a [A] by [pulling.name] ([pulling.ckey]) with \the [name]</font>"
msg_admin_attack("[pulling.name] ([pulling.ckey]) has thrusted [occupant.name]'s ([occupant.ckey]) [name] into \a [A] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[pulling.x];Y=[pulling.y];Z=[pulling.z]'>JMP</a>)",ckey=key_name(pulling),ckey_target=key_name(occupant))
else
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/bed/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)
@@ -186,41 +123,22 @@
B.set_dir(newdir)
bloodiness--
/obj/structure/bed/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.
origin_type = /obj/structure/bed/stool/chair/office/wheelchair
deploy_verb = "deploy"
/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.desc = src.desc
R.color = src.color
qdel(src)
/obj/structure/bed/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)
/obj/item/material/stool/chair/wheelchair/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
@@ -1,4 +1,4 @@
/obj/structure/bed/chair/remote
/obj/structure/bed/stool/chair/remote
name = "virtual reality centre"
desc = "A comfortable chair with full audio-visual transposition centres."
icon_state = "shuttlechair_preview"
@@ -7,24 +7,24 @@
can_dismantle = FALSE
var/remote_network // Which network does this remote control belong to?
/obj/structure/bed/chair/remote/Initialize()
/obj/structure/bed/stool/chair/remote/Initialize()
. = ..()
if(portable_type)
name = "portable [name]"
/obj/structure/bed/chair/remote/Destroy()
/obj/structure/bed/stool/chair/remote/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/structure/bed/chair/remote/examine(mob/user)
/obj/structure/bed/stool/chair/remote/examine(mob/user)
..()
if(portable_type)
to_chat(user, FONT_SMALL(SPAN_NOTICE("Can be packed up by using a wrench on it.")))
/obj/structure/bed/chair/remote/update_icon()
/obj/structure/bed/stool/chair/remote/update_icon()
return
/obj/structure/bed/chair/remote/attackby(obj/item/W, mob/user)
/obj/structure/bed/stool/chair/remote/attackby(obj/item/W, mob/user)
if(portable_type && W.iswrench())
user.visible_message(SPAN_NOTICE("\The [user] starts dismantling \the [src]..."), SPAN_NOTICE("You start dismantling \the [src]..."))
if(do_after(user, 20 SECONDS, TRUE, src))
@@ -35,7 +35,7 @@
return
..()
/obj/structure/bed/chair/remote/user_buckle(mob/user)
/obj/structure/bed/stool/chair/remote/user_buckle(mob/user)
..()
var/area/A = get_area(src)
if(!A.powered(EQUIP))
@@ -50,7 +50,7 @@
START_PROCESSING(SSprocessing, src)
/obj/structure/bed/chair/remote/process()
/obj/structure/bed/stool/chair/remote/process()
..()
if(buckled)
var/area/A = get_area(src)
@@ -58,7 +58,7 @@
user_unbuckle(buckled)
// Return to our body in the unfortunate event that we get unbuckled while plugged in
/obj/structure/bed/chair/remote/user_unbuckle(mob/user)
/obj/structure/bed/stool/chair/remote/user_unbuckle(mob/user)
if(buckled)
var/mob/M = buckled
if(istype(M) && M.vr_mob)
@@ -1,8 +1,8 @@
/obj/structure/bed/chair/remote/human
/obj/structure/bed/stool/chair/remote/human
name = "virtual reality centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to a virtual reality body."
/obj/structure/bed/chair/remote/human/user_buckle(mob/user)
/obj/structure/bed/stool/chair/remote/human/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -1,21 +1,21 @@
/obj/structure/bed/chair/remote/mech
/obj/structure/bed/stool/chair/remote/mech
name = "mech control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the remote network."
remote_network = REMOTE_GENERIC_MECH
/obj/structure/bed/chair/remote/mech/user_buckle(mob/user)
/obj/structure/bed/stool/chair/remote/mech/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
SSvirtualreality.mech_selection(H, remote_network)
/obj/structure/bed/chair/remote/mech/portable
/obj/structure/bed/stool/chair/remote/mech/portable
portable_type = /obj/item/deployable_kit/remote_mech
/obj/structure/bed/chair/remote/mech/prison
/obj/structure/bed/stool/chair/remote/mech/prison
name = "brig mech control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to exosuits attached to the brig network."
remote_network = REMOTE_PRISON_MECH
/obj/structure/bed/chair/remote/mech/prison/portable
portable_type = /obj/item/deployable_kit/remote_mech/brig
/obj/structure/bed/stool/chair/remote/mech/prison/portable
portable_type = /obj/item/deployable_kit/remote_mech/brig
@@ -1,25 +1,25 @@
/obj/structure/bed/chair/remote/robot
/obj/structure/bed/stool/chair/remote/robot
name = "robot control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the remote network."
remote_network = REMOTE_GENERIC_ROBOT
/obj/structure/bed/chair/remote/robot/user_buckle(mob/user)
/obj/structure/bed/stool/chair/remote/robot/user_buckle(mob/user)
..()
if(ishuman(user))
var/mob/living/carbon/human/H = user
SSvirtualreality.robot_selection(H, remote_network)
/obj/structure/bed/chair/remote/robot/bunker
/obj/structure/bed/stool/chair/remote/robot/bunker
name = "bunker robot control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the bunker network."
remote_network = REMOTE_BUNKER_ROBOT
/obj/structure/bed/chair/remote/robot/prison
/obj/structure/bed/stool/chair/remote/robot/prison
name = "penal robot control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the penal network."
remote_network = REMOTE_PRISON_ROBOT
/obj/structure/bed/chair/remote/robot/warden
/obj/structure/bed/stool/chair/remote/robot/warden
name = "warden robot control centre"
desc = "A comfortable chair with full audio-visual transposition centres. This one gives you access to robots attached to the warden's network."
remote_network = REMOTE_WARDEN_ROBOT
remote_network = REMOTE_WARDEN_ROBOT
+44 -1
View File
@@ -503,6 +503,14 @@
/obj/structure/window/shuttle/scc_space_ship/cardinal
smooth = SMOOTH_MORE
/obj/structure/window/shuttle/scc
icon = 'icons/turf/shuttles_unique/scc_shuttle_pieces.dmi'
icon_state = "scc_window"
basestate = "scc_window"
health = 160
maxhealth = 160
smooth = 0
/obj/structure/window/shuttle/crescent
desc = "It looks rather strong."
@@ -581,7 +589,6 @@
reinf = TRUE
maximal_heat = T0C + 750
dir = 5
smooth = SMOOTH_TRUE
damage_per_fire_tick = 2.0
can_be_unanchored = TRUE
glasstype = /obj/item/stack/material/glass/reinforced
@@ -595,6 +602,42 @@
F.anchored = anchored
qdel(src)
/obj/structure/window/full/cardinal_smooth(adjacencies, var/list/dir_mods)
LAZYINITLIST(dir_mods)
var/north_wall = FALSE
var/east_wall = FALSE
var/south_wall = FALSE
var/west_wall = FALSE
if(adjacencies & N_NORTH)
var/turf/T = get_step(src, NORTH)
if(iswall(T))
dir_mods["[N_NORTH]"] = "-wall"
north_wall = TRUE
if(adjacencies & N_EAST)
var/turf/T = get_step(src, EAST)
if(iswall(T))
dir_mods["[N_EAST]"] = "-wall"
east_wall = TRUE
if(adjacencies & N_SOUTH)
var/turf/T = get_step(src, SOUTH)
if(iswall(T))
dir_mods["[N_SOUTH]"] = "-wall"
south_wall = TRUE
if(adjacencies & N_WEST)
var/turf/T = get_step(src, WEST)
if(iswall(T))
dir_mods["[N_WEST]"] = "-wall"
west_wall = TRUE
if(((adjacencies & N_NORTH) && (adjacencies & N_WEST)) && (north_wall || west_wall))
dir_mods["[N_NORTH][N_WEST]"] = "-n[north_wall ? "wall" : "win"]-w[west_wall ? "wall" : "win"]"
if(((adjacencies & N_NORTH) && (adjacencies & N_EAST)) && (north_wall || east_wall))
dir_mods["[N_NORTH][N_EAST]"] = "-n[north_wall ? "wall" : "win"]-e[east_wall ? "wall" : "win"]"
if(((adjacencies & N_SOUTH) && (adjacencies & N_WEST)) && (south_wall || west_wall))
dir_mods["[N_SOUTH][N_WEST]"] = "-s[south_wall ? "wall" : "win"]-w[west_wall ? "wall" : "win"]"
if((adjacencies & N_SOUTH) && (adjacencies & N_EAST) && (south_wall || east_wall))
dir_mods["[N_SOUTH][N_EAST]"] = "-s[south_wall ? "wall" : "win"]-e[east_wall ? "wall" : "win"]"
return ..(adjacencies, dir_mods)
/obj/structure/window/full/phoron
name = "reinforced borosilicate window"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."