mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 16:12:19 +00:00
This feature was broken due to some hair name changes. The entire stuff was remade to be a proc in the machinery object, that also checks for any hair with a length longer than four.
112 lines
4.0 KiB
Plaintext
112 lines
4.0 KiB
Plaintext
//Spacesuit
|
|
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
|
// Meaning the the suit is defined directly after the corrisponding helmet. Just like below!
|
|
|
|
/obj/item/clothing/head/helmet/space
|
|
name = "space helmet"
|
|
icon_state = "space"
|
|
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
|
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
|
item_state_slots = list(
|
|
slot_l_hand_str = "s_helmet",
|
|
slot_r_hand_str = "s_helmet"
|
|
)
|
|
permeability_coefficient = 0.01
|
|
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
|
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|BLOCKHAIR
|
|
body_parts_covered = HEAD|FACE|EYES
|
|
cold_protection = HEAD
|
|
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
|
siemens_coefficient = 0.5
|
|
species_restricted = list("exclude","Diona","Vox","Golem")
|
|
flash_protection = FLASH_PROTECTION_MAJOR
|
|
allow_hair_covering = FALSE
|
|
|
|
var/obj/machinery/camera/camera
|
|
|
|
action_button_name = "Toggle Helmet Light"
|
|
light_overlay = "helmet_light"
|
|
brightness_on = 4
|
|
light_wedge = LIGHT_WIDE
|
|
on = 0
|
|
|
|
/obj/item/clothing/head/helmet/space/Initialize()
|
|
. = ..()
|
|
if(camera)
|
|
verbs += /obj/item/clothing/head/helmet/space/proc/toggle_camera
|
|
|
|
/obj/item/clothing/head/helmet/space/proc/toggle_camera()
|
|
set name = "Toggle Helmet Camera"
|
|
set category = "Object"
|
|
set src in usr
|
|
|
|
if(ispath(camera))
|
|
camera = new camera(src)
|
|
camera.set_status(0)
|
|
|
|
if(camera)
|
|
camera.set_status(!camera.status)
|
|
if(camera.status)
|
|
camera.c_tag = FindNameFromID(usr)
|
|
to_chat(usr, "<span class='notice'>User scanned as [camera.c_tag]. Camera activated.</span>")
|
|
else
|
|
to_chat(usr, "<span class='notice'>Camera deactivated.</span>")
|
|
|
|
/obj/item/clothing/head/helmet/space/examine(var/mob/user)
|
|
if(..(user, 1) && camera)
|
|
to_chat(user, "This helmet has a built-in camera. It's [!ispath(camera) && camera.status ? "" : "in"]active.")
|
|
|
|
/obj/item/clothing/suit/space
|
|
name = "space suit"
|
|
desc = "A suit that protects against low pressure environments. \"NSS AURORA\" is written in large block letters on the back."
|
|
icon_state = "space"
|
|
item_state = "s_suit"
|
|
randpixel = 0
|
|
center_of_mass = null
|
|
w_class = 4//bulky item
|
|
gas_transfer_coefficient = 0.01
|
|
permeability_coefficient = 0.02
|
|
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL
|
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
|
allowed = list(/obj/item/device/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
|
|
slowdown = 3
|
|
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
|
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
|
|
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
|
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
|
siemens_coefficient = 0.5
|
|
species_restricted = list("exclude","Diona","Vox","Golem")
|
|
|
|
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.
|
|
|
|
/obj/item/clothing/suit/space/equipped(mob/M)
|
|
check_limb_support()
|
|
..()
|
|
|
|
/obj/item/clothing/suit/space/dropped(var/mob/user)
|
|
check_limb_support(user)
|
|
..()
|
|
|
|
/obj/item/clothing/suit/space/on_slotmove(var/mob/user)
|
|
check_limb_support(user)
|
|
..()
|
|
|
|
// Some space suits are equipped with reactive membranes that support
|
|
// broken limbs - at the time of writing, only the ninja suit, but
|
|
// I can see it being useful for other suits as we expand them. ~ Z
|
|
// The actual splinting occurs in /obj/item/organ/external/proc/fracture()
|
|
/obj/item/clothing/suit/space/proc/check_limb_support(var/mob/living/carbon/human/user)
|
|
|
|
// If this isn't set, then we don't need to care.
|
|
if(!supporting_limbs || !supporting_limbs.len)
|
|
return
|
|
|
|
if(!istype(user) || user.wear_suit == src)
|
|
return
|
|
|
|
// Otherwise, remove the splints.
|
|
for(var/obj/item/organ/external/E in supporting_limbs)
|
|
E.status &= ~ ORGAN_SPLINTED
|
|
to_chat(user, "The suit stops supporting your [E.name].")
|
|
supporting_limbs = list()
|