mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 01:22:13 +00:00
`code/setup.dm`: Fixed large amounts of indenting. Fixed large numbers of comments and their clarity. Added parentheses to macros using expressions. Added FIXME for unused duplicated macros, without certainty of their requirement. Removed some duplicate macros present. (`BRUTE`, `BURN`, etc.) Removed macro `PI`, and replaced instances of its use with `var/const/Pi` from `maths.dm` `code/global.dm`: Fixed large amounts of indenting, added newlines to long single-lined list definitions. Slightly clarified comments.
94 lines
3.7 KiB
Plaintext
94 lines
3.7 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."
|
|
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
|
item_state = "space"
|
|
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
|
|
body_parts_covered = HEAD|FACE|EYES
|
|
cold_protection = HEAD
|
|
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
|
siemens_coefficient = 0.9
|
|
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
|
|
|
|
var/obj/machinery/camera/camera
|
|
var/list/camera_networks
|
|
|
|
light_overlay = "helmet_light"
|
|
brightness_on = 4
|
|
on = 0
|
|
|
|
/obj/item/clothing/head/helmet/space/attack_self(mob/user)
|
|
|
|
if(!camera && camera_networks)
|
|
|
|
if(!icon_action_button)
|
|
icon_action_button = "[icon_state]"
|
|
|
|
camera = new /obj/machinery/camera(src)
|
|
camera.network = camera_networks
|
|
cameranet.removeCamera(camera)
|
|
camera.c_tag = user.name
|
|
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
|
return 1
|
|
|
|
..()
|
|
|
|
/obj/item/clothing/head/helmet/space/examine()
|
|
..()
|
|
if(camera_networks && get_dist(usr,src) <= 1)
|
|
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
|
|
|
/obj/item/clothing/suit/space
|
|
name = "Space suit"
|
|
desc = "A suit that protects against low pressure environments. \"NSS EXODUS\" is written in large block letters on the back."
|
|
icon_state = "space"
|
|
item_state = "s_suit"
|
|
w_class = 4//bulky item
|
|
gas_transfer_coefficient = 0.01
|
|
permeability_coefficient = 0.02
|
|
flags = FPRINT | TABLEPASS | STOPPRESSUREDAMAGE | THICKMATERIAL
|
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
|
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/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.9
|
|
species_restricted = list("exclude","Diona","Vox", "Xenomorph", "Xenomorph Drone", "Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Queen")
|
|
|
|
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)
|
|
..()
|
|
|
|
// 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 /datum/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/datum/organ/external/E in supporting_limbs)
|
|
E.status &= ~ ORGAN_SPLINTED
|
|
user << "The suit stops supporting your [E.display_name]."
|
|
supporting_limbs = list() |