Files
Polaris/code/WorkInProgress/virus2/antibodies.dm
CIB123@gmail.com db96d85362 Ammend to the last commit, a few files were left out.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2687 316c924e-a436-60f5-8080-3fe189b3f50e
2011-12-15 12:29:30 +00:00

54 lines
1.7 KiB
Plaintext

// pure concentrated antibodies
datum/reagent/antibodies
data = new/list("antibodies"=0)
name = "Antibodies"
id = "antibodies"
reagent_state = LIQUID
color = "#0050F0"
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(istype(M,/mob/living/carbon/human))
if(src.data && method == INGEST)
if(src.data["antibodies"] & M:virus2.antigen)
M:virus2.dead = 1
return
// reserving some numbers for later special antigens
var/global/const
ANTIGEN_A = 1
ANTIGEN_B = 2
ANTIGEN_RH = 4
ANTIGEN_Q = 8
ANTIGEN_U = 16
ANTIGEN_V = 32
ANTIGEN_X = 64
ANTIGEN_Y = 128
ANTIGEN_Z = 256
ANTIGEN_M = 512
ANTIGEN_N = 1024
ANTIGEN_P = 2048
ANTIGEN_O = 4096
var/global/list/ANTIGENS = list("[ANTIGEN_A]" = "A", "[ANTIGEN_B]" = "B", "[ANTIGEN_RH]" = "RH", "[ANTIGEN_Q]" = "Q",
"[ANTIGEN_U]" = "U", "[ANTIGEN_V]" = "V", "[ANTIGEN_Z]" = "Z", "[ANTIGEN_M]" = "M",
"[ANTIGEN_N]" = "N", "[ANTIGEN_P]" = "P", "[ANTIGEN_O]" = "O")
/obj/item/device/antibody_scanner
name = "Antibody Scanner"
desc = "Used to scan living beings for antibodies in their blood."
icon_state = "health"
w_class = 2.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT | USEDELAY
/obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(! istype(M, /mob/living/carbon) || !M:antibodies)
user << "Unable to detect antibodies.."
else
// iterate over the list of antigens and see what matches
var/code = ""
for(var/V in ANTIGENS) if(text2num(V) & M.antibodies) code += ANTIGENS[V]
user << text("\blue [src] The antibody scanner displays a cryptic set of data: [code]")