Files
siliconsGitHubfake_vm_user <fake_vm_user>VM_USER <VM_USER>
934ad25bfe refactors: inventory, mousedrag, stripping, species bodytypes, inventory HUD, and probably some unrelated things (#4092)
* start

* i hate people who pack shit into one file

* sigh

* regex

* inventory rework

* stubs

* regex

* this is insanity

* oh no

* backend moment

* a

* changes

* wild

* regexing

* changes

* put in hands

* more errorS

* attackby

* more helpers

* replacements

* wild

* fixes

* pain

* fxies

* fixes

* unneeded

* ape

* ape

* wild

* wild

* more

* wild

* there

* fixes

* fixes

* l

* wild

* more

* moer

* fixes

* enough for todayd

* regexing

* long time coming

* shaking and crying

* end me

* fixes

* fixes

* e

* fxies

* rig refactor moment

* fixes

* fixes

* fixes

* fixes

* out with the shitcode

* thanks git

* partial rig rewrite here we go

* more

* fixes

* WWWW

* ok

* wild

* bitfield defines

* nobludgeon

* pain

* pain

* fixes

* more

* wild

* wild

* fixes

* pain

* move behaviorsr

* fixes

* next up, finishing core procs

* y

* .

* time to finish this

* time to finish this

* propagate accessories

* hate this accursed engine

* hate this accursed engine

* pain

* more

* cancer

* epic

* genuinely hate

* wild

* that

* why

* circuitry is my bane

* y

* how

* sort

* logging

* logging

* im dying

* fixes

* next

* f

* more

* epic style

* fixes

* on meta

* fix

* wild

* uh

* quirky

* fixes

* agh

* pain

* fixes

* fix

* sigh

* a

* epic1

* fixes

* ugh

* epic

* fixes

* uhh.

* is this even a fix

* fix

* fixes

* fixes

* we love optimization

* wear over system

* correct

* worn over stuff

* just augments

* coggy

* implant magnetic catch

* implant magnetic catch

* fixe

* a

* g

* t

* fix

* fix

* wack!

* fix

* a

* semantics

* fix

* that

* fixes

* handle denesting

* w

* fixes

* e

* bugs

* fixes

* fixes

* unit tests

* absolutely wild

* fixes

* fix

* fix

* fixes

* on god this is bad

* fixes

* fixes

* fix

* fix

* wacky!

* fix

* wack

* manual

* fixes

* closets

* OOPS

* wack

* pain

* pain

* flags

* regex

* fixes

* wakc

* changes

* more

* augh

* more

* replaces

* more

* that

* acc

* acc

* fix

* fix

* fix

* oh woops that was important

* wack

* epic

Co-authored-by: fake_vm_user <fake_vm_user>
Co-authored-by: VM_USER <VM_USER>
2022-07-29 00:20:47 -07:00

66 lines
1.7 KiB
Plaintext

/obj/machinery/disease2/diseaseanalyser
name = "disease analyser"
icon = 'icons/obj/virology.dmi'
icon_state = "analyser"
anchored = 1
density = 1
var/scanning = 0
var/pause = 0
var/obj/item/virusdish/dish = null
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/O as obj, var/mob/user as mob)
if(default_unfasten_wrench(user, O, 20))
return
else if(!istype(O,/obj/item/virusdish))
return ..()
if(dish)
to_chat(user, "\The [src] is already loaded.")
return
if(!user.attempt_insert_item_for_installation(O, src))
return
dish = O
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
/obj/machinery/disease2/diseaseanalyser/process(delta_time)
if(machine_stat & (NOPOWER|BROKEN))
return
if(scanning)
scanning -= 1
if(scanning == 0)
if (dish.virus2.addToDB())
ping("\The [src] pings, \"New pathogen added to data bank.\"")
var/obj/item/paper/P = new /obj/item/paper(src.loc)
var/info = dish.virus2.get_info()
P.name = "paper - [dish.virus2.name()]"
P.info = "[virology_letterhead("Post-Analysis Memo")]<br>[info]<hr><u>Additional Notes:</u><br>"
dish.basic_info = dish.virus2.get_basic_info()
dish.info = info
dish.name = "[initial(dish.name)] ([dish.virus2.name()])"
dish.analysed = 1
dish.loc = src.loc
dish = null
icon_state = "analyser"
src.state("\The [src] prints a sheet of paper.")
else if(dish && !scanning && !pause)
if(dish.virus2 && dish.growth > 50)
dish.growth -= 10
scanning = 5
icon_state = "analyser_processing"
else
pause = 1
spawn(25)
dish.loc = src.loc
dish = null
src.state("\The [src] buzzes, \"Insufficient growth density to complete analysis.\"")
pause = 0