mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-18 22:22:09 +00:00
Conflict fix?
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
// work in progress
|
||||
|
||||
var/const/members_possible = 5
|
||||
var/sent_emergency_team = 0
|
||||
var/const/members_required = 1 // We need at least *one* person ;_;
|
||||
var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
|
||||
// 'sent_response_team' for automagic response teams
|
||||
|
||||
/client/proc/response_team()
|
||||
set name = "Dispatch Emergency Response Team"
|
||||
@@ -18,7 +20,7 @@ var/sent_emergency_team = 0
|
||||
if(ticker.current_state == GAME_STATE_PREGAME)
|
||||
usr << "\red The round hasn't started yet!"
|
||||
return
|
||||
if(sent_emergency_team == 1)
|
||||
if(admin_emergency_team || send_emergency_team)
|
||||
usr << "\red Central Command has already dispatched an emergency response team!"
|
||||
return
|
||||
if(alert("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes")
|
||||
@@ -35,11 +37,11 @@ var/sent_emergency_team = 0
|
||||
if(alert("You haven't specified a mission. Exit the setup process?",,"No","Yes")=="Yes")
|
||||
return
|
||||
|
||||
if(sent_emergency_team)
|
||||
if(admin_emergency_team || send_emergency_team)
|
||||
usr << "\red Looks like somebody beat you to it!"
|
||||
return
|
||||
|
||||
sent_emergency_team = 1
|
||||
admin_emergency_team = 1
|
||||
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
|
||||
log_admin("[key_name(usr)] used Dispatch Response Team.")
|
||||
|
||||
@@ -87,6 +89,12 @@ var/sent_emergency_team = 0
|
||||
|
||||
sleep(300)
|
||||
|
||||
if(candidates.len < members_required)
|
||||
message_admins("Not enough people signed up for [key_name_admin(usr)]'s response team! Aborting.")
|
||||
log_admin("Response Team aborted: Not Enough Signups.")
|
||||
admin_emergency_team = 0
|
||||
return
|
||||
|
||||
for(var/i=members_possible,(i>0&&candidates.len), i--) // The rest of the choosing process is just an input with a list of candidates on it
|
||||
var/chosen = input("Time's up! Choose characters to spawn as reponse team members. This will go on until there are no more ghosts to pick from or until all slots are full.", "Considered Players") as null|anything in candidates
|
||||
candidates -= chosen
|
||||
@@ -175,9 +183,11 @@ var/sent_emergency_team = 0
|
||||
new_member.mind.special_role = "Emergency Response Team"
|
||||
ticker.mode.traitors += new_member.mind // ERTs will show up at the end of the round on the "traitor" list
|
||||
|
||||
// Join message
|
||||
new_member << "\blue You are the <b>Emergency Response Team[!leader_selected?"!</b>":" Leader!</b>"] \nAs a response team [!leader_selected?"member":"<b>leader</b>"] you answer directly to [!leader_selected?"your team leader.":"Central Command."] \nYou have been deployed by NanoTrasen Central Command in Tau Ceti to resolve a Code Red alert aboard [station_name()], and have been provided with the following instructions and information regarding your mission: \red [situation]"
|
||||
new_member.mind.store_memory("<b>Mission Parameters:</b> \red [situation].")
|
||||
|
||||
// Leader join message
|
||||
if(leader_selected)
|
||||
new_member << "\red The Nuclear Authentication Code is: <b> [nuke_code]</b>. You are instructed not to detonate the nuclear device aboard [station_name()] unless <u>absolutely necessary</u>."
|
||||
new_member.mind.store_memory("<b>Nuclear Authentication Code:</b> \red [nuke_code]")
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/obj/machinery/disease2/biodestroyer
|
||||
name = "Biohazard destroyer"
|
||||
icon = 'icons/obj/pipes/disposal.dmi'
|
||||
icon_state = "disposal"
|
||||
var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk)
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
for(var/path in accepts)
|
||||
if(I.type in typesof(path))
|
||||
user.drop_item()
|
||||
del(I)
|
||||
overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
|
||||
return
|
||||
user.drop_item()
|
||||
I.loc = src.loc
|
||||
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] \blue The [src.name] beeps", 2)
|
||||
@@ -1,42 +0,0 @@
|
||||
/obj/item/weapon/cureimplanter
|
||||
name = "Hypospray injector"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implanter1"
|
||||
var/datum/disease2/resistance/resistance = null
|
||||
var/works = 0
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
|
||||
|
||||
/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob)
|
||||
if(ismob(target))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
if (target != user)
|
||||
O.show_message(text("\red <B>[] is trying to inject [] with [src.name]!</B>", user, target), 1)
|
||||
else
|
||||
O.show_message("\red <B>[user] is trying to inject themselves with [src.name]!</B>", 1)
|
||||
if(!do_mob(user, target,60)) return
|
||||
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
if (target != user)
|
||||
O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1)
|
||||
else
|
||||
O.show_message("\red [user] injects themself with [src.name]!", 1)
|
||||
|
||||
|
||||
var/mob/living/carbon/M = target
|
||||
|
||||
if(works == 0 && prob(25))
|
||||
M.resistances2 += resistance
|
||||
if(M.virus2)
|
||||
M.virus2.cure_added(resistance)
|
||||
else if(works == 1)
|
||||
M.adjustToxLoss(rand(20,50))
|
||||
else if(works == 2)
|
||||
M.adjustToxLoss(rand(50,100))
|
||||
else if(works == 3)
|
||||
infect_virus2(M,virus2,1)
|
||||
@@ -1,202 +0,0 @@
|
||||
/obj/machinery/computer/diseasesplicer
|
||||
name = "Disease Splicer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "crew"
|
||||
//brightnessred = 0
|
||||
// brightnessgreen = 2
|
||||
// brightnessblue = 2
|
||||
// broken_icon
|
||||
|
||||
var/datum/disease2/effectholder/memorybank = null
|
||||
var/analysed = 0
|
||||
var/obj/item/weapon/virusdish/dish = null
|
||||
var/burning = 0
|
||||
|
||||
var/splicing = 0
|
||||
var/scanning = 0
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
/*
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)*/
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
var/mob/living/carbon/c = user
|
||||
if(!dish)
|
||||
|
||||
dish = I
|
||||
c.drop_item()
|
||||
I.loc = src
|
||||
if(istype(I,/obj/item/weapon/diseasedisk))
|
||||
user << "You upload the contents of the disk into the buffer"
|
||||
memorybank = I:effect
|
||||
|
||||
|
||||
//else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat
|
||||
if(splicing)
|
||||
dat = "Splicing in progress"
|
||||
else if(scanning)
|
||||
dat = "Splicing in progress"
|
||||
else if(burning)
|
||||
dat = "Data disk burning in progress"
|
||||
else
|
||||
if(dish)
|
||||
dat = "Virus dish inserted"
|
||||
|
||||
dat += "<BR>Current DNA strand : "
|
||||
if(memorybank)
|
||||
dat += "<A href='?src=\ref[src];splice=1'>"
|
||||
if(analysed)
|
||||
dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])"
|
||||
else
|
||||
dat += "Unknown DNA strand ([5-memorybank.effect.stage])"
|
||||
dat += "</a>"
|
||||
|
||||
dat += "<BR><A href='?src=\ref[src];disk=1'>Burn DNA Sequence to data storage disk</a>"
|
||||
else
|
||||
dat += "Empty"
|
||||
|
||||
dat += "<BR><BR>"
|
||||
|
||||
if(dish)
|
||||
if(dish.virus2)
|
||||
if(dish.growth >= 50)
|
||||
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
dat += "<BR><A href='?src=\ref[src];grab=\ref[e]'> DNA strand"
|
||||
if(dish.analysed)
|
||||
dat += ": [e.effect.name]"
|
||||
dat += " (5-[e.effect.stage])</a>"
|
||||
else
|
||||
dat += "<BR>Insufficent cells to attempt gene splicing"
|
||||
else
|
||||
dat += "<BR>No virus found in dish"
|
||||
|
||||
dat += "<BR><BR><A href='?src=\ref[src];eject=1'>Eject disk</a>"
|
||||
else
|
||||
dat += "<BR>Please insert dish"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
src.updateDialog()
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
if(!scanning)
|
||||
state("The [src.name] beeps")
|
||||
icon_state = "crew"
|
||||
if(splicing)
|
||||
splicing -= 1
|
||||
if(!splicing)
|
||||
state("The [src.name] pings")
|
||||
icon_state = "crew"
|
||||
if(burning)
|
||||
burning -= 1
|
||||
if(!burning)
|
||||
var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
|
||||
if(analysed)
|
||||
d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])"
|
||||
else
|
||||
d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])"
|
||||
d.effect = memorybank
|
||||
state("The [src.name] zings")
|
||||
icon_state = "crew"
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["grab"])
|
||||
memorybank = locate(href_list["grab"])
|
||||
analysed = dish.analysed
|
||||
del(dish)
|
||||
dish = null
|
||||
scanning = 30
|
||||
icon_state = "crew"
|
||||
|
||||
else if(href_list["eject"])
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
|
||||
else if(href_list["splice"])
|
||||
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
if(e.stage == memorybank.stage)
|
||||
e.effect = memorybank.effect
|
||||
splicing = 50
|
||||
dish.virus2.spreadtype = "Blood"
|
||||
icon_state = "crew"
|
||||
|
||||
else if(href_list["disk"])
|
||||
burning = 20
|
||||
icon_state = "crew"
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] \blue [msg]", 2)
|
||||
|
||||
|
||||
/obj/item/weapon/diseasedisk
|
||||
name = "Blank GNA disk"
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk2"
|
||||
var/datum/disease2/effectholder/effect = null
|
||||
var/stage = 1
|
||||
|
||||
/obj/item/weapon/diseasedisk/premade/New()
|
||||
name = "Blank GNA disk (stage: [5-stage])"
|
||||
effect = new /datum/disease2/effectholder
|
||||
effect.effect = new /datum/disease2/effect/invisible
|
||||
effect.stage = stage
|
||||
@@ -1,176 +0,0 @@
|
||||
/obj/machinery/disease2/incubator/
|
||||
name = "Pathogenic incubator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "incubator"
|
||||
var/obj/item/weapon/virusdish/dish
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/radiation = 0
|
||||
|
||||
var/on = 0
|
||||
var/power = 0
|
||||
|
||||
var/foodsupply = 0
|
||||
var/toxins = 0
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(25))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/B as obj, var/mob/user as mob)
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(src.beaker)
|
||||
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "A syringe is already loaded into the machine."
|
||||
else
|
||||
user << "A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
if(src.dish)
|
||||
user << "A dish is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.dish = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
user << "You add the dish to the machine!"
|
||||
src.updateUsrDialog()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
if(!dish) return
|
||||
|
||||
if (href_list["power"])
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "incubator_on"
|
||||
else
|
||||
icon_state = "incubator"
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
if (href_list["rad"])
|
||||
radiation += 10
|
||||
if (href_list["flush"])
|
||||
radiation = 0
|
||||
toxins = 0
|
||||
foodsupply = 0
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!dish)
|
||||
dat = "Please insert dish into the incubator.<BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
var/string = "Off"
|
||||
if(on)
|
||||
string = "On"
|
||||
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Food supply : [foodsupply]"
|
||||
dat += "<BR>"
|
||||
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Toxins : [toxins]"
|
||||
dat += "<BR><BR>"
|
||||
if(beaker)
|
||||
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
if(dish)
|
||||
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
dat += "<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a>"
|
||||
|
||||
|
||||
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
|
||||
onclose(user, "incubator")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
process()
|
||||
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
if(foodsupply)
|
||||
foodsupply -= 1
|
||||
dish.growth += 1
|
||||
if(dish.growth == 100)
|
||||
state("The [src.name] pings")
|
||||
if(radiation)
|
||||
if(radiation > 50 & prob(5))
|
||||
dish.virus2.majormutate()
|
||||
if(dish.info)
|
||||
dish.info = "OUTDATED : [dish.info]"
|
||||
dish.analysed = 0
|
||||
state("The [src.name] beeps")
|
||||
|
||||
else if(prob(5))
|
||||
dish.virus2.minormutate()
|
||||
radiation -= 1
|
||||
if(toxins && prob(5))
|
||||
dish.virus2.infectionchance -= 1
|
||||
if(toxins > 50)
|
||||
dish.virus2 = null
|
||||
else if(!dish)
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
|
||||
|
||||
if(beaker)
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 20
|
||||
if(!beaker.reagents.remove_reagent("toxins",1))
|
||||
toxins += 1
|
||||
|
||||
proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] \blue [msg]", 2)
|
||||
@@ -1,139 +0,0 @@
|
||||
/obj/machinery/disease2/isolator/
|
||||
name = "Pathogenic Isolator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "isolator"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/isolating = 0
|
||||
var/beaker = null
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(25))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
|
||||
if(!istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
|
||||
if(src.beaker)
|
||||
user << "A syringe is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "isolator_in"
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
if(!beaker) return
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
|
||||
if (href_list["isolate"])
|
||||
var/datum/reagent/blood/Blood
|
||||
for(var/datum/reagent/blood/B in R.reagent_list)
|
||||
if(B)
|
||||
Blood = B
|
||||
break
|
||||
|
||||
if(Blood.data["virus2"])
|
||||
virus2 = Blood.data["virus2"]
|
||||
isolating = 40
|
||||
icon_state = "isolator_processing"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if (href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "isolator"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert sample into the isolator.<BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
else if(isolating)
|
||||
dat = "Isolating"
|
||||
else
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
|
||||
if(!R.total_volume)
|
||||
dat += "[beaker] is empty."
|
||||
else
|
||||
dat += "Contained reagents:<BR>"
|
||||
for(var/datum/reagent/blood/G in R.reagent_list)
|
||||
dat += " [G.name]: <A href='?src=\ref[src];isolate=[G.id]'>Isolate</a>"
|
||||
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]", "window=isolator;size=575x400")
|
||||
onclose(user, "isolator")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
process()
|
||||
if(isolating > 0)
|
||||
isolating -= 1
|
||||
if(isolating == 0)
|
||||
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
|
||||
d.virus2 = virus2.getcopy()
|
||||
virus2 = null
|
||||
icon_state = "isolator_in"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/virusdish
|
||||
name = "Virus containment/growth dish"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/growth = 0
|
||||
var/info = 0
|
||||
var/analysed = 0
|
||||
|
||||
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
|
||||
if(istype(W,/obj/item/weapon/hand_labeler))
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
user << "The dish shatters"
|
||||
if(virus2.infectionchance > 0)
|
||||
infect_virus2(user,virus2)
|
||||
del src
|
||||
|
||||
/obj/item/weapon/virusdish/examine()
|
||||
usr << "This is a virus containment dish"
|
||||
if(src.info)
|
||||
usr << "It has the following information about its contents"
|
||||
usr << src.info
|
||||
@@ -1,30 +0,0 @@
|
||||
/obj/machinery/disease2/monkeycloner
|
||||
name = "Monkey dispensor"
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "pod_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
var/cloning = 0
|
||||
|
||||
/obj/machinery/disease2/monkeycloner/attack_hand()
|
||||
if(!cloning)
|
||||
cloning = 150
|
||||
|
||||
icon_state = "pod_g"
|
||||
|
||||
/obj/machinery/disease2/monkeycloner/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
src.updateDialog()
|
||||
|
||||
if(cloning)
|
||||
cloning -= 1
|
||||
if(!cloning)
|
||||
new /mob/living/carbon/monkey(src.loc)
|
||||
icon_state = "pod_0"
|
||||
|
||||
|
||||
|
||||
return
|
||||
@@ -1,78 +0,0 @@
|
||||
/obj/machinery/disease2/diseaseanalyser
|
||||
name = "Disease Analyser"
|
||||
icon = '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
|
||||
@@ -1,58 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
// 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))
|
||||
if(src.data && method == INGEST)
|
||||
if(M:virus2) if(src.data["antibodies"] & M:virus2.antigen)
|
||||
M:virus2.dead = 1
|
||||
// if the virus is killed this way it immunizes
|
||||
// M:antibodies |= M:virus2.antigen
|
||||
M:antibodies |= src.data["antibodies"]
|
||||
return
|
||||
|
||||
// reserving some numbers for later special antigens
|
||||
var/global/const/ANTIGEN_A = 1
|
||||
var/global/const/ANTIGEN_B = 2
|
||||
var/global/const/ANTIGEN_RH = 4
|
||||
var/global/const/ANTIGEN_Q = 8
|
||||
var/global/const/ANTIGEN_U = 16
|
||||
var/global/const/ANTIGEN_V = 32
|
||||
var/global/const/ANTIGEN_X = 64
|
||||
var/global/const/ANTIGEN_Y = 128
|
||||
var/global/const/ANTIGEN_Z = 256
|
||||
var/global/const/ANTIGEN_M = 512
|
||||
var/global/const/ANTIGEN_N = 1024
|
||||
var/global/const/ANTIGEN_P = 2048
|
||||
var/global/const/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 | 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]")
|
||||
@@ -1,601 +0,0 @@
|
||||
/obj/virus
|
||||
// a virus instance that is placed on the map, moves, and infects
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
|
||||
var/datum/disease2/disease
|
||||
|
||||
New()
|
||||
..()
|
||||
step_rand(src)
|
||||
step_rand(src)
|
||||
anchored = 1
|
||||
spawn(300) del(src)
|
||||
|
||||
/mob/living/carbon/proc/get_infection_chance()
|
||||
var/score = 0
|
||||
var/mob/living/carbon/M = src
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M:gloves)
|
||||
score += 5
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(M.wear_mask)
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(M.internal)
|
||||
score += 10
|
||||
|
||||
if(score >= 30)
|
||||
return 0
|
||||
else if(score == 25 && prob(99))
|
||||
return 0
|
||||
else if(score == 20 && prob(95))
|
||||
return 0
|
||||
else if(score == 15 && prob(75))
|
||||
return 0
|
||||
else if(score == 10 && prob(55))
|
||||
return 0
|
||||
else if(score == 5 && prob(35))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
proc/airborne_can_reach(turf/source, turf/target)
|
||||
var/obj/dummy = new(source)
|
||||
dummy.flags = FPRINT | TABLEPASS
|
||||
dummy.pass_flags = PASSTABLE
|
||||
|
||||
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
|
||||
|
||||
var/rval = (dummy.loc in range(1,target))
|
||||
del dummy
|
||||
return rval
|
||||
|
||||
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
|
||||
if(M.virus2)
|
||||
return
|
||||
if(!disease)
|
||||
return
|
||||
//immunity
|
||||
/*for(var/iii = 1, iii <= M.immunevirus2.len, iii++)
|
||||
if(disease.issame(M.immunevirus2[iii]))
|
||||
return*/
|
||||
|
||||
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
|
||||
if(M.antibodies & disease.antigen != 0) return
|
||||
|
||||
for(var/datum/disease2/resistance/res in M.resistances)
|
||||
if(res.resistsdisease(disease))
|
||||
return
|
||||
if(prob(disease.infectionchance) || forced)
|
||||
if(M.virus2)
|
||||
return
|
||||
else
|
||||
// certain clothes can prevent an infection
|
||||
if(!forced && !M.get_infection_chance())
|
||||
return
|
||||
|
||||
M.virus2 = disease.getcopy()
|
||||
M.virus2.minormutate()
|
||||
|
||||
for(var/datum/disease2/resistance/res in M.resistances)
|
||||
if(res.resistsdisease(M.virus2))
|
||||
M.virus2 = null
|
||||
|
||||
|
||||
|
||||
/datum/disease2/resistance
|
||||
var/list/datum/disease2/effect/resistances = list()
|
||||
|
||||
proc/resistsdisease(var/datum/disease2/disease/virus2)
|
||||
var/list/res2 = list()
|
||||
for(var/datum/disease2/effect/e in resistances)
|
||||
res2 += e.type
|
||||
for(var/datum/disease2/effectholder/holder in virus2)
|
||||
if(!(holder.effect.type in res2))
|
||||
return 0
|
||||
else
|
||||
res2 -= holder.effect.type
|
||||
if(res2.len > 0)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
||||
New(var/datum/disease2/disease/virus2)
|
||||
for(var/datum/disease2/effectholder/h in virus2.effects)
|
||||
resistances += h.effect.type
|
||||
|
||||
|
||||
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
|
||||
if(!M.virus2)
|
||||
M.virus2 = new /datum/disease2/disease
|
||||
M.virus2.makerandom()
|
||||
M.virus2.infectionchance = 1
|
||||
|
||||
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
|
||||
if(!M.virus2)
|
||||
M.virus2 = new /datum/disease2/disease
|
||||
M.virus2.makerandom(1)
|
||||
|
||||
/datum/disease2/var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
|
||||
|
||||
/datum/disease2/disease
|
||||
var/infectionchance = 10
|
||||
var/speed = 1
|
||||
var/spreadtype = "Blood" // Can also be "Airborne"
|
||||
var/stage = 1
|
||||
var/stageprob = 10
|
||||
var/dead = 0
|
||||
var/clicks = 0
|
||||
|
||||
var/uniqueID = 0
|
||||
var/list/datum/disease2/effectholder/effects = list()
|
||||
proc/makerandom(var/greater=0)
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
holder.stage = 1
|
||||
if(greater)
|
||||
holder.getrandomeffect_greater()
|
||||
else
|
||||
holder.getrandomeffect_lesser()
|
||||
effects += holder
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 2
|
||||
if(greater)
|
||||
holder.getrandomeffect_greater()
|
||||
else
|
||||
holder.getrandomeffect_lesser()
|
||||
effects += holder
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 3
|
||||
if(greater)
|
||||
holder.getrandomeffect_greater()
|
||||
else
|
||||
holder.getrandomeffect_lesser()
|
||||
effects += holder
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 4
|
||||
if(greater)
|
||||
holder.getrandomeffect_greater()
|
||||
else
|
||||
holder.getrandomeffect_lesser()
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
infectionchance = rand(1,10)
|
||||
// pick 2 antigens
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = "Airborne"
|
||||
|
||||
proc/makealien()
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
holder.stage = 1
|
||||
holder.chance = 10
|
||||
holder.effect = new/datum/disease2/effect/lesser/gunck()
|
||||
effects += holder
|
||||
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 2
|
||||
holder.chance = 10
|
||||
holder.effect = new/datum/disease2/effect/lesser/cough()
|
||||
effects += holder
|
||||
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 3
|
||||
holder.chance = 10
|
||||
holder.effect = new/datum/disease2/effect/greater/toxins()
|
||||
effects += holder
|
||||
|
||||
holder = new /datum/disease2/effectholder
|
||||
holder.stage = 4
|
||||
holder.chance = 10
|
||||
holder.effect = new/datum/disease2/effect/alien()
|
||||
effects += holder
|
||||
|
||||
uniqueID = 896 // all alien diseases have the same ID
|
||||
infectionchance = 0
|
||||
spreadtype = "Airborne"
|
||||
|
||||
proc/minormutate()
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.minormutate()
|
||||
infectionchance = min(10,infectionchance + rand(0,1))
|
||||
|
||||
proc/issame(var/datum/disease2/disease/disease)
|
||||
var/list/types = list()
|
||||
var/list/types2 = list()
|
||||
for(var/datum/disease2/effectholder/d in effects)
|
||||
types += d.effect.type
|
||||
var/equal = 1
|
||||
|
||||
for(var/datum/disease2/effectholder/d in disease.effects)
|
||||
types2 += d.effect.type
|
||||
|
||||
for(var/type in types)
|
||||
if(!(type in types2))
|
||||
equal = 0
|
||||
return equal
|
||||
|
||||
proc/activate(var/mob/living/carbon/mob)
|
||||
if(dead)
|
||||
cure(mob)
|
||||
mob.virus2 = null
|
||||
return
|
||||
if(mob.stat == 2)
|
||||
return
|
||||
// with a certain chance, the mob may become immune to the disease before it starts properly
|
||||
if(stage <= 1 && clicks == 0)
|
||||
if(prob(20))
|
||||
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
|
||||
else
|
||||
if(mob.radiation > 50)
|
||||
if(prob(1))
|
||||
majormutate()
|
||||
if(mob.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
if(mob.reagents.has_reagent("virusfood"))
|
||||
mob.reagents.remove_reagent("virusfood",0.1)
|
||||
clicks += 10
|
||||
if(clicks > stage*100 && prob(10))
|
||||
if(stage == 4)
|
||||
var/datum/disease2/resistance/res = new /datum/disease2/resistance(src)
|
||||
src.cure(mob)
|
||||
mob.resistances2 += res
|
||||
mob.antibodies |= src.antigen
|
||||
mob.virus2 = null
|
||||
del src
|
||||
stage++
|
||||
clicks = 0
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.runeffect(mob,stage)
|
||||
clicks+=speed
|
||||
|
||||
proc/cure(var/mob/living/carbon/mob)
|
||||
var/datum/disease2/effectholder/E
|
||||
if(stage>1)
|
||||
E = effects[1]
|
||||
E.effect.deactivate(mob)
|
||||
if(stage>2)
|
||||
E = effects[2]
|
||||
E.effect.deactivate(mob)
|
||||
if(stage>3)
|
||||
E = effects[3]
|
||||
E.effect.deactivate(mob)
|
||||
if(stage>4)
|
||||
E = effects[4]
|
||||
E.effect.deactivate(mob)
|
||||
|
||||
proc/cure_added(var/datum/disease2/resistance/res)
|
||||
if(res.resistsdisease(src))
|
||||
dead = 1
|
||||
|
||||
proc/majormutate()
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.majormutate()
|
||||
|
||||
|
||||
proc/getcopy()
|
||||
// world << "getting copy"
|
||||
var/datum/disease2/disease/disease = new /datum/disease2/disease
|
||||
disease.infectionchance = infectionchance
|
||||
disease.spreadtype = spreadtype
|
||||
disease.stageprob = stageprob
|
||||
disease.antigen = antigen
|
||||
for(var/datum/disease2/effectholder/holder in effects)
|
||||
// world << "adding effects"
|
||||
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
|
||||
newholder.effect = new holder.effect.type
|
||||
newholder.chance = holder.chance
|
||||
newholder.cure = holder.cure
|
||||
newholder.multiplier = holder.multiplier
|
||||
newholder.happensonce = holder.happensonce
|
||||
newholder.stage = holder.stage
|
||||
disease.effects += newholder
|
||||
// world << "[newholder.effect.name]"
|
||||
// world << "[disease]"
|
||||
return disease
|
||||
|
||||
/datum/disease2/effect
|
||||
var/chance_maxm = 100
|
||||
var/name = "Blanking effect"
|
||||
var/stage = 4
|
||||
var/maxm = 1
|
||||
proc/activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
proc/deactivate(var/mob/living/carbon/mob)
|
||||
|
||||
/datum/disease2/effect/alien
|
||||
name = "Unidentified Foreign Body"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red You feel something tearing its way out of your stomach..."
|
||||
mob.adjustToxLoss(10)
|
||||
mob.updatehealth()
|
||||
if(prob(40))
|
||||
if(mob.client)
|
||||
mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc)
|
||||
else
|
||||
new/mob/living/carbon/alien/larva(mob.loc)
|
||||
var/datum/disease2/disease/D = mob:virus2
|
||||
mob:gib()
|
||||
del D
|
||||
|
||||
/datum/disease2/effect/greater/gibbingtons
|
||||
name = "Gibbingtons Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.gib()
|
||||
|
||||
/datum/disease2/effect/greater/radian
|
||||
name = "Radian's syndrome"
|
||||
stage = 4
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.radiation += (2*multiplier)
|
||||
|
||||
/datum/disease2/effect/greater/toxins
|
||||
name = "Hyperacid Syndrome"
|
||||
stage = 3
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss((2*multiplier))
|
||||
|
||||
/datum/disease2/effect/greater/scream
|
||||
name = "Random screaming syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*scream")
|
||||
|
||||
/datum/disease2/effect/greater/drowsness
|
||||
name = "Automated sleeping syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.drowsyness += 10
|
||||
|
||||
/datum/disease2/effect/greater/shakey
|
||||
name = "World Shaking syndrome"
|
||||
stage = 3
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
shake_camera(mob,5*multiplier)
|
||||
|
||||
/datum/disease2/effect/greater/deaf
|
||||
name = "Hard of hearing syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf += 20
|
||||
|
||||
/datum/disease2/effect/invisible
|
||||
name = "Waiting Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
/datum/disease2/effect/greater/telepathic
|
||||
name = "Telepathy Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.mutations |= 512
|
||||
|
||||
/*/datum/disease2/effect/greater/noface
|
||||
name = "Identity Loss syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.face_dmg++
|
||||
deactivate(var/mob/living/carbon/mob)
|
||||
mob.face_dmg--*/
|
||||
|
||||
/datum/disease2/effect/greater/monkey
|
||||
name = "Monkism syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/h = mob
|
||||
h.monkeyize()
|
||||
|
||||
/datum/disease2/effect/greater/sneeze
|
||||
name = "Coldingtons Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*sneeze")
|
||||
|
||||
/datum/disease2/effect/greater/gunck
|
||||
name = "Flemmingtons"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red Mucous runs down the back of your throat."
|
||||
|
||||
/datum/disease2/effect/greater/killertoxins
|
||||
name = "Toxification syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(15)
|
||||
|
||||
/*/datum/disease2/effect/greater/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 25*/
|
||||
|
||||
/datum/disease2/effect/greater/sleepy
|
||||
name = "Resting syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*collapse")
|
||||
|
||||
/datum/disease2/effect/greater/mind
|
||||
name = "Lazy mind syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.setBrainLoss(50)
|
||||
|
||||
/datum/disease2/effect/greater/suicide
|
||||
name = "Suicidal syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.suiciding = 1
|
||||
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
|
||||
viewers(mob) << "\red <b>[mob.name] is holding \his breath. It looks like \he's trying to commit suicide.</b>"
|
||||
mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss())
|
||||
mob.updatehealth()
|
||||
spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
|
||||
mob.suiciding = 0
|
||||
|
||||
// lesser syndromes, partly just copypastes
|
||||
/datum/disease2/effect/lesser/mind
|
||||
name = "Lazy mind syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.setBrainLoss(20)
|
||||
|
||||
/datum/disease2/effect/lesser/drowsy
|
||||
name = "Bedroom Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.drowsyness = 5
|
||||
|
||||
/datum/disease2/effect/lesser/deaf
|
||||
name = "Hard of hearing syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf = 5
|
||||
|
||||
/datum/disease2/effect/lesser/gunck
|
||||
name = "Flemmingtons"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red Mucous runs down the back of your throat."
|
||||
|
||||
/datum/disease2/effect/lesser/radian
|
||||
name = "Radian's syndrome"
|
||||
stage = 4
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.radiation += 1
|
||||
|
||||
/datum/disease2/effect/lesser/sneeze
|
||||
name = "Coldingtons Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*sneeze")
|
||||
|
||||
/datum/disease2/effect/lesser/cough
|
||||
name = "Anima Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
|
||||
/*/datum/disease2/effect/lesser/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 5*/
|
||||
|
||||
/*/datum/disease2/effect/lesser/arm
|
||||
name = "Disarming Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
var/datum/organ/external/org = mob.organs["r_arm"]
|
||||
org.take_damage(3,0,0,0)
|
||||
mob << "\red You feel a sting in your right arm."*/
|
||||
|
||||
/datum/disease2/effect/lesser/hungry
|
||||
name = "Appetiser Effect"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.nutrition = max(0, mob.nutrition - 200)
|
||||
|
||||
/datum/disease2/effect/lesser/groan
|
||||
name = "Groaning Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*groan")
|
||||
|
||||
/datum/disease2/effect/lesser/scream
|
||||
name = "Loudness Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*scream")
|
||||
|
||||
/datum/disease2/effect/lesser/drool
|
||||
name = "Saliva Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*drool")
|
||||
|
||||
/datum/disease2/effect/lesser/fridge
|
||||
name = "Refridgerator Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*shiver")
|
||||
|
||||
/datum/disease2/effect/lesser/twitch
|
||||
name = "Twitcher"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*twitch")
|
||||
|
||||
/*Removed on request by Spaceman, due to it being detrimental to RP. -CN
|
||||
/datum/disease2/effect/lesser/deathgasp
|
||||
name = "Zombie Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*deathgasp")*/
|
||||
|
||||
/datum/disease2/effect/lesser/giggle
|
||||
name = "Uncontrolled Laughter Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*giggle")
|
||||
|
||||
|
||||
/datum/disease2/effect/lesser
|
||||
chance_maxm = 10
|
||||
|
||||
/datum/disease2/effectholder
|
||||
var/name = "Holder"
|
||||
var/datum/disease2/effect/effect
|
||||
var/chance = 0 //Chance in percentage each tick
|
||||
var/cure = "" //Type of cure it requires
|
||||
var/happensonce = 0
|
||||
var/multiplier = 1 //The chance the effects are WORSE
|
||||
var/stage = 0
|
||||
|
||||
proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
|
||||
if(happensonce > -1 && effect.stage <= stage && prob(chance))
|
||||
effect.activate(mob)
|
||||
if(happensonce == 1)
|
||||
happensonce = -1
|
||||
|
||||
proc/getrandomeffect_greater()
|
||||
var/list/datum/disease2/effect/list = list()
|
||||
for(var/e in (typesof(/datum/disease2/effect/greater) - /datum/disease2/effect/greater))
|
||||
// world << "Making [e]"
|
||||
var/datum/disease2/effect/f = new e
|
||||
if(f.stage == src.stage)
|
||||
list += f
|
||||
effect = pick(list)
|
||||
chance = rand(1,6)
|
||||
|
||||
proc/getrandomeffect_lesser()
|
||||
var/list/datum/disease2/effect/list = list()
|
||||
for(var/e in (typesof(/datum/disease2/effect/lesser) - /datum/disease2/effect/lesser))
|
||||
var/datum/disease2/effect/f = new e
|
||||
if(f.stage == src.stage)
|
||||
list += f
|
||||
effect = pick(list)
|
||||
chance = rand(1,6)
|
||||
|
||||
proc/minormutate()
|
||||
switch(pick(1,2,3,4,5))
|
||||
if(1)
|
||||
chance = rand(0,effect.chance_maxm)
|
||||
if(2)
|
||||
multiplier = rand(1,effect.maxm)
|
||||
proc/majormutate()
|
||||
getrandomeffect_greater()
|
||||
|
||||
/proc/dprob(var/p)
|
||||
return(prob(sqrt(p)) && prob(sqrt(p)))
|
||||
@@ -1,43 +0,0 @@
|
||||
/obj/item/weapon/cureimplanter
|
||||
name = "Hypospray injector"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "implanter1"
|
||||
var/datum/disease2/resistance/resistance = null
|
||||
var/works = 0
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
item_state = "syringe_0"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 2.0
|
||||
|
||||
|
||||
/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob)
|
||||
if(ismob(target))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
if (target != user)
|
||||
O.show_message(text("\red <B>[] is trying to inject [] with [src.name]!</B>", user, target), 1)
|
||||
else
|
||||
O.show_message("\red <B>[user] is trying to inject themselves with [src.name]!</B>", 1)
|
||||
if(!do_mob(user, target,60)) return
|
||||
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
if (target != user)
|
||||
O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1)
|
||||
else
|
||||
O.show_message("\red [user] injects themself with [src.name]!", 1)
|
||||
|
||||
|
||||
var/mob/living/carbon/M = target
|
||||
|
||||
if(works == 0)
|
||||
M.resistances2 += resistance
|
||||
//M.immunevirus2 += M.virus2.getcopy()
|
||||
if(M.virus2)
|
||||
M.virus2.cure_added(resistance)
|
||||
else if(works == 1)
|
||||
M.adjustToxLoss(60)
|
||||
else if(works == 2)
|
||||
M.gib()
|
||||
else if(works == 3)
|
||||
infect_virus2(M,virus2,1)
|
||||
@@ -1,169 +0,0 @@
|
||||
/obj/machinery/disease2/incubator/
|
||||
name = "Pathogenic incubator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "incubator"
|
||||
var/obj/item/weapon/virusdish/dish
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/radiation = 0
|
||||
|
||||
var/on = 0
|
||||
var/power = 0
|
||||
|
||||
var/foodsupply = 0
|
||||
var/toxins = 0
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(25))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/B as obj, var/mob/user as mob)
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(src.beaker)
|
||||
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "A syringe is already loaded into the machine."
|
||||
else
|
||||
user << "A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
if(src.dish)
|
||||
user << "A dish is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.dish = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
user << "You add the dish to the machine!"
|
||||
src.updateUsrDialog()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
if(!dish)
|
||||
return
|
||||
usr.machine = src
|
||||
if (href_list["power"])
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "incubator_on"
|
||||
else
|
||||
icon_state = "incubator"
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
if (href_list["rad"])
|
||||
radiation += 10
|
||||
if (href_list["flush"])
|
||||
radiation = 0
|
||||
toxins = 0
|
||||
foodsupply = 0
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!dish)
|
||||
dat = "Please insert dish into the incubator.<BR>"
|
||||
var/string = "Off"
|
||||
if(on)
|
||||
string = "On"
|
||||
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Food supply : [foodsupply]"
|
||||
dat += "<BR>"
|
||||
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Toxins : [toxins]"
|
||||
dat += "<BR><BR>"
|
||||
if(beaker)
|
||||
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
if(dish)
|
||||
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
dat += "<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a><BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
|
||||
onclose(user, "incubator")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
process()
|
||||
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
if(foodsupply)
|
||||
foodsupply -= 1
|
||||
dish.growth += 3
|
||||
if(dish.growth >= 100)
|
||||
state("The [src.name] pings", "blue")
|
||||
if(radiation)
|
||||
if(radiation > 50 & prob(5))
|
||||
dish.virus2.majormutate()
|
||||
if(dish.info)
|
||||
dish.info = "OUTDATED : [dish.info]"
|
||||
dish.analysed = 0
|
||||
state("The [src.name] beeps", "blue")
|
||||
|
||||
else if(prob(5))
|
||||
dish.virus2.minormutate()
|
||||
radiation -= 1
|
||||
if(toxins && prob(5))
|
||||
dish.virus2.infectionchance -= 1
|
||||
if(toxins > 50)
|
||||
dish.virus2 = null
|
||||
else if(!dish)
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
|
||||
|
||||
if(beaker)
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 10
|
||||
if(!beaker.reagents.remove_reagent("toxin",1))
|
||||
toxins += 1
|
||||
@@ -1,161 +0,0 @@
|
||||
/obj/machinery/disease2/isolator/
|
||||
name = "Pathogenic Isolator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "isolator"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/isolating = 0
|
||||
var/beaker = null
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
|
||||
blob_act()
|
||||
if (prob(25))
|
||||
del(src)
|
||||
|
||||
meteorhit()
|
||||
del(src)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
|
||||
if(!istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
|
||||
if(src.beaker)
|
||||
user << "A syringe is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "isolator_in"
|
||||
|
||||
Topic(href, href_list)
|
||||
if(stat & BROKEN) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
|
||||
usr.machine = src
|
||||
if(!beaker) return
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
|
||||
if (href_list["isolate"])
|
||||
var/datum/reagent/blood/Blood
|
||||
for(var/datum/reagent/blood/B in R.reagent_list)
|
||||
if(B)
|
||||
Blood = B
|
||||
break
|
||||
|
||||
if(Blood.data["virus2"])
|
||||
virus2 = Blood.data["virus2"]
|
||||
isolating = 40
|
||||
icon_state = "isolator_processing"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if (href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "isolator"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert sample into the isolator.<BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
else if(isolating)
|
||||
dat = "Isolating"
|
||||
else
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
|
||||
if(!R.total_volume)
|
||||
dat += "[beaker] is empty."
|
||||
else
|
||||
dat += "Contained reagents:<BR>"
|
||||
for(var/datum/reagent/blood/G in R.reagent_list)
|
||||
if(G.data["virus2"])
|
||||
dat += " [G.name]: <A href='?src=\ref[src];isolate=[G.id]'>Isolate</a>"
|
||||
else
|
||||
dat += " <b>No pathogen</b>"
|
||||
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]", "window=isolator;size=575x400")
|
||||
onclose(user, "isolator")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
process()
|
||||
if(isolating > 0)
|
||||
isolating -= 1
|
||||
if(isolating == 0)
|
||||
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
|
||||
d.virus2 = virus2.getcopy()
|
||||
virus2 = null
|
||||
icon_state = "isolator_in"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/virusdish
|
||||
name = "Virus containment/growth dish"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/growth = 0
|
||||
var/info = 0
|
||||
var/analysed = 0
|
||||
|
||||
reagents = list()
|
||||
|
||||
/obj/item/weapon/virusdish/random
|
||||
name = "Virus Sample"
|
||||
|
||||
/obj/item/weapon/virusdish/random/New()
|
||||
..()
|
||||
// add a random virus to this dish
|
||||
src.virus2 = new /datum/disease2/disease
|
||||
src.virus2.makerandom()
|
||||
growth = rand(5, 50)
|
||||
|
||||
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
|
||||
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
user << "The dish shatters"
|
||||
if(virus2.infectionchance > 0)
|
||||
for(var/mob/living/carbon/target in view(null, src)) if(!target.virus2)
|
||||
if(airborne_can_reach(src.loc, target.loc))
|
||||
if(target.get_infection_chance())
|
||||
infect_virus2(target,src.virus2)
|
||||
del src
|
||||
|
||||
/obj/item/weapon/virusdish/examine()
|
||||
usr << "This is a virus containment dish"
|
||||
if(src.info)
|
||||
usr << "It has the following information about its contents"
|
||||
usr << src.info
|
||||
|
||||
/obj/machinery/proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] \blue [msg]", 2)
|
||||
@@ -1,30 +0,0 @@
|
||||
/obj/machinery/disease2/monkeycloner
|
||||
name = "Monkey dispensor"
|
||||
icon = 'cloning.dmi'
|
||||
icon_state = "pod_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
var/cloning = 0
|
||||
|
||||
/obj/machinery/disease2/monkeycloner/attack_hand()
|
||||
if(!cloning)
|
||||
cloning = 150
|
||||
|
||||
icon_state = "pod_g"
|
||||
|
||||
/obj/machinery/disease2/monkeycloner/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
//src.updateDialog()
|
||||
|
||||
if(cloning)
|
||||
cloning -= 1
|
||||
if(!cloning)
|
||||
new /mob/living/carbon/monkey(src.loc)
|
||||
icon_state = "pod_0"
|
||||
|
||||
|
||||
|
||||
return
|
||||
@@ -124,14 +124,15 @@
|
||||
|
||||
for(var/i = 0, i < lethal_amount, i++)
|
||||
var/mob/living/carbon/human/H = pick(crew)
|
||||
if(H.virus2)
|
||||
if(lethal.uniqueID in H.virus2)
|
||||
i--
|
||||
continue
|
||||
H.virus2 = lethal.getcopy()
|
||||
H.virus2["[lethal.uniqueID]"] = lethal.getcopy()
|
||||
infectees += H
|
||||
|
||||
var/mob/living/carbon/human/patient_zero = pick(infectees)
|
||||
patient_zero.virus2.stage = 3
|
||||
var/datum/disease2/disease/V = patient_zero.virus2["[lethal.uniqueID]"]
|
||||
V.stage = 3
|
||||
|
||||
cruiser_arrival = world.time + (10 * 90 * 60)
|
||||
stage = 1
|
||||
@@ -169,7 +170,7 @@
|
||||
var/sick = 0
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.key && H.stat != 2) alive++
|
||||
if(H.virus2 && H.stat != 2) sick++
|
||||
if(H.virus2.len && H.stat != 2) sick++
|
||||
|
||||
if(alive == 0)
|
||||
finished = 2
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Announce()
|
||||
if(!virus)
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if((H.virus2) || (H.stat == 2) || prob(30))
|
||||
if((H.virus2.len) || (H.stat == 2) || prob(30))
|
||||
continue
|
||||
if(prob(100)) // no lethal diseases outside virus mode!
|
||||
infect_mob_random_lesser(H)
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
t1 = "<font color='red'>*dead*</font>"
|
||||
else
|
||||
dat += text("[]\tHealth %: [] ([])</FONT><BR>", (occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"), occupant.health, t1)
|
||||
if(iscarbon(occupant))
|
||||
var/mob/living/carbon/C = occupant
|
||||
dat += text("[]\t-Pulse, bpm: []</FONT><BR>", (C.pulse == PULSE_NONE || C.pulse == PULSE_THREADY ? "<font color='red'>" : "<font color='blue'>"), C.get_pulse(GETPULSE_TOOL))
|
||||
dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss())
|
||||
dat += text("[]\t-Respiratory Damage %: []</FONT><BR>", (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getOxyLoss())
|
||||
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss())
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
else
|
||||
dat += text("[]\tHealth %: [] ([])</FONT><BR>", (occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"), occupant.health, t1)
|
||||
|
||||
if(occupant.virus2)
|
||||
if(occupant.virus2.len)
|
||||
dat += text("<font color='red'>Viral pathogen detected in blood stream.</font><BR>")
|
||||
|
||||
dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss())
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<B>Fire Damage:</B> [src.victim.getFireLoss()]<BR>
|
||||
<B>Suffocation Damage:</B> [src.victim.getOxyLoss()]<BR>
|
||||
<B>Patient Status:</B> [src.victim.stat ? "Non-Responsive" : "Stable"]<BR>
|
||||
<B>Heartbeat rate:</B> [victim.get_pulse(GETPULSE_TOOL)]<BR>
|
||||
"}
|
||||
else
|
||||
src.victim = null
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
dat += text("\n<A href='?src=\ref[];print_p=1'>Print Record</A><BR>\n<A href='?src=\ref[];screen=2'>Back</A><BR>", src, src)
|
||||
if(5.0)
|
||||
dat += "<CENTER><B>Virus Database</B></CENTER>"
|
||||
/* Advanced diseases is weak! Feeble! Glory to virus2!
|
||||
for(var/Dt in typesof(/datum/disease/))
|
||||
var/datum/disease/Dis = new Dt(0)
|
||||
if(istype(Dis, /datum/disease/advance))
|
||||
@@ -90,6 +91,11 @@
|
||||
if(!Dis.desc)
|
||||
continue
|
||||
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
|
||||
*/
|
||||
for (var/ID in virusDB)
|
||||
var/datum/data/record/v = virusDB[ID]
|
||||
dat += "<br><a href='?src=\ref[src];vir=\ref[v]'>[v.fields["name"]]</a>"
|
||||
|
||||
dat += "<br><a href='?src=\ref[src];screen=1'>Back</a>"
|
||||
if(6.0)
|
||||
dat += "<center><b>Medical Robot Monitor</b></center>"
|
||||
@@ -121,36 +127,56 @@
|
||||
/obj/machinery/computer/med_data/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if (!( data_core.general.Find(src.active1) ))
|
||||
src.active1 = null
|
||||
|
||||
if (!( data_core.medical.Find(src.active2) ))
|
||||
src.active2 = null
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
|
||||
if (href_list["scan"])
|
||||
if (src.scan)
|
||||
src.scan.loc = src.loc
|
||||
src.scan = null
|
||||
|
||||
if(ishuman(usr))
|
||||
scan.loc = usr.loc
|
||||
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
|
||||
scan = null
|
||||
|
||||
else
|
||||
src.scan.loc = src.loc
|
||||
src.scan = null
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.scan = I
|
||||
|
||||
else if (href_list["logout"])
|
||||
src.authenticated = null
|
||||
src.screen = null
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
|
||||
else if (href_list["login"])
|
||||
|
||||
if (istype(usr, /mob/living/silicon/ai))
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
src.authenticated = usr.name
|
||||
src.rank = "AI"
|
||||
src.screen = 1
|
||||
|
||||
else if (istype(usr, /mob/living/silicon/robot))
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
@@ -158,13 +184,16 @@
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
src.rank = R.braintype
|
||||
src.screen = 1
|
||||
|
||||
else if (istype(src.scan, /obj/item/weapon/card/id))
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
|
||||
if (src.check_access(src.scan))
|
||||
src.authenticated = src.scan.registered_name
|
||||
src.rank = src.scan.assignment
|
||||
src.screen = 1
|
||||
|
||||
if (src.authenticated)
|
||||
|
||||
if(href_list["screen"])
|
||||
@@ -176,20 +205,12 @@
|
||||
src.active2 = null
|
||||
|
||||
if(href_list["vir"])
|
||||
var/type = href_list["vir"]
|
||||
var/datum/disease/Dis = new type(0)
|
||||
var/AfS = ""
|
||||
for(var/Str in Dis.affected_species)
|
||||
AfS += " [Str];"
|
||||
src.temp = {"<b>Name:</b> [Dis.name]
|
||||
<BR><b>Number of stages:</b> [Dis.max_stages]
|
||||
<BR><b>Spread:</b> [Dis.spread] Transmission
|
||||
<BR><b>Possible Cure:</b> [(Dis.cure||"none")]
|
||||
<BR><b>Affected Species:</b>[AfS]
|
||||
<BR>
|
||||
<BR><b>Notes:</b> [Dis.desc]
|
||||
<BR>
|
||||
<BR><b>Severity:</b> [Dis.severity]"}
|
||||
var/datum/data/record/v = locate(href_list["vir"])
|
||||
src.temp = "<center>GNAv2 based virus lifeform V-[v.fields["id"]]</center>"
|
||||
src.temp += "<br><b>Name:</b> <A href='?src=\ref[src];field=vir_name;edit_vir=\ref[v]'>[v.fields["name"]]</A>"
|
||||
src.temp += "<br><b>Antigen:</b> [v.fields["antigen"]]"
|
||||
src.temp += "<br><b>Spread:</b> [v.fields["spread type"]] "
|
||||
src.temp += "<br><b>Details:</b><br> <A href='?src=\ref[src];field=vir_desc;edit_vir=\ref[v]'>[v.fields["description"]]</A>"
|
||||
|
||||
if (href_list["del_all"])
|
||||
src.temp = text("Are you sure you wish to delete all records?<br>\n\t<A href='?src=\ref[];temp=1;del_all2=1'>Yes</A><br>\n\t<A href='?src=\ref[];temp=1'>No</A><br>", src, src)
|
||||
@@ -279,7 +300,7 @@
|
||||
src.active2.fields["notes"] = t1
|
||||
if("p_stat")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
src.temp = text("<B>Physical Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unconscious'>*Unconscious*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unfit'>Physically Unfit</A><BR>", src, src, src, src)
|
||||
src.temp = text("<B>Physical Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=deceased'>*Deceased*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=ssd'>*SSD*</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=active'>Active</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=unfit'>Physically Unfit</A><BR>\n\t<A href='?src=\ref[];temp=1;p_stat=disabled'>Disabled</A><BR>", src, src, src, src, src)
|
||||
if("m_stat")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
src.temp = text("<B>Mental Condition:</B><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=insane'>*Insane*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=unstable'>*Unstable*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=watch'>*Watch*</A><BR>\n\t<A href='?src=\ref[];temp=1;m_stat=stable'>Stable</A><BR>", src, src, src, src)
|
||||
@@ -292,6 +313,20 @@
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
src.active1.fields["dna"] = t1
|
||||
if("vir_name")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = copytext(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["name"] = t1
|
||||
if("vir_desc")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = copytext(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message),1,MAX_MESSAGE_LEN)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["description"] = t1
|
||||
else
|
||||
|
||||
if (href_list["p_stat"])
|
||||
@@ -299,12 +334,14 @@
|
||||
switch(href_list["p_stat"])
|
||||
if("deceased")
|
||||
src.active1.fields["p_stat"] = "*Deceased*"
|
||||
if("unconscious")
|
||||
src.active1.fields["p_stat"] = "*Unconscious*"
|
||||
if("ssd")
|
||||
src.active1.fields["p_stat"] = "*SSD*"
|
||||
if("active")
|
||||
src.active1.fields["p_stat"] = "Active"
|
||||
if("unfit")
|
||||
src.active1.fields["p_stat"] = "Physically Unfit"
|
||||
if("disabled")
|
||||
src.active1.fields["p_stat"] = "Disabled"
|
||||
|
||||
if (href_list["m_stat"])
|
||||
if (src.active1)
|
||||
@@ -466,7 +503,7 @@
|
||||
if(4)
|
||||
R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+")
|
||||
if(5)
|
||||
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
|
||||
R.fields["p_stat"] = pick("*SSD*", "Active", "Physically Unfit", "Disabled")
|
||||
if(6)
|
||||
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
|
||||
continue
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<B>Current cell temperature:</B> [temp_text]K<BR>
|
||||
<B>Cryo status:</B> [ on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
|
||||
[beaker_text]<BR><BR>
|
||||
<B>Current occupant:</B> [occupant ? "<BR>Name: [occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(occupant.getToxLoss(),0.1)]<BR>Body temperature: [occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR>
|
||||
<B>Current occupant:</B> [occupant ? "<BR>Name: [occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(occupant.getToxLoss(),0.1)]<BR>Body temperature: [occupant.bodytemperature]<BR>Heartbeat rate: [occupant.get_pulse(GETPULSE_TOOL)]" : "<FONT color=red>None</FONT>"]<BR>
|
||||
"}
|
||||
user.set_machine(src)
|
||||
user << browse(dat, "window=cryo")
|
||||
|
||||
@@ -87,8 +87,11 @@
|
||||
for(var/datum/disease/D in patient.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
foundVirus++
|
||||
if(patient.virus2)
|
||||
foundVirus++
|
||||
|
||||
for (var/ID in patient.virus2)
|
||||
if (ID in virusDB)
|
||||
foundVirus = 1
|
||||
break
|
||||
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/effect/sign/barsign
|
||||
/obj/effect/sign/double/barsign
|
||||
icon = 'barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/amount = 5
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Del()
|
||||
@@ -144,4 +144,4 @@
|
||||
icon = 'blood.dmi'
|
||||
icon_state = "mucus"
|
||||
random_icon_states = list("mucus")
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
|
||||
@@ -113,9 +113,10 @@
|
||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||
if (user.hand)
|
||||
temp = user:organs_by_name["l_hand"]
|
||||
if(temp && temp.status & ORGAN_DESTROYED)
|
||||
user << "<span class = 'warning'> Yo- wait a minute."
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
|
||||
return
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = src.loc
|
||||
S.remove_from_storage(src)
|
||||
|
||||
@@ -129,8 +129,13 @@ MASS SPECTROMETER
|
||||
if (istype(M, /mob/living/carbon))
|
||||
if(M:reagents.total_volume > 0)
|
||||
user.show_message(text("\red Warning: Unknown substance detected in subject's blood."))
|
||||
if(M:virus2)
|
||||
user.show_message(text("\red Warning: Unknown pathogen detected in subject's blood."))
|
||||
if(M:virus2.len)
|
||||
var/mob/living/carbon/C = M
|
||||
for (var/ID in C.virus2)
|
||||
if (ID in virusDB)
|
||||
var/datum/data/record/V = virusDB[ID]
|
||||
user.show_message(text("\red Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]"))
|
||||
// user.show_message(text("\red Warning: Unknown pathogen detected in subject's blood."))
|
||||
if (M.getCloneLoss())
|
||||
user.show_message("\red Subject appears to have been imperfectly cloned.")
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
@@ -174,6 +179,7 @@ MASS SPECTROMETER
|
||||
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
|
||||
else
|
||||
user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl")
|
||||
user.show_message("\blue Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
R.icon_state = "robot"
|
||||
del(R.module)
|
||||
R.module = null
|
||||
R.modtype = "robot"
|
||||
R.updatename("Default")
|
||||
R.status_flags |= CANPUSH
|
||||
R.updateicon()
|
||||
@@ -52,6 +51,7 @@
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
R.real_name = heldname
|
||||
|
||||
return 1
|
||||
|
||||
@@ -253,4 +253,4 @@ var/global/list/datum/stack_recipe/silver_recipes = list ( \
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
perunit = 2000
|
||||
|
||||
@@ -111,4 +111,4 @@
|
||||
maxcharge = 10000
|
||||
maxcharge = 10000
|
||||
m_amt = 0
|
||||
g_amt = 0
|
||||
g_amt = 0
|
||||
|
||||
@@ -201,3 +201,56 @@
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
icon_state = "Dpacket"
|
||||
item_state = "Dpacket"
|
||||
|
||||
|
||||
/*
|
||||
* Vial Box
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/fancy/vials
|
||||
icon = 'icons/obj/vialbox.dmi'
|
||||
icon_state = "vialbox6"
|
||||
icon_type = "vial"
|
||||
name = "vial storage box"
|
||||
storage_slots = 6
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
||||
|
||||
|
||||
/obj/item/weapon/storage/fancy/vials/New()
|
||||
..()
|
||||
for(var/i=1; i <= storage_slots; i++)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker/vial(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/lockbox/vials
|
||||
name = "secure vial storage box"
|
||||
desc = "A locked box for keeping things away from children."
|
||||
icon = 'icons/obj/vialbox.dmi'
|
||||
icon_state = "vialbox0"
|
||||
item_state = "syringe_kit"
|
||||
max_w_class = 3
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||
storage_slots = 6
|
||||
req_access = list(access_virology)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/vials/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/vials/update_icon(var/itemremoved = 0)
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
src.icon_state = "vialbox[total_contents]"
|
||||
src.overlays.Cut()
|
||||
if (!broken)
|
||||
overlays += image(icon, src, "led[locked]")
|
||||
if(locked)
|
||||
overlays += image(icon, src, "cover")
|
||||
else
|
||||
overlays += image(icon, src, "ledb")
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/structure/sign/barsign
|
||||
/obj/structure/sign/double/barsign
|
||||
icon = 'barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -118,4 +119,4 @@
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/shield/riot(src)
|
||||
new /obj/item/weapon/storage/lockbox/loyalty(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
@@ -149,6 +150,7 @@
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
@@ -252,6 +254,7 @@
|
||||
new /obj/item/clothing/suit/armor/det_suit(src)
|
||||
new /obj/item/ammo_magazine/c38(src)
|
||||
new /obj/item/ammo_magazine/c38(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/gun/projectile/detective(src)
|
||||
new /obj/item/clothing/tie/holster/armpit(src)
|
||||
return
|
||||
|
||||
@@ -19,20 +19,60 @@
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/sign/blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
del(src)
|
||||
else ..()
|
||||
|
||||
/obj/structure/sign/map
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = 3 //big
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && isturf(user.loc))
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel") return
|
||||
var/obj/structure/sign/S = new(user.loc)
|
||||
switch(direction)
|
||||
if("North")
|
||||
S.pixel_y = 32
|
||||
if("East")
|
||||
S.pixel_x = 32
|
||||
if("South")
|
||||
S.pixel_y = -32
|
||||
if("West")
|
||||
S.pixel_x = -32
|
||||
else return
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = sign_state
|
||||
user << "You fasten \the [S] with your [tool]."
|
||||
del(src)
|
||||
else ..()
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
desc = "A framed picture of the station."
|
||||
|
||||
/obj/structure/sign/map/left
|
||||
/obj/structure/sign/double/map/left
|
||||
icon_state = "map-left"
|
||||
|
||||
/obj/structure/sign/map/right
|
||||
/obj/structure/sign/double/map/right
|
||||
icon_state = "map-right"
|
||||
|
||||
/obj/structure/sign/securearea
|
||||
@@ -75,13 +115,11 @@
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
icon_state = "fire"
|
||||
|
||||
|
||||
/obj/structure/sign/nosmoking_1
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking"
|
||||
|
||||
|
||||
/obj/structure/sign/nosmoking_2
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
@@ -112,14 +150,14 @@
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
icon_state = "atmosplaque"
|
||||
|
||||
/obj/structure/sign/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
|
||||
/obj/structure/sign/double/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
|
||||
name = "The Maltese Falcon"
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
|
||||
/obj/structure/sign/maltesefalcon/left
|
||||
/obj/structure/sign/double/maltesefalcon/left
|
||||
icon_state = "maltesefalcon-left"
|
||||
|
||||
/obj/structure/sign/maltesefalcon/right
|
||||
/obj/structure/sign/double/maltesefalcon/right
|
||||
icon_state = "maltesefalcon-right"
|
||||
|
||||
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//STRIKE TEAMS
|
||||
|
||||
var/list/response_team_members = list()
|
||||
var/global/send_emergency_team = 0
|
||||
var/global/send_emergency_team = 0 // Used for automagic response teams
|
||||
// 'admin_emergency_team' for admin-spawned response teams
|
||||
|
||||
client/verb/JoinResponseTeam()
|
||||
set category = "IC"
|
||||
@@ -10,6 +11,9 @@ client/verb/JoinResponseTeam()
|
||||
if(!send_emergency_team)
|
||||
usr << "No emergency response team is currently being sent."
|
||||
return
|
||||
if(admin_emergency_team)
|
||||
usr << "An emergency response team has already been sent."
|
||||
return
|
||||
if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer"))
|
||||
usr << "<font color=red><b>You are jobbanned from the emergency reponse team!"
|
||||
return
|
||||
@@ -65,7 +69,7 @@ proc/percentage_antagonists()
|
||||
|
||||
|
||||
proc/trigger_armed_response_team(var/force = 0)
|
||||
if(send_emergency_team)
|
||||
if(send_emergency_team || admin_emergency_team)
|
||||
return
|
||||
|
||||
var/send_team_chance = 20 // base chance that a team will be sent
|
||||
@@ -78,7 +82,7 @@ proc/trigger_armed_response_team(var/force = 0)
|
||||
// there's only a certain chance a team will be sent
|
||||
if(!prob(send_team_chance)) return
|
||||
|
||||
command_alert("According to our sensors, [station_name()] has entered code red. We will prepare and dispatch an emergency response team to deal with the situation.", "Command Report")
|
||||
command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "NMV Icarus Command")
|
||||
|
||||
send_emergency_team = 1
|
||||
|
||||
|
||||
@@ -107,11 +107,15 @@
|
||||
for(var/obj/effect/decal/cleanable/blood/B in contents)
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
B.virus2 |= virus_copylist(M.virus2)
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
//if there isn't a blood decal already, make one.
|
||||
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(src)
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
newblood.virus2 |= virus_copylist(M.virus2)
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
|
||||
@@ -120,6 +124,8 @@
|
||||
if( istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/human))
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
this.virus2 = virus_copylist(M.virus2)
|
||||
|
||||
else if( istype(M, /mob/living/carbon/alien ))
|
||||
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(src)
|
||||
|
||||
@@ -53,8 +53,10 @@
|
||||
for(var/datum/disease/D in patient.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
foundVirus++
|
||||
if(patient.virus2)
|
||||
foundVirus++
|
||||
for (var/ID in patient.virus2)
|
||||
if (ID in virusDB)
|
||||
foundVirus = 1
|
||||
break
|
||||
if(!C) continue
|
||||
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
|
||||
@@ -318,6 +318,10 @@
|
||||
icon_state = "eleanorstone"
|
||||
item_state = "eleanorstone"
|
||||
|
||||
volume = 150
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,25,30,50,150)
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/fluff/listermedbottle //compactninja: Lister Black
|
||||
name = "Pill bottle (anti-depressants)"
|
||||
desc = "Contains pills used to deal with depression. They appear to be prescribed to Lister Black"
|
||||
|
||||
@@ -286,3 +286,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(host)
|
||||
host.ckey = src.ckey
|
||||
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
|
||||
|
||||
/mob/dead/observer/verb/view_manfiest()
|
||||
set name = "View Crew Manifest"
|
||||
set category = "Ghost"
|
||||
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
dat += data_core.get_manifest()
|
||||
|
||||
src << browse(dat, "window=manifest;size=370x420;can_close=1")
|
||||
|
||||
@@ -455,4 +455,26 @@
|
||||
<BR>"}
|
||||
user << browse(dat, text("window=mob[];size=325x500", name))
|
||||
onclose(user, "mob[name]")
|
||||
return
|
||||
return
|
||||
|
||||
//generates realistic-ish pulse output based on preset levels
|
||||
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
|
||||
var/temp = 0 //see setup.dm:694
|
||||
switch(src.pulse)
|
||||
if(PULSE_NONE)
|
||||
return "0"
|
||||
if(PULSE_SLOW)
|
||||
temp = rand(40, 60)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_NORM)
|
||||
temp = rand(60, 90)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_FAST)
|
||||
temp = rand(90, 120)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_2FAST)
|
||||
temp = rand(120, 160)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_THREADY)
|
||||
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
|
||||
// output for machines^ ^^^^^^^output for people^^^^^^^^^
|
||||
@@ -2,8 +2,7 @@
|
||||
gender = MALE
|
||||
var/list/stomach_contents = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/list/datum/disease2/disease/resistances2 = list()
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/antibodies = 0
|
||||
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
@@ -19,4 +18,6 @@
|
||||
//Surgery info
|
||||
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
var/pose = null
|
||||
|
||||
var/pulse = PULSE_NORM //current pulse level
|
||||
|
||||
@@ -209,19 +209,13 @@
|
||||
spawn(15)
|
||||
usr << "\blue [t_He] has a pulse!"
|
||||
|
||||
if (src.stat == 2 || (status_flags & FAKEDEATH))
|
||||
if(distance <= 1)
|
||||
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
if(distance <= 1)
|
||||
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0)
|
||||
spawn(15)
|
||||
var/foundghost = 0
|
||||
if(src.client)
|
||||
foundghost = 1
|
||||
if(!foundghost)
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse and [t_his] soul has departed...</span>"
|
||||
if(pulse == PULSE_NONE)
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
|
||||
else
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse...</span>"
|
||||
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
|
||||
@@ -1213,3 +1213,36 @@ mob/living/carbon/human/yank_out_object()
|
||||
organ.status |= ORGAN_BLEEDING
|
||||
organ.take_damage(rand(1,3), 0, 0)
|
||||
src.adjustToxLoss(rand(1,3))
|
||||
|
||||
/mob/living/carbon/human/verb/check_pulse()
|
||||
set category = "Object"
|
||||
set name = "Check pulse"
|
||||
set desc = "Approximately count somebody's pulse. Requires you to stand still at least 6 seconds."
|
||||
set src in view(1)
|
||||
var/self = 0
|
||||
|
||||
if(usr.stat == 1 || usr.restrained() || !isliving(usr)) return
|
||||
|
||||
if(usr == src)
|
||||
self = 1
|
||||
if(!self)
|
||||
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
|
||||
"You begin counting [src]'s pulse")
|
||||
else
|
||||
usr.visible_message("\blue [usr] begins counting their pulse.",\
|
||||
"You begin counting your pulse.")
|
||||
|
||||
if(src.pulse)
|
||||
usr << "\blue [self ? "You have a" : "[src] has a"] pulse! Counting..."
|
||||
else
|
||||
usr << "\red [src] has no pulse!" //it is REALLY UNLIKELY that a dead person would check his own pulse
|
||||
return
|
||||
|
||||
usr << "Don't move until counting is finished."
|
||||
var/time = world.timeofday
|
||||
sleep(60)
|
||||
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
|
||||
usr << "You moved while counting. Try again."
|
||||
else
|
||||
usr << "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]."
|
||||
|
||||
|
||||
@@ -113,6 +113,8 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
pulse = handle_pulse()
|
||||
|
||||
// Grabbing
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
@@ -542,17 +544,20 @@
|
||||
if(stat != 2)
|
||||
stabilize_temperature_from_calories()
|
||||
|
||||
// log_debug("Adjusting to atmosphere.")
|
||||
//After then, it reacts to the surrounding atmosphere based on your thermal protection
|
||||
if(loc_temp < bodytemperature)
|
||||
//Place is colder than we are
|
||||
if(loc_temp < BODYTEMP_COLD_DAMAGE_LIMIT) //Place is colder than we are
|
||||
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
else
|
||||
//Place is hotter than we are
|
||||
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
// log_debug("[loc_temp] is Cold. Cooling by [amt]")
|
||||
bodytemperature += amt
|
||||
else if (loc_temp > BODYTEMP_HEAT_DAMAGE_LIMIT) //Place is hotter than we are
|
||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
// log_debug("[loc_temp] is Heat. Heating up by [amt]")
|
||||
bodytemperature += amt
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
@@ -632,19 +637,25 @@
|
||||
*/
|
||||
|
||||
proc/stabilize_temperature_from_calories()
|
||||
var/body_temperature_difference = 310.15 - bodytemperature
|
||||
if (abs(body_temperature_difference) < 0.01)
|
||||
return //fuck this precision
|
||||
switch(bodytemperature)
|
||||
if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
nutrition -= 2
|
||||
var/body_temperature_difference = 310.15 - bodytemperature
|
||||
bodytemperature += max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
var/recovery_amt = max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
// log_debug("Cold. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
if(260.15 to 360.15)
|
||||
var/body_temperature_difference = 310.15 - bodytemperature
|
||||
bodytemperature += body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
var/recovery_amt = body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
// log_debug("Norm. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
if(360.15 to INFINITY) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
|
||||
//We totally need a sweat system cause it totally makes sense...~
|
||||
var/body_temperature_difference = 310.15 - bodytemperature
|
||||
bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
var/recovery_amt = min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
// log_debug("Hot. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
|
||||
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, UPPER_TORSO, LOWER_TORSO, etc. See setup.dm for the full list)
|
||||
proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
|
||||
@@ -1332,28 +1343,35 @@
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
if(virus2) virus2.cure(src)
|
||||
if(!virus2)
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2 && get_infection_chance())
|
||||
infect_virus2(src,B.virus2)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2 && get_infection_chance())
|
||||
infect_virus2(src,M.virus2)
|
||||
else
|
||||
if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
V.cure(src)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2.len && get_infection_chance(src))
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2.len && get_infection_chance(src))
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
|
||||
CRASH("virus2 nulled before calling activate()")
|
||||
else
|
||||
virus2.activate(src)
|
||||
|
||||
V.activate(src)
|
||||
// activate may have deleted the virus
|
||||
if(!virus2) return
|
||||
if(!V) continue
|
||||
|
||||
// check if we're immune
|
||||
if(virus2.antigen & src.antibodies) virus2.dead = 1
|
||||
if(V.antigen & src.antibodies)
|
||||
V.dead = 1
|
||||
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
proc/handle_stomach()
|
||||
spawn(0)
|
||||
@@ -1414,5 +1432,34 @@
|
||||
if (shock_stage > 80)
|
||||
Paralyse(rand(15,28))
|
||||
|
||||
proc/handle_pulse()
|
||||
if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
|
||||
var/temp = PULSE_NORM
|
||||
|
||||
if(round(vessel.get_reagent_amount("blood")) <= BLOOD_VOLUME_BAD) //how much blood do we have
|
||||
temp = PULSE_THREADY //not enough :(
|
||||
|
||||
if(status_flags & FAKEDEATH)
|
||||
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
|
||||
temp--
|
||||
break //one reagent is enough
|
||||
//comment out the breaks to make med effects stack
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
|
||||
if(R.id in tachycardics)
|
||||
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
|
||||
temp++
|
||||
break
|
||||
|
||||
return temp
|
||||
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -150,28 +150,40 @@
|
||||
emote("gasp")
|
||||
updatehealth()
|
||||
|
||||
proc/handle_virus_updates()//copypaste from mob/carbon/human/life.dm
|
||||
proc/handle_virus_updates()
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(bodytemperature > 406)
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure()
|
||||
if(!virus2)
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2 && get_infection_chance())
|
||||
infect_virus2(src,B.virus2)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2 && get_infection_chance())
|
||||
infect_virus2(src,M.virus2)
|
||||
else
|
||||
if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
V.cure(src)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
|
||||
if(B.virus2.len && get_infection_chance(src))
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
|
||||
if(M.virus2.len && get_infection_chance(src))
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
infect_virus2(src,V)
|
||||
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
|
||||
CRASH("virus2 nulled before calling activate()")
|
||||
else
|
||||
virus2.activate(src)
|
||||
|
||||
V.activate(src)
|
||||
// activate may have deleted the virus
|
||||
if(!virus2) return
|
||||
if(!V) continue
|
||||
|
||||
// check if we're immune
|
||||
if(virus2.antigen & src.antibodies) virus2.dead = 1
|
||||
if(V.antigen & src.antibodies)
|
||||
V.dead = 1
|
||||
|
||||
return
|
||||
|
||||
proc/breathe()
|
||||
if(reagents)
|
||||
|
||||
@@ -59,8 +59,11 @@
|
||||
for(var/datum/disease/D in patient.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
foundVirus++
|
||||
if(patient.virus2)
|
||||
foundVirus++
|
||||
|
||||
for (var/ID in patient.virus2)
|
||||
if (ID in virusDB)
|
||||
foundVirus = 1
|
||||
break
|
||||
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
//var/list/laws = list()
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list())
|
||||
var/viewalerts = 0
|
||||
var/modtype = "robot"
|
||||
var/modtype = "Default"
|
||||
var/lower_mod = 0
|
||||
var/jetpack = 0
|
||||
var/datum/effect/effect/system/ion_trail_follow/ion_trail = null
|
||||
@@ -87,7 +87,7 @@
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
hands.icon_state = "standard"
|
||||
icon_state = "secborg"
|
||||
modtype = "Synd"
|
||||
modtype = "Security"
|
||||
else
|
||||
laws = new /datum/ai_laws/nanotrasen()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
@@ -148,10 +148,10 @@
|
||||
if(module)
|
||||
return
|
||||
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security")
|
||||
if(crisis) //Leaving this in until it's balanced appropriately.
|
||||
if(emagged || security_level > SEC_LEVEL_BLUE)
|
||||
src << "\red Crisis mode active. Combat module available."
|
||||
modules+="Combat"
|
||||
var/mod = input("Please, select a module!", "Robot", null, null) in modules
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
var/channels = list()
|
||||
@@ -159,17 +159,15 @@
|
||||
if(module)
|
||||
return
|
||||
|
||||
switch(mod)
|
||||
switch(modtype)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
modtype = "Stand"
|
||||
module_sprites["Basic"] = "robot_old"
|
||||
module_sprites["Android"] = "droid"
|
||||
module_sprites["Default"] = "robot"
|
||||
|
||||
if("Service")
|
||||
module = new /obj/item/weapon/robot_module/butler(src)
|
||||
modtype = "Butler"
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
@@ -178,7 +176,6 @@
|
||||
|
||||
if("Miner")
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
modtype = "Miner"
|
||||
channels = list("Supply" = 1)
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
module_sprites["Advanced Droid"] = "droid-miner"
|
||||
@@ -186,7 +183,6 @@
|
||||
|
||||
if("Medical")
|
||||
module = new /obj/item/weapon/robot_module/medical(src)
|
||||
modtype = "Med"
|
||||
channels = list("Medical" = 1)
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
@@ -195,7 +191,6 @@
|
||||
|
||||
if("Security")
|
||||
module = new /obj/item/weapon/robot_module/security(src)
|
||||
modtype = "Sec"
|
||||
channels = list("Security" = 1)
|
||||
module_sprites["Basic"] = "secborg"
|
||||
module_sprites["Red Knight"] = "Security"
|
||||
@@ -204,7 +199,6 @@
|
||||
|
||||
if("Engineering")
|
||||
module = new /obj/item/weapon/robot_module/engineering(src)
|
||||
modtype = "Eng"
|
||||
channels = list("Engineering" = 1)
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
@@ -212,26 +206,24 @@
|
||||
|
||||
if("Janitor")
|
||||
module = new /obj/item/weapon/robot_module/janitor(src)
|
||||
modtype = "Jan"
|
||||
module_sprites["Basic"] = "JanBot2"
|
||||
module_sprites["Mopbot"] = "janitorrobot"
|
||||
module_sprites["Mop Gear Rex"] = "mopgearrex"
|
||||
|
||||
if("Combat")
|
||||
module = new /obj/item/weapon/robot_module/combat(src)
|
||||
modtype = "Com"
|
||||
module_sprites["Combat Android"] = "droid-combat"
|
||||
channels = list("Security" = 1)
|
||||
|
||||
//Custom_sprite check and entry
|
||||
if (custom_sprite == 1)
|
||||
module_sprites["Custom"] = "[src.ckey]-[mod]"
|
||||
module_sprites["Custom"] = "[src.ckey]-[modtype]"
|
||||
|
||||
hands.icon_state = lowertext(mod)
|
||||
feedback_inc("cyborg_[lowertext(mod)]",1)
|
||||
updatename(mod)
|
||||
hands.icon_state = lowertext(modtype)
|
||||
feedback_inc("cyborg_[lowertext(modtype)]",1)
|
||||
updatename()
|
||||
|
||||
if(mod == "Medical" || mod == "Security" || mod == "Combat")
|
||||
if(modtype == "Medical" || modtype == "Security" || modtype == "Combat")
|
||||
status_flags &= ~CANPUSH
|
||||
|
||||
choose_icon(6,module_sprites)
|
||||
@@ -239,7 +231,8 @@
|
||||
base_icon = icon_state
|
||||
|
||||
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
|
||||
|
||||
if(prefix)
|
||||
modtype = prefix
|
||||
if(istype(mmi, /obj/item/device/mmi/posibrain))
|
||||
braintype = "Android"
|
||||
else
|
||||
@@ -249,7 +242,7 @@
|
||||
if(custom_name)
|
||||
changed_name = custom_name
|
||||
else
|
||||
changed_name = "[(prefix ? "[prefix] " : "")][braintype]-[num2text(ident)]"
|
||||
changed_name = "[modtype] [braintype]-[num2text(ident)]"
|
||||
real_name = changed_name
|
||||
name = real_name
|
||||
|
||||
@@ -287,7 +280,7 @@
|
||||
if (newname != "")
|
||||
custom_name = newname
|
||||
|
||||
updatename("Default")
|
||||
updatename()
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/verb/cmd_robot_alerts()
|
||||
|
||||
@@ -145,8 +145,8 @@
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
@@ -154,25 +154,25 @@
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
|
||||
// This is a pure virtual function, it should be overwritten by all subclasses
|
||||
/mob/living/silicon/proc/show_malf_ai()
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// this function displays the station time in the status panel
|
||||
/mob/living/silicon/proc/show_station_time()
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
|
||||
|
||||
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/living/silicon/proc/show_emergency_shuttle_eta()
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
..()
|
||||
@@ -182,13 +182,13 @@
|
||||
show_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
show_malf_ai()
|
||||
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(0) // make it monochrome
|
||||
dat += data_core.get_manifest(1) // make it monochrome
|
||||
dat += "<br>"
|
||||
src << browse(dat, "window=airoster")
|
||||
onclose(src, "airoster")
|
||||
@@ -163,8 +163,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
//set reagent data
|
||||
B.data["donor"] = src
|
||||
if(src.virus2)
|
||||
B.data["virus2"] = src.virus2.getcopy()
|
||||
if (!B.data["virus2"])
|
||||
B.data["virus2"] = list()
|
||||
B.data["virus2"] |= virus_copylist(src.virus2)
|
||||
B.data["antibodies"] = src.antibodies
|
||||
B.data["blood_DNA"] = copytext(src.dna.unique_enzymes,1,0)
|
||||
if(src.resistances && src.resistances.len)
|
||||
@@ -200,7 +201,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
else
|
||||
vessel.add_reagent("blood", amount, injected.data)
|
||||
vessel.update_total()
|
||||
|
||||
src.virus2 |= virus_copylist(injected.data["virus2"])
|
||||
if (injected.data["antibodies"] && prob(5))
|
||||
antibodies |= injected.data["antibodies"]
|
||||
var/list/chems = list()
|
||||
chems = params2list(injected.data["trace_chem"])
|
||||
for(var/C in chems)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
del(spark_system)
|
||||
|
||||
else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
|
||||
if (E.status & ORGAN_DESTROYED || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
|
||||
if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
|
||||
leg_tally-- // let it fail even if just foot&leg
|
||||
|
||||
// standing is poor
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
if(issilicon(A))
|
||||
user << "<span class='notice'>You can't label cyborgs.</span>"
|
||||
return
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/glass))
|
||||
user << "<span class='notice'>The label can't stick to the [A.name]. (Try using a pen)</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] labels [A] as [label].</span>", \
|
||||
"<span class='notice'>You label [A] as [label].</span>")
|
||||
|
||||
@@ -30,6 +30,15 @@
|
||||
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
var/firerate = 1 // 0 for one bullet after tarrget moves and aim is lowered,
|
||||
//1 for keep shooting until aim is lowered
|
||||
var/fire_delay = 6
|
||||
var/last_fired = 0
|
||||
|
||||
proc/ready_to_fire()
|
||||
if(world.time >= last_fired + fire_delay)
|
||||
last_fired = world.time
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
proc/load_into_chamber()
|
||||
return 0
|
||||
@@ -87,6 +96,11 @@
|
||||
if(!special_check(user))
|
||||
return
|
||||
|
||||
if (!ready_to_fire())
|
||||
if (world.time % 3) //to prevent spam
|
||||
user << "<span class='warning'>[src] is not ready to fire again!"
|
||||
return
|
||||
|
||||
if(!load_into_chamber()) //CHECK
|
||||
return click_empty(user)
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
origin_tech = "combat=4;materials=3;powerstorage=3"
|
||||
projectile_type = "/obj/item/projectile/beam/heavylaser"
|
||||
|
||||
fire_delay = 20
|
||||
|
||||
isHandgun()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
projectile_type = "/obj/item/projectile/beam/pulse"
|
||||
cell_type = "/obj/item/weapon/cell/super"
|
||||
var/mode = 2
|
||||
|
||||
fire_delay = 25
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
switch(mode)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
ammo_type = "/obj/item/ammo_casing/c9mm"
|
||||
automatic = 1
|
||||
|
||||
fire_delay = 0
|
||||
|
||||
isHandgun()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -929,11 +929,15 @@ datum
|
||||
M.apply_effect(2*REM,IRRADIATE,0)
|
||||
// radium may increase your chances to cure a disease
|
||||
if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs
|
||||
if(M:virus2 && prob(5))
|
||||
if(prob(50))
|
||||
M.radiation += 50 // curing it that way may kill you instead
|
||||
M.adjustToxLoss(100)
|
||||
M:antibodies |= M:virus2.antigen
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.virus2.len)
|
||||
for (var/ID in C.virus2)
|
||||
var/datum/disease2/disease/V = C.virus2[ID]
|
||||
if(prob(5))
|
||||
if(prob(50))
|
||||
M.radiation += 50 // curing it that way may kill you instead
|
||||
M.adjustToxLoss(100)
|
||||
M:antibodies |= V.antigen
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -3459,4 +3463,4 @@ datum
|
||||
else if(data >= 115 && prob(33))
|
||||
M.confused = max(M.confused+15,15)
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -501,7 +501,7 @@ datum
|
||||
result = "virusfood"
|
||||
required_reagents = list("water" = 5, "milk" = 5, "oxygen" = 5)
|
||||
result_amount = 15
|
||||
|
||||
/*
|
||||
mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
@@ -539,7 +539,7 @@ datum
|
||||
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
|
||||
if(D)
|
||||
D.Devolve()
|
||||
|
||||
*/
|
||||
condensedcapsaicin
|
||||
name = "Condensed Capsaicin"
|
||||
id = "condensedcapsaicin"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/obj/item/weapon/reagent_containers/glass
|
||||
name = " "
|
||||
var/base_name = " "
|
||||
desc = " "
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "null"
|
||||
@@ -13,6 +14,8 @@
|
||||
volume = 50
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
|
||||
var/label_text = ""
|
||||
|
||||
var/list/can_be_placed_into = list(
|
||||
/obj/machinery/chem_master/,
|
||||
/obj/machinery/chem_dispenser/,
|
||||
@@ -31,7 +34,12 @@
|
||||
/obj/machinery/disposal,
|
||||
/obj/machinery/apiary,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat )
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/obj/machinery/computer/centrifuge )
|
||||
|
||||
New()
|
||||
..()
|
||||
base_name = name
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
@@ -39,8 +47,7 @@
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\blue It contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
usr << "\blue [R.volume] units of [R.name]"
|
||||
usr << "\blue [src.reagents.total_volume] units of liquid."
|
||||
else
|
||||
usr << "\blue Nothing."
|
||||
if (!is_open_container())
|
||||
@@ -121,6 +128,22 @@
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
|
||||
var/tmp_label = sanitize(input(user, "Enter a label for [src.name]","Label",src.label_text))
|
||||
if(length(tmp_label) > 10)
|
||||
user << "\red The label can be at most 10 characters long."
|
||||
else
|
||||
user << "\blue You set the label to \"[tmp_label]\"."
|
||||
src.label_text = tmp_label
|
||||
src.update_name_label()
|
||||
|
||||
proc/update_name_label()
|
||||
if(src.label_text == "")
|
||||
src.name = src.base_name
|
||||
else
|
||||
src.name = "[src.base_name] ([src.label_text])"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. Can hold up to 50 units."
|
||||
@@ -228,6 +251,16 @@
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
desc = "Small glass vial. Looks fragile."
|
||||
icon_state = "vial"
|
||||
g_amt = 500
|
||||
volume = 15
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1,5,15)
|
||||
flags = FPRINT | TABLEPASS | OPENCONTAINER
|
||||
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/blender_jug
|
||||
name = "Blender Jug"
|
||||
|
||||
@@ -88,8 +88,7 @@
|
||||
/obj/item/weapon/reagent_containers/spray/examine()
|
||||
set src in usr
|
||||
..()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
usr << "[round(R.volume)] units of [R.name] left."
|
||||
usr << "[round(src.reagents.total_volume)] units left."
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/verb/empty()
|
||||
|
||||
@@ -1,75 +1,62 @@
|
||||
/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]."
|
||||
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 = 25
|
||||
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
|
||||
/obj/machinery/disease2/diseaseanalyser
|
||||
name = "Disease Analyser"
|
||||
icon = '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"
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/disease2/diseaseanalyser/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
if(scanning == 0)
|
||||
var/r = dish.virus2.get_info()
|
||||
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
|
||||
P.info = r
|
||||
dish.info = r
|
||||
dish.analysed = 1
|
||||
if (dish.virus2.addToDB())
|
||||
src.state("\The [src.name] states, \"Added new pathogen to database.\"")
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
icon_state = "analyser"
|
||||
|
||||
src.state("\The [src.name] 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.name] buzzes")
|
||||
pause = 0
|
||||
return
|
||||
52
code/modules/virus2/antibodies.dm
Normal file
52
code/modules/virus2/antibodies.dm
Normal file
@@ -0,0 +1,52 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
// reserving some numbers for later special antigens
|
||||
var/global/const/ANTIGEN_A = 1
|
||||
var/global/const/ANTIGEN_B = 2
|
||||
var/global/const/ANTIGEN_RH = 4
|
||||
var/global/const/ANTIGEN_Q = 8
|
||||
var/global/const/ANTIGEN_U = 16
|
||||
var/global/const/ANTIGEN_V = 32
|
||||
var/global/const/ANTIGEN_X = 64
|
||||
var/global/const/ANTIGEN_Y = 128
|
||||
var/global/const/ANTIGEN_Z = 256
|
||||
var/global/const/ANTIGEN_M = 512
|
||||
var/global/const/ANTIGEN_N = 1024
|
||||
var/global/const/ANTIGEN_P = 2048
|
||||
var/global/const/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"
|
||||
)
|
||||
|
||||
// pure concentrated antibodies
|
||||
datum/reagent/antibodies
|
||||
data = 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))
|
||||
if(src.data && method == INGEST)
|
||||
if(M:virus2) if(src.data["antibodies"] & M:virus2.antigen)
|
||||
M:virus2.dead = 1
|
||||
M:antibodies |= src.data["antibodies"]
|
||||
return
|
||||
|
||||
// iterate over the list of antigens and see what matches
|
||||
/proc/antigens2string(var/antigens)
|
||||
var/code = ""
|
||||
for(var/V in ANTIGENS) if(text2num(V) & antigens) code += ANTIGENS[V]
|
||||
return code
|
||||
157
code/modules/virus2/centrifuge.dm
Normal file
157
code/modules/virus2/centrifuge.dm
Normal file
@@ -0,0 +1,157 @@
|
||||
/obj/machinery/computer/centrifuge
|
||||
name = "Isolation Centrifuge"
|
||||
desc = "Used to separate things with different weight. Spin 'em round, round, right round."
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "centrifuge"
|
||||
var/curing
|
||||
var/isolating
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/vial/sample = null
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
|
||||
/obj/machinery/computer/centrifuge/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
return ..(I,user)
|
||||
|
||||
if(istype(I,/obj/item/weapon/reagent_containers/glass/beaker/vial))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!sample)
|
||||
sample = I
|
||||
C.drop_item()
|
||||
I.loc = src
|
||||
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/centrifuge/update_icon()
|
||||
..()
|
||||
if(! (stat & (BROKEN|NOPOWER)) && (isolating || curing))
|
||||
icon_state = "centrifuge_moving"
|
||||
|
||||
/obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat= ""
|
||||
if(curing)
|
||||
dat = "Antibody isolation in progress"
|
||||
else if(isolating)
|
||||
dat = "Pathogen isolation in progress"
|
||||
else
|
||||
dat += "<BR>Blood sample:"
|
||||
dat += "<br><table cellpadding='10'><tr><td>"
|
||||
if(sample)
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if(B)
|
||||
dat += "Sample inserted."
|
||||
if (B.data["antibodies"])
|
||||
dat += "</td></tr><tr><td>"
|
||||
dat += "Antibodies: [antigens2string(B.data["antibodies"])]"
|
||||
dat += "</td><td><A href='?src=\ref[src];action=antibody'>Isolate</a>"
|
||||
|
||||
var/list/virus = B.data["virus2"]
|
||||
for (var/ID in virus)
|
||||
var/datum/disease2/disease/V = virus[ID]
|
||||
dat += " </td></tr><tr><td> pathogen [V.name()]"
|
||||
dat += "</td><td><A href='?src=\ref[src];action=isolate;isolate=[V.uniqueID]'>Isolate</a>"
|
||||
else
|
||||
dat += "Please check container contents."
|
||||
dat += "</td></tr><tr><td><A href='?src=\ref[src];action=sample'>Eject container</a>"
|
||||
else
|
||||
dat = "Please insert a container."
|
||||
dat += "</td></tr></table><br>"
|
||||
|
||||
dat += "<hr>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/centrifuge/process()
|
||||
..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
|
||||
if(curing)
|
||||
curing -= 1
|
||||
if(curing == 0)
|
||||
if(sample)
|
||||
cure()
|
||||
update_icon()
|
||||
if(isolating)
|
||||
isolating -= 1
|
||||
if(isolating == 0)
|
||||
if(sample)
|
||||
isolate()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/centrifuge/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
|
||||
switch(href_list["action"])
|
||||
if("antibody")
|
||||
var/delay = 20
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if (!B)
|
||||
state("\The [src.name] buzzes, \"No antibody carrier detected.\"", "blue")
|
||||
return
|
||||
|
||||
if(sample.reagents.has_reagent("toxins"))
|
||||
state("\The [src.name] beeps, \"Pathogen purging speed above nominal.\"", "blue")
|
||||
delay = delay/2
|
||||
return
|
||||
|
||||
curing = delay
|
||||
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
update_icon()
|
||||
|
||||
if("isolate")
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if (!B)
|
||||
return
|
||||
|
||||
var/list/virus = virus_copylist(B.data["virus2"])
|
||||
var/choice = href_list["isolate"];
|
||||
if (choice in virus)
|
||||
virus2 = virus[choice]
|
||||
else
|
||||
state("\The [src.name] buzzes, \"No such pathogen detected.\"", "blue")
|
||||
return
|
||||
isolating = 40
|
||||
update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
if("sample")
|
||||
if(sample)
|
||||
sample.loc = src.loc
|
||||
sample = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
attack_hand(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/centrifuge/proc/cure()
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if (!B)
|
||||
return
|
||||
|
||||
var/list/data = list("antibodies" = B.data["antibodies"])
|
||||
var/amt= sample.reagents.get_reagent_amount("blood")
|
||||
sample.reagents.remove_reagent("blood",amt)
|
||||
sample.reagents.add_reagent("antibodies",amt,data)
|
||||
|
||||
state("\The [src.name] pings", "blue")
|
||||
|
||||
/obj/machinery/computer/centrifuge/proc/isolate()
|
||||
var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(src.loc)
|
||||
dish.virus2 = virus2
|
||||
|
||||
state("\The [src.name] pings", "blue")
|
||||
@@ -9,31 +9,7 @@
|
||||
|
||||
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
//var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
//A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
//var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
//A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
return ..(I,user)
|
||||
if(istype(I,/obj/item/weapon/reagent_containers))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!container)
|
||||
@@ -46,8 +22,8 @@
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
|
||||
|
||||
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=null,"antibodies"=0)
|
||||
data["virus2"] = I:virus2
|
||||
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=list(),"antibodies"=0)
|
||||
data["virus2"] |= I:virus2
|
||||
product.reagents.add_reagent("blood",30,data)
|
||||
|
||||
virusing = 1
|
||||
@@ -55,7 +31,6 @@
|
||||
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
return
|
||||
//else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
@@ -102,7 +77,6 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
//src.updateDialog()
|
||||
|
||||
if(curing)
|
||||
curing -= 1
|
||||
@@ -114,16 +88,15 @@
|
||||
/obj/machinery/computer/curer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["antibody"])
|
||||
curing = 10
|
||||
else if(href_list["eject"])
|
||||
container.loc = src.loc
|
||||
container = null
|
||||
if (href_list["antibody"])
|
||||
curing = 10
|
||||
else if(href_list["eject"])
|
||||
container.loc = src.loc
|
||||
container = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -137,11 +110,4 @@
|
||||
data["antibodies"] = B.data["antibodies"]
|
||||
product.reagents.add_reagent("antibodies",30,data)
|
||||
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
/*
|
||||
/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2)
|
||||
var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc)
|
||||
implanter.name = "Viral implanter (MAJOR BIOHAZARD)"
|
||||
implanter.works = 3
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
*/
|
||||
state("\The [src.name] buzzes", "blue")
|
||||
164
code/modules/virus2/disease2.dm
Normal file
164
code/modules/virus2/disease2.dm
Normal file
@@ -0,0 +1,164 @@
|
||||
/datum/disease2/disease
|
||||
var/infectionchance = 10
|
||||
var/speed = 1
|
||||
var/spreadtype = "Blood" // Can also be "Airborne"
|
||||
var/stage = 1
|
||||
var/stageprob = 10
|
||||
var/dead = 0
|
||||
var/clicks = 0
|
||||
var/uniqueID = 0
|
||||
var/list/datum/disease2/effectholder/effects = list()
|
||||
var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
|
||||
var/max_stage = 4
|
||||
|
||||
/datum/disease2/disease/New()
|
||||
uniqueID = rand(0,10000)
|
||||
..()
|
||||
|
||||
/datum/disease2/disease/proc/makerandom(var/greater=0)
|
||||
for(var/i=1 ; i <= max_stage ; i++ )
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
holder.stage = i
|
||||
if(greater)
|
||||
holder.getrandomeffect(2)
|
||||
else
|
||||
holder.getrandomeffect()
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
infectionchance = rand(1,10)
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = "Airborne"
|
||||
|
||||
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
||||
if(dead)
|
||||
cure(mob)
|
||||
return
|
||||
|
||||
if(mob.stat == 2)
|
||||
return
|
||||
if(stage <= 1 && clicks == 0) // with a certain chance, the mob may become immune to the disease before it starts properly
|
||||
if(prob(20))
|
||||
mob.antibodies |= antigen // 20% immunity is a good chance IMO, because it allows finding an immune person easily
|
||||
else
|
||||
if(mob.radiation > 50)
|
||||
if(prob(1))
|
||||
majormutate()
|
||||
|
||||
//Space antibiotics stop disease completely (temporary)
|
||||
if(mob.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
|
||||
//Virus food speeds up disease progress
|
||||
if(mob.reagents.has_reagent("virusfood"))
|
||||
mob.reagents.remove_reagent("virusfood",0.1)
|
||||
clicks += 10
|
||||
|
||||
//Moving to the next stage
|
||||
if(clicks > stage*100 && prob(10))
|
||||
if(stage == max_stage)
|
||||
src.cure(mob)
|
||||
mob.antibodies |= src.antigen
|
||||
stage++
|
||||
clicks = 0
|
||||
//Do nasty effects
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.runeffect(mob,stage)
|
||||
|
||||
//fever
|
||||
mob.bodytemperature = max(mob.bodytemperature, min(310+5*stage ,mob.bodytemperature+5*stage))
|
||||
clicks+=speed
|
||||
|
||||
/datum/disease2/disease/proc/cure(var/mob/living/carbon/mob)
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.effect.deactivate(mob)
|
||||
mob.virus2.Remove("[uniqueID]")
|
||||
|
||||
/datum/disease2/disease/proc/minormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.minormutate()
|
||||
infectionchance = min(10,infectionchance + rand(0,1))
|
||||
|
||||
/datum/disease2/disease/proc/majormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.majormutate()
|
||||
if (prob(5))
|
||||
antigen = text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
|
||||
/datum/disease2/disease/proc/getcopy()
|
||||
var/datum/disease2/disease/disease = new /datum/disease2/disease
|
||||
disease.infectionchance = infectionchance
|
||||
disease.spreadtype = spreadtype
|
||||
disease.stageprob = stageprob
|
||||
disease.antigen = antigen
|
||||
disease.uniqueID = uniqueID
|
||||
for(var/datum/disease2/effectholder/holder in effects)
|
||||
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
|
||||
newholder.effect = new holder.effect.type
|
||||
newholder.chance = holder.chance
|
||||
newholder.cure = holder.cure
|
||||
newholder.multiplier = holder.multiplier
|
||||
newholder.happensonce = holder.happensonce
|
||||
newholder.stage = holder.stage
|
||||
disease.effects += newholder
|
||||
return disease
|
||||
|
||||
/datum/disease2/disease/proc/issame(var/datum/disease2/disease/disease)
|
||||
var/list/types = list()
|
||||
var/list/types2 = list()
|
||||
for(var/datum/disease2/effectholder/d in effects)
|
||||
types += d.effect.type
|
||||
var/equal = 1
|
||||
|
||||
for(var/datum/disease2/effectholder/d in disease.effects)
|
||||
types2 += d.effect.type
|
||||
|
||||
for(var/type in types)
|
||||
if(!(type in types2))
|
||||
equal = 0
|
||||
|
||||
if (antigen != disease.antigen)
|
||||
equal = 0
|
||||
return equal
|
||||
|
||||
/proc/virus_copylist(var/list/datum/disease2/disease/viruses)
|
||||
var/list/res = list()
|
||||
for (var/ID in viruses)
|
||||
var/datum/disease2/disease/V = viruses[ID]
|
||||
res["[V.uniqueID]"] = V.getcopy()
|
||||
return res
|
||||
|
||||
|
||||
var/global/list/virusDB = list()
|
||||
|
||||
/datum/disease2/disease/proc/name()
|
||||
.= "stamm #[add_zero("[uniqueID]", 4)]"
|
||||
if ("[uniqueID]" in virusDB)
|
||||
var/datum/data/record/V = virusDB["[uniqueID]"]
|
||||
.= V.fields["name"]
|
||||
|
||||
/datum/disease2/disease/proc/get_info()
|
||||
var/r = "GNAv2 based virus lifeform - [name()], #[add_zero("[uniqueID]", 4)]"
|
||||
r += "<BR>Infection rate : [infectionchance * 10]"
|
||||
r += "<BR>Spread form : [spreadtype]"
|
||||
r += "<BR>Progress Speed : [stageprob * 10]"
|
||||
for(var/datum/disease2/effectholder/E in effects)
|
||||
r += "<BR>Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
|
||||
|
||||
r += "<BR>Antigen pattern: [antigens2string(antigen)]"
|
||||
return r
|
||||
|
||||
/datum/disease2/disease/proc/addToDB()
|
||||
if ("[uniqueID]" in virusDB)
|
||||
return 0
|
||||
var/datum/data/record/v = new()
|
||||
v.fields["id"] = uniqueID
|
||||
v.fields["name"] = name()
|
||||
v.fields["description"] = get_info()
|
||||
v.fields["antigen"] = antigens2string(antigen)
|
||||
v.fields["spread type"] = spreadtype
|
||||
virusDB["[uniqueID]"] = v
|
||||
return 1
|
||||
@@ -13,31 +13,7 @@
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
//var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
//A.circuit = M
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
//var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
//A.circuit = M
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
A.anchored = 1
|
||||
del(src)
|
||||
return ..(I,user)
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
var/mob/living/carbon/c = user
|
||||
if(!dish)
|
||||
@@ -49,8 +25,6 @@
|
||||
user << "You upload the contents of the disk into the buffer"
|
||||
memorybank = I:effect
|
||||
|
||||
|
||||
//else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
@@ -117,7 +91,6 @@
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
//src.updateDialog()
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
@@ -143,44 +116,29 @@
|
||||
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["grab"])
|
||||
memorybank = locate(href_list["grab"])
|
||||
analysed = dish.analysed
|
||||
del(dish)
|
||||
dish = null
|
||||
scanning = 10
|
||||
if (href_list["grab"])
|
||||
memorybank = locate(href_list["grab"])
|
||||
analysed = dish.analysed
|
||||
del(dish)
|
||||
dish = null
|
||||
scanning = 10
|
||||
|
||||
else if(href_list["eject"])
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
else if(href_list["eject"])
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
|
||||
else if(href_list["splice"])
|
||||
if(dish)
|
||||
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
if(e.stage == memorybank.stage)
|
||||
e.effect = memorybank.effect
|
||||
splicing = 10
|
||||
dish.virus2.spreadtype = "Blood"
|
||||
else if(href_list["splice"])
|
||||
if(dish)
|
||||
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
if(e.stage == memorybank.stage)
|
||||
e.effect = memorybank.effect
|
||||
splicing = 10
|
||||
// dish.virus2.spreadtype = "Blood"
|
||||
|
||||
else if(href_list["disk"])
|
||||
burning = 10
|
||||
else if(href_list["disk"])
|
||||
burning = 10
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/diseasedisk
|
||||
name = "Blank GNA disk"
|
||||
icon = 'cloning.dmi'
|
||||
icon_state = "datadisk0"
|
||||
var/datum/disease2/effectholder/effect = null
|
||||
var/stage = 1
|
||||
|
||||
/obj/item/weapon/diseasedisk/premade/New()
|
||||
name = "Blank GNA disk (stage: [5-stage])"
|
||||
effect = new /datum/disease2/effectholder
|
||||
effect.effect = new /datum/disease2/effect/invisible
|
||||
effect.stage = stage
|
||||
167
code/modules/virus2/dishincubator.dm
Normal file
167
code/modules/virus2/dishincubator.dm
Normal file
@@ -0,0 +1,167 @@
|
||||
/obj/machinery/disease2/incubator/
|
||||
name = "Pathogenic incubator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "incubator"
|
||||
var/obj/item/weapon/virusdish/dish
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/radiation = 0
|
||||
|
||||
var/on = 0
|
||||
var/power = 0
|
||||
|
||||
var/foodsupply = 0
|
||||
var/toxins = 0
|
||||
|
||||
var/virusing
|
||||
|
||||
/obj/machinery/disease2/incubator/attackby(var/obj/B as obj, var/mob/user as mob)
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(src.beaker)
|
||||
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "A syringe is already loaded into the machine."
|
||||
else
|
||||
user << "A beaker is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
if(src.dish)
|
||||
user << "A dish is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.dish = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/virusdish))
|
||||
user << "You add the dish to the machine!"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/disease2/incubator/Topic(href, href_list)
|
||||
if(..()) return
|
||||
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.loc = src.loc
|
||||
beaker = null
|
||||
if(!dish)
|
||||
return
|
||||
usr.machine = src
|
||||
if (href_list["power"])
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "incubator_on"
|
||||
else
|
||||
icon_state = "incubator"
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
if (href_list["rad"])
|
||||
radiation += 10
|
||||
if (href_list["flush"])
|
||||
radiation = 0
|
||||
toxins = 0
|
||||
foodsupply = 0
|
||||
|
||||
if(href_list["virus"])
|
||||
if (!dish)
|
||||
state("\The [src.name] buzzes, \"No viral culture sample detected.\"", "blue")
|
||||
return
|
||||
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
|
||||
if (!B)
|
||||
state("\The [src.name] buzzes, \"No suitable breeding enviroment detected.\"", "blue")
|
||||
return
|
||||
|
||||
if (!B.data["virus2"])
|
||||
B.data["virus2"] = list()
|
||||
var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
|
||||
B.data["virus2"] = virus
|
||||
|
||||
state("\The [src.name] pings, \"Injection complete.\"", "blue")
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/disease2/incubator/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!dish)
|
||||
dat = "Please insert dish into the incubator.<BR>"
|
||||
var/string = "Off"
|
||||
if(on)
|
||||
string = "On"
|
||||
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Food supply : [foodsupply]"
|
||||
dat += "<BR>"
|
||||
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
|
||||
dat += "<BR>"
|
||||
dat += "Toxins : [toxins]"
|
||||
dat += "<BR><BR>"
|
||||
if(beaker)
|
||||
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
if(dish)
|
||||
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
|
||||
dat += "<BR>"
|
||||
if(beaker)
|
||||
dat += "Breed viral culture in beaker : <A href='?src=\ref[src];virus=1'> Start</a>"
|
||||
dat += "<BR>"
|
||||
dat += "<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a><BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
|
||||
onclose(user, "incubator")
|
||||
return
|
||||
|
||||
/obj/machinery/disease2/incubator/process()
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
if(foodsupply)
|
||||
foodsupply -= 1
|
||||
dish.growth += 3
|
||||
if(dish.growth >= 100)
|
||||
state("The [src.name] pings", "blue")
|
||||
if(radiation)
|
||||
if(radiation > 50 & prob(5))
|
||||
dish.virus2.majormutate()
|
||||
if(dish.info)
|
||||
dish.info = "OUTDATED : [dish.info]"
|
||||
dish.analysed = 0
|
||||
state("The [src.name] beeps", "blue")
|
||||
|
||||
else if(prob(5))
|
||||
dish.virus2.minormutate()
|
||||
radiation -= 1
|
||||
if(toxins && prob(5))
|
||||
dish.virus2.infectionchance -= 1
|
||||
if(toxins > 50)
|
||||
dish.virus2 = null
|
||||
else if(!dish)
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
|
||||
if(beaker)
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 10
|
||||
if(!beaker.reagents.remove_reagent("toxin",1))
|
||||
toxins += 1
|
||||
361
code/modules/virus2/effect.dm
Normal file
361
code/modules/virus2/effect.dm
Normal file
@@ -0,0 +1,361 @@
|
||||
/datum/disease2/effectholder
|
||||
var/name = "Holder"
|
||||
var/datum/disease2/effect/effect
|
||||
var/chance = 0 //Chance in percentage each tick
|
||||
var/cure = "" //Type of cure it requires
|
||||
var/happensonce = 0
|
||||
var/multiplier = 1 //The chance the effects are WORSE
|
||||
var/stage = 0
|
||||
|
||||
/datum/disease2/effectholder/proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
|
||||
if(happensonce > -1 && effect.stage <= stage && prob(chance))
|
||||
effect.activate(mob)
|
||||
if(happensonce == 1)
|
||||
happensonce = -1
|
||||
|
||||
/datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1)
|
||||
var/list/datum/disease2/effect/list = list()
|
||||
for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect))
|
||||
var/datum/disease2/effect/f = new e
|
||||
if (f.badness > badness) //we don't want such strong effects
|
||||
continue
|
||||
if(f.stage == src.stage)
|
||||
list += f
|
||||
effect = pick(list)
|
||||
chance = rand(1,6)
|
||||
|
||||
/datum/disease2/effectholder/proc/minormutate()
|
||||
switch(pick(1,2,3,4,5))
|
||||
if(1)
|
||||
chance = rand(0,effect.chance_maxm)
|
||||
if(2)
|
||||
multiplier = rand(1,effect.maxm)
|
||||
|
||||
/datum/disease2/effectholder/proc/majormutate()
|
||||
getrandomeffect(2)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////EFFECTS/////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/disease2/effect
|
||||
var/chance_maxm = 50
|
||||
var/name = "Blanking effect"
|
||||
var/stage = 4
|
||||
var/maxm = 1
|
||||
var/badness = 1
|
||||
proc/activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
proc/deactivate(var/mob/living/carbon/mob)
|
||||
|
||||
////////////////////////SPECIAL/////////////////////////////////
|
||||
/datum/disease2/effect/alien
|
||||
name = "Unidentified Foreign Body"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red You feel something tearing its way out of your stomach..."
|
||||
mob.adjustToxLoss(10)
|
||||
mob.updatehealth()
|
||||
if(prob(40))
|
||||
if(mob.client)
|
||||
mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc)
|
||||
else
|
||||
new/mob/living/carbon/alien/larva(mob.loc)
|
||||
var/datum/disease2/disease/D = mob:virus2
|
||||
mob:gib()
|
||||
del D
|
||||
|
||||
/datum/disease2/effect/invisible
|
||||
name = "Waiting Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
////////////////////////STAGE 4/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/gibbingtons
|
||||
name = "Gibbingtons Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.gib()
|
||||
|
||||
/datum/disease2/effect/radian
|
||||
name = "Radian's Syndrome"
|
||||
stage = 4
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.radiation += (2*multiplier)
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Dead Ear Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf += 20
|
||||
|
||||
/datum/disease2/effect/monkey
|
||||
name = "Monkism Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/h = mob
|
||||
h.monkeyize()
|
||||
|
||||
/datum/disease2/effect/suicide
|
||||
name = "Suicidal Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.suiciding = 1
|
||||
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
|
||||
viewers(mob) << "\red <b>[mob.name] is holding \his breath. It looks like \he's trying to commit suicide.</b>"
|
||||
mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss())
|
||||
mob.updatehealth()
|
||||
spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
|
||||
mob.suiciding = 0
|
||||
|
||||
/datum/disease2/effect/killertoxins
|
||||
name = "Toxification Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
/datum/disease2/effect/dna
|
||||
name = "Reverse Pattern Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.bodytemperature = max(mob.bodytemperature, 350)
|
||||
scramble(0,mob,10)
|
||||
mob.apply_damage(10, CLONE)
|
||||
|
||||
/datum/disease2/effect/organs
|
||||
name = "Shutdown Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/datum/organ/external/E = pick(H.organs)
|
||||
if (!(E.status & ORGAN_DEAD))
|
||||
E.status |= ORGAN_DEAD
|
||||
H << "<span class='notice'>You can't feel your [E.display_name] anymore...</span>"
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
E.status ^= ORGAN_DEAD
|
||||
|
||||
/datum/disease2/effect/immortal
|
||||
name = "Longevity Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
if (E.status & ORGAN_BROKEN && prob(30))
|
||||
E.status ^= ORGAN_BROKEN
|
||||
var/heal_amt = -5*multiplier
|
||||
mob.apply_damages(heal_amt,heal_amt,heal_amt,heal_amt)
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
H << "<span class='notice'>You suddenly feel hurt and old...</span>"
|
||||
H.age += 8
|
||||
var/backlash_amt = 5*multiplier
|
||||
mob.apply_damages(backlash_amt,backlash_amt,backlash_amt,backlash_amt)
|
||||
|
||||
////////////////////////STAGE 3/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/bones
|
||||
name = "Fragile Bones Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
E.min_broken_damage = max(5, E.min_broken_damage - 30)
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/datum/organ/external/E in H.organs)
|
||||
E.min_broken_damage = initial(E.min_broken_damage)
|
||||
|
||||
/datum/disease2/effect/toxins
|
||||
name = "Hyperacidity"
|
||||
stage = 3
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss((2*multiplier))
|
||||
|
||||
/datum/disease2/effect/shakey
|
||||
name = "World Shaking Syndrome"
|
||||
stage = 3
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
shake_camera(mob,5*multiplier)
|
||||
|
||||
/datum/disease2/effect/telepathic
|
||||
name = "Telepathy Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.dna.check_integrity()
|
||||
var/newdna = setblock(mob.dna.struc_enzymes,REMOTETALKBLOCK,toggledblock(getblock(mob.dna.struc_enzymes,REMOTETALKBLOCK,3)),3)
|
||||
mob.dna.struc_enzymes = newdna
|
||||
domutcheck(mob, null)
|
||||
|
||||
/datum/disease2/effect/mind
|
||||
name = "Lazy Mind Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/datum/organ/internal/brain/B = H.internal_organs["brain"]
|
||||
B.take_damage(5)
|
||||
else
|
||||
mob.setBrainLoss(50)
|
||||
|
||||
/datum/disease2/effect/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 25
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Hard of Hearing Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf = 5
|
||||
|
||||
/datum/disease2/effect/giggle
|
||||
name = "Uncontrolled Laughter Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*giggle")
|
||||
|
||||
/datum/disease2/effect/confusion
|
||||
name = "Topographical Cretinism"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>You have trouble telling right and left apart all of a sudden.</span>"
|
||||
mob.confused += 10
|
||||
|
||||
/datum/disease2/effect/mutation
|
||||
name = "DNA Degradation"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.apply_damage(2, CLONE)
|
||||
|
||||
|
||||
/datum/disease2/effect/groan
|
||||
name = "Groaning Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*groan")
|
||||
////////////////////////STAGE 2/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/scream
|
||||
name = "Loudness Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*scream")
|
||||
|
||||
/datum/disease2/effect/drowsness
|
||||
name = "Automated Sleeping Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.drowsyness += 10
|
||||
|
||||
/datum/disease2/effect/sleepy
|
||||
name = "Resting Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*collapse")
|
||||
|
||||
/datum/disease2/effect/blind
|
||||
name = "Blackout Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.eye_blind = max(mob.eye_blind, 4)
|
||||
|
||||
/datum/disease2/effect/cough
|
||||
name = "Anima Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
for(var/mob/living/carbon/M in view(1,mob))
|
||||
if(airborne_can_reach(get_turf(mob), get_turf(M)))
|
||||
for (var/datum/disease2/disease/V in mob.virus2)
|
||||
if(V.spreadtype == "Airborne")
|
||||
infect_virus2(M,V)
|
||||
|
||||
/datum/disease2/effect/hungry
|
||||
name = "Appetiser Effect"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.nutrition = max(0, mob.nutrition - 200)
|
||||
|
||||
/datum/disease2/effect/fridge
|
||||
name = "Refridgerator Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*shiver")
|
||||
|
||||
/datum/disease2/effect/hair
|
||||
name = "Hair Loss"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(!(H.h_style == "Bald") && !(H.h_style == "Balding Hair"))
|
||||
H << "<span class='danger'>Your hair starts to fall out in clumps...</span>"
|
||||
spawn(50)
|
||||
H.h_style = "Balding Hair"
|
||||
H.update_hair()
|
||||
|
||||
/datum/disease2/effect/stimulant
|
||||
name = "Adrenaline Extra"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>You feel a rush of energy inside you!</span>"
|
||||
if (mob.reagents.get_reagent_amount("hyperzine") < 30)
|
||||
mob.reagents.add_reagent("hyperzine", 10)
|
||||
if (prob(30))
|
||||
mob.jitteriness += 10
|
||||
|
||||
////////////////////////STAGE 1/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/sneeze
|
||||
name = "Coldingtons Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*sneeze")
|
||||
if (prob(50))
|
||||
var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
|
||||
M.virus2 = virus_copylist(mob.virus2)
|
||||
|
||||
/datum/disease2/effect/gunck
|
||||
name = "Flemmingtons"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red Mucous runs down the back of your throat."
|
||||
|
||||
/datum/disease2/effect/drool
|
||||
name = "Saliva Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*drool")
|
||||
|
||||
/datum/disease2/effect/twitch
|
||||
name = "Twitcher"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*twitch")
|
||||
|
||||
/datum/disease2/effect/headache
|
||||
name = "Headache"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> Your head hurts a bit</span>"
|
||||
82
code/modules/virus2/helpers.dm
Normal file
82
code/modules/virus2/helpers.dm
Normal file
@@ -0,0 +1,82 @@
|
||||
//Returns 1 if mob can be infected, 0 otherwise. Checks his clothing.
|
||||
proc/get_infection_chance(var/mob/living/carbon/M)
|
||||
var/score = 0
|
||||
if (!istype(M))
|
||||
return 0
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M:gloves)
|
||||
score += 5
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(M.wear_mask)
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(M.internal)
|
||||
score += 10
|
||||
|
||||
if(score >= 30)
|
||||
return 0
|
||||
else if(score == 25 && prob(99))
|
||||
return 0
|
||||
else if(score == 20 && prob(95))
|
||||
return 0
|
||||
else if(score == 15 && prob(75))
|
||||
return 0
|
||||
else if(score == 10 && prob(55))
|
||||
return 0
|
||||
else if(score == 5 && prob(35))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Checks if table-passing table can reach target (5 tile radius)
|
||||
proc/airborne_can_reach(turf/source, turf/target)
|
||||
var/obj/dummy = new(source)
|
||||
dummy.flags = FPRINT | TABLEPASS
|
||||
dummy.pass_flags = PASSTABLE
|
||||
|
||||
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
|
||||
|
||||
var/rval = (dummy.loc in range(1,target))
|
||||
del dummy
|
||||
return rval
|
||||
|
||||
//Attemptes to infect mob M with virus. Set forced to 1 to ignore protective clothnig
|
||||
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
|
||||
if(!istype(disease))
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if ("[disease.uniqueID]" in M.virus2)
|
||||
return
|
||||
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
|
||||
if(M.antibodies & disease.antigen != 0)
|
||||
return
|
||||
|
||||
if(prob(disease.infectionchance) || forced)
|
||||
// certain clothes can prevent an infection
|
||||
if(!forced && !get_infection_chance(M))
|
||||
return
|
||||
|
||||
var/datum/disease2/disease/D = disease.getcopy()
|
||||
D.minormutate()
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Infects mob M with random lesser disease, if he doesn't have one
|
||||
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom()
|
||||
D.infectionchance = 1
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Infects mob M with random greated disease, if he doesn't have one
|
||||
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom(1)
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
return(prob(sqrt(p)) && prob(sqrt(p)))
|
||||
97
code/modules/virus2/isolator.dm
Normal file
97
code/modules/virus2/isolator.dm
Normal file
@@ -0,0 +1,97 @@
|
||||
/obj/machinery/disease2/isolator/
|
||||
name = "Pathogenic Isolator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'virology.dmi'
|
||||
icon_state = "isolator"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/isolating = 0
|
||||
var/beaker = null
|
||||
|
||||
/obj/machinery/disease2/isolator/attackby(var/W as obj, var/mob/user)
|
||||
if(!istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/B = W
|
||||
|
||||
if(src.beaker)
|
||||
user << "A syringe is already loaded into the machine."
|
||||
return
|
||||
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
||||
user << "You add the syringe to the machine!"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "isolator_in"
|
||||
|
||||
/obj/machinery/disease2/isolator/Topic(href, href_list)
|
||||
if(..()) return
|
||||
|
||||
usr.machine = src
|
||||
if(!beaker) return
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
|
||||
if (href_list["isolate"])
|
||||
var/datum/reagent/blood/Blood
|
||||
for(var/datum/reagent/blood/B in R.reagent_list)
|
||||
if(B)
|
||||
Blood = B
|
||||
break
|
||||
var/list/virus = virus_copylist(Blood.data["virus2"])
|
||||
var/choice = text2num(href_list["isolate"]);
|
||||
for (var/datum/disease2/disease/V in virus)
|
||||
if (V.uniqueID == choice)
|
||||
virus2 = virus
|
||||
isolating = 40
|
||||
icon_state = "isolator_processing"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if (href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "isolator"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/disease2/isolator/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert sample into the isolator.<BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
else if(isolating)
|
||||
dat = "Isolating"
|
||||
else
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
dat += "<A href='?src=\ref[src];eject=1'>Eject</A><BR><BR>"
|
||||
if(!R.total_volume)
|
||||
dat += "[beaker] is empty."
|
||||
else
|
||||
dat += "Contained reagents:<BR>"
|
||||
for(var/datum/reagent/blood/G in R.reagent_list)
|
||||
if(G.data["virus2"])
|
||||
var/list/virus = G.data["virus2"]
|
||||
for (var/datum/disease2/disease/V in virus)
|
||||
dat += " <br> [G.name]: <A href='?src=\ref[src];isolate=[V.uniqueID]'>Isolate pathogen #[V.uniqueID]</a>"
|
||||
else
|
||||
dat += " <b>No pathogen</b>"
|
||||
user << browse("<TITLE>Pathogenic Isolator</TITLE>Isolator menu:<BR><BR>[dat]", "window=isolator;size=575x400")
|
||||
onclose(user, "isolator")
|
||||
return
|
||||
|
||||
/obj/machinery/disease2/isolator/process()
|
||||
if(isolating > 0)
|
||||
isolating -= 1
|
||||
if(isolating == 0)
|
||||
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
|
||||
d.virus2 = virus2.getcopy()
|
||||
virus2 = null
|
||||
icon_state = "isolator_in"
|
||||
81
code/modules/virus2/items_devices.dm
Normal file
81
code/modules/virus2/items_devices.dm
Normal file
@@ -0,0 +1,81 @@
|
||||
/obj/machinery/proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] <span class = 'notice'>[msg]</span>", 2)
|
||||
|
||||
///////////////ANTIBODY SCANNER///////////////
|
||||
|
||||
/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 | CONDUCT | USEDELAY
|
||||
|
||||
|
||||
/obj/item/device/antibody_scanner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if(!istype(M))
|
||||
user << "<span class='notice'>Incompatible object, scan aborted.</span>"
|
||||
return
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.antibodies)
|
||||
user << "<span class='notice'>Unable to detect antibodies.</span>"
|
||||
return
|
||||
var/code = antigens2string(M.antibodies)
|
||||
user << "<span class='notice'>[src] The antibody scanner displays a cryptic set of data: [code]</span>"
|
||||
|
||||
///////////////VIRUS DISH///////////////
|
||||
|
||||
/obj/item/weapon/virusdish
|
||||
name = "Virus containment/growth dish"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/growth = 0
|
||||
var/info = 0
|
||||
var/analysed = 0
|
||||
|
||||
reagents = list()
|
||||
|
||||
/obj/item/weapon/virusdish/random
|
||||
name = "Virus Sample"
|
||||
|
||||
/obj/item/weapon/virusdish/random/New()
|
||||
..()
|
||||
src.virus2 = new /datum/disease2/disease
|
||||
src.virus2.makerandom()
|
||||
growth = rand(5, 50)
|
||||
|
||||
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
|
||||
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
user << "The dish shatters"
|
||||
if(virus2.infectionchance > 0)
|
||||
for(var/mob/living/carbon/target in view(null, src))
|
||||
if(airborne_can_reach(src.loc, target.loc))
|
||||
if(get_infection_chance(target))
|
||||
infect_virus2(target,src.virus2)
|
||||
del src
|
||||
|
||||
/obj/item/weapon/virusdish/examine()
|
||||
usr << "This is a virus containment dish"
|
||||
if(src.info)
|
||||
usr << "It has the following information about its contents"
|
||||
usr << src.info
|
||||
|
||||
///////////////GNA DISK///////////////
|
||||
|
||||
/obj/item/weapon/diseasedisk
|
||||
name = "Blank GNA disk"
|
||||
icon = 'cloning.dmi'
|
||||
icon_state = "datadisk0"
|
||||
var/datum/disease2/effectholder/effect = null
|
||||
var/stage = 1
|
||||
|
||||
/obj/item/weapon/diseasedisk/premade/New()
|
||||
name = "Blank GNA disk (stage: [5-stage])"
|
||||
effect = new /datum/disease2/effectholder
|
||||
effect.effect = new /datum/disease2/effect/invisible
|
||||
effect.stage = stage
|
||||
@@ -679,3 +679,18 @@ var/list/be_special_flags = list(
|
||||
#define IMPLOYAL_HUD 5 // loyality implant
|
||||
#define IMPCHEM_HUD 6 // chemical implant
|
||||
#define IMPTRACK_HUD 7 // tracking implant
|
||||
|
||||
//Pulse levels, very simplified
|
||||
#define PULSE_NONE 0 //so !M.pulse checks would be possible
|
||||
#define PULSE_SLOW 1 //<60 bpm
|
||||
#define PULSE_NORM 2 //60-90 bpm
|
||||
#define PULSE_FAST 3 //90-120 bpm
|
||||
#define PULSE_2FAST 4 //>120 bpm
|
||||
#define PULSE_THREADY 5 //occurs during hypovolemic shock
|
||||
//feel free to add shit to lists below
|
||||
var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate
|
||||
var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate
|
||||
|
||||
//proc/get_pulse methods
|
||||
#define GETPULSE_HAND 0 //less accurate (hand)
|
||||
#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc)
|
||||
|
||||
Reference in New Issue
Block a user