Files
vgstation13/code/WorkInProgress/virus2/analyser.dm
elly1989@rocketmail.com 4073ac9b00 Replaced all 'file.extension' references with 'relativepath/file.extension' using a script by thvortex of ss13-daedalus.
All credits to the author for this handy little script.
I Committed the modified python script to tool directory. Although it needs to be in the root folder of your repo to work.

To notice the improved compile times, in dreammaker go to Build > Preferences > and untick "automatically set file_dir for subfolders"

If this commit inteferes with any large projects just revert it, do your thing, then rerun the script. Easy-peasy.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4488 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-18 16:33:40 +00:00

78 lines
2.1 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/weapon/virusdish/dish = null
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
if(!dish)
dish = I
c.drop_item()
I.loc = src
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3)
else
user << "There is already a dish inserted"
//else
return
/obj/machinery/disease2/diseaseanalyser/process()
if(stat & (NOPOWER|BROKEN))
return
use_power(500)
//src.updateDialog()
if(scanning)
scanning -= 1
if(scanning == 0)
var/r = "GNAv2 based virus lifeform"
r += "<BR>Infection rate : [dish.virus2.infectionchance * 10]"
r += "<BR>Spread form : [dish.virus2.spreadtype]"
r += "<BR>Progress Speed : [dish.virus2.stageprob * 10]"
for(var/datum/disease2/effectholder/E in dish.virus2.effects)
r += "<BR>Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
// display the antigens
var/code = ""
for(var/V in ANTIGENS) if(text2num(V) & dish.virus2.antigen) code += ANTIGENS[V]
r += "<BR>Antigen pattern: [code]"
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
P.info = r
dish.info = r
dish.analysed = 1
dish.loc = src.loc
dish = null
icon_state = "analyser"
for(var/mob/O in hearers(src, null))
O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
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
for(var/mob/M in viewers(src))
M.show_message("\icon[src] \blue The [src.name] buzzes", 2)
pause = 0
return