This commit is contained in:
Metis
2024-05-26 18:52:31 -04:00
parent 77ef9cfb53
commit 9744bc614d
4 changed files with 37 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
/obj/item/integrated_circuit/input/fat_scanner
name = "integrated body fat analyser"
desc = "A very small version of the common medical analyser adjusted to scan a target's weight."
icon_state = "medscan"
complexity = 4
inputs = list("target" = IC_PINTYPE_REF)
outputs = list(
"weight (pounds)" = IC_PINTYPE_NUMBER,
"weight (BFI)" = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
power_draw_per_use = 40
/obj/item/integrated_circuit/input/fat_scanner/do_work()
var/mob/living/carbon/fatty = get_pin_data_as_type(IC_INPUT, 1, /mob/living)
if(!istype(fatty)) //Invalid input
return
if(!fatty.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
return
var/weight_in_pounds = fatty.calculate_weight_in_pounds()
var/weight_in_fatness = fatty.fatness
set_pin_data(IC_OUTPUT, 1, weight_in_pounds)
set_pin_data(IC_OUTPUT, 2, weight_in_fatness)
push_data()
activate_pin(2)
+4 -1
View File
@@ -71,8 +71,11 @@
weighperson(HM)
/obj/structure/scale/proc/weighperson(mob/living/carbon/human/fatty)
src.lastreading = round((140 + (fatty.fatness*src.fatnessToWeight))*(fatty.size_multiplier**2)*((fatty.dna.features["taur"] != "None") ? 2.5: 1))
src.lastreading = fatty.calculate_weight_in_pounds()
weighEffect(fatty)
visible_message("<span class='notice'>[fatty] weighs themselves.</span>")
visible_message("<span class='notice'>The numbers on the screen settle on: [src.lastreading]Lbs.</span>")
visible_message("<span class='notice'>The numbers on the screen read out: [fatty] has a BFI of [fatty.fatness].</span>")
/mob/living/carbon/proc/calculate_weight_in_pounds()
return round((140 + (fatness*FATNESS_TO_WEIGHT_RATIO))*(size_multiplier**2)*((dna.features["taur"] != "None") ? 2.5: 1))
+2
View File
@@ -528,3 +528,5 @@ GLOBAL_LIST_INIT(lighter_reskins, list(ZIPPO_SKIN_PLAIN = "plain", ZIPPO_SKIN_DA
#define FATTENING_TYPE_MAGIC "magic"
#define FATTENING_TYPE_VIRUS "virus"
#define FATTENING_TYPE_WEIGHT_LOSS "weight_loss"
#define FATNESS_TO_WEIGHT_RATIO 0.25
+1
View File
@@ -3126,6 +3126,7 @@
#include "GainStation13\code\modules\vending\gatocola.dm"
#include "GainStation13\code\modules\vending\mealdor.dm"
#include "GainStation13\code\obj\items\bluespace_belt.dm"
#include "GainStation13\code\obj\items\circuits.dm"
#include "GainStation13\code\obj\items\holy.dm"
#include "GainStation13\code\obj\items\minor_items.dm"
#include "GainStation13\code\obj\items\sensors\weight_infared.dm"