Skip to content

Commit fb7c54b

Browse files
authored
Adds a heart/bloodvessel requirement tip to the disgorger UI (#274)
* blood vessel info for disgorger * oops * other disgorger fixes The reagent list now (finally) works (I think it's just been broken forever) kidney eff max list is a slightly more reasonable number
1 parent 13276e7 commit fb7c54b

2 files changed

Lines changed: 25 additions & 5 deletions

File tree

code/modules/aberrants/organs/machinery/disgorger.dm

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
var/spit_target
2525
var/spit_range = 2 // For var-edits
2626
var/has_brain = FALSE
27-
27+
/// does this disgorger have sufficient heart efficiency?
28+
var/has_heart = FALSE
29+
/// does this disgorger have sufficient blood vessel efficiency?
30+
var/has_blood = FALSE
2831
// Production
2932
var/grind_rate = 8 // How many ticks between each processed item
3033
var/current_tick = 0
@@ -63,7 +66,6 @@
6366
RefreshParts()
6467

6568
/obj/machinery/reagentgrinder/industrial/disgorger/examine(mob/user, extra_description = "")
66-
..()
6769
var/accepted
6870

6971
if(accepted_objects?.len)
@@ -82,6 +84,7 @@
8284
if(accepted)
8385
accepted = copytext(accepted, 1, length(accepted) - 1)
8486
extra_description += span_notice("\n<i>Accepts [accepted].</i>")
87+
..(user, extra_description)
8588

8689
/obj/machinery/reagentgrinder/industrial/disgorger/proc/check_reagents(obj/item/I, mob/user)
8790
if(!I.reagents || !I.reagents.total_volume)
@@ -261,7 +264,8 @@
261264
var/throughput_mult = 0
262265

263266
has_brain = FALSE
264-
267+
has_heart = FALSE
268+
has_blood = FALSE
265269
for(var/component in component_parts)
266270
if(istype(component, /obj/item/electronics/circuitboard/disgorger))
267271
var/obj/item/electronics/circuitboard/disgorger/C = component
@@ -286,8 +290,12 @@
286290
muscle_eff += O.organ_efficiency[eff]
287291
if(OP_BLOOD_VESSEL)
288292
blood_vessel_eff += O.organ_efficiency[eff]
293+
if(blood_vessel_eff > 75)
294+
has_blood = TRUE
289295
if(OP_HEART)
290296
heart_eff += O.organ_efficiency[eff]
297+
if(heart_eff > 75)
298+
has_heart = TRUE
291299
if(BP_BRAIN)
292300
has_brain = TRUE
293301
brain_eff += O.organ_efficiency[eff]
@@ -320,7 +328,7 @@
320328
/datum/reagent/stim = 0.5,
321329
/datum/reagent/drug/psilocybin = 2
322330
))
323-
if(kidney_eff > 199)
331+
if(kidney_eff > 150)
324332
LAZYADD(accepted_reagents, list(
325333
/datum/reagent/medicine/suppressital = 1,
326334
/datum/reagent/medicine/methylphenidate = 1,
@@ -335,7 +343,6 @@
335343
))
336344

337345
throughput_mult = (heart_eff > 79) ? round((heart_eff + blood_vessel_eff) / 650, 0.05) : 0.05
338-
339346
capacity_mod = round((stomach_eff / 15) + carrion_chem_eff)
340347
tick_reduction = round((muscle_eff / 20) + carrion_maw_eff)
341348
production_mod = round(throughput_mult * ((stomach_eff / 2) + (liver_eff / 4) + (kidney_eff / 4) + (carrion_maw_eff)) / 100, 0.01)
@@ -355,6 +362,8 @@
355362
/obj/machinery/reagentgrinder/industrial/disgorger/nano_ui_data()
356363
. = ..()
357364

365+
.["has_heart"] = has_heart
366+
.["has_blood"] = has_blood
358367
.["biomatter_counter"] = biomatter_counter
359368
.["research_counter"] = research_counter
360369
.["research_rate"] = round(100 / research_denominator, 1)

nano/templates/disgorger.tmpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
{{:helper.meatMode()}}
2+
<div class='notice'><span class='noticePlaceholder'>
3+
{{if data.has_heart && data.has_blood}}
4+
PULMONET STATUS: SUFFICIENT FLOW
5+
{{else data.has_blood}}
6+
PULMONET STATUS: INSUFFICIENT CARDIAC TISSUE
7+
{{else data.has_heart}}
8+
PULMONET STATUS: INSUFFICIENT VASCULAR TISSUE
9+
{{else}}
10+
PULMONET STATUS: NO FLOW - MISSING CARDIAC SYSTEM
11+
{{/if}}
12+
</span></div>
213
<div class="statusDisplay" style="min-height: 180px;">
314
<div class="itemLabelWide" style="width: 100%">
415
Biotic substrate stored: {{if data.biomatter_counter}}{{:data.biomatter_counter}}{{else}}0{{/if}} / 60

0 commit comments

Comments
 (0)