diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 1a061e4a7ce..2892b5431a3 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -931,6 +931,7 @@ "holopad", //SKYRAT EDIT - ADDITION MEDIGUNS "gownmedicell", + "bedmedicell", //SKYRAT EDIT END "vendatray", ) diff --git a/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medcells.dm b/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medcells.dm index 6f1459f1eef..8e053b89bc9 100644 --- a/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medcells.dm +++ b/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medcells.dm @@ -376,6 +376,27 @@ return FALSE . = ..() +//Hardlight Rollerbed Medicell +/obj/item/ammo_casing/energy/medical/utility/bed + projectile_type = /obj/projectile/energy/medical/utility/bed + select_name = "rollerbed" + select_color = "#00fff2" + +/obj/projectile/energy/medical/utility/bed + name = "hardlight bed field" + +/obj/projectile/energy/medical/utility/bed/on_hit(mob/living/target) + . = ..() + if(!istype(target, /mob/living/carbon/human)) //Only checks if they are human, it would make sense for this to work on the dead. + return FALSE + for(var/obj/structure/bed/roller/medigun in target.loc) //Prevents multiple beds from being spawned on the same turf + return FALSE + if(HAS_TRAIT(target, TRAIT_FLOORED) || target.resting) //Is the person already on the floor to begin with? Mostly a measure to prevent spamming. + new /obj/structure/bed/roller/medigun(target.loc) + return TRUE + else + return FALSE + //Objects Used by medicells. /obj/item/clothing/suit/toggle/labcoat/hospitalgown/hardlight name = "Hardlight Hospital Gown" @@ -416,6 +437,39 @@ if(heals_left <= 0) qdel(src) +//Hardlight Roller Bed. +/obj/structure/bed/roller/medigun + name = "Hardlight Roller Bed" + desc = "A Roller Bed made out of Hardlight" + icon = 'modular_skyrat/modules/modular_weapons/icons/obj/guns/mediguns/misc.dmi' + max_integrity = 1 + buildstacktype = FALSE //It would not be good if people could use this to farm materials. + var/deploytime = 20 SECONDS //How long the roller beds lasts for without someone buckled to it. + +/obj/structure/bed/roller/medigun/Initialize() + . = ..() + addtimer(CALLBACK(src, .proc/check_bed), deploytime) + +/obj/structure/bed/roller/medigun/proc/check_bed() //Checks to see if anyone is buckled to the bed, if not the bed will qdel itself. + if(!has_buckled_mobs()) + qdel(src) //Deletes the roller bed, mostly meant to prevent stockpiling and clutter + return TRUE //There is nothing on the bed. + else + return FALSE //There is something on the bed. + +/obj/structure/bed/roller/medigun/post_unbuckle_mob(mob/living/M) + . = ..() + qdel(src) + +/obj/structure/bed/roller/medigun/MouseDrop(over_object, src_location, over_location) + if(over_object == usr && Adjacent(usr)) + if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE)) + return FALSE + if(has_buckled_mobs()) + return FALSE + usr.visible_message(span_notice("[usr] deactivates \the [src]."), span_notice("You deactivate \the [src].")) + qdel(src) + //End of utility #undef UPGRADED_MEDICELL_PASSFLAGS #undef MINIMUM_TEMP_DIFFERENCE diff --git a/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medguns.dm b/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medguns.dm index 11f1b68b6d9..aa2c51b7415 100644 --- a/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medguns.dm +++ b/modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medguns.dm @@ -239,6 +239,11 @@ icon_state = "salve" ammo_type = /obj/item/ammo_casing/energy/medical/utility/salve +/obj/item/weaponcell/medical/utility/bed + name = "Hardlight Roller Bed Medicell" + desc = "A medicell that summons a temporary roller bed under a patient already lying on the floor" + icon_state = "gown" + ammo_type = /obj/item/ammo_casing/energy/medical/utility/bed //Empty Medicell// /obj/item/device/custom_kit/empty_cell //Having the empty cell as an upgrade kit sounds jank, but it should work well. diff --git a/modular_skyrat/modules/modular_weapons/code/modules/research/designs/mediguns.dm b/modular_skyrat/modules/modular_weapons/code/modules/research/designs/mediguns.dm index 16180fd07ad..064ae96d542 100644 --- a/modular_skyrat/modules/modular_weapons/code/modules/research/designs/mediguns.dm +++ b/modular_skyrat/modules/modular_weapons/code/modules/research/designs/mediguns.dm @@ -121,6 +121,16 @@ category = list("Ammo") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/bedmedicell + name = "Hardlight Roller Bed Medicell" + desc = "A Medicell that deploys a hardlight roller bed under a patient lying down." + id = "bedmedicell" + build_type = PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/plastic = 2000, /datum/material/glass = 2000) + build_path = /obj/item/weaponcell/medical/utility/bed + category = list("Ammo") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + /datum/design/salvemedicell name = "Empty Salve Medicell" desc = "A Empty Medicell that can be upgraded by aloe into a usable Salve Medicell." diff --git a/modular_skyrat/modules/modular_weapons/icons/obj/guns/mediguns/misc.dmi b/modular_skyrat/modules/modular_weapons/icons/obj/guns/mediguns/misc.dmi index a6ff01f3e26..5c44675c447 100644 Binary files a/modular_skyrat/modules/modular_weapons/icons/obj/guns/mediguns/misc.dmi and b/modular_skyrat/modules/modular_weapons/icons/obj/guns/mediguns/misc.dmi differ