mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Mineymonkey assembly examine fix (#22448)
<img width="415" height="189" alt="image" src="https://github.com/user-attachments/assets/a8cee503-f9b5-4c10-9a60-cc4d5b3a99f8" />
This commit is contained in:
@@ -184,13 +184,11 @@
|
||||
for(var/obj/item/integrated_circuit/part in contents)
|
||||
. |= part.GetAccess()
|
||||
|
||||
/obj/item/electronic_assembly/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
/obj/item/electronic_assembly/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
if(opened && is_adjacent)
|
||||
for(var/obj/item/integrated_circuit/IC in contents)
|
||||
. += IC.external_examine(user)
|
||||
if(opened)
|
||||
interact(user)
|
||||
. += SPAN_NOTICE("It contains \a [IC].")
|
||||
|
||||
/obj/item/electronic_assembly/proc/get_part_complexity()
|
||||
. = 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A portable(ish) machine made to print tiny modular circuitry out of metal."
|
||||
icon = 'icons/obj/assemblies/electronic_tools.dmi'
|
||||
icon_state = "circuit_printer"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/metal = 0
|
||||
var/max_metal = 100
|
||||
var/metal_per_sheet = 10 // One sheet equals this much metal.
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
name = "number to string"
|
||||
desc = "This circuit can convert a number variable into a string."
|
||||
extended_desc = "Because of game limitations null/false variables will output a '0' string."
|
||||
complexity = 1
|
||||
icon_state = "num-string"
|
||||
inputs = list("input" = IC_PINTYPE_NUMBER)
|
||||
outputs = list("output" = IC_PINTYPE_STRING)
|
||||
@@ -29,6 +30,87 @@
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text4
|
||||
name = "4-way number to string"
|
||||
desc = "This circuit can convert up to four number variables into strings."
|
||||
extended_desc = "Because of game limitations null/false variables will output a '0' string."
|
||||
icon_state = "num-string"
|
||||
inputs = list(
|
||||
"input 1" = IC_PINTYPE_NUMBER,
|
||||
"input 2" = IC_PINTYPE_NUMBER,
|
||||
"input 3" = IC_PINTYPE_NUMBER,
|
||||
"input 4" = IC_PINTYPE_NUMBER
|
||||
)
|
||||
outputs = list(
|
||||
"output 1" = IC_PINTYPE_STRING,
|
||||
"output 2" = IC_PINTYPE_STRING,
|
||||
"output 3" = IC_PINTYPE_STRING,
|
||||
"output 4" = IC_PINTYPE_STRING
|
||||
)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text4/do_work()
|
||||
pull_data()
|
||||
|
||||
for(var/i = 1 to 4)
|
||||
var/result = null
|
||||
var/incoming = get_pin_data(IC_INPUT, i)
|
||||
|
||||
if(!isnull(incoming))
|
||||
result = num2text(incoming)
|
||||
else if(!incoming)
|
||||
result = "0"
|
||||
|
||||
set_pin_data(IC_OUTPUT, i, result)
|
||||
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text8
|
||||
name = "8-way number to string"
|
||||
desc = "This circuit can convert up to eight number variables into strings."
|
||||
extended_desc = "Because of game limitations null/false variables will output a '0' string."
|
||||
complexity = 4
|
||||
icon_state = "num-string"
|
||||
inputs = list(
|
||||
"input 1" = IC_PINTYPE_NUMBER,
|
||||
"input 2" = IC_PINTYPE_NUMBER,
|
||||
"input 3" = IC_PINTYPE_NUMBER,
|
||||
"input 4" = IC_PINTYPE_NUMBER,
|
||||
"input 5" = IC_PINTYPE_NUMBER,
|
||||
"input 6" = IC_PINTYPE_NUMBER,
|
||||
"input 7" = IC_PINTYPE_NUMBER,
|
||||
"input 8" = IC_PINTYPE_NUMBER
|
||||
)
|
||||
outputs = list(
|
||||
"output 1" = IC_PINTYPE_STRING,
|
||||
"output 2" = IC_PINTYPE_STRING,
|
||||
"output 3" = IC_PINTYPE_STRING,
|
||||
"output 4" = IC_PINTYPE_STRING,
|
||||
"output 5" = IC_PINTYPE_STRING,
|
||||
"output 6" = IC_PINTYPE_STRING,
|
||||
"output 7" = IC_PINTYPE_STRING,
|
||||
"output 8" = IC_PINTYPE_STRING
|
||||
)
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text8/do_work()
|
||||
pull_data()
|
||||
|
||||
for(var/i = 1 to 8)
|
||||
var/result = null
|
||||
var/incoming = get_pin_data(IC_INPUT, i)
|
||||
|
||||
if(!isnull(incoming))
|
||||
result = num2text(incoming)
|
||||
else if(!incoming)
|
||||
result = "0"
|
||||
|
||||
set_pin_data(IC_OUTPUT, i, result)
|
||||
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/text2num
|
||||
name = "string to number"
|
||||
desc = "This circuit can convert a string variable into a number."
|
||||
|
||||
@@ -151,11 +151,11 @@
|
||||
"body temperature" = IC_PINTYPE_NUMBER,
|
||||
"in cardiac arrest?" = IC_PINTYPE_BOOLEAN,
|
||||
// Advanced
|
||||
"brute damage" = IC_PINTYPE_NUMBER,
|
||||
"burn damage" = IC_PINTYPE_NUMBER,
|
||||
"toxin damage" = IC_PINTYPE_NUMBER,
|
||||
"radiation dose" = IC_PINTYPE_NUMBER,
|
||||
"genetic instability" = IC_PINTYPE_NUMBER
|
||||
"brute damage" = IC_PINTYPE_STRING,
|
||||
"burn damage" = IC_PINTYPE_STRING,
|
||||
"toxin damage" = IC_PINTYPE_STRING,
|
||||
"radiation dose" = IC_PINTYPE_STRING,
|
||||
"genetic instability" = IC_PINTYPE_STRING
|
||||
)
|
||||
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
@@ -179,11 +179,11 @@
|
||||
set_pin_data(IC_OUTPUT, 5, H.bodytemperature)
|
||||
set_pin_data(IC_OUTPUT, 6, H.is_asystole())
|
||||
// Advanced
|
||||
set_pin_data(IC_OUTPUT, 7, H.getBruteLoss())
|
||||
set_pin_data(IC_OUTPUT, 8, H.getFireLoss())
|
||||
set_pin_data(IC_OUTPUT, 9, H.getToxLoss())
|
||||
set_pin_data(IC_OUTPUT, 10, H.total_radiation)
|
||||
set_pin_data(IC_OUTPUT, 11, H.getCloneLoss())
|
||||
set_pin_data(IC_OUTPUT, 7, get_severity(H.getBruteLoss(), TRUE))
|
||||
set_pin_data(IC_OUTPUT, 8, get_severity(H.getFireLoss(), TRUE))
|
||||
set_pin_data(IC_OUTPUT, 9, get_severity(H.getToxLoss(), TRUE))
|
||||
set_pin_data(IC_OUTPUT, 10, get_severity(H.total_radiation, TRUE))
|
||||
set_pin_data(IC_OUTPUT, 11, get_severity(H.getCloneLoss(), TRUE))
|
||||
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
Reference in New Issue
Block a user