From 6ec68b1d6e0bb6bcdff96ab7d13eab6aa79931db Mon Sep 17 00:00:00 2001 From: ExcessiveUseOfCobblestone Date: Wed, 26 Feb 2020 23:11:28 -0500 Subject: [PATCH] penlite bros --- code/game/machinery/defibrillator_mount.dm | 38 ++++++++++++------ .../research/designs/medical_designs.dm | 15 ++++++- code/modules/research/techweb/all_nodes.dm | 2 +- icons/obj/machines/defib_mount.dmi | Bin 534 -> 635 bytes 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index f6cc265ee6a..0d41bf1e742 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -3,12 +3,12 @@ //Not being adjacent will cause the paddles to snap back /obj/machinery/defibrillator_mount name = "defibrillator mount" - desc = "Holds and recharges defibrillators. You can grab the paddles if one is mounted." + desc = "Holds defibrillators. You can grab the paddles if one is mounted." icon = 'icons/obj/machines/defib_mount.dmi' icon_state = "defibrillator_mount" density = FALSE use_power = IDLE_POWER_USE - idle_power_usage = 1 + idle_power_usage = 0 power_channel = EQUIP req_one_access = list(ACCESS_MEDICAL, ACCESS_HEADS, ACCESS_SECURITY) //used to control clamps var/obj/item/defibrillator/defib //this mount's defibrillator @@ -32,26 +32,20 @@ else . += "Its locking clamps can be [clamps_locked ? "dis" : ""]engaged by swiping an ID with access." -/obj/machinery/defibrillator_mount/process() - if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational()) - use_power(200) - defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5% - update_icon() - /obj/machinery/defibrillator_mount/update_overlays() . = ..() - + if(!defib) return - + . += "defib" - + if(defib.powered) . += (defib.safety ? "online" : "emagged") var/ratio = defib.cell.charge / defib.cell.maxcharge ratio = CEILING(ratio * 4, 1) * 25 . += "charge[ratio]" - + if(clamps_locked) . += "clamps" @@ -138,6 +132,19 @@ defib = null update_icon() +/obj/machinery/defibrillator_mount/charging + name = "PENLITE defibrillator mount" + desc = "Holds defibrillators. You can grab the paddles if one is mounted. This PENLITE variant also allows for slow, passive recharging of the defibrillator." + icon_state = "penlite_mount" + idle_power_usage = 1 + +/obj/machinery/defibrillator_mount/charging/process() + if(defib?.cell?.charge < defib.cell.maxcharge && is_operational()) + use_power(100) + defib.cell.give(80) + update_icon() + + //wallframe, for attaching the mounts easily /obj/item/wallframe/defib_mount name = "unhooked defibrillator mount" @@ -148,3 +155,10 @@ w_class = WEIGHT_CLASS_BULKY result_path = /obj/machinery/defibrillator_mount pixel_shift = -28 + +/obj/item/wallframe/defib_mount/charging + name = "unhooked PENLITE defibrillator mount" + desc = "A frame for a PENLITE defibrillator mount. It can't be removed once it's placed." + icon_state = "penlite_mount" + custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 100, /datum/material/silver = 50) + result_path = /obj/machinery/defibrillator_mount/charging diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 92ecdbfa67b..4d568a13b18 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -163,14 +163,25 @@ /datum/design/defibrillator_mount name = "Defibrillator Wall Mount" - desc = "An all-in-one mounted frame for holding defibrillators, complete with ID-locked clamps and recharging cables." - id = "defibmount" + desc = "A mounted frame for holding defibrillators, providing easy security." + id = "defibmountdefault" build_type = PROTOLATHE materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000) build_path = /obj/item/wallframe/defib_mount category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/defibrillator_mount_charging + name = "PENLITE Defibrillator Wall Mount" + desc = "An all-in-one mounted frame for holding defibrillators, complete with ID-locked clamps and recharging cables. The PENLITE version also allows for slow recharging of the defib's battery." + id = "defibmount" + build_type = PROTOLATHE + materials = list(/datum/material/iron = 2000, /datum/material/glass = 1000, /datum/material/silver = 500) + build_path = /obj/item/wallframe/defib_mount/charging + category = list("Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + + /datum/design/defibrillator_compact name = "Compact Defibrillator" desc = "A compact defibrillator that can be worn on a belt." diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 54095e6b354..31a099dbc9c 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -57,7 +57,7 @@ display_name = "Basic Medical Equipment" description = "Basic medical tools and equipment." design_ids = list("cybernetic_liver", "cybernetic_heart", "cybernetic_lungs", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat", - "surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper") + "surgical_drapes", "syringe", "plumbing_rcd", "beaker", "large_beaker", "xlarge_beaker", "dropper", "defibmountdefault") /////////////////////////Biotech///////////////////////// /datum/techweb_node/biotech diff --git a/icons/obj/machines/defib_mount.dmi b/icons/obj/machines/defib_mount.dmi index 3f6e3e1d17362372ee4fa5dde49a1ad494d1db83..4518bb33783ae55510be5f50beb7b182fdbb9e87 100644 GIT binary patch delta 553 zcmV+^0@nSO1p5S#Bmq~EB|U#_e3AecF%(3AIj%wg005S*crZuCn(^b0d!JMQvg8b*k%9#0Kj@wSad{Xb7OL8aCB*JZU6vyoQ;vo3c@fDMc2t!gmx>^ zhsBi}X^}4MFGw_F63C+@QStAMEr<&--OVs(E_3hXWZxb7fwadS-@$)*X${$t&APzo zAz2WysVj^GNG`(M_&@{1GGlO+XD5}S!Mc;SHxn|9m~=i)ON_3LYMATK&P7o@`Xn|< zCn;-`G?2tVQ_g|?=At$dxwB!gefdK!r&q+75 z(}Q2+n~QzT^81Sb00DmnNkl`;-6x0002|p>kyR`PInY1!eU# zUfnZYKtG=@KnU6ZAxr^DfEq3Jd{NT`y!CKtP6J7R-g?=cfZ91g|9@{9+j`s11xWK- rs0nu9dp=13@s%Br{9XV60O$1quyz}D`uB<`00000NkvXXu0mjfvD*4% delta 451 zcmV;!0X+Wu1eOGlBmqB>B|U%t{{R600FZ{0aR2}S0d!JMQvg8b*k%9#0K0lrSad{X zb7OL8aCB*JZU6vyoQ;u93c@fDh1ba`Lc0}dtHqTYX^}4M6(pKz63CAvQStW17Q{s* zWj1e^ZyxiQoE+L?*OTVd;RiS`ts#4|T^ATVB?}@pn+hWVl8Z1kKG1&vQDzJVd2v!H z8mv2Odp9A&h)L(;w8Us|RKujdJ6A>Z%_p(ZI!Rfhq=6&`nsN?oo{QlaDEj(jTg}$b z@q#)IRh>>bf_1SF+%0u1i@%mRY5Qh;;~RyDffD1rw?zN|0KQ2?K~!jg?bqE3gD?z+ zVVAACS%1;{zt&aOlj?soP@Q$~J|0wwkdIUpvkbsh+-4RxheY;x}RPZvg-R0DwzqyX|_f)OR=Qlm=QIaN1U@_x(9Z t0000006?ti|9u#=`Z%7K2mk>5+#7N$2(-Hu7l;4=002ovPDHLkV1m$)!14e9