mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-30 16:16:17 +01:00
Baystation Update Merge 01
Mahoosive update. A lot of things.
This commit is contained in:
@@ -28,7 +28,8 @@
|
||||
/obj/machinery/disease2/diseaseanalyser/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
|
||||
//use_power(500)
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
@@ -59,4 +60,4 @@
|
||||
dish = null
|
||||
src.state("\The [src.name] buzzes")
|
||||
pause = 0
|
||||
return
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
//use_power(500)
|
||||
|
||||
if(curing)
|
||||
curing -= 1
|
||||
@@ -151,4 +151,4 @@
|
||||
var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(src.loc)
|
||||
dish.virus2 = virus2
|
||||
|
||||
state("\The [src.name] pings", "blue")
|
||||
state("\The [src.name] pings", "blue")
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
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
|
||||
var/list/affected_species = list("Human","Unathi","Skrell","Tajaran")
|
||||
|
||||
/datum/disease2/disease/New()
|
||||
uniqueID = rand(0,10000)
|
||||
@@ -30,6 +31,24 @@
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||
|
||||
if(all_species.len)
|
||||
affected_species = get_infectable_species()
|
||||
|
||||
/proc/get_infectable_species()
|
||||
var/list/meat = list()
|
||||
var/list/res = list()
|
||||
for (var/specie in all_species)
|
||||
var/datum/species/S = all_species[specie]
|
||||
if(!(S.flags & IS_SYNTHETIC))
|
||||
meat += S.name
|
||||
if(meat.len)
|
||||
var/num = rand(1,meat.len)
|
||||
for(var/i=0,i<num,i++)
|
||||
var/picked = pick(meat)
|
||||
meat -= picked
|
||||
res += picked
|
||||
return res
|
||||
|
||||
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
||||
if(dead)
|
||||
cure(mob)
|
||||
@@ -45,8 +64,10 @@
|
||||
if(prob(1))
|
||||
majormutate()
|
||||
|
||||
//Space antibiotics stop disease completely (temporary)
|
||||
//Space antibiotics stop disease completely
|
||||
if(mob.reagents.has_reagent("spaceacillin"))
|
||||
if(stage == 1 && prob(20))
|
||||
src.cure()
|
||||
return
|
||||
|
||||
//Virus food speeds up disease progress
|
||||
@@ -79,6 +100,7 @@
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.effect.deactivate(mob)
|
||||
mob.virus2.Remove("[uniqueID]")
|
||||
mob.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
/datum/disease2/disease/proc/minormutate()
|
||||
//uniqueID = rand(0,10000)
|
||||
@@ -93,6 +115,8 @@
|
||||
if (prob(5))
|
||||
antigen = text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
if (prob(5) && all_species.len)
|
||||
affected_species = get_infectable_species()
|
||||
|
||||
/datum/disease2/disease/proc/getcopy()
|
||||
var/datum/disease2/disease/disease = new /datum/disease2/disease
|
||||
@@ -101,6 +125,7 @@
|
||||
disease.stageprob = stageprob
|
||||
disease.antigen = antigen
|
||||
disease.uniqueID = uniqueID
|
||||
disease.affected_species = affected_species.Copy()
|
||||
for(var/datum/disease2/effectholder/holder in effects)
|
||||
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
|
||||
newholder.effect = new holder.effect.type
|
||||
@@ -151,6 +176,9 @@ var/global/list/virusDB = list()
|
||||
r += "<BR>Infection rate : [infectionchance * 10]"
|
||||
r += "<BR>Spread form : [spreadtype]"
|
||||
r += "<BR>Progress Speed : [stageprob * 10]"
|
||||
r += "<BR>Affected species:"
|
||||
for(var/S in affected_species)
|
||||
r += "<BR>[S]"
|
||||
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]."
|
||||
|
||||
@@ -175,6 +203,7 @@ proc/virus2_lesser_infection()
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
candidates += G
|
||||
|
||||
if(!candidates.len) return
|
||||
|
||||
candidates = shuffle(candidates)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
/obj/machinery/computer/diseasesplicer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
//use_power(500)
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
@@ -137,6 +137,7 @@
|
||||
if(e.stage == memorybank.stage)
|
||||
e.effect = memorybank.effect
|
||||
splicing = 10
|
||||
dish.virus2.uniqueID = rand(0,10000)
|
||||
// dish.virus2.spreadtype = "Blood"
|
||||
|
||||
else if(href_list["disk"])
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
if(f.stage == src.stage)
|
||||
list += f
|
||||
effect = pick(list)
|
||||
chance = rand(1,6)
|
||||
chance = rand(0,effect.chance_maxm)
|
||||
multiplier = rand(1,effect.maxm)
|
||||
|
||||
/datum/disease2/effectholder/proc/minormutate()
|
||||
switch(pick(1,2,3,4,5))
|
||||
@@ -47,23 +48,6 @@
|
||||
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
|
||||
@@ -219,7 +203,8 @@
|
||||
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)
|
||||
if (B.damage < B.min_broken_damage)
|
||||
B.take_damage(5)
|
||||
else
|
||||
mob.setBrainLoss(50)
|
||||
|
||||
@@ -334,7 +319,12 @@
|
||||
name = "Coldingtons Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (prob(30))
|
||||
mob << "<span class='warning'>You feel like you are about to sneeze!</span>"
|
||||
sleep(5)
|
||||
mob.say("*sneeze")
|
||||
for(var/mob/living/carbon/M in get_step(mob,mob.dir))
|
||||
mob.spread_disease_to(M)
|
||||
if (prob(50))
|
||||
var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
|
||||
M.virus2 = virus_copylist(mob.virus2)
|
||||
|
||||
@@ -13,14 +13,19 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space)) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood)) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 20
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 30
|
||||
|
||||
|
||||
if (vector == "Contact")
|
||||
if(M:gloves) score += 15
|
||||
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:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 15
|
||||
|
||||
|
||||
// log_debug("[M]'s resistance to [vector] viruses: [score]")
|
||||
|
||||
@@ -47,7 +52,7 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
|
||||
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
|
||||
|
||||
var/rval = (dummy.loc in range(1,target))
|
||||
var/rval = dummy.Adjacent(target)
|
||||
dummy.loc = null
|
||||
dummy = null
|
||||
return rval
|
||||
@@ -65,6 +70,17 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
// 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(M.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
if(istype(M,/mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/chimp = M
|
||||
if (!(chimp.greaterform in disease.affected_species))
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/chump = M
|
||||
if (!(chump.species.name in disease.affected_species))
|
||||
return
|
||||
|
||||
// log_debug("Infecting [M]")
|
||||
|
||||
@@ -77,19 +93,22 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
D.minormutate()
|
||||
// log_debug("Adding virus")
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//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
|
||||
infect_virus2(M,D,1)
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//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
|
||||
infect_virus2(M,D,1)
|
||||
M.hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
@@ -135,4 +154,4 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
for (var/ID in victim.virus2)
|
||||
var/datum/disease2/disease/V = victim.virus2[ID]
|
||||
if(V && V.spreadtype != vector) continue
|
||||
infect_virus2(src,V)
|
||||
infect_virus2(src,V)
|
||||
|
||||
Reference in New Issue
Block a user