mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MOSTLY MODULAR] Hardlight Rollerbed Medicell (#9394)
* ports over work from before * makes the roller bed dissappear after a set while stockpiling is bad * adds icons and makes it so there is only one bed spawned per turf. * adds item to techweb * Update modular_skyrat/modules/modular_weapons/code/modules/projectiles/guns/energy/cell_based/medgun/medcells.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * applies suggestions from code review * Update medcells.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
@@ -931,6 +931,7 @@
|
||||
"holopad",
|
||||
//SKYRAT EDIT - ADDITION MEDIGUNS
|
||||
"gownmedicell",
|
||||
"bedmedicell",
|
||||
//SKYRAT EDIT END
|
||||
"vendatray",
|
||||
)
|
||||
|
||||
+54
@@ -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
|
||||
|
||||
+5
@@ -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.
|
||||
|
||||
@@ -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."
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user