Skip to content

Commit

Permalink
Organization
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Mar 22, 2024
1 parent 0a50cf9 commit e03c4b8
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 66 deletions.
15 changes: 15 additions & 0 deletions code/game/objects/items/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,18 @@
icon_state = "syndieenvirobag_folded"
unfoldedbag_path = /obj/structure/closet/body_bag/environmental/prisoner/pressurized/syndicate
resistance_flags = ACID_PROOF | FIRE_PROOF | FREEZE_PROOF | LAVA_PROOF

// NON-MODULE CHANGE / addition
/obj/item/bodybag/stasis
name = /obj/structure/closet/body_bag/environmental/stasis::name
desc = /obj/structure/closet/body_bag/environmental/stasis::desc
max_integrity = /obj/structure/closet/body_bag/environmental/stasis::max_integrity
icon = 'maplestation_modules/icons/obj/bodybag.dmi'
icon_state = "stasis_bag_folded"
unfoldedbag_path = /obj/structure/closet/body_bag/environmental/stasis

/obj/item/bodybag/stasis/deploy_bodybag(mob/user, atom/location)
var/obj/structure/closet/body_bag/environmental/stasis/bag = ..()
bag.last_filter_update = -1
bag.update_integrity(get_integrity())
return bag
97 changes: 31 additions & 66 deletions code/game/objects/structures/crates_lockers/closets/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
var/obj/item/bodybag/foldedbag_instance = null
/// The tagged name of the bodybag, also used to check if the bodybag IS tagged.
var/tag_name
/// Whether you can health-analyzer through the walls of the bodybag
var/can_scan_through = FALSE


/obj/structure/closet/body_bag/Initialize(mapload)
Expand Down Expand Up @@ -174,6 +176,32 @@
folding_bodybag.w_class = max_weight_of_contents
the_folder.put_in_hands(folding_bodybag)

/obj/structure/closet/body_bag/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs)
. = ..()
ADD_TRAIT(arrived, TRAIT_FLOORED, REF(src))

/obj/structure/closet/body_bag/Exited(atom/movable/gone, direction)
. = ..()
REMOVE_TRAIT(gone, TRAIT_FLOORED, REF(src))

/obj/structure/closet/body_bag/examine(mob/user)
. = ..()
if(can_scan_through)
. += span_notice("The walls of the bag are thin enough to scan through via a <b>health analyzer</b>.")

/obj/structure/closet/body_bag/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
. = ..()
if(. & ITEM_INTERACT_ANY_BLOCKER)
return .

if(!can_scan_through || !istype(tool, /obj/item/healthanalyzer))
return .

for(var/mob/living/frozen in src)
return tool.interact_with_atom(frozen, user)

return .

/// Environmental bags. They protect against bad weather.

/obj/structure/closet/body_bag/environmental
Expand Down Expand Up @@ -370,6 +398,7 @@
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
foldedbag_path = null
weather_protection = list(TRAIT_VOIDSTORM_IMMUNE, TRAIT_SNOWSTORM_IMMUNE)
can_scan_through = TRUE

/obj/structure/closet/body_bag/environmental/hardlight/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
if(damage_type in list(BRUTE, BURN))
Expand All @@ -382,45 +411,13 @@
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
foldedbag_path = null
weather_protection = list(TRAIT_VOIDSTORM_IMMUNE, TRAIT_SNOWSTORM_IMMUNE)
can_scan_through = TRUE

/obj/structure/closet/body_bag/environmental/prisoner/hardlight/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
if(damage_type in list(BRUTE, BURN))
playsound(src, 'sound/weapons/egloves.ogg', 80, TRUE)

// NON-MODULE CHANGE START
/obj/structure/closet/body_bag
/// Whether you can health-analyzer through the walls of the bodybag
var/can_scan_through = FALSE

/obj/structure/closet/body_bag/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs)
. = ..()
ADD_TRAIT(arrived, TRAIT_FLOORED, REF(src))

/obj/structure/closet/body_bag/Exited(atom/movable/gone, direction)
. = ..()
REMOVE_TRAIT(gone, TRAIT_FLOORED, REF(src))

/obj/structure/closet/body_bag/environmental/hardlight
can_scan_through = TRUE

/obj/structure/closet/body_bag/examine(mob/user)
. = ..()
if(can_scan_through)
. += span_notice("The walls of the bag are thin enough to scan through via a <b>health analyzer</b>.")

/obj/structure/closet/body_bag/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
. = ..()
if(. & ITEM_INTERACT_ANY_BLOCKER)
return .

if(!can_scan_through || !istype(tool, /obj/item/healthanalyzer))
return .

for(var/mob/living/frozen in src)
return tool.interact_with_atom(frozen, user)

return .

// NON-MODULE CHANGE / addition
/obj/structure/closet/body_bag/environmental/stasis
name = "stasis bodybag"
desc = "A disposable bodybag designed to keep its contents in stasis, preventing decay and further injury. \
Expand Down Expand Up @@ -607,35 +604,3 @@
/obj/structure/closet/body_bag/environmental/stasis/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)

// The thing
/obj/item/bodybag/stasis
name = /obj/structure/closet/body_bag/environmental/stasis::name
desc = /obj/structure/closet/body_bag/environmental/stasis::desc
max_integrity = /obj/structure/closet/body_bag/environmental/stasis::max_integrity
icon = 'maplestation_modules/icons/obj/bodybag.dmi'
icon_state = "stasis_bag_folded"
unfoldedbag_path = /obj/structure/closet/body_bag/environmental/stasis

/obj/item/bodybag/stasis/deploy_bodybag(mob/user, atom/location)
var/obj/structure/closet/body_bag/environmental/stasis/bag = ..()
bag.last_filter_update = -1
bag.update_integrity(get_integrity())
return bag

// The design
/datum/design/stasis_bag
name = "Stasis Bodybag"
desc = "A disposal bodybag designed to stabilize patients in the field in critical condition. \
The bag itself cannot maintain stasis for long, and will eventually fall apart."
id = "stasis_bodybag"
build_type = PROTOLATHE
materials = list(
/datum/material/plastic = 10 * SHEET_MATERIAL_AMOUNT, // Very plastic expensive (but only because cloth cannot be put in the lathe)
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT,
)
build_path = /obj/item/bodybag/stasis
category = list(RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_MEDICAL)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL

// NON-MODULE CHANGE END
15 changes: 15 additions & 0 deletions code/modules/research/designs/medical_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,21 @@
)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL | DEPARTMENT_BITFLAG_SCIENCE

// NON-MODULE CHANGE / addition
/datum/design/stasis_bag
name = "Stasis Bodybag"
desc = "A disposal bodybag designed to stabilize patients in the field in critical condition. \
The bag itself cannot maintain stasis for long, and will eventually fall apart."
id = "stasis_bodybag"
build_type = PROTOLATHE | AWAY_LATHE
materials = list(
/datum/material/plastic = 10 * SHEET_MATERIAL_AMOUNT, // Very plastic expensive (but only because cloth cannot be put in the lathe)
/datum/material/silver = HALF_SHEET_MATERIAL_AMOUNT,
)
build_path = /obj/item/bodybag/stasis
category = list(RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_MEDICAL)
departmental_flags = DEPARTMENT_BITFLAG_MEDICAL

/datum/design/plasmarefiller
name = "Plasmaman Jumpsuit Refill"
desc = "A refill pack for the auto-extinguisher on Plasma-man suits."
Expand Down

0 comments on commit e03c4b8

Please sign in to comment.